/* NineWaves site stylesheet — tokens, type, components, motion.
   Measured against mercury.com (14 Oct 2026); see docs/MERCURY_DESIGN_ANALYSIS.md */

/* ───────────────────────── Tokens ───────────────────────── */
:root {
  --ink: #0F1115;
  --ink-2: #1A1D24;
  --ink-3: #242830;
  --light: #FCFCFA;
  --beige: #F5F4F0;
  --beige-2: #EEEDE8;

  --accent: #1C7FD6;
  --accent-hover: #1771C0;
  --accent-tint: rgba(28, 127, 214, .16);
  --accent-tint-hover: rgba(28, 127, 214, .26);
  --accent-light: #CFE3F8;

  --font-display: 'Geist', 'Instrument Sans', system-ui, sans-serif;
  --font-logo: 'Fraunces', Georgia, serif;
  --font-text: 'Geist', 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  --r-pill: 40px;
  --r-card: 16px;
  --r-panel: 12px;
  --r-sm: 8px;
  --r-xs: 4px;

  --container: 1040px;
  --gutter: 24px;
  --nav-h: 72px;

  /* easing library (Section 5.12) */
  --e-std: cubic-bezier(.4, 0, .2, 1);
  --e-out: cubic-bezier(0, 0, .2, 1);
  --e-theme: cubic-bezier(0, 0, .6, 1);
  --e-collapse: cubic-bezier(.16, 0, .13, 1);
  --e-expo: cubic-bezier(.2, 1, .4, 1);
  --e-rise: cubic-bezier(.28, 1.1, .74, 1);
  --e-fade: cubic-bezier(.59, .41, .68, .49);
  --e-quad: cubic-bezier(.25, .46, .45, .94);
  --e-in: cubic-bezier(.6, 0, .8, 0);
  --e-snap: cubic-bezier(.8, 0, .5, 1);
  --e-sym: cubic-bezier(.76, 0, .24, 1);

  --d-fast: 150ms;
  --d-menu-swap: 175ms;
  --d-hover: 200ms;
  --d-menu: 250ms;
  --d-ui: 300ms;
  --d-blur: 500ms;
  --d-theme: 500ms;
  --d-rise: 670ms;
}

/* Theme variables: swapped on the root by data-theme (Section 5.2) */
[data-theme="ink"] {
  --bg: var(--ink);
  --surface: var(--ink-2);
  --surface-2: var(--ink-3);
  --fg: #EDEDF3;
  --fg-muted: #9DA2B0;
  --fg-faint: #6E7383;
  --hair: rgba(140, 150, 180, .22);
  --hair-strong: rgba(140, 150, 180, .4);
  --btn-tint-fg: #EDEDF3;
  --input-bg: rgba(140, 150, 180, .14);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .3);
}
[data-theme="beige"] {
  --bg: var(--beige);
  --surface: #FFFFFF;
  --surface-2: var(--beige-2);
  --fg: #15171C;
  --fg-muted: #5A5A5E;
  --fg-faint: #8A8B90;
  --hair: rgba(60, 60, 70, .14);
  --hair-strong: rgba(60, 60, 70, .3);
  --btn-tint-fg: #15171C;
  --input-bg: rgba(60, 60, 70, .07);
  --shadow-card: 0 1px 2px rgba(20, 20, 30, .06);
}
[data-theme="light"] {
  --bg: var(--light);
  --surface: #F3F4F6;
  --surface-2: #E9EBEF;
  --fg: #15171C;
  --fg-muted: #5A5A5E;
  --fg-faint: #8A8B90;
  --hair: rgba(60, 60, 70, .14);
  --hair-strong: rgba(60, 60, 70, .3);
  --btn-tint-fg: #15171C;
  --input-bg: rgba(60, 60, 70, .07);
  --shadow-card: 0 1px 2px rgba(20, 20, 30, .06);
}

/* ───────────────────────── Base ───────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 24px;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* Everything that carries theme colour transitions together (Mercury's .transition-theme) */
.t, body, .nav, .card, .hair, .btn-tint, .input, .acc-item, .tab-bar, .menu-panel, .mobile-menu, .scan-panel {
  transition: color var(--d-theme) var(--e-theme),
              background-color var(--d-theme) var(--e-theme),
              border-color var(--d-theme) var(--e-theme),
              fill var(--d-theme) var(--e-theme),
              stroke var(--d-theme) var(--e-theme);
}

/* ───────────────────────── Type scale ───────────────────────── */
.h1, .h2, .h2-s, .stat, .quote {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.025em;
  color: var(--fg);
}
.h1 { font-size: 52px; line-height: 58px; }
.h2 { font-size: 38px; line-height: 44px; letter-spacing: -.02em; }
.h2-s { font-size: 26px; line-height: 32px; letter-spacing: -.015em; }
.stat { font-size: 65px; line-height: 1; }
.quote { font-size: 22px; line-height: 30px; font-weight: 500; }
.accent-italic { color: var(--accent); }
.h3 { font-family: var(--font-text); font-size: 16px; line-height: 24px; font-weight: 500; color: var(--fg); }
.sub { font-size: 18px; line-height: 26px; color: var(--fg-muted); }
.body { font-size: 16px; line-height: 24px; color: var(--fg); }
.body-muted { font-size: 16px; line-height: 24px; color: var(--fg-muted); }
.small { font-size: 14px; line-height: 20px; color: var(--fg-muted); }
.label { font-size: 12px; line-height: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-faint); font-weight: 500; }
.mono { font-family: var(--font-mono); font-size: 13px; line-height: 20px; color: var(--fg-muted); }
sup.fn { font-size: 11px; line-height: 0; vertical-align: super; }
sup.fn a { color: var(--accent); }

@media (max-width: 720px) {
  .h1 { font-size: 40px; line-height: 44px; }
  .h2 { font-size: 32px; line-height: 38px; }
  .stat { font-size: 52px; }
}

/* ───────────────────────── Buttons, inputs, links ───────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 20px; border-radius: var(--r-pill);
  font-family: var(--font-text); font-size: 16px; font-weight: 500; white-space: nowrap;
  transition: color var(--d-ui) var(--e-out), background-color var(--d-ui) var(--e-out), border-color var(--d-ui) var(--e-out);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-tint { background: var(--accent-tint); color: var(--btn-tint-fg); }
.btn-tint:hover { background: var(--accent-tint-hover); }
.btn-ghost { color: var(--fg-muted); padding: 0 12px; }
.btn-ghost:hover { color: var(--fg); }
.btn-sm { height: 32px; padding: 0 14px; font-size: 14px; }

.input {
  display: flex; align-items: center; height: 48px; padding: 4px 4px 4px 20px;
  background: var(--input-bg); border-radius: var(--r-pill); gap: 8px;
}
.input input {
  flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: 0;
  font: inherit; font-size: 16px; color: var(--fg);
}
.input input::placeholder { color: var(--fg-faint); }
@media (max-width: 600px) {
  .input { flex-wrap: wrap; height: auto; padding: 8px; border-radius: 24px; }
  .input input { flex-basis: 100%; height: 40px; padding: 0 12px; }
  .input .btn { flex: 1; }
}

.link {
  color: var(--fg); text-decoration: underline; text-decoration-thickness: 1px;
  text-decoration-color: var(--hair-strong); text-underline-offset: 4px;
  transition: text-decoration-color var(--d-ui) var(--e-out);
}
.link:hover { text-decoration-color: var(--fg); }
.link-arrow::after { content: " \2197"; font-size: .9em; }

/* ───────────────────────── Layout helpers ───────────────────────── */
.sec { padding: 120px 0; }
.sec-tight { padding: 80px 0; }
.hair { border-top: 1px solid var(--hair); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stack-sm > * + * { margin-top: 12px; }
.stack > * + * { margin-top: 24px; }
.stack-lg > * + * { margin-top: 48px; }
@media (max-width: 860px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .sec { padding: 80px 0; } }

/* ───────────────────────── Nav ───────────────────────── */
/* The nav is always dark (data-theme="ink" on the element), so the logo never has to switch colour as sections change theme. */
.nav { position: sticky; top: 0; z-index: 50; height: var(--nav-h); color: var(--fg); background: var(--bg); border-bottom: 1px solid var(--hair); }
.nav-inner { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-logo); font-size: 20px; font-weight: 500; letter-spacing: -.01em; }
.nav-logo .logo-mark { width: 34px; height: auto; display: block; }
.nav-logo .mark { width: 28px; height: 28px; border-radius: 7px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 16px; font-family: var(--font-logo); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-item { position: static; }
.nav-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--r-pill); font-size: 15px; font-weight: 500; color: var(--fg-muted); transition: color var(--d-ui) var(--e-out), background-color var(--d-ui) var(--e-out); }
.nav-btn:hover, .nav-item.is-open .nav-btn { color: var(--fg); background: var(--input-bg); }
.nav-btn svg { width: 12px; height: 12px; transition: transform var(--d-menu) var(--e-expo); }
.nav-item.is-open .nav-btn svg { transform: rotate(180deg); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.nav-burger { display: none; width: 40px; height: 40px; place-items: center; }
.nav-burger svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.8; fill: none; }

/* Menu panel: unfolds from the nav edge (Section 5.9) */
.menu-panel {
  position: absolute; left: 0; right: 0; top: var(--nav-h);
  background: var(--surface); color: var(--fg);
  border-radius: 0 0 var(--r-panel) var(--r-panel);
  box-shadow: 0 24px 48px rgba(0, 0, 0, .18);
  transform-origin: top center;
  visibility: hidden; opacity: 0;
  transition: visibility 0s linear var(--d-menu);
}
.nav.has-open .menu-panel.is-open { visibility: visible; opacity: 1; animation: scaleIn var(--d-menu) var(--e-expo) both; transition: none; }
.menu-panel.is-closing { visibility: visible; animation: scaleOut var(--d-menu) var(--e-expo) both; }
.menu-grid { max-width: var(--container); margin: 0 auto; padding: 28px var(--gutter) 32px; display: grid; grid-template-columns: 1.1fr 1fr 1fr 1fr; gap: 32px; }
.menu-group h4 { font-size: 16px; font-weight: 500; margin-bottom: 4px; }
.menu-group p { font-size: 13px; line-height: 18px; color: var(--fg-muted); margin-bottom: 14px; }
.menu-group .label { margin-bottom: 8px; }
.menu-group a { display: block; font-size: 14px; line-height: 20px; padding: 3px 0; color: var(--fg-muted); transition: color var(--d-fast) var(--e-std); }
.menu-group a:hover { color: var(--fg); }
.menu-foot { border-top: 1px solid var(--hair); }
.menu-foot .wrap { display: flex; align-items: center; gap: 12px; padding-top: 16px; padding-bottom: 16px; font-size: 15px; }
.menu-foot .wrap span { color: var(--fg-muted); font-size: 14px; }
.menu-swap { animation: fadeIn var(--d-menu-swap) ease both; }

/* Mobile menu: slides from the right (Section 5.9) */
.mobile-menu {
  position: fixed; inset: 0; z-index: 60; background: var(--surface); color: var(--fg);
  transform: translateX(100%); transition: transform var(--d-ui) var(--e-in);
  display: flex; flex-direction: column; padding: 16px var(--gutter) 24px;
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu .mm-top { display: flex; justify-content: flex-end; height: 56px; align-items: center; }
.mobile-menu .mm-list { border-top: 1px solid var(--hair); }
.mobile-menu .mm-list a { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--hair); font-size: 18px; }
.mobile-menu .mm-cta { margin-top: auto; display: flex; gap: 12px; }
.mobile-menu .mm-cta .btn { flex: 1; }
body.menu-lock { overflow: hidden; }
@media (max-width: 860px) { .nav-links, .nav-cta .btn-ghost { display: none; } .nav-burger { display: grid; } }

/* ───────────────────────── Cards ───────────────────────── */
.card { background: var(--surface); border-radius: var(--r-card); overflow: hidden; }
.card-pad { padding: 28px; }
.card-media { aspect-ratio: 3 / 2; position: relative; overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card-caption { padding: 14px 0 0; }
.card-caption .h3 { margin-bottom: 2px; }

/* Evidence card: hover fades the second layer in over 200 ms (Section 5.6) */
.evidence .layer-b { position: absolute; inset: 0; opacity: 0; transition: opacity var(--d-hover) ease-out; pointer-events: none; }
.evidence:hover .layer-b { opacity: 1; }
.evidence .pause { position: absolute; left: 16px; bottom: 16px; width: 40px; height: 40px; border-radius: 50%; background: rgba(15, 17, 21, .7); color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity var(--d-hover) ease-out; }
.evidence:hover .pause { opacity: 1; }

/* ───────────────────────── Accordion (Section 5.3 / 5.7) ───────────────────────── */
.acc { border-top: 1px solid var(--hair); }
.acc-item { border-bottom: 1px solid var(--hair); }
.acc-head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 18px 0; text-align: left; font-size: 16px; font-weight: 500; color: var(--fg-muted); transition: color var(--d-ui) var(--e-out); }
.acc-item.is-open .acc-head { color: var(--fg); }
.acc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); opacity: 0; transform: scale(.4); transition: opacity var(--d-ui) var(--e-collapse), transform var(--d-ui) var(--e-collapse); flex: none; }
.acc-item.is-open .acc-dot { opacity: 1; transform: scale(1); }
.acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--d-ui) var(--e-collapse); }
.acc-item.is-open .acc-body { grid-template-rows: 1fr; }
.acc-body > div { overflow: hidden; }
.acc-content { padding: 0 0 20px 20px; color: var(--fg-muted); font-size: 15px; line-height: 22px; }
.acc-content .link { display: inline-block; margin-top: 10px; color: var(--fg); }

/* ───────────────────────── Tabs with blur dissolve (Section 5.5) ───────────────────────── */
.tabs-stage { position: relative; display: grid; }
.tab-panel { grid-area: 1 / 1; visibility: hidden; }
.tab-panel.is-active { visibility: visible; animation: tabIn var(--d-ui) ease-in-out var(--d-ui) both; }
.tab-panel.is-leaving { visibility: visible; animation: tabOut var(--d-ui) ease-in-out both; }
.tab-panel .tab-pic { animation: none; }
.tab-panel.is-leaving .tab-pic { animation: blurOut var(--d-blur) var(--e-quad) both; }
.tab-bars { display: flex; gap: 12px; margin-top: 20px; }
.tab-bar { flex: 1; height: 28px; display: flex; align-items: center; border-radius: var(--r-xs); }
.tab-bar i { display: block; width: 100%; height: 4px; border-radius: 2px; background: var(--hair); transition: background-color var(--d-ui) var(--e-out), box-shadow var(--d-ui) var(--e-out); }
.tab-bar:hover i { box-shadow: 0 10px 16px rgba(28, 28, 35, .02), 0 6px 10px rgba(28, 28, 35, .04), 0 0 3px rgba(28, 28, 35, .09); }
.tab-bar.is-active i { background: var(--fg); }

/* ───────────────────────── Marquee (Section 5.4) ───────────────────────── */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee var(--marquee-d, 40s) linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 15px; color: var(--fg-muted); }
.marquee-item .glyph { font-family: var(--font-display); font-size: 22px; color: var(--fg); }

/* ───────────────────────── Section entrance (Section 5.7) ───────────────────────── */
.rise { opacity: 0; translate: 0 50px; }
.rise.is-in { animation: riseUp var(--d-rise) var(--e-rise) 150ms both, fadeIn var(--d-rise) var(--e-fade) both; }

/* ───────────────────────── Scrub hero (Section 5.1) ───────────────────────── */
.scrub { position: relative; height: 2250px; }
.scrub-stage { position: sticky; top: 0; height: 100vh; min-height: 640px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; background: var(--ink); }
.scrub-copy { position: relative; z-index: 2; padding-top: 112px; padding-bottom: 36px; text-align: center; }
.scrub-copy .h1 { max-width: 780px; margin: 0 auto 14px; }
.scrub-copy .sub { max-width: 560px; margin: 0 auto 24px; }
.scrub-copy .input { max-width: 540px; margin: 0 auto; }
.scrub-frames {
  position: relative; align-self: end; width: min(1040px, calc(100% - 48px)); margin: 0 auto; aspect-ratio: 16 / 9; max-height: 100%;
  border-radius: var(--r-card) var(--r-card) 0 0; overflow: hidden; background: #1A1D24;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, .08), 0 30px 80px rgba(0, 0, 0, .5);
  mask-image: linear-gradient(#000 0%, #000 70%, transparent 100%);
}
.scrub-chrome { position: absolute; z-index: 3; left: 0; right: 0; top: 0; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: #1A1D24; border-bottom: 1px solid rgba(255, 255, 255, .06); font-family: var(--font-mono); font-size: 11px; color: #9DA2B0; }
.scrub-chrome i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.scrub-chrome .url { margin-left: 10px; padding: 3px 10px; border-radius: 6px; background: rgba(255, 255, 255, .06); color: #EDEDF3; }
.scrub-frame { position: absolute; left: 0; right: 0; top: 36px; bottom: 0; opacity: 0; transition: opacity var(--d-fast) var(--e-std); }
.scrub-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top center; filter: saturate(.8); }
.scrub-frame.is-active { opacity: 1; }
.scrub-readout { position: absolute; z-index: 4; left: 50%; bottom: 28px; transform: translateX(-50%); padding: 10px 18px; border-radius: var(--r-pill); background: rgba(15, 17, 21, .82); color: #EDEDF3; font-family: var(--font-mono); font-size: 12px; display: flex; gap: 14px; align-items: center; white-space: nowrap; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.scrub-readout b { color: #fff; font-weight: 500; }
.scrub-readout { max-width: calc(100% - 32px); }
.scrub-readout b, .scrub-readout span { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 720px) { .scrub-copy { padding-top: 96px; } .scrub-frames { width: calc(100% - 32px); aspect-ratio: 4 / 3; } .scrub-readout { font-size: 11px; gap: 10px; padding: 8px 14px; } }

/* ───────────────────────── Sticky showcase (Section 5.3) ───────────────────────── */
.showcase { position: relative; height: 2250px; }
.showcase-stage { position: sticky; top: 0; height: 100vh; min-height: 640px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.showcase-screens { position: relative; aspect-ratio: 4 / 3; }
.screen { position: absolute; inset: 0; opacity: 0; transition: opacity var(--d-fast) var(--e-std); }
.screen.is-active { opacity: 1; }
.screen-frame { height: 100%; background: var(--ink-2); border-radius: var(--r-card); box-shadow: 0 30px 60px rgba(0, 0, 0, .35); overflow: hidden; color: #EDEDF3; display: flex; flex-direction: column; }
.screen-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); font-family: var(--font-mono); font-size: 12px; color: #9DA2B0; }
.screen-bar .pill { padding: 2px 8px; border-radius: 10px; background: rgba(28, 127, 214, .2); color: #8CC3F2; }
.screen-body { padding: 16px; flex: 1; overflow: hidden; }
.row { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); font-size: 13px; }
.row img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.row .who { color: #EDEDF3; font-weight: 500; }
.row .meta { color: #9DA2B0; font-family: var(--font-mono); font-size: 11px; }
.row .num { font-family: var(--font-mono); font-size: 12px; color: #9DA2B0; text-align: right; }
.row .num b { color: #EDEDF3; font-weight: 500; }
.domrow { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); font-size: 13px; }
.domrow img { width: 64px; height: 40px; object-fit: cover; object-position: top; border-radius: 4px; }
.domrow .mono { color: #EDEDF3; }
.sev { font-family: var(--font-mono); font-size: 11px; padding: 2px 8px; border-radius: 4px; }
.sev-high { background: rgba(224, 82, 82, .18); color: #F08787; }
.sev-med { background: rgba(217, 119, 6, .18); color: #F2B35B; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 44px; gap: 12px; align-items: center; padding: 8px 0; font-size: 13px; }
.bar-row .track { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 4px; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform 600ms var(--e-out) 120ms; }
.screen.is-active .bar-row .fill { transform: scaleX(1); }
.bar-row .num { font-family: var(--font-mono); font-size: 12px; text-align: right; color: #9DA2B0; }
@media (max-width: 860px) { .showcase { height: auto; } .showcase-stage { position: static; height: auto; grid-template-columns: 1fr; padding-top: 64px; padding-bottom: 64px; } .showcase-screens { aspect-ratio: 4 / 3; } }

/* ───────────────────────── Stats ───────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats > div { padding: 8px 24px 8px 0; border-left: 1px solid var(--hair); padding-left: 24px; }
.stats > div:first-child { border-left: 0; padding-left: 0; }
.stats .small { margin-top: 10px; }
@media (max-width: 860px) { .stats { grid-template-columns: 1fr 1fr; gap: 24px; } .stats > div { border-left: 0; padding-left: 0; } }

/* ───────────────────────── Instant scan panel (Section 11.10) ───────────────────────── */
.scan { max-width: 640px; margin: 0 auto; }
.scan-panel { margin-top: 16px; background: var(--surface); border-radius: var(--r-card); padding: 20px 24px; transform-origin: top center; display: none; }
.scan-panel.is-open { display: block; animation: scaleIn var(--d-menu) var(--e-expo) both; }
.scan-line { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--hair); font-size: 15px; opacity: 0; visibility: hidden; }
.scan-line:last-child { border-bottom: 0; }
.scan-line.is-in { animation: tabIn var(--d-ui) ease-in-out both; }
.scan-line .state { font-family: var(--font-mono); font-size: 12px; color: var(--fg-muted); white-space: nowrap; }
.scan-line .state.ok { color: var(--accent); }

/* ───────────────────────── Specimen-only helpers ───────────────────────── */
.swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.swatch { border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--hair); }
.swatch i { display: block; height: 72px; }
.swatch div { padding: 8px 10px; font-family: var(--font-mono); font-size: 11px; line-height: 16px; color: var(--fg-muted); }
.swatch div b { display: block; font-family: var(--font-text); font-size: 13px; color: var(--fg); font-weight: 500; }
@media (max-width: 860px) { .swatches { grid-template-columns: repeat(3, 1fr); } }
.type-row { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--hair); align-items: baseline; }
.type-row .mono { padding-top: 4px; }
@media (max-width: 720px) { .type-row { grid-template-columns: 1fr; gap: 6px; } }
.ease-row { display: grid; grid-template-columns: 220px 1fr 160px; gap: 24px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.ease-track { position: relative; height: 24px; }
.ease-track::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 2px; background: var(--hair); }
.ease-dot { position: absolute; top: 4px; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); }
.ease-row.is-playing .ease-dot { animation: easeRun var(--dur) var(--curve) both; }
@media (max-width: 720px) { .ease-row { grid-template-columns: 1fr; gap: 8px; } }
.spec-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 18px; }
.spec-table th, .spec-table td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--hair); vertical-align: top; }
.spec-table th { color: var(--fg-faint); font-weight: 500; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.spec-table td { color: var(--fg-muted); }
.spec-table td:first-child { color: var(--fg); font-weight: 500; }
.note { font-size: 13px; line-height: 19px; color: var(--fg-faint); }
.chapter { display: flex; align-items: center; gap: 12px; margin-bottom: 40px; }
.chapter .label { color: var(--accent); }
.chapter .hairline { flex: 1; height: 1px; background: var(--hair); }
.chapter .label { white-space: nowrap; }
@media (max-width: 720px) { .chapter { flex-wrap: wrap; } .chapter .hairline { flex-basis: 100%; order: 3; display: none; } .chapter .note { flex-basis: 100%; } }

/* ───────────────────────── Keyframes ───────────────────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes riseUp { from { translate: 0 50px; } to { translate: 0 0; } }
@keyframes scaleIn { from { opacity: 0; transform: rotateX(-10deg) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes scaleOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: rotateX(-10deg) scale(.9); } }
@keyframes tabIn { from { opacity: 0; visibility: hidden; translate: 0 5px; } to { opacity: 1; visibility: visible; translate: 0 0; } }
@keyframes tabOut { from { opacity: 1; visibility: visible; translate: 0 0; } to { opacity: 0; visibility: hidden; translate: 0 -5px; } }
@keyframes blurOut { from { opacity: 1; filter: blur(0); } to { opacity: 0; filter: blur(4px); } }
@keyframes marquee { to { translate: calc(-50% - 24px) 0; } }
@keyframes easeRun { from { left: 0; } to { left: calc(100% - 16px); } }

/* ───────────────────────── Reduced motion ───────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { opacity: 1; translate: none; }
  .rise.is-in, .menu-panel.is-open, .tab-panel.is-active, .scan-panel.is-open, .scan-line.is-in { animation: none !important; }
  .tab-panel.is-leaving, .tab-panel.is-leaving .tab-pic { animation: none !important; visibility: hidden; }
  .marquee-track { animation: none; }
  .scrub, .showcase { height: auto; }
  .scrub-stage, .showcase-stage { position: static; height: auto; }
  .scrub-frame:not(.is-active) { display: none; }
  .mobile-menu { transition: none; }
  .acc-body, .acc-dot, .evidence .layer-b, .bar-row .fill { transition: none; }
  .scan-line.is-in { opacity: 1; visibility: visible; }
}

/* static hero: one viewport, frames cycle on a timer */
.scrub[data-static] { height: auto; }
.scrub[data-static] .scrub-stage { position: relative; height: 100vh; min-height: 680px; max-height: 960px; }
.scrub[data-static] .scrub-readout { cursor: default; }
.scrub-dots { display: inline-flex; gap: 6px; margin-left: 4px; }
.scrub-dots button { width: 8px; height: 8px; border-radius: 50%; padding: 0; border: 0; background: rgba(255,255,255,.28); cursor: pointer; transition: background var(--d-ui) var(--e-out), transform var(--d-ui) var(--e-out); }
.scrub-dots button.is-active { background: #fff; transform: scale(1.25); }
/* ── Second colour: amber. One job each: signal numbers, counters, arrows, timeline, beige-section eyebrows ── */
:root { --accent-2: #D97706; --accent-2-soft: #FDE8CC; }
[data-theme="ink"] { --accent-2: #F5A524; }
[id] { scroll-margin-top: 88px; }
.stats-band .stat, .statline .stat, .accent-italic { color: var(--accent-2); }
.bullets li::before, .numbered > div::before, .tl-step .k { color: var(--accent-2); }
.tl-step::before { border-color: var(--accent-2); }
.timeline::before { background: var(--accent-2-soft); }
.pull { border-left: 3px solid var(--accent-2); }
[data-theme-section="beige"] .eyebrow, [data-theme-section="beige"] .label { color: var(--accent-2); }
[data-theme-section="beige"] .eyebrow::before { background: var(--accent-2); }
.product .tag.protect { color: var(--fg); } .product .tag.grow { color: var(--accent-2); }
.scrub-dots button.is-active { background: var(--accent-2); }
.marquee-item .glyph { color: var(--accent-2); }
.footer .label { color: var(--accent-2); }
.rail .tab-bar.is-active i { background: var(--accent-2); }
.cta-band .h2 em, .h1 em { font-style: normal; color: var(--accent-2); }
/* static hero: frame fills its box (no aspect lock), stage fits under the in-flow nav */
.scrub[data-static] .scrub-stage { height: calc(100vh - 72px); min-height: 600px; max-height: 900px; }
.scrub[data-static] .scrub-copy { padding-top: 64px; padding-bottom: 28px; }
.scrub[data-static] .scrub-frames { aspect-ratio: auto; height: 100%; width: min(1040px, calc(100% - 48px)); margin: 0 auto; }
.scrub[data-static] .scrub-frame .shotframe.crop { aspect-ratio: auto; width: 100%; height: 100%; border-radius: 14px 14px 0 0; }
.scrub[data-static] .scrub-frame .shotframe.crop .pic { height: calc(100% - 34px); }
.scrub[data-static] .scrub-frame .shotframe.crop .pic img { position: absolute; left: 0; top: 0; width: 100%; height: auto; max-width: none; }
.scrub[data-static] .scrub-readout { bottom: 20px; }
.scrub-readout { width: max-content; max-width: calc(100% - 32px); }
.scrub-readout b, .scrub-readout span { overflow: visible; text-overflow: clip; }
/* mobile hygiene */
html, body { overflow-x: clip; }
.scrub-stage .scrub-readout { position: absolute; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 600px) {
  .scrub-readout { width: auto; max-width: calc(100% - 32px); }
  .scrub-readout [data-scrub-label] { display: none; }
  .compare { min-width: 560px; font-size: 13px; }
  .rail { padding-bottom: 2px; }
}
/* phone hero: let the hero grow so the whole dashboard frame is visible */
@media (max-width: 720px) {
  .scrub[data-static] .scrub-stage { height: auto; min-height: 0; max-height: none; padding-bottom: 76px; }
  .scrub[data-static] .scrub-copy { padding-top: 48px; padding-bottom: 20px; }
  .scrub[data-static] .scrub-frames { height: auto; aspect-ratio: 16 / 10; width: calc(100% - 32px); max-height: none; mask-image: none; border-radius: 12px; }
  .scrub[data-static] .scrub-frame .shotframe.crop { border-radius: 12px; }
  .scrub[data-static] .scrub-frame .shotframe.crop .pic img { width: 100%; height: auto; }
  .scrub[data-static] .scrub-readout { bottom: 18px; }
  .scrub .h1 { font-size: 38px; line-height: 44px; }
}
@media (max-width: 720px) {
  /* frame height = full 16:10 screenshot + the 34px browser bar, so nothing is cropped */
  .scrub[data-static] .scrub-frames { aspect-ratio: auto; height: calc((100vw - 32px) * 0.625 + 34px); }
}
