/* Keydance shared website shell — one header and footer language across public pages. */
:root {
  --global-paper: #f1eee7;
  --global-paper-bright: #faf7f0;
  --global-ink: #343a43;
  --global-muted: #69717d;
  --global-line: rgba(52, 58, 67, .16);
  --global-orange: #f36f3d;
  --global-blue: #4e76df;
  --global-width: 1180px;
}

[hidden] { display: none !important; }
html:not([data-language-ready]) [data-language-only="en"] { display: none !important; }
.policy-nav-v5 b { color: inherit; font: inherit; }

.global-header {
  position: relative;
  z-index: 40;
  display: block;
  width: 100%;
  border-bottom: 1px solid var(--global-line);
  background:
    linear-gradient(90deg, rgba(78, 118, 223, .045), transparent 22%, transparent 76%, rgba(243, 111, 61, .055)),
    rgba(248, 245, 238, .92);
  color: var(--global-ink);
  backdrop-filter: blur(18px) saturate(112%);
  -webkit-backdrop-filter: blur(18px) saturate(112%);
  pointer-events: auto;
}

.global-header__inner {
  display: grid;
  width: min(var(--global-width), calc(100% - 64px));
  min-height: 82px;
  margin: 0 auto;
  grid-template-columns: minmax(150px, 1fr) auto minmax(240px, 1fr);
  align-items: center;
  gap: clamp(20px, 2.5vw, 38px);
}

.global-brand,
.global-primary-nav a,
.global-download,
.global-footer a {
  color: inherit;
  text-decoration: none;
}

.global-brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-self: start;
  gap: 9px;
  white-space: nowrap;
}

.global-brand img {
  display: block;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 7px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(49, 57, 68, .12), 0 0 0 1px rgba(255, 255, 255, .58);
}

.global-brand__name,
.global-brand small {
  color: var(--global-ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: 14px;
  font-weight: 670;
  line-height: 1;
}

.global-brand__name { margin-left: 1px; letter-spacing: -.025em; }
.global-brand small { font-weight: 620; letter-spacing: .02em; }

.global-primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(15px, 1.9vw, 27px);
}

.global-primary-nav a {
  position: relative;
  padding: 9px 0;
  color: rgba(52, 58, 67, .68);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: clamp(10px, .86vw, 12px);
  font-weight: 570;
  line-height: 1.4;
  letter-spacing: .07em;
  white-space: nowrap;
}

.global-primary-nav a::after {
  position: absolute;
  right: 100%;
  bottom: 1px;
  left: 0;
  height: 1px;
  background: var(--global-orange);
  content: "";
  transition: right .2s ease;
}

.global-primary-nav a:hover,
.global-primary-nav a.is-active,
.global-primary-nav a[aria-current] { color: var(--global-ink); }

.global-primary-nav a:hover::after,
.global-primary-nav a.is-active::after,
.global-primary-nav a[aria-current]::after { right: 0; }

.global-download {
  --nav-glow-x: 50%;
  --nav-glow-y: 50%;
  position: relative;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid rgba(255, 247, 236, .76);
  border-radius: 4px;
  background:
    radial-gradient(circle at var(--nav-glow-x) var(--nav-glow-y), rgba(255, 239, 218, .38) 0 8%, transparent 52%),
    linear-gradient(135deg, #cf6240, #e48659);
  box-shadow: 0 0 0 1px rgba(220, 112, 71, .14), 0 8px 22px rgba(161, 77, 45, .13);
  color: #fffaf2;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
  transition: box-shadow .2s ease, transform .2s ease;
}

.global-header__actions {
  display: flex;
  min-height: 34px;
  min-width: 0;
  align-items: center;
  justify-self: end;
  gap: 10px;
}

.global-language-toggle {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 9px;
  border: 1px solid rgba(52, 58, 67, .2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .38);
  color: rgba(52, 58, 67, .42);
  font: 700 9px/1 "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  letter-spacing: .03em;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.global-header .global-language-toggle {
  min-height: 34px;
  border: 1px solid rgba(52, 58, 67, .2);
  font: 700 9px/1 "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
}

.global-language-toggle:hover {
  border-color: rgba(243, 111, 61, .48);
  background: rgba(255, 255, 255, .7);
}

.global-language-toggle span { transition: color .2s ease, opacity .2s ease; }
.global-language-toggle span:not(.is-active) { opacity: .48; }
.global-language-toggle span.is-active { color: var(--global-ink); opacity: 1; }
.global-language-toggle i { color: rgba(52, 58, 67, .22); font-style: normal; }
.global-download__compact { display: none; }

.global-download > strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 650;
  letter-spacing: .015em;
}

.global-download:hover {
  box-shadow: 0 0 0 1px rgba(220, 112, 71, .18), 0 10px 26px rgba(161, 77, 45, .2);
  transform: translateY(-1px);
}

.global-download .motion-nav-status-dot {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fffaf2;
  box-shadow: 0 0 0 1px rgba(255, 250, 242, .22), 0 0 6px rgba(255, 250, 242, .86);
  animation: global-status-pulse 1.8s ease-in-out infinite;
}

@keyframes global-status-pulse {
  0%, 100% { opacity: .62; transform: scale(.82); }
  50% { opacity: 1; transform: scale(1.12); }
}

.global-header a:focus-visible,
.global-header button:focus-visible,
.global-footer a:focus-visible,
.motion-master-footer a:focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--global-orange);
  outline-offset: 4px;
}

.global-download:focus-visible {
  outline-color: #fffaf2 !important;
  box-shadow: 0 0 0 3px var(--global-orange), 0 10px 26px rgba(161, 77, 45, .2);
}

.motion-home .global-header {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
}

.motion-home .global-header__inner { width: min(var(--global-width), calc(100% - 64px)); }

.global-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, .10);
  background:
    radial-gradient(circle at 80% 30%, rgba(78, 118, 223, .13), transparent 26%),
    #20252d;
  color: rgba(255, 255, 255, .72);
}

.global-footer__inner {
  display: grid;
  width: min(var(--global-width), calc(100% - 64px));
  min-height: 148px;
  margin: 0 auto;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  align-items: center;
  gap: clamp(28px, 4vw, 58px);
}

.global-footer__brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 9px;
  color: #fff;
  white-space: nowrap;
}

.global-footer__brand img {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
}

.global-footer__brand span { display: flex; align-items: baseline; gap: 7px; }
.global-footer__brand strong { font-size: 14px; font-weight: 660; }
.global-footer__brand small { color: rgba(255, 255, 255, .5); font-size: 11px; }

.global-footer nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.4vw, 32px);
}

.global-footer nav a {
  color: rgba(255, 255, 255, .6);
  font-size: 11px;
  white-space: nowrap;
}

.global-footer nav a:hover,
.global-footer nav a[aria-current] { color: #fff; }

.global-footer__meta {
  justify-self: end;
  color: rgba(255, 255, 255, .42);
  font: 9px/1.55 "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
  letter-spacing: .06em;
  text-align: right;
}

@media (max-width: 900px) {
  .global-header__inner { width: min(var(--global-width), calc(100% - 40px)); gap: 20px; }
  .motion-home .global-header__inner { width: min(var(--global-width), calc(100% - 40px)); }
  .global-primary-nav { gap: 14px; }
  .global-header__actions { gap: 7px; }
  .global-footer__inner { width: calc(100% - 40px); }
}

@media (max-width: 760px) {
  .global-header { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .global-header__inner,
  .motion-home .global-header__inner {
    width: calc(100% - 28px);
    min-height: 108px;
    padding: 12px 0 11px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 8px 14px;
  }
  .global-brand { grid-column: 1; grid-row: 1; }
  .global-brand img { width: 26px; height: 26px; flex-basis: 26px; }
  .global-brand__name,
  .global-brand small { font-size: 13px; }
  .global-header__actions { grid-column: 2; grid-row: 1; gap: 7px; }
  .global-language-toggle { min-height: 32px; padding: 7px 8px; }
  .global-header .global-language-toggle { min-height: 32px; }
  .global-download { min-height: 32px; padding: 7px 9px; font-size: 9px; }
  .global-download__full { display: none; }
  .global-download__compact { display: inline; }
  .global-primary-nav {
    width: 100%;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-between;
    gap: 9px;
  }
  .global-primary-nav a { padding: 7px 0; font-size: 9px; letter-spacing: .02em; }
  .motion-master-footer { gap: 14px; }
  .global-footer__inner {
    width: calc(100% - 32px);
    min-height: 0;
    padding: 34px 0;
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .global-footer__brand,
  .global-footer__meta { justify-self: start; }
  .global-footer nav { justify-content: flex-start; flex-wrap: wrap; gap: 14px 24px; }
  .global-footer__meta { text-align: left; }
}

@media (max-width: 380px) {
  .global-header__inner,
  .motion-home .global-header__inner { width: calc(100% - 22px); gap-inline: 9px; }
  .global-brand { gap: 6px; }
  .global-brand small { display: none; }
  .global-download { padding-inline: 7px; }
  .global-language-toggle { padding-inline: 7px; }
  .global-primary-nav { gap: 6px; }
  .global-primary-nav a { font-size: 8.5px; }
  .motion-master-footer-left > span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .global-primary-nav a::after,
  .global-download,
  .global-language-toggle,
  .global-language-toggle span { transition: none; }
  .global-download .motion-nav-status-dot { animation: none; }
}

@media print {
  .global-header { position: static !important; background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .global-download { display: none; }
  .global-footer { background: #fff; color: #222; }
}
