/* iPhone Agent — launch site (dark, cinematic, scroll-driven)
   All tokens live on :root. Phone internals are em-based so one --pw scales
   the whole handset. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --f-cap: 13px; --f-sm: 15px; --f-body: 17px; --f-lede: 22px; --f-h3: 22px;
  --f-claim: clamp(32px, 4.5vw, 56px);
  --f-display: clamp(48px, 8vw, 96px);
  --lh: 1.6;

  --s-1: 8px; --s-2: 16px; --s-3: 24px; --s-4: 32px; --s-5: 40px; --s-6: 48px; --s-8: 64px; --s-12: 96px; --s-16: 128px;
  --section-pad: var(--s-16);
  --container: 1200px;
  --gutter: var(--s-3);

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px;

  --t-in: 240ms; --t-out: 160ms;
  --ease-out: cubic-bezier(.2,.7,.2,1);
  --ease-in: cubic-bezier(.5,0,.8,.4);

  /* dark-only palette */
  --bg: #0A0A0C;
  --bg-2: #141417;
  --panel: #1C1C21;
  --label: #F5F5F7;
  --label-2: #A1A1A6;
  --label-3: #6E6E73;
  --sep: rgba(255,255,255,.10);
  --sep-2: rgba(255,255,255,.16);
  --fill: rgba(255,255,255,.06);
  --fill-2: rgba(255,255,255,.10);
  --accent: #2997FF;
  --accent-hover: #64B2FF;
  --green: #30D158;
  --glow: rgba(41,151,255,.28);
  --shadow-phone: 0 40px 90px rgba(0,0,0,.6);

  --header-h: 60px;
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0; font-family: var(--font); font-size: var(--f-body); line-height: var(--lh);
  color: var(--label); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: clip;
}
h1, h2, h3, p, ul, ol, pre, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: .18em; }
code { font-family: var(--mono); font-size: .92em; }
p code { background: var(--fill); padding: .1em .38em; border-radius: 6px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-sm); }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; left: var(--s-2); top: -100px; z-index: 100; padding: var(--s-1) var(--s-2); background: var(--accent); color: #000; border-radius: var(--r-md); font-weight: 600; }
.skip:focus { top: var(--s-2); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,12,.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--sep);
}
.header-row { --od-gap: var(--s-3); min-height: var(--header-h); }
.brand { --od-gap: 10px; color: var(--label); font-weight: 600; }
.brand:hover { text-decoration: none; color: var(--label); }
.brand-mark { color: var(--accent); }
.brand-name { font-size: var(--f-sm); letter-spacing: -.01em; }
.site-nav { --od-gap: var(--s-3); margin-inline-start: var(--s-2); }
.site-nav a { color: var(--label-2); font-size: var(--f-sm); padding: 10px 0; }
.site-nav a:hover { color: var(--label); text-decoration: none; }
.header-actions { --od-gap: var(--s-1); margin-inline-start: auto; }
.lang-toggle { flex: none; white-space: nowrap; border: 0.5px solid var(--sep-2); background: transparent; color: var(--label); border-radius: 999px; padding: 0 14px; font-size: var(--f-cap); font-weight: 600; transition: background var(--t-in) var(--ease-out); }
.lang-toggle:hover { background: var(--fill); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; font-size: var(--f-sm); font-weight: 600; white-space: nowrap;
  border: 0.5px solid transparent;
  transition: background var(--t-in) var(--ease-out), color var(--t-in) var(--ease-out), border-color var(--t-in) var(--ease-out), transform var(--t-in) var(--ease-out);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: var(--f-cap); }
.btn-primary { background: var(--label); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: #000; }
.btn-outline, .btn-ghost { background: transparent; color: var(--label); border-color: var(--sep-2); }
.btn-outline:hover, .btn-ghost:hover { background: var(--fill); color: var(--label); }

/* ---------- glow (the only gradient on the page) ---------- */
.glow { position: absolute; z-index: 0; pointer-events: none; border-radius: 50%; background: radial-gradient(closest-side, var(--glow), transparent); filter: blur(24px); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: var(--s-12) var(--s-12); }
.hero .glow { width: 900px; height: 900px; right: -220px; top: -160px; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-8); align-items: center; min-height: calc(100vh - var(--header-h) - var(--s-12) - var(--s-12)); }
.hero-copy { --od-gap: var(--s-4); }
.eyebrow { font-size: var(--f-cap); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
html[lang="zh-CN"] .eyebrow { text-transform: none; letter-spacing: .04em; }
.display { font-size: var(--f-display); line-height: 1.02; font-weight: 700; letter-spacing: -.03em; overflow-wrap: anywhere; }
.lede { font-size: var(--f-lede); line-height: 1.45; color: var(--label-2); max-width: 30ch; }
.hero-actions { --od-gap: var(--s-2); }

/* value bar */
.values { --od-cols: 4; --od-gap: var(--s-4); position: relative; z-index: 1; margin-top: var(--s-12); padding-top: var(--s-5); border-top: 0.5px solid var(--sep); }
.values .v-t { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.values .v-d { font-size: var(--f-sm); color: var(--label-2); line-height: 1.45; margin-top: 8px; }

/* ---------- demo (hero right) ---------- */
.demo-slot { position: relative; z-index: 1; min-width: 0; }
.demo { --overhang: 276px; --console-w: 300px; position: relative; padding-left: var(--overhang); width: max-content; }
.phone-hero { --pw: clamp(260px, 24vw, 340px); }
.console {
  position: absolute; left: 0; bottom: 40px; width: var(--console-w); z-index: 2;
  display: grid; grid-template-rows: auto auto auto;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
  font-family: var(--mono); font-size: 13px; line-height: 1.5;
  background: rgba(20,20,23,.8); border: 0.5px solid var(--sep); border-radius: var(--r-lg); overflow: hidden;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.console-bar { justify-content: space-between; padding: 10px 14px; border-bottom: 0.5px solid var(--sep); color: var(--label-3); font-size: 11.5px; }
.console-title { font-weight: 600; letter-spacing: .02em; }
.console-focus { --od-gap: 6px; font-family: var(--font); color: var(--green); }
.console-focus .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(48,209,88,.18); }
.console-body { padding: 14px; }
.cmd-line { color: var(--label); overflow-wrap: anywhere; min-height: 3em; }
.cmd-line .prompt { color: var(--accent); font-weight: 600; }
.caret { display: inline-block; width: 7px; height: 1.05em; vertical-align: -.15em; background: var(--label); margin-left: 1px; animation: blink 1s steps(2) infinite; }
.steps { display: grid; gap: 5px; margin-top: 10px; }
.step { display: grid; grid-template-columns: 16px 78px minmax(0,1fr); gap: 8px; align-items: baseline; color: var(--label-2);
  opacity: 0; transform: translateY(4px); transition: opacity var(--t-in) var(--ease-out), transform var(--t-in) var(--ease-out); }
.step.is-on { opacity: 1; transform: none; }
.step .n { color: var(--label-3); text-align: right; }
.step .tool { color: var(--accent); font-weight: 600; }
.step .why { font-family: var(--font); color: var(--label-2); }
.summary { display: grid; gap: 4px; margin-top: 12px; padding-top: 10px; border-top: 0.5px solid var(--sep);
  opacity: 0; transform: translateY(4px); transition: opacity var(--t-in) var(--ease-out), transform var(--t-in) var(--ease-out); }
.summary.is-on { opacity: 1; transform: none; }
.sum-meta { color: var(--green); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; }
.sum-answer { font-family: var(--font); color: var(--label); font-size: 16px; }
.you { --od-gap: 8px; padding: 10px 14px; border-top: 0.5px solid var(--sep); font-family: var(--font); font-size: 12px; color: var(--label-2); }
.you .pointer { color: var(--label); animation: wander 6s ease-in-out infinite; flex: none; }
.you-typed { font-family: var(--mono); color: var(--label-3); overflow: hidden; white-space: nowrap; text-overflow: clip; flex: 1 1 0; min-width: 0; }
.you-caret { width: 1.5px; height: 14px; background: var(--accent); animation: blink 1s steps(2) infinite; flex: none; }

/* ---------- phone (em-based; --pw scales everything) ---------- */
.phone {
  --pw: 340px;
  width: var(--pw); aspect-ratio: 0.487; font-size: calc(var(--pw) / 34);
  border-radius: 5.6em; padding: 0.7em; position: relative; flex: none;
  background: linear-gradient(160deg, #3A3A3E, #1A1A1C);
  box-shadow: var(--shadow-phone), inset 0 0 0 1px rgba(255,255,255,.10), inset 0 0 0 2px rgba(0,0,0,.9);
}
.phone::before, .phone::after { content: ""; position: absolute; width: .3em; background: #2A2A2E; border-radius: .2em; }
.phone::before { right: -.4em; top: 9em; height: 4.4em; }
.phone::after { left: -.4em; top: 7.2em; height: 2.6em; box-shadow: 0 4em 0 #2A2A2E, 0 7.8em 0 #2A2A2E; }
.phone-screen { position: relative; height: 100%; overflow: hidden; border-radius: 4.9em; background: #F2F2F7; color: #000; font-family: var(--font); font-size: 1.45em; line-height: 1.3; }
.status-bar { position: absolute; z-index: 5; left: 0; right: 0; top: 0; justify-content: space-between; padding: .9em 1.6em 0; height: 2.6em; font-size: 1em; }
.status-bar .time { font-weight: 600; font-size: .92em; }
.status-bar .island { position: absolute; left: 50%; top: .75em; width: 7.4em; height: 2.1em; border-radius: 1.2em; background: #000; transform: translateX(-50%); }
.status-bar .signal { --od-gap: .3em; }
.status-bar .bars { width: 1em; height: .7em; background: linear-gradient(to right, #000 0 20%, transparent 20% 30%, #000 30% 50%, transparent 50% 60%, #000 60% 80%, transparent 80% 90%, #000 90%); }
.status-bar .batt { width: 1.5em; height: .75em; border: 1px solid #000; border-radius: .2em; padding: 1px; background: linear-gradient(to right, #000 0 80%, transparent 80%); background-clip: content-box; }
.screens { position: absolute; inset: 0; }
.screen { position: absolute; inset: 0; padding: 3.2em .9em 0; opacity: 0; transform: translateX(2em); transition: opacity 280ms var(--ease-out), transform 280ms var(--ease-out); pointer-events: none; overflow: hidden; }
.screen.is-current { opacity: 1; transform: none; }
.screen.is-past { opacity: 0; transform: translateX(-1.4em); }
.scr-nav { --od-gap: .3em; color: #0A84FF; font-size: .85em; margin-bottom: .4em; }
.scr-nav .back { width: .55em; height: .55em; border-left: .16em solid #0A84FF; border-bottom: .16em solid #0A84FF; transform: rotate(45deg); margin-left: .2em; }
.scr-title { font-size: 1.55em; font-weight: 700; letter-spacing: -.02em; margin: .2em .3em .5em; }
.group { background: #fff; border-radius: .7em; overflow: hidden; }
.group + .group { margin-top: 1em; }
.row { --od-gap: .7em; min-height: 2.5em; padding: 0 .8em; position: relative; }
.row + .row { border-top: 0.5px solid rgba(60,60,67,.2); }
.row .ic { width: 1.4em; height: 1.4em; border-radius: .35em; flex: none; }
.row .chev { width: .5em; height: .5em; border-right: .15em solid #C7C7CC; border-top: .15em solid #C7C7CC; transform: rotate(45deg); flex: none; margin-right: .2em; }
.row .val { color: #8E8E93; flex: none; }
.row.is-hl { background: #E5F1FF; }
.row .tog { width: 3.2em; height: 1.9em; border-radius: 1em; background: #E9E9EB; flex: none; position: relative; }
.row .tog::after { content: ""; position: absolute; top: .15em; left: .15em; width: 1.6em; height: 1.6em; border-radius: 50%; background: #fff; box-shadow: 0 .1em .3em rgba(0,0,0,.25); }
.row .tog.on { background: #34C759; }
.row .tog.on::after { left: 1.45em; }
.scr-sub { font-size: .78em; color: #6E6E73; text-transform: uppercase; letter-spacing: .04em; margin: 1em .9em .4em; }
/* vision state: a soft highlight sweeps row by row */
.screen.is-scan .row { animation: rowscan 4.5s linear infinite; }
.screen.is-scan .group:nth-of-type(1) .row:nth-child(1) { animation-delay: 0.0s; }
.screen.is-scan .group:nth-of-type(1) .row:nth-child(2) { animation-delay: 0.28s; }
.screen.is-scan .group:nth-of-type(1) .row:nth-child(3) { animation-delay: 0.56s; }
.screen.is-scan .group:nth-of-type(1) .row:nth-child(4) { animation-delay: 0.84s; }
.screen.is-scan .group:nth-of-type(1) .row:nth-child(5) { animation-delay: 1.12s; }
.screen.is-scan .group:nth-of-type(1) .row:nth-child(6) { animation-delay: 1.4s; }
.screen.is-scan .group:nth-of-type(2) .row:nth-child(1) { animation-delay: 1.4s; }
.screen.is-scan .group:nth-of-type(2) .row:nth-child(2) { animation-delay: 1.68s; }
.screen.is-scan .group:nth-of-type(2) .row:nth-child(3) { animation-delay: 1.96s; }
.screen.is-scan .group:nth-of-type(2) .row:nth-child(4) { animation-delay: 2.24s; }
.screen.is-scan .group:nth-of-type(2) .row:nth-child(5) { animation-delay: 2.52s; }
.screen.is-scan .group:nth-of-type(2) .row:nth-child(6) { animation-delay: 2.8s; }
.screen.is-scan .group:nth-of-type(3) .row:nth-child(1) { animation-delay: 2.8s; }
.screen.is-scan .group:nth-of-type(3) .row:nth-child(2) { animation-delay: 3.08s; }
.screen.is-scan .group:nth-of-type(3) .row:nth-child(3) { animation-delay: 3.36s; }
.screen.is-scan .group:nth-of-type(3) .row:nth-child(4) { animation-delay: 3.64s; }
.screen.is-scan .group:nth-of-type(3) .row:nth-child(5) { animation-delay: 3.92s; }
.screen.is-scan .group:nth-of-type(3) .row:nth-child(6) { animation-delay: 4.2s; }

.ripple { position: absolute; z-index: 6; left: var(--rx, 50%); top: var(--ry, 50%); width: 2.4em; height: 2.4em; margin: -1.2em 0 0 -1.2em; border-radius: 50%; background: rgba(10,132,255,.35); box-shadow: 0 0 0 2px rgba(10,132,255,.6); opacity: 0; transform: scale(.4); pointer-events: none; }
.ripple.is-on { animation: ripple 520ms var(--ease-out) forwards; }
.home-indicator { position: absolute; z-index: 5; left: 50%; bottom: .6em; width: 6em; height: .35em; border-radius: .2em; background: #000; transform: translateX(-50%); }

/* home screen */
.screen.home { padding-top: 3.6em; background: radial-gradient(circle at 30% 18%, #26324A, #12151C 55%, #0B0C10 100%); }
.widgets { display: grid; grid-template-columns: 1fr 1fr; gap: .8em; padding: 0 .5em 1em; }
.wg { border-radius: 1.4em; padding: .9em 1em; min-height: 9.6em; color: #fff; display: flex; flex-direction: column; }
.wg.weather { background: #1E5AA8; }
.wg-city { font-size: .85em; font-weight: 600; }
.wg-temp { font-size: 2.6em; font-weight: 500; line-height: 1.05; letter-spacing: -.03em; }
.wg-cond { font-size: .78em; margin-top: auto; }
.wg-hl { font-size: .78em; opacity: .85; white-space: nowrap; }
.wg.cal, .wg.batt { background: rgba(28,28,30,.92); border: 1px solid rgba(255,255,255,.08); }
.wg-day { font-size: .72em; color: #FF453A; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.wg-date { font-size: 1.9em; font-weight: 600; line-height: 1.05; }
.wg-ev { font-size: .68em; display: flex; gap: .4em; align-items: center; margin-top: .35em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wg-ev i { width: .3em; height: 1em; border-radius: .2em; background: #0A84FF; flex: none; }
.wg-ev i.o { background: #FF9F0A; }
.wg-ev i.g { background: #30D158; }
.wg.batt { align-items: center; }
.wg.batt .wg-day { color: #A1A1A6; align-self: flex-start; }
.ring { width: 5.4em; height: 5.4em; border-radius: 50%; border: .55em solid #30D158; border-right-color: rgba(255,255,255,.15); display: grid; place-items: center; margin-top: .5em; }
.ring b { font-size: 1em; }
.screen.home .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1em .6em; padding: 0 .4em; }
.app { display: grid; justify-items: center; gap: .3em; font-size: .72em; color: #fff; text-align: center; }
.app i { display: block; width: 4.2em; height: 4.2em; border-radius: 1em; }
.app span { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dock { position: absolute; left: .8em; right: .8em; bottom: 1.6em; display: grid; grid-template-columns: repeat(4, 1fr); gap: .6em; padding: .8em .4em; border-radius: 1.4em; background: rgba(255,255,255,.18); }
.dock .app span { display: none; }
.dots { position: absolute; left: 50%; bottom: 7.6em; transform: translateX(-50%); display: flex; gap: .4em; }
.dots i { width: .4em; height: .4em; border-radius: 50%; background: rgba(255,255,255,.4); }
.dots i.on { background: #fff; }

/* ledger app */
.screen.ledger { background: #F2F2F7; }
.ledger-head { padding: .2em .4em .8em; }
.ledger-head .t { font-size: 1.1em; font-weight: 600; }
.ledger-head .total { font-size: 1.9em; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; }
.ledger-head .sub { font-size: .8em; color: #8E8E93; }
.ledger-plus { position: absolute; right: 1.2em; top: 3.4em; width: 2.2em; height: 2.2em; border-radius: 50%; background: #0A84FF; color: #fff; font-size: 1em; line-height: 2.2em; text-align: center; font-weight: 600; }
.row .cat { width: 2em; height: 2em; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font-size: .8em; font-weight: 700; }
.row .amt { flex: none; font-weight: 600; white-space: nowrap; }
.row.is-new { background: #E9F6EC; }
.chart { display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: .5em; height: 6em; padding: 0 .6em; margin: .2em 0 .4em; }
.chart i { display: block; height: calc(var(--v) / var(--max) * 100%); border-radius: .3em .3em 0 0; background: #30B0C7; opacity: .8; }
.chart i:last-child { background: #0A84FF; opacity: 1; }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5em; margin-top: 1em; }
.keys span { padding: .7em 0; text-align: center; background: #fff; border-radius: .6em; font-size: 1.1em; font-weight: 500; }
.form .field + .field { margin-top: .5em; }
.form { padding: .4em; }
.form .amount { font-size: 2.4em; font-weight: 700; letter-spacing: -.02em; padding: .3em .2em; white-space: nowrap; }
.form .amount small { font-size: .5em; color: #8E8E93; margin-right: .2em; }
.form .amount .blank { color: #C7C7CC; }
.chips { display: flex; flex-wrap: wrap; gap: .4em; padding: .4em .2em; }
.chips span { padding: .3em .8em; border-radius: 1em; background: #fff; font-size: .85em; color: #1D1D1F; }
.chips span.on { background: #0A84FF; color: #fff; }
.form .field { margin-top: .6em; padding: .7em .8em; background: #fff; border-radius: .7em; color: #8E8E93; }
.form .field.filled { color: #000; }
.form .save { margin-top: 1em; padding: .8em; border-radius: .8em; background: #0A84FF; color: #fff; text-align: center; font-weight: 600; }

/* memory notes */
.screen.memory { background: #F2F2F7; }
.mem { padding: .6em .8em; background: #fff; border-radius: .7em; font-size: .85em; line-height: 1.4; }
.mem + .mem { margin-top: .6em; }
.mem b { display: block; font-size: 1em; }
.mem span { display: block; color: #6E6E73; }
.mem .path { display: block; font-family: var(--mono); font-size: .9em; color: #0A84FF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@keyframes blink { to { opacity: 0; } }
@keyframes ripple { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(1.4); } }
@keyframes rowscan { 0%, 100% { background: transparent; box-shadow: none; } 6%, 18% { background: rgba(10,132,255,.16); box-shadow: inset 0 0 0 .12em rgba(10,132,255,.55); } 28% { background: transparent; box-shadow: none; } }
@keyframes wander { 0%, 100% { transform: translate(0,0); } 30% { transform: translate(5px,-3px); } 60% { transform: translate(-3px,2px); } }

/* ---------- story: sticky stage + panels ---------- */
.story { position: relative; border-top: 0.5px solid var(--sep); overflow-x: clip; }
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-8); align-items: start; }
.panels { display: flex; flex-direction: column; }
.panel { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; gap: var(--s-3); padding-block: var(--s-12); border-bottom: 0.5px solid var(--sep); }
.panel:last-child { border-bottom: 0; }
.panel-n { font-family: var(--mono); font-size: var(--f-cap); color: var(--accent); letter-spacing: .08em; }
.claim { font-size: var(--f-claim); line-height: 1.08; font-weight: 700; letter-spacing: -.025em; }
.panel-body { font-size: 19px; line-height: 1.55; color: var(--label-2); max-width: 46ch; }
.steps-compare { --od-gap: var(--s-4); max-width: 360px; margin-top: var(--s-2); }
.steps-compare .num { font-size: clamp(48px, 5vw, 64px); font-weight: 700; letter-spacing: -.03em; line-height: 1; color: var(--label-3); }
.steps-compare .num.accent { color: var(--accent); }
.steps-compare .cap { font-size: var(--f-sm); color: var(--label-2); margin-top: 6px; }
.note { font-size: var(--f-sm); color: var(--label-2); max-width: 60ch; }

.stage-col { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); display: grid; place-items: center; }
.stage { --spw: min(300px, 36vh); position: relative; display: grid; grid-template-rows: auto auto; justify-items: center; align-content: center; gap: var(--s-3); width: 100%; height: 100%; }
.glow-stage { width: min(620px, 100%); height: auto; aspect-ratio: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.phone-stage { --pw: var(--spw); grid-area: 1 / 1; position: relative; z-index: 1; }

/* overlays anchored to the stage, revealed by state */
.ov { grid-area: 1 / 1; position: absolute; z-index: 2; width: max-content; max-width: 260px; opacity: 0; transform: translateY(8px); transition: opacity var(--t-in) var(--ease-out), transform var(--t-in) var(--ease-out); pointer-events: none;
  background: rgba(20,20,23,.85); border: 0.5px solid var(--sep-2); border-radius: var(--r-md); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-size: var(--f-cap); color: var(--label); }
.stage[data-state="sealed"] .ov[data-for="sealed"],
.stage[data-state="background"] .ov[data-for="background"],
.stage[data-state="vision"] .ov[data-for="vision"],
.stage[data-state="model"] .ov[data-for="model"] { opacity: 1; transform: none; }
.ov-zeros { --od-gap: 6px; right: calc(100% + 16px); top: 18%; padding: 12px 14px; }
.ov-zeros .od-row { --od-gap: 10px; }
.ov-zeros b { font-size: 22px; font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; min-width: 1.2ch; }
.ov-mac { --od-gap: 8px; right: calc(100% + 16px); bottom: 14%; padding: 10px 14px; }
.ov-mac .pointer { color: var(--label); animation: wander 6s ease-in-out infinite; }
.ov-vision { --od-gap: 6px; left: calc(100% + 16px); top: 16%; padding: 12px 14px; }
.ov-vision .od-row { --od-gap: 8px; }
.ov-vision .sw { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.sw-ocr { background: var(--accent); }
.sw-vis { background: var(--green); }
.ov-providers { --od-gap: 8px; left: 50%; top: calc(100% + 16px); transform: translate(-50%, 8px); width: max-content; max-width: min(100%, 420px); justify-content: center; padding: 10px 12px; font-family: var(--mono); background: transparent; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
.stage[data-state="model"] .ov-providers { transform: translate(-50%, 0); }
.ov-providers span { padding: 6px 12px; border-radius: 999px; background: rgba(20,20,23,.85); border: 0.5px solid var(--sep-2); }

/* ---------- code ---------- */
.code { --od-gap: var(--s-1); background: var(--bg-2); border: 0.5px solid var(--sep); border-radius: var(--r-md); padding: 6px 6px 6px var(--s-2); max-width: 640px; }
.code pre { font-family: var(--mono); font-size: 14px; line-height: 1.6; overflow-x: auto; padding-block: 8px; -webkit-overflow-scrolling: touch; }
.code-block { padding: var(--s-2) var(--s-3); }
.copy { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--label-2); font-size: var(--f-cap); font-weight: 600; flex: none; transition: background var(--t-in) var(--ease-out), color var(--t-in) var(--ease-out); }
.copy:hover { background: var(--fill); color: var(--label); }
.copy.is-done { color: var(--green); }

/* ---------- marquee band ---------- */
.band { padding-block: var(--s-8); border-top: 0.5px solid var(--sep); border-bottom: 0.5px solid var(--sep); background: var(--bg-2); overflow: hidden; }
.band-label { font-size: var(--f-h3); font-weight: 600; letter-spacing: -.01em; margin-bottom: var(--s-4); }
.marquee { overflow: hidden; mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
.marquee + .marquee { margin-top: var(--s-2); }
.marquee-track { display: flex; gap: var(--s-2); width: max-content; animation: marquee 45s linear infinite; }
.marquee-track.reverse { animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track li { font-family: var(--mono); font-size: var(--f-sm); padding: 10px 18px; border-radius: 999px; background: var(--fill); border: 0.5px solid var(--sep); color: var(--label); white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding-block: var(--section-pad); }
.section-alt { background: var(--bg-2); }
.section-head { --od-gap: var(--s-3); max-width: 62ch; margin-bottom: var(--s-8); }
h3 { font-size: var(--f-h3); line-height: 1.3; font-weight: 600; letter-spacing: -.015em; }
.sub { font-size: 20px; line-height: 1.5; color: var(--label-2); }
.more { font-size: var(--f-sm); font-weight: 600; }

.facts { --od-gap: var(--s-6); }
.fact { --od-gap: var(--s-2); padding-top: var(--s-3); border-top: 0.5px solid var(--sep-2); }
.fact-n { font-family: var(--mono); font-size: var(--f-cap); color: var(--accent); letter-spacing: .06em; }
.fact p { color: var(--label-2); font-size: var(--f-sm); }

.docs { --od-gap: var(--s-2); }
.doc { --od-gap: 4px; display: grid; padding: var(--s-3); border-radius: var(--r-lg); background: var(--panel); border: 0.5px solid var(--sep); color: var(--label); height: 100%; transition: border-color var(--t-in) var(--ease-out), transform var(--t-in) var(--ease-out); }
.doc:hover { text-decoration: none; color: var(--label); border-color: var(--accent); }
.doc-n { font-family: var(--mono); font-size: var(--f-cap); color: var(--label-3); }
.doc-t { font-weight: 600; font-size: var(--f-sm); }
.doc-d { font-size: var(--f-cap); color: var(--label-2); }
.contrib { --od-cols: 2; --od-gap: var(--s-4); margin-top: var(--s-8); padding-top: var(--s-6); border-top: 0.5px solid var(--sep); align-items: center; }
.contrib .od-stack { --od-gap: var(--s-1); }
.contrib p { color: var(--label-2); font-size: var(--f-sm); }
.contrib-actions { --od-gap: var(--s-2); justify-content: flex-end; }

/* ---------- footer ---------- */
.site-footer { padding-block: var(--s-6); border-top: 0.5px solid var(--sep); font-size: var(--f-cap); color: var(--label-2); }
.site-footer .od-stack { --od-gap: var(--s-2); }
.footer-row { --od-gap: var(--s-3); }
.footer-row .brand-name { color: var(--label); }
.fine { color: var(--label-3); }

/* ---------- reveal on enter ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
.facts .reveal:nth-child(2) { transition-delay: 40ms; }
.facts .reveal:nth-child(3) { transition-delay: 80ms; }

/* trust */
.trust { --od-cols: 3; --od-gap: var(--s-3); }
.tcard { --od-gap: var(--s-2); padding: var(--s-4); border-radius: var(--r-lg); background: var(--panel); border: 0.5px solid var(--sep); }
.tcard-ic { color: var(--accent); }
.tcard p { color: var(--label-2); font-size: var(--f-sm); }
.trust .reveal:nth-child(2) { transition-delay: 40ms; }
.trust .reveal:nth-child(3) { transition-delay: 80ms; }

/* provider wall */
.wall-section { padding-bottom: var(--s-12); }
.wall-section .section-head { margin-bottom: var(--s-6); }
.wall { overflow: hidden; }
.marquee-track.logos { gap: var(--s-6); animation-duration: 60s; padding-block: 4px; }
.logo { display: flex; align-items: center; gap: 12px; white-space: nowrap; color: var(--label); font-size: 17px; font-weight: 600; letter-spacing: -.01em; opacity: .92; }
.logo img { display: block; width: 28px; height: 28px; }
.logo-text span { padding: 8px 16px; border-radius: 999px; border: 0.5px solid var(--sep-2); font-size: var(--f-sm); }

@media (hover: hover) { .doc:hover { transform: translateY(-2px); } }

/* ---------- breakpoints ---------- */
@media (min-width: 1440px) { :root { --container: 1280px; } }
@media (max-width: 1279px) {
  .story-grid { grid-template-columns: minmax(0, 1fr) minmax(320px, 42%); gap: var(--s-6); }
  .stage { --spw: min(280px, 34vh); }
  .ov { position: relative; grid-area: 2 / 1; inset: auto; transform: none !important; width: auto; max-width: 100%; }
  .ov-providers { justify-content: center; }
}
@media (max-width: 1023px) {
  :root { --section-pad: var(--s-12); }
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-8); min-height: 0; }
  .lede { max-width: 40ch; }
  .demo { padding-left: 0; width: 100%; display: grid; justify-items: center; gap: var(--s-3); }
  .phone-hero { --pw: min(320px, 72vw); }
  .console { position: static; width: min(100%, 440px); box-shadow: none; }
  .values { --od-cols: 2; }
  .story-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .stage-col { order: -1; height: auto; top: var(--header-h); z-index: 5; padding-block: var(--s-3); background: linear-gradient(to bottom, var(--bg) 82%, transparent); }
  .stage { height: auto; }
  .stage { --spw: min(220px, 26vh); gap: var(--s-2); }
  .glow-stage { width: min(360px, 100%); }
  .panel { min-height: 0; padding-block: var(--s-8); }
  .docs { --od-cols: 2; }
}
@media (max-width: 767px) {
  :root { --section-pad: var(--s-8); --gutter: var(--s-2); }
  .site-nav { display: none; }
  .header-row { --od-gap: var(--s-2); }
  .hero { padding-block: var(--s-8); }
  .hero .glow { width: 520px; height: 520px; right: -160px; top: -80px; }
  .phone-hero { --pw: min(280px, 72vw); }
  .lede { font-size: 19px; }
  .panel-body { font-size: 17px; }
  .facts, .docs, .contrib, .trust { --od-cols: 1; }
  .tcard { display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: var(--s-3); row-gap: 4px; align-items: start; }
  .tcard-ic { grid-row: 1 / span 2; margin-top: 2px; }
  .contrib-actions { justify-content: flex-start; }
  .values { margin-top: var(--s-8); }
}
@media (max-width: 400px) {
  .values { --od-cols: 1; }
  .btn { width: 100%; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .stage { --spw: 200px; }
}

/* ---------- reduced motion ---------- */
@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; }
  .caret, .you-caret { animation: none; opacity: 1; }
  .pointer { animation: none; }
  .reveal { opacity: 1; transform: none; }
  /* Per the owner's decision the marquees keep rolling under reduced motion. */
  .marquee-track { animation-duration: 45s !important; animation-iteration-count: infinite !important; }
  .marquee-track.logos { animation-duration: 60s !important; }
}
