/* Zonedeck landing page: tokens, type, layout, components and the stage frames.
   Spec: site/DESIGN.md (§2 type, §3 colour, §4 layout, §5 structure, §6 components).
   Nothing in here styles the inside of a .scene: scenes.css owns that. */

/* MARK: Fonts. URLs are relative so site/dev/ pages resolve them too. */

@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/instrument-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/instrument-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Arial reshaped to Instrument Sans' metrics, so the swap does not shift the layout.
   Measured in Chrome: width ratio 1.0136 on body copy at 400; ascent .970 and descent .250 of the em. */
@font-face { font-family: "Instrument Sans Fallback"; src: local("Arial"), local("ArialMT");
  size-adjust: 101.36%; ascent-override: 95.70%; descent-override: 24.66%; line-gap-override: 0%; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/geist-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/geist-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* MARK: Tokens */

:root {
  /* colour (§3.1) */
  --bg: #fbfaf6;
  --surface: #f4f3ef;
  --line: #eceae9;
  --chip: #e8e7e3;
  --ink: #071a31;
  --ink-2: #4f5452;
  --ink-3: #6b6f72;
  --white: #ffffff;
  --focus: #2563d9;
  --field-line: #d5dbe0;
  --field-line-hover: #b9c1c8;
  --error: #b42318;
  --error-line: #d92d20;
  --navy: #071931;
  --navy-line: #112a4c;
  --navy-link: #bac8da;
  --panel: #12141f;
  --r-s: 6px; --r-m: 10px; --r-l: 24px; --r-xl: 32px;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

  /* families (§2.1). No system UI faces. */
  --sans: "Instrument Sans", "Instrument Sans Fallback", "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* focus ring: the colour of the block behind, then the ring (§6.1) */
  --ring-bg: var(--bg);
  --ring: var(--focus);

  /* layout (§4) */
  --max: 1144px;
  --gutter: 48px;
  --inset: 24px;
  --inset-r: 32px;
  --sec: 64px;
  --head-gap: 64px;
  --tail: 240px;
  --hero-top: 96px;

  /* type scale (§2.3), desktop 1280 and up */
  --h1: 64px; --h1-lh: 70px; --h1-ls: -0.043em;
  --h2: 48px; --h2-lh: 54px; --h2-ls: -0.04em;
  --cta: 40px; --cta-lh: 46px; --cta-ls: -0.035em;
  --tag: 48px; --tag-lh: 52px; --tag-ls: -0.04em;
  --h3: 22px; --h3-lh: 28px;
  --tt: 20px; --tt-lh: 26px;
  --cap: 18px; --cap-lh: 26px;
  --lead: 18px; --lead-lh: 26px;
  --word: 20px;
  --fh: 18px; --fh-lh: 24px;
  --pill: 14px;
}

@media (max-width: 1279px) {
  :root {
    --gutter: 40px;
    --h1: 56px; --h1-lh: 62px;
    --h2: 42px; --h2-lh: 48px;
    --cta: 36px; --cta-lh: 42px;
    --tag: 44px; --tag-lh: 48px;
    --cap: 17px; --cap-lh: 25px;
  }
}
@media (max-width: 1023px) {
  :root {
    --gutter: 32px;
    --sec: 48px;
    --head-gap: 40px;
    --tail: 160px;
    --hero-top: 72px;
    --h1: 48px; --h1-lh: 54px;
    --h2: 38px; --h2-lh: 44px;
    --cta: 34px; --cta-lh: 40px;
    --tag: 38px; --tag-lh: 44px;
    --h3: 20px; --h3-lh: 26px;
    --tt: 18px; --tt-lh: 24px;
    --word: 18px;
  }
}
@media (max-width: 599px) {
  :root {
    --gutter: 20px;
    --inset: 8px;
    --inset-r: 24px;
    --tail: 96px;
    --hero-top: 56px;
    --h1: 40px; --h1-lh: 44px; --h1-ls: -0.035em;
    --h2: 32px; --h2-lh: 38px; --h2-ls: -0.03em;
    --cta: 30px; --cta-lh: 36px;
    --tag: 32px; --tag-lh: 38px;
    --cap: 16px; --cap-lh: 24px;
    --lead: 17px; --lead-lh: 24px;
    --fh: 16px; --fh-lh: 22px;
    --pill: 13px;
  }
}

/* MARK: Base */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 48px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html.still { scroll-behavior: auto; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 22px;
  font-weight: 400;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
::selection { background: rgba(37, 99, 217, .18); }

h1, h2 { text-wrap: balance; color: var(--ink); font-weight: 540; }
h3 { text-wrap: balance; }
p { text-wrap: pretty; }
h1 { font-size: var(--h1); line-height: var(--h1-lh); letter-spacing: var(--h1-ls); }
h2 { font-size: var(--h2); line-height: var(--h2-lh); letter-spacing: var(--h2-ls); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.nowrap { white-space: nowrap; }
.small { font-size: 13px; line-height: 18px; color: var(--ink-3); }
.lead { font-size: var(--lead); line-height: var(--lead-lh); color: var(--ink-2); }

/* Focus (§6.1): a gap in the colour behind, then the ring. */
:focus-visible { outline: none; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  box-shadow: 0 0 0 2px var(--ring-bg), 0 0 0 4px var(--ring);
  border-radius: 4px;
}
.skip {
  position: absolute; left: 16px; top: -64px; z-index: 30;
  height: 40px; padding: 0 16px; display: inline-flex; align-items: center;
  border-radius: 8px; background: var(--ink); color: #fff; text-decoration: none;
  font-size: 15px; line-height: 20px; font-weight: 500;
}
.skip:focus-visible { top: 12px; }

/* Icons (§6.11): line icons drawn in currentColor. */
.icon { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.glyph { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* <kbd> (§6.11): one cap, glyphs as SVG, digits and letters in Geist Mono. */
kbd {
  display: inline-flex; align-items: center; justify-content: center; gap: .08em;
  height: 1.4em; min-width: 1.4em; padding: 0 .3em;
  border-radius: 6px; background: #fff;
  box-shadow: inset 0 0 0 1px #dedcd5, 0 1px 0 #dedcd5;
  vertical-align: .1em;
  font-family: var(--mono); font-size: .85em; line-height: 1; font-weight: 600; color: var(--ink);
  white-space: nowrap;
}
kbd svg { width: .8em; height: .8em; flex: none; }

/* MARK: Layout */

.container { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
/* Inset blocks sit var(--inset) from the viewport; their content keeps the page column (§4.1). */
.inset > .container, .inset .container { width: min(var(--max), 100% + 2 * var(--inset) - 2 * var(--gutter)); }
.section { padding-block: var(--sec); }
.section-head { margin-bottom: var(--head-gap); }
.section-head.center { text-align: center; }
.section-head.center h2 { max-width: 820px; margin-inline: auto; }
.eyebrow {
  margin-bottom: 20px;
  font-size: 12px; line-height: 16px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink);
}

/* MARK: Buttons (§6.1) */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: 48px; padding: 0 24px; border: 0; border-radius: 10px;
  font-family: var(--sans); font-size: 16px; line-height: 20px; font-weight: 500;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 150ms var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #13294a; }
.btn-primary:disabled { background: #2a3a52; cursor: progress; transform: none; }
.btn-secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-secondary:hover { background: rgba(7, 26, 49, .05); }
.btn:focus-visible { border-radius: 10px; }
.btn-secondary:focus-visible { box-shadow: inset 0 0 0 1.5px var(--ink), 0 0 0 2px var(--ring-bg), 0 0 0 4px var(--ring); }
.btn-nav { height: 40px; padding: 0 16px; border-radius: 8px; font-size: 15px; line-height: 20px; }
.btn-nav:focus-visible { border-radius: 8px; }

/* MARK: Nav (§5.1) */

.nav-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; }
.nav-shell { position: sticky; top: 0; z-index: 20; padding: 12px 0; }
.nav { position: relative; height: 64px; display: flex; align-items: center; }
/* The pill: 12 beyond the column on each side, radius 20 = button radius 8 + 12. */
.nav::before {
  content: ""; position: absolute; inset: 0 -12px; z-index: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0);
  box-shadow: 0 0 0 1px rgba(7, 26, 49, 0), 0 12px 40px rgba(7, 26, 49, 0);
  transition: background-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.nav > * { position: relative; z-index: 1; }
.is-scrolled .nav::before {
  background: rgba(255, 255, 255, .90);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 0 0 1px rgba(7, 26, 49, .04), 0 12px 40px rgba(7, 26, 49, .08);
}
html.still .nav::before { transition: none; }
@media (prefers-reduced-motion: reduce) { .nav::before { transition: none; } }
.is-scrolled { --ring-bg: #fff; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--word); line-height: 24px; font-weight: 600; letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none;
}
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand:focus-visible { border-radius: 8px; }
.nav-links { display: flex; gap: 32px; margin-left: 48px; }
.nav-links a {
  font-size: 15px; line-height: 20px; font-weight: 500; color: var(--ink); text-decoration: none;
  transition: color 150ms var(--ease-out);
}
.nav-links a:hover { color: rgba(7, 26, 49, .62); }
.nav .btn-nav { margin-left: auto; }

/* MARK: Hero (§5.2) */

.hero { padding-bottom: var(--sec); }
.hero-copy {
  --ring-bg: var(--surface);
  margin: 0 var(--inset);
  border-radius: var(--inset-r);
  background: var(--surface);
  padding: var(--hero-top) 0 calc(48px + var(--tail));
  text-align: center;
}
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.badge {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px;
  border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px #e3e1dc;
  font-size: 13px; line-height: 16px; font-weight: 500; color: var(--ink);
}
.hero h1 { margin-top: 28px; max-width: 720px; }
.hero .lead { margin-top: 32px; max-width: 560px; text-wrap: balance; }
.hero-actions { margin-top: 32px; display: flex; justify-content: center; gap: 16px; }
.hero-note { margin-top: 20px; }
.dot { margin-inline: 4px; }
.showcase-wrap { position: relative; margin-top: calc(-1 * var(--tail)); }

/* MARK: Stage frames (§3.2, §5.3, §7.1). The page owns the frame; scenes.js owns the inside. */

.stage-frame { position: relative; isolation: isolate; overflow: hidden; }
/* Grain under the scene: windows are never grainy. */
.stage-frame::before, .download::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .05;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 220px 220px;
}
.sky {
  background:
    radial-gradient(70% 40% at 50% 0%, rgba(255, 255, 255, .25), transparent 70%),
    linear-gradient(180deg, #72adf6 0%, #9cc8f8 16%, #c2def7 32%, #b4e1ec 46%, #8fcbe4 60%, #4f93dc 77%, #2b63aa 91%, #1d4c86 100%);
}
.lagoon {
  background:
    radial-gradient(70% 40% at 50% 0%, rgba(255, 255, 255, .22), transparent 70%),
    linear-gradient(180deg, #7fb9ea 0%, #a4d4ee 18%, #a2e2e3 38%, #7fd3d0 54%, #45aca7 70%, #2b7c78 86%, #1d5654 100%);
}

.showcase { width: min(var(--max), 100% - 2 * var(--gutter)); margin: 0 auto; border-radius: 32px; padding-top: 24px; }
.showcase > .scene { width: 100%; aspect-ratio: 1144 / 600; }
@media (max-width: 783px) {
  .showcase { max-width: 480px; padding-top: 16px; }
  .showcase > .scene { aspect-ratio: 360 / 320; }
}
@media (max-width: 599px) { .showcase { border-radius: 20px; } }

/* Hero step pills (§6.9) */
.hero-pills { display: flex; justify-content: center; gap: 8px; height: 36px; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 8px;
  border-radius: 18px; background: rgba(255, 255, 255, .42); color: rgba(7, 26, 49, .70);
  font-size: var(--pill); line-height: 16px; font-weight: 500; white-space: nowrap;
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.hero-pill-num {
  display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(7, 26, 49, .08);
  font-family: var(--mono); font-size: 11px; line-height: 1; font-weight: 600;
  transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.hero-pill.is-active { background: #fff; color: var(--ink); }
.hero-pill.is-active .hero-pill-num { background: var(--ink); color: #fff; }
html.still .hero-pill, html.still .hero-pill-num { transition: none; }

/* MARK: Feature tour (§5.5, §6.6) */

.tour {
  display: grid; grid-template-columns: minmax(0, 1fr) 560px; gap: 80px; align-items: center;
}
@media (max-width: 1279px) { .tour { grid-template-columns: minmax(0, 1fr) 496px; gap: 48px; } }
.tour-item { position: relative; border-top: 1px solid var(--line); }
.tour-item:last-child { border-bottom: 1px solid var(--line); }
.tour-progress {
  position: absolute; left: 0; right: 0; top: -1px; height: 2px; overflow: hidden; pointer-events: none;
}
.tour-progress > span {
  display: block; height: 100%; background: var(--ink);
  transform: scaleX(0); transform-origin: 0 50%;
}
.tour-item:not(.is-active) .tour-progress { visibility: hidden; }
html.still .tour-progress { display: none; }

.tour-tab {
  display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 16px;
  padding: 24px 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.tour-tab:focus-visible { border-radius: 8px; }
/* The row's inactive opacity sits on its content, so a focus ring stays at full strength. */
.tour-tab > .tour-icon, .tour-tab > .tour-text { opacity: .42; transition: opacity 200ms var(--ease-out); }
.tour-tab:hover > .tour-icon, .tour-tab:hover > .tour-text,
.tour-tab:focus-visible > .tour-icon, .tour-tab:focus-visible > .tour-text { opacity: .7; }
.is-active > .tour-tab > .tour-icon, .is-active > .tour-tab > .tour-text { opacity: 1; }
.tour-icon {
  display: grid; place-items: center; width: 32px; height: 32px; margin-top: -3px;
  border-radius: 8px; background: var(--chip); color: var(--ink);
  transition: opacity 200ms var(--ease-out), background-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.tour-icon svg { width: 18px; height: 18px; }
.is-active .tour-icon { background: var(--ink); color: #fff; }
.tour-title {
  display: block; font-size: var(--tt); line-height: var(--tt-lh); font-weight: 550;
  letter-spacing: -0.01em; color: var(--ink); text-wrap: balance;
}
.tour-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 300ms var(--ease-out); }
.is-active .tour-body { grid-template-rows: 1fr; }
.tour-body > span { display: block; min-height: 0; overflow: hidden; }
.tour-desc { display: block; margin-top: 8px; min-height: var(--tour-min, 66px); color: var(--ink-2); text-wrap: pretty; }

.tour-stage { display: grid; }
.tour-panel {
  grid-area: 1 / 1; opacity: 0; visibility: hidden;
  transition: opacity 200ms var(--ease-out), visibility 0s linear 200ms;
  border-radius: 24px;
}
.tour-panel.is-active { opacity: 1; visibility: visible; z-index: 1; transition: opacity 300ms var(--ease-out); }
.tour-panel:focus-visible { border-radius: 24px; }
.tour-frame { border-radius: 24px; aspect-ratio: 1; }
.tour-frame > .scene { width: 100%; aspect-ratio: 1; }
.tour-slot { display: none; }

@media (max-width: 1023px) {
  /* Accordion: the open item holds its panel inline (§8.3). */
  .tour { display: block; }
  .tour-stage { display: none; }
  .tour-desc { min-height: 0; }
  .tour-slot { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 300ms var(--ease-out); }
  .tour-item.is-active .tour-slot { grid-template-rows: 1fr; }
  .tour-slot > div { min-height: 0; overflow: hidden; }
  .tour-slot .tour-panel { max-width: 560px; margin: 0 auto; opacity: 1; visibility: visible; transition: none; }
  .tour-slot-pad { padding: 12px 0 24px; }
  .tour-item.is-active .tour-tab { padding-bottom: 0; }
}

/* MARK: Details (§5.6, §6.7) */

.details-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 48px;
  align-items: last baseline; margin-bottom: var(--head-gap);
}
.details-note { max-width: 360px; color: var(--ink-2); text-wrap: balance; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.tile { min-height: 212px; padding: 24px; border-radius: 24px; background: var(--surface); }
.tile-icon { width: 24px; height: 24px; color: var(--ink); }
.tile h3 {
  margin-top: 24px; font-size: var(--h3); line-height: var(--h3-lh); font-weight: 500;
  letter-spacing: -0.012em; color: var(--ink);
}
.tile p { margin-top: 8px; color: var(--ink-2); }
/* Language names (each tagged with its lang) never break inside: 한국어 or 简体中文 would split anywhere. */
.tile [lang] { white-space: nowrap; }
@media (max-width: 1023px) {
  .details-head { grid-template-columns: minmax(0, 1fr); }
  .details-note { margin-top: 16px; max-width: 560px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
  .tiles { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .tile { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 16px; min-height: 0; padding: 20px; border-radius: 20px; }
  .tile h3 { margin-top: 0; }
}

/* MARK: Download (§5.7, §6.2, §6.8) */

.download {
  --ring-bg: #2b5bb0; --ring: #fff;
  position: relative; isolation: isolate; overflow: hidden;
  margin: 0 var(--inset); border-radius: var(--inset-r); color: #fff;
  background:
    radial-gradient(55% 80% at 100% 15%, rgba(174, 117, 218, .85), transparent 60%),
    radial-gradient(60% 90% at 100% 100%, rgba(208, 160, 204, .85), transparent 60%),
    radial-gradient(70% 70% at 0% 0%, #5d70c4, transparent 60%),
    linear-gradient(120deg, #24509f 0%, #2b5bb0 45%, #4a62c0 70%, #8a6fd0 100%);
}
.download-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 480px; gap: 64px; align-items: center;
  padding-block: 96px;
}
.chip {
  display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px;
  background: #fff; color: var(--ink);
  font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.download h2 {
  margin-top: 20px; color: #fff;
  font-size: var(--cta); line-height: var(--cta-lh); letter-spacing: var(--cta-ls);
}
.download-sub { margin-top: 20px; max-width: 520px; color: rgba(255, 255, 255, .9); }
.facts { margin-top: 32px; display: grid; gap: 12px; }
.facts li { display: flex; align-items: center; gap: 12px; font-size: 16px; line-height: 22px; color: #fff; }
.facts svg { width: 20px; height: 20px; flex: none; color: rgba(255, 255, 255, .85); }

/* Equaliser bars behind the card (§3.2): 18 wide, 10 apart, a 200 px band centred on the card.
   The row starts 107 px left of the card, so four bars show in the gap and the card's edge falls in a gap. */
.download-side { position: relative; }
.eq {
  position: absolute; z-index: 0; top: 50%; left: -107px; height: 200px; transform: translateY(-50%);
  display: flex; align-items: center; gap: 10px; pointer-events: none;
}
.eq i { width: 18px; border-radius: 9px; background: rgba(255, 255, 255, .18); }
.eq i:nth-child(6n + 1) { height: 40%; }
.eq i:nth-child(6n + 2) { height: 70%; }
.eq i:nth-child(6n + 3) { height: 100%; }
.eq i:nth-child(6n + 4) { height: 55%; }
.eq i:nth-child(6n + 5) { height: 85%; }
.eq i:nth-child(6n + 6) { height: 45%; }

.form-card {
  --ring-bg: #fff; --ring: var(--focus);
  position: relative; z-index: 1; overflow: hidden;
  padding: 32px; border-radius: 24px; background: #fff; color: var(--ink-2);
  box-shadow: 0 30px 60px -30px rgba(7, 26, 49, .45);
}
.form-title {
  font-size: var(--h3); line-height: var(--h3-lh); font-weight: 500; letter-spacing: -0.012em; color: var(--ink);
}
.form-title:focus-visible { box-shadow: none; }
.signup { margin-top: 24px; display: flex; flex-direction: column; }
.field-label { margin-bottom: 8px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); }
.input {
  width: 100%; height: 48px; padding: 0 14px;
  border: 1px solid var(--field-line); border-radius: 10px; background: #fff;
  font-family: var(--sans); font-size: 16px; line-height: 22px; color: var(--ink);
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
.input::placeholder { color: #8a8f92; opacity: 1; }
.input:hover { border-color: var(--field-line-hover); }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(37, 99, 217, .25); }
.input[aria-invalid="true"] { border-color: var(--error-line); box-shadow: 0 0 0 3px rgba(217, 45, 32, .18); }
.input:read-only { background: #f6f7f8; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.field-error, .form-note {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 14px; line-height: 20px; font-weight: 500; color: var(--error);
}
.field-error { margin-top: 8px; }
.field-error svg, .form-note svg { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.signup .btn { margin-top: 16px; width: 100%; }
.form-note { margin-top: 12px; }
.form-note:empty { display: none; }
.form-fine { margin-top: 16px; }
.form-fine a, .form-done a { color: var(--ink); text-underline-offset: 2px; }
.spinner {
  width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .3); border-top-color: #fff;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-done { text-align: left; }
.done-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; }
.done-icon svg { width: 20px; height: 20px; }
.form-done .form-title { margin-top: 20px; }
.done-text { margin-top: 8px; }
.done-again { margin-top: 16px; }
.done-email { margin-top: 8px; }
/* An address moves to the next line whole; only one longer than the line breaks inside. */
.email { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.is-entering { animation: fade-in 200ms var(--ease-out) both; }
.is-leaving { animation: fade-out 200ms var(--ease-out) both; pointer-events: none; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

@media (max-width: 1279px) {
  .download-grid { grid-template-columns: minmax(0, 1fr) 420px; gap: 48px; padding-block: 80px; }
  .eq { display: none; }
}
@media (max-width: 1023px) {
  .download-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-block: 64px; }
  .download-side { max-width: 560px; }
}
@media (max-width: 599px) {
  .download .container { width: calc(100% - 40px); }
  .download-grid { padding-block: 56px; }
  .form-card { padding: 24px; }
}

/* MARK: Footer (§5.8, §6.10) */

.footer {
  --ring-bg: var(--navy); --ring: #fff;
  margin: 0 var(--inset) var(--inset); border-radius: var(--inset-r); background: var(--navy); color: var(--navy-link);
}
.footer-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 48px;
  padding-top: 96px;
}
.footer-tagline {
  max-width: 520px; color: #fff; font-weight: 540;
  font-size: var(--tag); line-height: var(--tag-lh); letter-spacing: var(--tag-ls); text-wrap: balance;
}
.footer .brand { margin-top: 48px; color: #fff; font-size: 20px; }
.footer-cols { display: flex; gap: 48px; }
.footer-head { margin-bottom: 8px; font-size: var(--fh); line-height: var(--fh-lh); font-weight: 500; color: #fff; letter-spacing: 0; }
.footer-cols a {
  display: inline-block; font-size: 14px; line-height: 26px; color: var(--navy-link); text-decoration: none;
  white-space: nowrap; transition: color 150ms var(--ease-out);
}
.footer-cols a:hover { color: #fff; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 8px 24px;
  margin-top: 64px; padding: 24px 0 48px; border-top: 1px solid var(--navy-line);
  font-size: 14px; line-height: 20px; color: var(--navy-link);
}
@media (max-width: 1279px) {
  .footer-grid { padding-top: 80px; }
  .footer-bottom { padding-bottom: 40px; }
}
@media (max-width: 1023px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); row-gap: 40px; padding-top: 64px; }
  .footer-bottom { flex-direction: column; padding-bottom: 32px; }
}
@media (max-width: 599px) {
  .footer .container { width: calc(100% - 40px); }
  .footer-grid { padding-top: 56px; }
  .footer-cols { flex-wrap: wrap; gap: 32px 40px; }
}

/* MARK: Reveal on scroll (§8.2). Only with motion allowed; page.js adds .is-in. */

html.motion [data-reveal] {
  opacity: 0; transform: translateY(16px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}
html.motion [data-reveal="fade"] { transform: none; }
html.motion [data-reveal].is-in { opacity: 1; transform: none; }

/* MARK: Small screens */

@media (max-width: 1023px) {
  .nav-links { display: none; }
}
@media (max-width: 767px) {
  .br-wide { display: none; }
}
@media (max-width: 599px) {
  .hero h1 { max-width: 100%; }
  .hero-actions { flex-direction: column; align-items: center; gap: 12px; width: 100%; }
  .hero-actions .btn { width: 100%; max-width: 340px; }
}

/* MARK: Plain pages (privacy, 404) */

.doc { padding-top: 40px; padding-bottom: var(--sec); }
.doc-inner { max-width: 720px; }
.doc h1 { font-size: var(--h2); line-height: var(--h2-lh); letter-spacing: var(--h2-ls); }
.doc .updated { margin-top: 12px; }
.doc h2 {
  margin-top: 48px; font-size: var(--h3); line-height: var(--h3-lh); font-weight: 500; letter-spacing: -0.012em;
}
.doc p { margin-top: 12px; font-size: 16px; line-height: 26px; }
.doc h2 + p { margin-top: 12px; }
.doc .updated + h2 { margin-top: 40px; }
.doc strong { font-weight: 600; color: var(--ink); }
.doc a { color: var(--ink); text-underline-offset: 2px; }
.not-found .hero-copy { padding-bottom: var(--hero-top); }
.not-found .eyebrow { margin-bottom: 0; }
.not-found h1 { margin-top: 20px; }
.not-found .lead { margin-top: 24px; }
