/* ==========================================================================
   Overdrive — landing styles.
   Methodology mirrors games2gether/styles.css: design tokens in :root,
   BEM blocks per section, animation tunables shared with js/config.js
   (numeric values arrive as CSS custom properties written on :root).
   Design rule: FLAT COLOR ONLY — no gradients anywhere. Palette: white,
   near-black ink, boosted blue #1d74ff, plus flat neutral greys.
   ========================================================================== */

/* ---------- Self-hosted variable fonts (latin subsets, no CDN) ---------- */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(assets/fonts/space-grotesk-var.woff2) format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(assets/fonts/inter-var.woff2) format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url(assets/fonts/inter-italic-var.woff2) format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url(assets/fonts/jetbrains-mono-var.woff2) format("woff2");
}
:root {
  /* --- palette (flat) --- */
  --bg: #ffffff;
  --ink: #0b0b0c;                /* near-black display + body ink            */
  --ink-soft: #4a4f58;           /* secondary text on white                  */
  --blue: #1d74ff;               /* boosted blue — THE accent                */
  --blue-press: #0f5ed8;         /* hover/pressed blue (solid)               */
  --blue-soft: #5793ff;          /* links on dark surfaces                   */
  --blue-ghost: #e9f1ff;         /* light blue flat tint                     */
  --blue-deep: #1257cc;          /* empty cells on blue surfaces             */
  --paper: #f5f6f8;              /* light grey section / card surface        */
  --paper-2: #fbfcfe;            /* placeholder zone fill                    */
  --line: #e4e7ec;               /* hairlines on white                       */
  --line-dark: #26272c;          /* hairlines on black                       */
  --panel: #0b0b0c;              /* panel + dark sections                    */
  --panel-2: #131418;            /* dark card surface                        */
  --panel-3: #1b1c21;           /* dark inset surface                       */
  --grey-cell: #2a2b31;          /* empty cache cell on dark                 */
  --grey-dull: #8b93a1;          /* muted mono text                          */

  /* --- typography --- */
  --font-display: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* --- layout --- */
  --max-w: 1280px;
  --pad-x: clamp(20px, 4vw, 72px);
  --pad-section: clamp(72px, 9vw, 140px);
  --radius-card: 0px;
  --radius-chip: 0px;
  --nav-h: 72px;

  /* --- motion --- */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-snap: cubic-bezier(0.4, 0, 0.2, 1);
  /* Animation tunables (defaults; js/config.js overrides at runtime) */
  --strike-ms: 420ms;
  --sharpen-ms: 220ms;
  --sweep-s: 3.2s;
  --travel-ms: 1400ms;
  --worker-pulse-ms: 1600ms;
  --bento-stagger: 90ms;
  --bento-distance: 36px;
  --flip-ms: 340ms;
  --scan-s: 2.6s;
  --faq-ms: 260ms;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { background: none; border: 0; color: inherit; cursor: pointer; font: inherit; padding: 0; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- Shared display title ---------- */
.od-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.06;
  margin: 0 0 0.5em;
}
.od-title__accent { color: var(--blue); }
.od-title--ondark { color: #fff; }
.od-title--onblue { color: #fff; }
.od-title--onblue .od-title__accent { color: var(--ink); }

/* ---------- Shared eyebrow (frame-number style) ---------- */
.od-eyebrow, .hero__eyebrow {
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  margin: 0 0 18px;
  text-transform: uppercase;
}
.od-eyebrow--ondark { color: var(--blue-soft); }
.od-eyebrow--onblue { color: #cfe0ff; }

/* ---------- Buttons ---------- */
.btn {
  align-items: center;
  border: 1.5px solid transparent;
  border-radius: 0px;
  display: inline-flex;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  gap: 8px;
  justify-content: center;
  line-height: 1;
  padding: 12px 22px;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--lg { font-size: 17px; padding: 16px 30px; }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-press); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #26272c; }
.btn--white { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn--white:hover { background: var(--paper); }

/* ---------- Skip link (visible on keyboard focus only) ---------- */
.skip-link {
  background: var(--ink);
  border-radius: 0 0 10px 0;
  color: #fff;
  font-weight: 600;
  left: 0;
  padding: 12px 18px;
  position: fixed;
  top: 0;
  transform: translateY(-110%);
  transition: transform 0.2s var(--ease);
  z-index: 1000;
}
.skip-link:focus-visible { transform: none; }

/* ---------- Entrance reveal (hidden only under html.js) ---------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
html.js .reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  align-items: center;
  background: var(--bg);
  border-bottom: 1.5px solid transparent;
  display: flex;
  gap: 24px;
  height: var(--nav-h);
  padding: 0 var(--pad-x);
  position: sticky;
  top: 0;
  transition: border-color 0.25s var(--ease);
  z-index: 900;
}
.nav[data-scrolled] { border-bottom-color: var(--line); }
.nav__logo { align-items: center; display: inline-flex; }
.nav__wordmark-img { display: block; height: 26px; width: auto; }
.nav__links-wrap { margin-left: auto; }
.nav__links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__link {
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 500;
  padding: 6px 0;
  position: relative;
  transition: color 0.2s var(--ease);
}
.nav__link::after {
  background: var(--blue);
  bottom: 0;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  right: 100%;
  transition: right 0.25s var(--ease);
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { right: 0; }
.nav__right { display: flex; }
.nav__cta { font-size: 14px; padding: 10px 18px; }
/* Page progress: a strip of cache cells that fills as you scroll. */
.nav__progress {
  bottom: 0;
  display: flex;
  gap: 2px;
  height: 3px;
  left: 0;
  position: absolute;
  right: 0;
}
.nav__progress i { background: transparent; flex: 1; transition: background-color 0.2s var(--ease); }
.nav__progress i.is-full { background: var(--blue); }

/* ==========================================================================
   1 — HERO
   ========================================================================== */
.hero { padding: clamp(48px, 7vw, 96px) var(--pad-x) var(--pad-section); }
.hero__inner {
  align-items: center;
  display: grid;
  gap: clamp(36px, 5vw, 64px);
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  margin: 0 auto;
  max-width: var(--max-w);
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 4.8vw, 66px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.04;
  margin: 0 0 24px;
}
/* "waiting" gets struck through by a blue line, then dims. */
.hero__strike { position: relative; transition: color 0.3s var(--ease) calc(var(--strike-ms) * 0.6); white-space: nowrap; }
.hero__strike::after {
  background: var(--blue);
  content: "";
  height: 0.09em;
  left: -2%;
  position: absolute;
  right: -2%;
  top: 55%;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--strike-ms) var(--ease-snap);
}
.hero__strike.is-struck { color: #98a2b3; }
.hero__strike.is-struck::after { transform: scaleX(1); }
.hero__subhead {
  color: var(--ink-soft);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.65;
  margin: 0 0 32px;
  max-width: 540px;
}
.hero__actions { align-items: center; display: flex; flex-wrap: wrap; gap: 22px; margin: 0 0 18px; }
.hero__how { border-bottom: 1.5px solid var(--ink); font-weight: 600; padding-bottom: 2px; transition: color 0.2s var(--ease), border-color 0.2s var(--ease); }
.hero__how:hover { border-color: var(--blue); color: var(--blue); }
.hero__microcopy { color: var(--grey-dull); font-family: var(--font-mono); font-size: 12.5px; margin: 0; }
.hero__panel-caption { color: var(--grey-dull); font-family: var(--font-mono); font-size: 11px; margin: 12px 0 0; text-align: center; }

/* ---------- The Overdrive panel (live mock) ---------- */
.od-panel {
  background: var(--panel);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-card);
  overflow: hidden;
  user-select: none;
}
.od-panel__bar {
  align-items: center;
  border-bottom: 1px solid var(--line-dark);
  display: flex;
  gap: 12px;
  padding: 12px 16px;
}
.od-panel__dots { display: inline-flex; gap: 6px; }
.od-panel__dots i { background: #3a3c44; border-radius: 50%; height: 10px; width: 10px; }
.od-panel__name {
  color: var(--grey-dull);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.od-panel__gain {
  background: var(--blue);
  border-radius: 999px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  margin-left: auto;
  min-width: 52px;
  padding: 4px 10px;
  text-align: center;
}
.od-panel__viewport {
  aspect-ratio: 16 / 9;
  background: var(--panel-3);
  container-type: size;
  cursor: grab;
  margin: 14px;
  border-radius: 0px;
  overflow: hidden;
  position: relative;
  touch-action: none;
}
.od-panel__viewport:active { cursor: grabbing; }
.od-panel__art { inset: 0; position: absolute; }
.od-panel__ball {
  background: var(--blue);
  border-radius: 50%;
  height: 30px;
  left: 0;
  position: absolute;
  top: 0;
  width: 30px;
}
.od-panel__card {
  background: #ffffff;
  border-radius: 0px;
  height: 26cqh;
  left: 36%;
  position: absolute;
  top: 24%;
  width: 24cqw;
}
.od-panel__bars {
  align-items: flex-end;
  bottom: 10%;
  display: flex;
  gap: 6px;
  height: 34%;
  position: absolute;
  right: 8%;
}
.od-panel__bars i { background: #fff; height: 100%; transform-origin: bottom; width: 9px; }
.od-panel__bars i:nth-child(2) { background: var(--blue); }
.od-panel__framecount {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  left: 12px;
  position: absolute;
  top: 10px;
}
.od-panel__quality {
  background: #fff;
  border-radius: 0px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  position: absolute;
  right: 10px;
  top: 10px;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.od-panel__quality.is-proxy { background: var(--blue); color: #fff; }
.od-panel__timeline { cursor: ew-resize; padding: 4px 14px 10px; touch-action: none; }
.od-panel__strip { height: 26px; position: relative; }
.od-panel__cache {
  bottom: 7px;
  display: flex;
  gap: 2px;
  left: 0;
  position: absolute;
  right: 0;
  top: 7px;
}
.od-panel__cache i { background: var(--grey-cell); border-radius: 2px; flex: 1; transition: background-color 0.18s var(--ease); }
.od-panel__cache i.is-full { background: var(--blue); }
.od-panel__playhead {
  background: #fff;
  bottom: 0;
  left: 0;
  margin-left: -1px;
  position: absolute;
  top: 0;
  width: 2px;
}
.od-panel__playhead::before {
  background: #fff;
  border-radius: 2px;
  content: "";
  height: 7px;
  left: 50%;
  position: absolute;
  top: -2px;
  transform: translateX(-50%);
  width: 9px;
}
.od-panel__ruler {
  color: #5b6069;
  display: flex;
  font-family: var(--font-mono);
  font-size: 10px;
  justify-content: space-between;
  margin-top: 4px;
}
.od-panel__status {
  align-items: center;
  border-top: 1px solid var(--line-dark);
  color: var(--grey-dull);
  display: flex;
  font-family: var(--font-mono);
  font-size: 11px;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 16px;
}
.od-panel__state { align-items: center; display: inline-flex; gap: 8px; }
.od-panel__dot { background: #fff; border-radius: 50%; display: inline-block; height: 7px; width: 7px; }
.od-panel__dot[data-mode="ahead"] { animation: od-pulse 1.1s var(--ease) infinite; background: var(--blue); }
.od-panel__dot[data-mode="full"] { background: var(--blue); }
@keyframes od-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.od-panel__hint { text-align: right; }

/* ==========================================================================
   2 — THE PROBLEM (black band)
   ========================================================================== */
.problem { background: var(--panel); color: #fff; padding: var(--pad-section) var(--pad-x); }
.problem__inner {
  align-items: center;
  display: grid;
  gap: clamp(36px, 5vw, 80px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  margin: 0 auto;
  max-width: var(--max-w);
}
.problem__lede { color: #b9bec8; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.7; margin: 0 0 28px; max-width: 520px; }
.problem__punch {
  color: var(--blue-soft);
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}
.problem__demo {
  background: var(--panel-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-card);
  padding: clamp(18px, 2.4vw, 30px);
}
.problem__row + .problem__row { margin-top: 26px; }
.problem__row-head {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.problem__row-head .problem__row-status { margin-left: auto; }
/* The "one value": drag it sideways (or click) and the cache drops. */
.problem__param {
  align-items: center;
  background: var(--panel-3);
  border: 1px solid var(--line-dark);
  border-radius: 0px;
  color: #d6dae2;
  cursor: ew-resize;
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 3px 10px;
  touch-action: none;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
  user-select: none;
}
.problem__param b { color: var(--blue-soft); font-weight: 600; min-width: 34px; text-align: right; }
.problem__param:hover { border-color: var(--blue-soft); }
.problem__param.is-touched { border-color: var(--blue); color: #fff; }
.problem__row-label {
  color: #d6dae2;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.problem__row-label--od { color: var(--blue-soft); }
.problem__row-status {
  align-items: center;
  color: var(--grey-dull);
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 11.5px;
  gap: 8px;
}
.problem__row-status--ready { color: var(--blue-soft); }
.problem__spinner {
  animation: od-spin 0.8s linear infinite;
  border: 2px solid #3a3c44;
  border-radius: 50%;
  border-top-color: #d6dae2;
  display: inline-block;
  height: 13px;
  width: 13px;
}
.problem__spinner.is-sad { animation-play-state: paused; opacity: 0.45; }
@keyframes od-spin { to { transform: rotate(360deg); } }
.problem__dot { background: var(--blue); border-radius: 50%; display: inline-block; height: 7px; width: 7px; }
.problem__strip { display: flex; gap: 2px; height: 16px; position: relative; }
.problem__strip i { background: var(--grey-cell); border-radius: 2px; flex: 1; transition: background-color 0.15s var(--ease); }
.problem__strip[data-ae-strip] i.is-full { background: #9aa1ad; }
.problem__strip.is-wiped { animation: od-shake 0.4s var(--ease-snap); }
@keyframes od-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  60% { transform: translateX(3px); }
}
.problem__strip--od i.is-full { background: var(--blue); }
.problem__sweep {
  background: #fff;
  border-radius: 1px;
  bottom: -3px;
  left: 0;
  position: absolute;
  top: -3px;
  width: 2px;
}
html.js .problem__sweep { animation: od-sweep var(--sweep-s) linear infinite alternate; }
@keyframes od-sweep { from { left: 0; } to { left: calc(100% - 2px); } }
.problem__demo-note {
  color: var(--grey-dull);
  font-family: var(--font-mono);
  font-size: 12px;
  font-style: italic;
  margin: 22px 0 0;
  min-height: 1.4em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.problem__demo-note.is-on { opacity: 1; transform: none; }

/* ==========================================================================
   3 — HOW IT WORKS (flow diagram)
   ========================================================================== */
.flow { padding: var(--pad-section) var(--pad-x); }
.flow__inner { margin: 0 auto; max-width: var(--max-w); }
.flow__copy { margin-bottom: clamp(36px, 4.5vw, 64px); max-width: 780px; }
.flow__lede { color: var(--ink-soft); font-size: clamp(16px, 1.4vw, 18.5px); line-height: 1.7; margin: 0 0 18px; }
.flow__diagram {
  background: var(--paper);
  border-radius: var(--radius-card);
  padding: clamp(22px, 3.4vw, 44px);
}
.flow__lane {
  align-items: stretch;
  display: grid;
  gap: 0;
  grid-template-columns: 1fr 64px 1.15fr 64px 1fr;
}
.flow__node {
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  padding: 20px;
  position: relative;
  z-index: 1;
}
.flow__node--ae { background: var(--ink); color: #fff; }
.flow__node--od { background: var(--blue); border-color: var(--blue); color: #fff; }
.flow__node--screen { background: #fff; }
.flow__node-tag {
  color: var(--grey-dull);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
}
.flow__node-tag--blue { color: #cfe0ff; }
.flow__node-name {
  font-family: var(--font-display);
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 700;
  line-height: 1.15;
}
.flow__node-sub { color: var(--grey-dull); font-size: 12.5px; line-height: 1.45; }
.flow__node-check { color: var(--blue); font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
.flow__cachegrid {
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(8, 1fr);
  margin-top: 6px;
}
.flow__cachegrid i { aspect-ratio: 1; background: var(--blue-deep); border-radius: 2px; transition: background-color 0.2s var(--ease); }
.flow__cachegrid i.is-full { background: #fff; }
.flow__conveyor { align-self: center; height: 24px; position: relative; }
.flow__track { background: #d3d8e0; height: 2px; left: 0; position: absolute; right: 0; top: 11px; }
.flow__packet {
  animation: od-packet var(--pk-ms, var(--travel-ms)) linear forwards;
  background: var(--ink);
  border-radius: 3px;
  height: 10px;
  left: -12px;
  position: absolute;
  top: 7px;
  width: 10px;
}
.flow__conveyor--fast .flow__packet { background: var(--blue); }
@keyframes od-packet { from { left: -12px; } to { left: 100%; } }
.flow__pool { align-items: center; display: flex; flex-direction: column; gap: 12px; margin-top: 30px; position: relative; }
.flow__pool::before { background: #d3d8e0; content: ""; height: 22px; left: 50%; position: absolute; top: -26px; width: 2px; }
.flow__pool-label {
  color: var(--grey-dull);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.flow__workers { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.flow__worker {
  align-items: center;
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 11px;
  gap: 8px;
  padding: 6px 14px;
}
.flow__worker i { background: var(--blue); border-radius: 50%; height: 8px; width: 8px; }
html.js .flow__worker i {
  animation: od-pulse var(--worker-pulse-ms) var(--ease) infinite;
  animation-delay: calc(var(--worker-i) * var(--worker-pulse-ms) / 4);
}
.flow__sr {
  border: 0 !important;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* ==========================================================================
   4 — FEATURES (bento)
   ========================================================================== */
.bento { background: var(--paper); padding: var(--pad-section) var(--pad-x); }
.bento__inner { margin: 0 auto; max-width: var(--max-w); }
.bento__grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(12, 1fr);
  margin-top: clamp(28px, 3.5vw, 48px);
}
.bento__card {
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  grid-column: span var(--span, 4);
  padding: clamp(20px, 2.2vw, 28px);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.bento__card:hover { box-shadow: 6px 6px 0 var(--blue); transform: translate(-2px, -2px); }
/* Cascade: cards rise one by one (order = --card-index, from the PHP loop). */
html.js .bento__grid .bento__card {
  opacity: 0;
  transform: translateY(var(--bento-distance));
  transition: opacity 0.55s var(--ease) calc(var(--card-index, 0) * var(--bento-stagger)),
              transform 0.55s var(--ease) calc(var(--card-index, 0) * var(--bento-stagger)),
              box-shadow 0.25s var(--ease);
}
html.js .bento__grid.is-in .bento__card { opacity: 1; transform: none; }
html.js .bento__grid.is-in .bento__card:hover { transform: translate(-2px, -2px); }
.bento__head { align-items: center; display: flex; gap: 12px; }
.bento__icon {
  align-items: center;
  background: var(--blue);
  border-radius: var(--radius-chip);
  display: inline-flex;
  flex: none;
  height: 40px;
  justify-content: center;
  width: 40px;
}
.bento__title { font-family: var(--font-display); font-size: clamp(17px, 1.6vw, 21px); font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.bento__text { color: var(--ink-soft); font-size: 14.5px; line-height: 1.6; margin: 0; }
.bento__media { margin-top: auto; }
.bento__media-hint { color: var(--grey-dull); font-family: var(--font-mono); font-size: 10.5px; margin: 8px 0 0; }

/* Placeholder zone — swap for a real screenshot later. */
.bento__ph {
  align-items: center;
  background: var(--paper-2);
  border: 1.5px dashed #b9c2d0;
  border-radius: 0px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  min-height: 150px;
}
.bento__ph-plus { color: #9aa6b8; font-family: var(--font-display); font-size: 36px; font-weight: 500; line-height: 1; }
.bento__ph-label { color: #9aa6b8; font-family: var(--font-mono); font-size: 11px; }
/* CMS-filled slots: the uploaded image replaces the "+" placeholder. */
.bento__ph--filled { border: 1.5px solid var(--line); border-style: solid; padding: 0; position: relative; }
.bento__ph-img { border-radius: 0px; height: 100%; inset: 0; object-fit: cover; position: absolute; width: 100%; }
.bento__face-img { border-radius: 0px; height: 100%; inset: 0; object-fit: cover; position: absolute; width: 100%; }

/* Infographic #1 — instant scrubbing */
.bento__scrub-view {
  background: var(--panel);
  border-radius: 0px;
  container-type: size;
  height: 150px;
  overflow: hidden;
  position: relative;
}
.bento__scrub-frame { color: #fff; font-family: var(--font-mono); font-size: 11px; left: 10px; position: absolute; top: 8px; }
.bento__scrub-quality {
  background: #fff;
  border-radius: 0px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  position: absolute;
  right: 8px;
  top: 8px;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.bento__scrub-quality.is-proxy { background: var(--blue); color: #fff; }
.bento__scrub-shape {
  background: var(--blue);
  border-radius: 0px;
  bottom: 24%;
  height: 30px;
  left: 6%;
  position: absolute;
  transition: transform 0.16s var(--ease);
  width: 30px;
}
.bento__scrub-strip { cursor: ew-resize; height: 20px; margin-top: 10px; position: relative; touch-action: none; }
.bento__scrub-ticks, .bento__ahead-ticks { display: flex; gap: 2px; height: 12px; margin-top: 4px; }
.bento__scrub-ticks i, .bento__ahead-ticks i { background: #dbe1ea; border-radius: 2px; flex: 1; transition: background-color 0.15s var(--ease); }
.bento__scrub-ticks i.is-full, .bento__ahead-ticks i.is-full { background: var(--blue); }
.bento__scrub-head, .bento__ahead-head {
  background: var(--ink);
  bottom: 0;
  left: 30%;
  margin-left: -1px;
  position: absolute;
  top: 0;
  width: 2px;
}
.bento__scrub-head::before, .bento__ahead-head::before {
  background: var(--ink);
  border-radius: 2px;
  content: "";
  height: 6px;
  left: 50%;
  position: absolute;
  top: -2px;
  transform: translateX(-50%);
  width: 8px;
}

/* Infographic #2 — renders ahead */
.bento__ahead-strip { height: 20px; position: relative; }
.bento__ahead { margin-top: auto; }

/* Before / after flip */
.bento__flip-stage {
  aspect-ratio: 16 / 9;
  cursor: pointer;
  display: block;
  position: relative;
  width: 100%;
}
.bento__flip-face {
  align-items: center;
  border-radius: 0px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  inset: 0;
  justify-content: center;
  opacity: 0;
  position: absolute;
  transform: translateX(10px);
  transition: opacity var(--flip-ms) var(--ease), transform var(--flip-ms) var(--ease);
}
.bento__flip-face--a { background: var(--paper-2); border: 1.5px dashed #b9c2d0; }
.bento__flip-face--b { background: var(--blue-ghost); border: 1.5px dashed var(--blue); }
.bento__flip-face--b .bento__ph-plus, .bento__flip-face--b .bento__ph-label { color: var(--blue); }
.bento__flip-face.is-front, .bento__flip-stage:not(.is-b) .bento__flip-face--a, .bento__flip-stage.is-b .bento__flip-face--b {
  opacity: 1;
  transform: none;
}
.bento__flip-stage.is-b .bento__flip-face--a { transform: translateX(-10px); }
.bento__flip-toggle { display: inline-flex; gap: 6px; margin-top: 12px; }
.bento__flip-opt {
  border: 1.5px solid var(--ink);
  border-radius: 0px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.bento__flip-opt.is-on { background: var(--ink); color: #fff; }

/* Measured gain */
.bento__card--gain .bento__media {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 4vw, 48px);
  margin-top: 8px;
}
.bento__gain-readout { align-items: baseline; display: flex; flex-wrap: wrap; gap: 14px; }
.bento__gain-number {
  color: var(--blue);
  font-family: var(--font-display);
  font-size: clamp(56px, 6.5vw, 92px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.bento__gain-caption { color: var(--grey-dull); font-family: var(--font-mono); font-size: 12px; max-width: 200px; }
.bento__gain-bar { background: var(--line); border-radius: 999px; flex: 1; height: 10px; min-width: 200px; overflow: hidden; }
.bento__gain-bar i {
  background: var(--blue);
  border-radius: 999px;
  display: block;
  height: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s linear;
  width: 100%;
}

/* ---------- Tilt 3D surfaces (flat depth: solid shadow, no gradient) ----------
   JS (OD_CONFIG.tilt) writes --tilt-x/--tilt-y/--tilt-scale/--tilt-sx/--tilt-sy
   and toggles [data-tilted] on every [data-tilt] element. The shadow is SOLID
   (zero blur) and slides opposite the lifted corner; icon + media pop out on
   translateZ. Wire a new surface by adding data-tilt to it. */
[data-tilt] { will-change: transform; }
[data-tilt][data-tilted] {
  box-shadow: var(--tilt-sx, 0px) var(--tilt-sy, 0px) 0 var(--tilt-shadow, var(--blue));
  transform: perspective(var(--tilt-perspective, 900px)) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) scale(var(--tilt-scale, 1));
  transform-style: preserve-3d;
  transition: none;
  z-index: 2;
}
/* Specificity boost: the live tilt transform must beat the bento cascade
   (.is-in resets transform) and the :hover translate at equal specificity. */
html.js .bento__grid.is-in .bento__card[data-tilted] {
  box-shadow: var(--tilt-sx, 0px) var(--tilt-sy, 0px) 0 var(--blue);
  transform: perspective(var(--tilt-perspective, 900px)) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) scale(var(--tilt-scale, 1));
  transform-style: preserve-3d;
  transition: none;
}
.bento__icon, .bento__media { transition: transform 0.35s var(--ease); }
.bento__card[data-tilted] .bento__icon { transform: translateZ(var(--tilt-lift-icon, 26px)); }
.bento__card[data-tilted] .bento__media { transform: translateZ(var(--tilt-lift-media, 14px)); }

/* ==========================================================================
   5 — FIDELITY (blue band)
   ========================================================================== */
.fidelity { background: var(--blue); color: #fff; padding: var(--pad-section) var(--pad-x); }
.fidelity__inner {
  align-items: center;
  display: grid;
  gap: clamp(36px, 5vw, 80px);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin: 0 auto;
  max-width: var(--max-w);
}
.fidelity__lede { color: #eaf2ff; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.7; margin: 0 0 26px; max-width: 520px; }
.fidelity__checks { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.fidelity__check {
  align-items: center;
  background: #fff;
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  gap: 8px;
  padding: 8px 16px;
}
.fidelity__check span { color: var(--blue); }
.fidelity__frames { align-items: center; display: flex; gap: clamp(12px, 2vw, 24px); justify-content: center; }
.fidelity__frame { background: #fff; border-radius: 14px; margin: 0; padding: 12px; }
.fidelity__grid {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(var(--px-cols, 12), 14px);
  grid-auto-rows: 14px;
  overflow: hidden;
  position: relative;
}
.fidelity__px--0 { background: #f1f5fb; }
.fidelity__px--1 { background: var(--ink); }
.fidelity__px--2 { background: var(--blue); }
.fidelity__px--3 { background: #fff; }
.fidelity__scan { background: var(--ink); bottom: 0; left: 0; position: absolute; top: 0; width: 2px; }
html.js .fidelity__scan { animation: od-scan var(--scan-s) linear infinite; }
@keyframes od-scan { from { left: 0; } to { left: calc(100% - 2px); } }
.fidelity__frame-label { color: var(--ink-soft); font-family: var(--font-mono); font-size: 10.5px; margin-top: 10px; text-align: center; }
.fidelity__equals { color: #fff; font-family: var(--font-display); font-size: clamp(28px, 3vw, 44px); font-weight: 700; }
.fidelity__readout { color: #cfe0ff; font-family: var(--font-mono); font-size: 12.5px; margin: 22px 0 0; text-align: center; }
.fidelity__readout strong { color: #fff; }

/* ==========================================================================
   6 — BETA SIGNUP
   ========================================================================== */
.beta { padding: var(--pad-section) var(--pad-x); }
.beta__inner {
  display: grid;
  gap: clamp(36px, 5vw, 80px);
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  margin: 0 auto;
  max-width: var(--max-w);
}
.beta__lede { color: var(--ink-soft); font-size: clamp(16px, 1.4vw, 19px); line-height: 1.7; margin: 0 0 26px; max-width: 460px; }
.beta__points { display: grid; gap: 12px; list-style: none; margin: 0; padding: 0; }
.beta__points li { align-items: baseline; color: var(--ink); display: flex; font-size: 15.5px; font-weight: 500; gap: 10px; }
.beta__point-mark { color: var(--blue); font-family: var(--font-mono); font-weight: 600; }
.beta-form {
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-card);
  padding: clamp(22px, 3vw, 36px);
}
.beta-form__body { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.beta-form__body[hidden] { display: none; }
.beta-form__field { display: flex; flex-direction: column; gap: 7px; }
.beta-form__field--full { grid-column: 1 / -1; }
.beta-form__field:nth-child(3) { grid-column: 1 / -1; } /* AE version spans full */
.beta-form__label {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.beta-form__label em { color: var(--blue); font-style: normal; }
.beta-form__label small { color: var(--grey-dull); font-size: 10.5px; letter-spacing: 0.06em; text-transform: none; }
.beta-form__field input,
.beta-form__field select,
.beta-form__field textarea {
  appearance: none;
  background: #fff;
  border: 1.5px solid #d4dae3;
  border-radius: 0px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 12px 14px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  width: 100%;
}
.beta-form__field textarea { resize: vertical; }
.beta-form__field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%230b0b0c' stroke-width='2'/></svg>");
  background-position: right 14px center;
  background-repeat: no-repeat;
  padding-right: 38px;
}
.beta-form__field input::placeholder,
.beta-form__field textarea::placeholder { color: #a8b0bc; }
.beta-form__field input:focus,
.beta-form__field select:focus,
.beta-form__field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-ghost);
  outline: none;
}
.beta-form__honeypot {
  height: 1px;
  left: -9999px;
  overflow: hidden;
  position: absolute;
  top: auto;
  width: 1px;
}
.beta-form__foot { display: flex; flex-direction: column; gap: 12px; grid-column: 1 / -1; margin-top: 4px; }
.beta-form__submit { justify-content: center; width: 100%; }
.beta-form__privacy { color: var(--grey-dull); font-family: var(--font-mono); font-size: 11.5px; margin: 0; text-align: center; }
.beta-form__status {
  background: var(--paper);
  border-left: 3px solid var(--blue);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 14px;
}
.beta-form__success { align-items: center; display: flex; flex-direction: column; gap: 10px; padding: clamp(24px, 4vw, 48px) 12px; text-align: center; }
.beta-form__success[hidden] { display: none; }
.beta-form__success-mark {
  align-items: center;
  background: var(--blue);
  border-radius: 16px;
  color: #fff;
  display: inline-flex;
  font-size: 30px;
  height: 64px;
  justify-content: center;
  width: 64px;
}
.beta-form__success-title { font-family: var(--font-display); font-size: clamp(30px, 3.4vw, 44px); font-weight: 700; margin: 6px 0 0; }
.beta-form__success-lede { color: var(--ink-soft); font-size: 16.5px; margin: 0; }

/* ==========================================================================
   7 — REQUIREMENTS (strip)
   ========================================================================== */
.reqs { background: var(--panel); border-bottom: 1px solid var(--line-dark); padding: 18px var(--pad-x); }
.reqs__list {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 0;
  justify-content: center;
  list-style: none;
  margin: 0 auto;
  max-width: var(--max-w);
  padding: 0;
}
.reqs__item { color: #d6dae2; font-family: var(--font-mono); font-size: 12.5px; }
.reqs__item + .reqs__item::before { color: var(--blue-soft); content: "\00B7"; font-weight: 700; margin: 0 16px; }

/* ==========================================================================
   8 — FAQ
   ========================================================================== */
.faq { padding: var(--pad-section) var(--pad-x); }
.faq__inner { margin: 0 auto; max-width: 860px; }
.faq__list { border-top: 1.5px solid var(--ink); margin-top: clamp(24px, 3vw, 40px); }
.faq__item { border-bottom: 1.5px solid var(--line); }
.faq__question {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-family: var(--font-display);
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 700;
  gap: 18px;
  justify-content: space-between;
  list-style: none;
  padding: 22px 2px;
  transition: color 0.2s var(--ease);
}
.faq__question::-webkit-details-marker { display: none; }
.faq__question:hover { color: var(--blue); }
.faq__toggle { flex: none; height: 20px; position: relative; width: 20px; }
.faq__toggle::before, .faq__toggle::after {
  background: var(--blue);
  border-radius: 1px;
  content: "";
  left: 50%;
  position: absolute;
  top: 50%;
  transition: transform var(--faq-ms) var(--ease-snap);
}
.faq__toggle::before { height: 2.5px; transform: translate(-50%, -50%); width: 18px; }
.faq__toggle::after { height: 18px; transform: translate(-50%, -50%); width: 2.5px; }
.faq__item.is-open .faq__toggle::after, .faq__item[open]:not(.is-open) .faq__toggle::after { transform: translate(-50%, -50%) rotate(90deg) scaleY(0.1); }
.faq__answer { color: var(--ink-soft); font-size: 15.5px; line-height: 1.7; margin: 0; max-width: 680px; padding: 0 2px 22px; }

/* ==========================================================================
   LEGAL page
   ========================================================================== */
.legal { padding: clamp(48px, 7vw, 96px) var(--pad-x) var(--pad-section); }
.legal__inner { margin: 0 auto; max-width: 760px; }
.legal__updated { color: var(--grey-dull); font-family: var(--font-mono); font-size: 12px; margin: 0 0 40px; }
.legal__section { border-top: 1.5px solid var(--ink); padding-top: 28px; }
.legal__section + .legal__section { margin-top: 48px; }
.legal__section { scroll-margin-top: calc(var(--nav-h) + 16px); }
.legal__title { font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; margin: 0 0 18px; }
.legal__section p { color: var(--ink-soft); font-size: 15.5px; line-height: 1.75; margin: 0 0 16px; }
.legal__section strong { color: var(--ink); }
.legal__link { border-bottom: 1.5px solid var(--blue); color: var(--blue); font-weight: 500; }
.legal__back { margin-top: 36px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { background: var(--panel); color: #fff; padding: clamp(48px, 6vw, 80px) var(--pad-x) 0; }
.footer__inner {
  display: grid;
  gap: clamp(32px, 5vw, 96px);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr);
  margin: 0 auto;
  max-width: var(--max-w);
  padding-bottom: clamp(36px, 5vw, 64px);
}
.footer__brand { display: flex; flex-direction: column; gap: 16px; }
.footer__logo { display: inline-flex; }
.footer__logo img { display: block; height: 32px; width: auto; }
.footer__tagline { color: var(--blue-soft); font-size: 17px; font-style: italic; font-weight: 600; margin: 0; }
.footer__cols {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.footer__col-title {
  color: var(--grey-dull);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  margin: 0 0 14px;
  text-transform: uppercase;
}
.footer__col-links { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.footer__link { color: #d6dae2; font-size: 14px; transition: color 0.2s var(--ease); }
.footer__link:hover { color: var(--blue-soft); }
.footer__copy {
  border-top: 1px solid var(--line-dark);
  color: #6d7480;
  font-family: var(--font-mono);
  font-size: 11.5px;
  margin: 0 calc(-1 * var(--pad-x));
  padding: 22px var(--pad-x) 26px;
  text-align: center;
}

/* ==========================================================================
   Back to top
   ========================================================================== */
.go-up {
  bottom: 22px;
  height: 52px;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  right: 22px;
  transform: translateY(10px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  width: 52px;
  z-index: 800;
}
.go-up.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.go-up:hover { transform: translateY(-3px); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .hero__inner, .problem__inner, .fidelity__inner, .beta__inner { grid-template-columns: 1fr; }
  .hero__panel { max-width: 640px; }
  .bento__card { grid-column: span 6; }
  .bento__card--gain { grid-column: span 12; }
  .flow__lane { grid-template-columns: 1fr; }
  .flow__conveyor { height: 48px; justify-self: center; width: 24px; }
  .flow__track { bottom: 0; height: auto; left: 11px; right: auto; top: 0; width: 2px; }
  .flow__packet { animation-name: od-packet-v; left: 7px; top: -12px; }
  @keyframes od-packet-v { from { top: -12px; } to { top: 100%; } }
}
@media (max-width: 860px) {
  .nav__links-wrap { display: none; }
}
@media (max-width: 480px) {
  .nav__wordmark-img { height: 22px; }
}
@media (max-width: 680px) {
  .bento__card, .bento__card--gain { grid-column: span 12; }
  .footer__inner { grid-template-columns: 1fr; }
  .fidelity__frames { flex-wrap: wrap; }
  .beta-form__body { grid-template-columns: 1fr; }
  .beta-form__field, .beta-form__field--full, .beta-form__foot, .beta-form__status { grid-column: auto; }
  .reqs__item { display: block; text-align: center; width: 100%; }
  .reqs__item + .reqs__item::before { content: none; }
  .od-panel__hint { display: none; }
}

/* ==========================================================================
   Reduced motion & no-JS guards
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
  html.js .bento__grid .bento__card { opacity: 1; transform: none; }
  .hero__strike::after { transform: scaleX(1); }
  .hero__strike { color: #98a2b3; }
  .problem__sweep { left: 40%; }
  .fidelity__scan { left: 62%; }
  .problem__spinner { animation: none; }
}
