/* ============================================================================
   Worthly site - design system
   ----------------------------------------------------------------------------
   Reusable by every page in /site. Do not fork per page; add a class here.

   CONTENTS
     1. Tokens (same palette as frontend/src/index.css, plus site-only extras)
     2. Base & atmosphere (mesh light, grain)
     3. Layout primitives   .container .section .split .grid .stack
     4. Type                .eyebrow .h-mega .h-hero .h-display .h-xl .lede .body
     5. Surfaces            .glass .card (gradient hairline + pointer light)
     6. Buttons & small UI  .btn .tag .caption .link-arrow
     7. Header, menu, footer
     8. Motion primitives   .reveal  [data-count]  [data-scrub]  .pin
     9. Components          .hero .stage .marquee .quotes .wall .ledger .doors
                            .device .chart .donut .bars .dl .log .community .faq
                            .page-hero .prose
    10. Responsive & reduced motion

   MOTION CONTRACT: every hidden/animated start state is gated by `html.motion`
   (set in <head> only when the user has NOT asked for reduced motion). Without
   it - no JS, or reduced motion - the page is complete and static.
   ========================================================================== */

/* 1. TOKENS ---------------------------------------------------------------- */
:root {
  --bg: #070b09;
  --surface-1: #0f1512;
  --surface-2: #171f1b;
  --surface-3: #1f2a25;
  --surface-inset: #0b100e;
  --border: #1d2723;
  --border-strong: #2c3a34;

  --text-primary: #f2f6f4;
  --text-secondary: #9db0a9;
  --text-muted: #6b7c76;
  --text-faint: #4c5a55;

  --accent: #34d399;
  --accent-hover: #4ade9f;
  --accent-contrast: #04140d;
  --accent-dim: rgba(52, 211, 153, 0.14);
  --accent-line: rgba(52, 211, 153, 0.3);
  --danger: #f87171;
  --warning: #fbbf24;

  --dv-1: #34d399; --dv-2: #60a5fa; --dv-3: #fbbf24; --dv-4: #f472b6;
  --dv-5: #a78bfa; --dv-6: #22d3ee; --dv-7: #fb7185; --dv-8: #a3e635;

  /* type scale 52 -> 34 -> 24 -> 18 -> 15 -> 13; fluid down to phone */
  --fs-mega: clamp(4.5rem, 2.6rem + 11vw, 9.5rem);
  --fs-hero: clamp(2.25rem, 1.15rem + 4.6vw, 3.25rem);
  --fs-display: clamp(1.75rem, 1.2rem + 2.3vw, 2.125rem);
  --fs-xl: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  --fs-lg: 1.125rem;
  --fs-md: 0.9375rem;
  --fs-sm: 0.8125rem;
  --fs-xs: 0.75rem;
  --fs-micro: 0.6875rem;
  --tracking-mega: -0.055em;
  --tracking-hero: -0.034em;
  --tracking-display: -0.028em;
  --tracking-xl: -0.02em;
  --tracking-lg: -0.014em;
  --tracking-eyebrow: 0.12em;

  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-7: 32px; --sp-8: 40px; --sp-9: 56px; --sp-10: 80px;
  --radius-sm: 10px; --radius: 16px; --radius-lg: 24px; --radius-pill: 999px;

  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);       /* UI transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);    /* reveals, entrances */

  /* site-only */
  --header-h: 60px;
  --gutter: 16px;
  --section-y: clamp(72px, 11vw, 144px);
  --glass-fill: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.012) 55%), rgba(15, 21, 18, 0.6);
  --glass-edge: linear-gradient(140deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.04) 38%, rgba(52, 211, 153, 0.05) 70%, rgba(52, 211, 153, 0.26));
  --glow: rgba(52, 211, 153, 0.16);
  --shadow-float: 0 40px 80px -36px rgba(0, 0, 0, 0.9), 0 12px 28px -14px rgba(0, 0, 0, 0.6);
  --prog: 1; /* scrub progress 0..1 (set by site.js) */
  color-scheme: dark;
}
@media (min-width: 720px) { :root { --gutter: 28px; --header-h: 68px; } }

/* 2. BASE & ATMOSPHERE ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--text-primary); font-family: var(--font); font-size: var(--fs-md);
  line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip; min-height: 100svh;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent-dim); color: var(--text-primary); }
[hidden] { display: none !important; }

/* Light comes from the top-left: a green mesh fixed behind everything. */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 46% at 12% -6%, rgba(52, 211, 153, 0.22), transparent 62%),
    radial-gradient(46% 38% at 100% 8%, rgba(34, 211, 238, 0.08), transparent 64%),
    radial-gradient(70% 50% at 50% 112%, rgba(52, 211, 153, 0.13), transparent 66%),
    radial-gradient(40% 30% at 0% 60%, rgba(52, 211, 153, 0.05), transparent 70%);
}
/* Fine grain so the dark reads as material, not flat fill. */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 300; padding: 10px 16px; border-radius: var(--radius-sm); background: var(--accent); color: var(--accent-contrast); font-weight: 600; transition: top .2s var(--ease); }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Every figure on the site is a number someone reads: tabular numerals. */
.num, [data-count], .tabular { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum', 'cv11'; }

/* 3. LAYOUT ---------------------------------------------------------------- */
.container { width: min(100% - 2 * var(--gutter), 1160px); margin-inline: auto; }
.container--narrow { width: min(100% - 2 * var(--gutter), 760px); }
.section { position: relative; padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * 0.55); }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head > * + * { margin-top: var(--sp-4); }
.container.section-head { max-width: none; } /* when the head IS the container */
.container.section-head > .body, .container.section-head > .lede { max-width: 60ch; }
.section-head--center { margin-inline: auto; text-align: center; }
.stack > * + * { margin-top: var(--sp-4); }
.split { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; }
.grid { display: grid; gap: var(--sp-4); }
.rule { height: 1px; border: 0; background: linear-gradient(90deg, transparent, var(--border-strong), transparent); }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--wide-left { grid-template-columns: 1.15fr 0.85fr; }
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 600px) and (max-width: 899px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } .grid--2 { grid-template-columns: repeat(2, 1fr); } }

/* 4. TYPE ------------------------------------------------------------------ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-micro); font-weight: 600;
  text-transform: uppercase; letter-spacing: var(--tracking-eyebrow); color: var(--accent);
}
.eyebrow::before { content: ''; width: 18px; height: 1px; background: currentColor; opacity: 0.7; }
.h-mega { font-size: var(--fs-mega); font-weight: 700; letter-spacing: var(--tracking-mega); line-height: 0.9; }
.h-hero { font-size: var(--fs-hero); font-weight: 700; letter-spacing: var(--tracking-hero); line-height: 1.04; text-wrap: balance; }
.h-display { font-size: var(--fs-display); font-weight: 700; letter-spacing: var(--tracking-display); line-height: 1.1; text-wrap: balance; }
.h-xl { font-size: var(--fs-xl); font-weight: 600; letter-spacing: var(--tracking-xl); line-height: 1.25; }
.h-lg { font-size: var(--fs-lg); font-weight: 600; letter-spacing: var(--tracking-lg); line-height: 1.3; }
.lede { font-size: var(--fs-lg); line-height: 1.55; color: var(--text-secondary); max-width: 54ch; text-wrap: pretty; }
.body { color: var(--text-secondary); max-width: 60ch; text-wrap: pretty; }
.small { font-size: var(--fs-sm); color: var(--text-secondary); }
.muted { color: var(--text-muted); }
.dim { color: var(--text-muted); }
/* Emphasis inside headings: emerald light, not a flat colour. */
.h-mega em, .h-hero em, .h-display em, .h-xl em {
  font-style: normal;
  background: linear-gradient(100deg, #8ff0c5 0%, var(--accent) 45%, #22d3ee 130%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* Silver headline: white fading toward the secondary text colour. */
.text-silver {
  background: linear-gradient(180deg, #ffffff 20%, #a9bcb5 120%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* 5. SURFACES -------------------------------------------------------------- */
/* .glass = blurred, for the few hero-weight surfaces. .card = same look, no
   blur, for lists of things. Both carry a lit gradient hairline instead of a
   flat 1px border, and a soft light that follows the pointer (site.js sets
   --mx/--my). */
.glass, .card {
  position: relative; border-radius: var(--radius-lg); background: var(--glass-fill);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), var(--shadow-float);
  isolation: isolate;
}
/* Blur is expensive (software compositors and low-end phones choke on a stack of
   it) and invisible over a flat canvas, so only surfaces that sit over MOVING
   content opt in with .glass--blur (hero number card, header, menu). */
.glass--blur { backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); }
.card { padding: var(--sp-6); }
.glass::before, .card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 1;
  background: var(--glass-edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.glass::after, .card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, -20%), var(--glow), transparent 70%);
  opacity: 0; transition: opacity .5s var(--ease);
}
.glass:hover::after, .card:hover::after, .glass.is-lit::after { opacity: 1; }
.card--flush { padding: 0; }
.card--pad-lg { padding: clamp(22px, 4vw, 40px); }
.card--tint { background: linear-gradient(160deg, rgba(52, 211, 153, 0.12), rgba(52, 211, 153, 0.02) 60%), rgba(15, 21, 18, 0.6); }

/* 6. BUTTONS & SMALL UI ---------------------------------------------------- */
.btn {
  --btn-bg: rgba(255, 255, 255, 0.05);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius-pill); border: 0; cursor: pointer;
  font: 600 var(--fs-md)/1 var(--font); letter-spacing: -0.005em; color: var(--text-primary); white-space: nowrap;
  background: var(--btn-bg); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden; isolation: isolate; -webkit-tap-highlight-color: transparent;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.btn::after { /* moving light: a sheen that slides across on hover */
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover { background: rgba(255, 255, 255, 0.09); }
.btn:active { transform: translateY(1px) scale(0.975); transition-duration: .06s; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 0 0 7px var(--accent-dim); }
.btn--primary {
  color: var(--accent-contrast); background: linear-gradient(180deg, #5ee6b0 0%, var(--accent) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 8px 24px -6px rgba(52, 211, 153, 0.55), 0 0 0 1px rgba(52, 211, 153, 0.5);
}
.btn--primary:hover { background: linear-gradient(180deg, #7bf0c1 0%, var(--accent-hover) 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -1px 0 rgba(0,0,0,.12), 0 12px 32px -6px rgba(52, 211, 153, 0.7), 0 0 0 1px rgba(52, 211, 153, 0.6); }
.btn--primary:active { box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 3px 10px -4px rgba(52, 211, 153, 0.6), 0 0 0 1px rgba(52, 211, 153, 0.5); }
.btn--ghost { --btn-bg: transparent; box-shadow: none; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.07); }
.btn--sm { min-height: 38px; padding: 0 16px; font-size: var(--fs-sm); }
.btn--lg { min-height: 56px; padding: 0 30px; font-size: var(--fs-lg); }
.btn--block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
@media (max-width: 520px) { .btn-row .btn { flex: 1 1 100%; } }

.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill);
  font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-dim); box-shadow: inset 0 0 0 1px var(--accent-line);
}
.tag--muted { color: var(--text-secondary); background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.tag--violet { color: var(--dv-5); background: rgba(167,139,250,.12); box-shadow: inset 0 0 0 1px rgba(167,139,250,.3); }
/* Demo-figure label: a whisper, never a warning banner. */
.caption { font-size: var(--fs-micro); letter-spacing: 0.04em; color: var(--text-faint); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--accent); transition: gap .25s var(--ease), color .2s; }
.link-arrow::after { content: '→'; transition: transform .25s var(--ease); }
.link-arrow:hover { color: var(--accent-hover); }
.link-arrow:hover::after { transform: translateX(4px); }
.chip-delta { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: 600; color: var(--accent); background: var(--accent-dim); }

/* 7. HEADER / MENU / FOOTER ------------------------------------------------ */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h); transition: background .35s var(--ease), box-shadow .35s var(--ease); }
.site-header.is-scrolled { background: rgba(7, 11, 9, 0.72); backdrop-filter: blur(18px) saturate(160%); -webkit-backdrop-filter: blur(18px) saturate(160%); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06); }
.site-header__bar { height: 100%; display: flex; align-items: center; gap: var(--sp-4); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: var(--fs-lg); letter-spacing: -0.03em; }
.brand__mark { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(150deg, #5ee6b0, #10a37a); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 6px 16px -6px rgba(52,211,153,.7); color: var(--accent-contrast); }
.brand__mark svg { width: 16px; height: 16px; }
.nav { display: none; margin-inline: auto; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: var(--radius-pill); font-size: var(--fs-sm); font-weight: 500; color: var(--text-secondary); transition: color .2s, background .2s; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--text-primary); background: rgba(255, 255, 255, 0.06); }
.header-actions { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }
.header-actions .lang { display: none; }
.menu-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.06); display: grid; place-items: center; cursor: pointer; transition: background .2s, transform .12s; }
.menu-btn:active { transform: scale(.92); }
.menu-btn span { grid-area: 1/1; width: 16px; height: 1.5px; background: var(--text-primary); border-radius: 2px; transition: transform .35s var(--ease); }
.menu-btn span:first-child { transform: translateY(-3px); }
.menu-btn span:last-child { transform: translateY(3px); }
.menu-btn[aria-expanded='true'] span:first-child { transform: rotate(45deg); }
.menu-btn[aria-expanded='true'] span:last-child { transform: rotate(-45deg); }
.menu { position: absolute; inset: calc(100% + 6px) var(--gutter) auto; padding: var(--sp-3); border-radius: var(--radius-lg); background: rgba(12, 18, 15, 0.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.09), var(--shadow-float); visibility: hidden; opacity: 0; transform: translateY(-8px) scale(.98); transform-origin: top right; transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s; }
.menu.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
.menu a:not(.btn) { display: block; padding: 14px 14px; border-radius: var(--radius-sm); font-weight: 500; font-size: var(--fs-lg); }
.menu a:not(.btn):hover { background: rgba(255,255,255,.06); }
.menu .lang { margin: var(--sp-2) 14px var(--sp-1); }
.lang { display: inline-flex; padding: 3px; border-radius: var(--radius-pill); background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.lang button { border: 0; background: none; cursor: pointer; padding: 5px 11px; border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .05em; color: var(--text-muted); transition: color .2s, background .2s; }
.lang button[aria-pressed='true'] { color: var(--accent-contrast); background: var(--accent); }
.lang button:not([aria-pressed='true']):hover { color: var(--text-primary); }
@media (min-width: 960px) {
  .nav { display: flex; }
  .menu-btn, .menu { display: none; }
  .header-actions .lang { display: inline-flex; }
}
@media (max-width: 380px) { .site-header__bar { gap: 8px; } .header-actions .btn--sm { padding: 0 12px; } .brand { font-size: var(--fs-md); } }

.site-footer { position: relative; padding-block: clamp(48px, 8vw, 96px) 40px; border-top: 1px solid rgba(255,255,255,.06); background: linear-gradient(180deg, transparent, rgba(0,0,0,.35)); }
.footer-grid { display: grid; gap: var(--sp-8); }
.footer-col h4 { font-size: var(--fs-xs); font-weight: 600; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--sp-4); }
.footer-col a { display: block; padding: 6px 0; color: var(--text-secondary); transition: color .2s; }
.footer-col a:hover { color: var(--text-primary); }
.footer-col a.quiet { color: var(--text-muted); font-size: var(--fs-sm); }
.footer-base { margin-top: var(--sp-9); padding-top: var(--sp-6); border-top: 1px solid rgba(255,255,255,.06); display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: space-between; align-items: center; font-size: var(--fs-xs); color: var(--text-muted); }
.footer-grid { grid-template-columns: 1fr 1fr; }
.footer-grid > :first-child { grid-column: 1 / -1; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } .footer-grid > :first-child { grid-column: auto; } }

/* 8. MOTION PRIMITIVES ----------------------------------------------------- */
/* Reveal: add .reveal; optional style="--i:2" staggers siblings by 80ms. */
html.motion .reveal { opacity: 0; transform: translate3d(0, 28px, 0); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); will-change: opacity, transform; }
html.motion .reveal--scale { transform: translate3d(0, 20px, 0) scale(.96); }
html.motion .reveal.in { opacity: 1; transform: none; will-change: auto; }

/* Scrub: JS writes --prog (0..1) from scroll position on [data-scrub]. */
html.motion [data-scrub] { --prog: 0; }
/* Words that light up as the section scrolls (JS splits into .w). */
.scrub-words .w { transition: opacity .2s linear; }

/* Pinned story: .pin > .pin__track > .pin__stage > .pane*. See DESIGN.md. */
.pin__dots { display: none; }
html:not(.motion) .pin__track { padding-top: var(--sp-8); }
html.motion .pin__track { height: calc(var(--steps, 3) * 85svh + 15svh); }
html.motion .pin__stage { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: calc(var(--header-h) + 8px); padding-bottom: 20px; }
html.motion .pin__dots { display: flex; gap: 8px; margin-bottom: var(--sp-5); }
.pin__dots i { width: 28px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.12); position: relative; overflow: hidden; }
.pin__dots i::after { content: ''; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.pin__dots i.is-done::after { transform: scaleX(1); }
.pin__panes { display: grid; gap: clamp(56px, 8vw, 96px); }
.pane { display: grid; gap: var(--sp-6); align-items: center; }
.pane__num { font-size: var(--fs-xs); font-weight: 600; letter-spacing: var(--tracking-eyebrow); color: var(--accent); text-transform: uppercase; margin-bottom: var(--sp-3); }
html.motion .pin__panes { gap: 0; }
html.motion .pane { grid-area: 1/1; opacity: 0; transform: translate3d(0, 24px, 0); pointer-events: none; transition: opacity .6s var(--ease), transform .8s var(--ease-out); }
html.motion .pane.is-on { opacity: 1; transform: none; pointer-events: auto; }
@media (min-width: 900px) { .pane { grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 88px); } }

/* 9. COMPONENTS ------------------------------------------------------------ */

/* --- hero ---------------------------------------------------------------- */
.hero { position: relative; padding: calc(var(--header-h) + 8px) 0 clamp(40px, 7vw, 96px); overflow: clip; }
.hero::before { /* a single beam of light from the top-left */
  content: ''; position: absolute; inset: -10% -20% auto -20%; height: 120%; z-index: -1; pointer-events: none;
  background: conic-gradient(from 198deg at 8% -12%, transparent 0deg, rgba(52,211,153,.2) 26deg, rgba(52,211,153,.05) 44deg, transparent 62deg);
  -webkit-mask: linear-gradient(180deg, #000 30%, transparent 92%); mask: linear-gradient(180deg, #000 30%, transparent 92%);
}
html.motion .hero::before { animation: beam 5s var(--ease-out) both; }
@keyframes beam { from { opacity: 0; transform: translate3d(-4%, 0, 0); } to { opacity: 1; transform: none; } }
.hero__grid { display: grid; gap: var(--sp-5); align-items: center; }
.hero__copy > * + * { margin-top: var(--sp-5); }
.hero__copy .lede { max-width: 46ch; }
.hero__note { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--fs-xs); color: var(--text-muted); }
.hero__note span { display: inline-flex; align-items: center; gap: 6px; }
.hero__note span::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.hero__stage { order: -1; }
@media (min-width: 940px) {
  .hero { padding-top: calc(var(--header-h) + 24px); min-height: min(100svh, 880px); display: flex; align-items: center; }
  .hero__grid { grid-template-columns: 1.02fr 1fr; gap: clamp(32px, 5vw, 80px); width: min(100% - 2 * var(--gutter), 1160px); margin-inline: auto; }
  .hero__stage { order: 0; }
}

/* The converging-platforms stage. Everything lives in one 100x80 coordinate
   space (SVG viewBox) so it scales perfectly at any width. */
.stage { position: relative; width: 100%; max-width: 560px; margin-inline: auto; aspect-ratio: 100 / 80; --e: 1; }
html.motion .stage:not(.is-ready) { opacity: 0; animation: show 0s 1.4s forwards; }
@keyframes show { to { opacity: 1; } }
.stage__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.stage__label { font: 500 2.5px var(--font); fill: var(--text-secondary); letter-spacing: .02em; }
.stage__letter { font: 700 4.6px var(--font); text-anchor: middle; dominant-baseline: central; }
.stage__halo { opacity: .16; transform: scale(.78); }
.pipe { fill: none; stroke: url(#pipeGrad); stroke-width: .5; stroke-linecap: round; }
.pipe-flow { fill: none; stroke: #b9ffe0; stroke-width: .7; stroke-linecap: round; stroke-dasharray: 1.2 9; opacity: 0; }
.stage.is-settled .pipe-flow { opacity: .9; }
html.motion .stage.is-settled .pipe-flow { animation: flow 2.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -10.2; } }
.stage__card {
  position: absolute; left: 50%; top: 11%; width: 76%; transform: translateX(-50%) scale(calc(.94 + .06 * var(--e)));
  padding: clamp(14px, 3.4vw, 22px) clamp(16px, 4vw, 26px); border-radius: var(--radius-lg); text-align: center;
  opacity: clamp(0, calc((var(--e) - .12) * 1.8), 1);
}
.stage__label-top { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: var(--fs-xs); font-weight: 500; color: var(--text-secondary); }
.stage__label-top i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.stage__value { margin-top: 4px; font-size: clamp(2.35rem, 1.2rem + 6.4vw, 3.6rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1.05; background: linear-gradient(180deg, #fff 30%, #9fe9c9 130%); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.stage__sub { margin-top: 6px; display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-muted); }
.stage__caption { position: absolute; right: 0; bottom: -4px; }

/* --- marquee -------------------------------------------------------------- */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee + .marquee { margin-top: 12px; }
.marquee__track { display: flex; width: max-content; }
.marquee__item { display: inline-flex; align-items: center; gap: 12px; margin-right: 12px; padding: 10px 20px 10px 10px; border-radius: var(--radius-pill); background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), inset 0 1px 0 rgba(255,255,255,.05); font-weight: 500; color: var(--text-secondary); white-space: nowrap; transition: color .25s, background .25s; }
.marquee__item:hover { color: var(--text-primary); background: rgba(255,255,255,.07); }
.mono { --c: var(--accent); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: var(--fs-sm); color: var(--c); background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--c) 28%, transparent), color-mix(in srgb, var(--c) 8%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); }
.mono svg { width: 17px; height: 17px; }
html.motion .marquee__track { animation: marquee 60s linear infinite; }
html.motion .marquee--rev .marquee__track { animation-direction: reverse; animation-duration: 72s; }
html.motion .marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }
html:not(.motion) .marquee { -webkit-mask-image: none; mask-image: none; }
html:not(.motion) .marquee__track { width: auto; flex-wrap: wrap; justify-content: center; row-gap: 12px; }

/* --- problem: quotes ------------------------------------------------------ */
.statement { font-size: clamp(1.75rem, 0.9rem + 4.4vw, 3.5rem); font-weight: 700; letter-spacing: var(--tracking-hero); line-height: 1.08; max-width: 18em; text-wrap: balance; }
.quotes { margin-top: clamp(40px, 7vw, 88px); }
.quote { display: grid; grid-template-columns: 44px 1fr; gap: var(--sp-4); padding: clamp(18px, 3vw, 28px) 0; border-top: 1px solid rgba(255,255,255,.07); }
.quote:last-child { border-bottom: 1px solid rgba(255,255,255,.07); }
.quote__n { font-size: var(--fs-xs); font-weight: 600; color: var(--text-faint); padding-top: .55em; }
.quote__q { font-size: var(--fs-xl); font-weight: 600; letter-spacing: var(--tracking-xl); line-height: 1.25; transition: color .3s; }
.quote__a { margin-top: 6px; color: var(--text-muted); font-size: var(--fs-md); }
.quote:hover .quote__q { color: var(--accent); }
.promise { margin-top: clamp(32px, 5vw, 56px); padding: clamp(22px, 4vw, 36px); border-radius: var(--radius-lg); }

/* --- doors (connect either way) ------------------------------------------ */
.doors { display: grid; gap: var(--sp-3); }
.door { display: grid; grid-template-columns: 44px 1fr; gap: var(--sp-4); align-items: start; padding: var(--sp-5); }
.door__ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-dim); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-line); }
.door__ico svg { width: 22px; height: 22px; }
.door h3 { font-size: var(--fs-lg); letter-spacing: var(--tracking-lg); }
.door p { margin-top: 4px; font-size: var(--fs-sm); color: var(--text-secondary); }
.door .tag { margin-top: 10px; }
.doors__or { text-align: center; font-size: var(--fs-xs); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--text-faint); line-height: 1; }

/* --- night sync pane ------------------------------------------------------ */
.sync { padding: var(--sp-6); }
.sync__top { display: flex; align-items: center; gap: var(--sp-4); }
.sync__time { font-size: clamp(2.5rem, 2rem + 3vw, 3.5rem); font-weight: 700; letter-spacing: -0.045em; line-height: 1; }
.sync__moon { width: 40px; height: 40px; color: var(--dv-5); }
.sync__rows { margin-top: var(--sp-5); display: grid; gap: 2px; }
.sync__row { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-top: 1px solid rgba(255,255,255,.06); font-size: var(--fs-sm); color: var(--text-secondary); }
.tick { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--accent); }
.tick svg { width: 14px; height: 14px; }
html.motion .pane:not(.is-on) .tick { opacity: 0; }
html.motion .pane.is-on .tick { animation: tickIn .6s var(--ease-out) both; animation-delay: calc(.5s + var(--i, 0) * .45s); }
@keyframes tickIn { from { opacity: 0; transform: translate3d(0, 6px, 0) scale(.9); } to { opacity: 1; transform: none; } }

/* Pane-3 sparkline draws itself when its pane becomes active. */
.one-line { stroke-dasharray: 1; filter: drop-shadow(0 0 6px rgba(52,211,153,.55)); }
html.motion .pane:not(.is-on) .one-line { stroke-dashoffset: 1; }
html.motion .pane:not(.is-on) .one-area { opacity: 0; }
html.motion .pane.is-on .one-line { animation: draw 2.2s var(--ease-out) .35s both; }
html.motion .pane.is-on .one-area { animation: fadeIn 1.6s ease-out 1s both; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- device (the mocked app) --------------------------------------------- */
.device { padding: clamp(18px, 3.4vw, 30px); border-radius: var(--radius-lg); }
.device__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.device__label { font-size: var(--fs-xs); font-weight: 500; color: var(--text-muted); }
.device__value { font-size: clamp(2rem, 1.4rem + 3vw, 2.75rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1.1; }
.chart { margin-top: var(--sp-5); position: relative; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart__grid line { stroke: rgba(255,255,255,.06); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart__line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--prog)); filter: drop-shadow(0 0 6px rgba(52,211,153,.55)); }
.chart__area { opacity: calc(var(--prog) * .9); }
.chart__dot { fill: #fff; stroke: var(--accent); stroke-width: 3; opacity: 0; }
@supports (offset-path: path('M0 0')) { .chart__dot { opacity: 1; offset-rotate: 0deg; offset-distance: calc(var(--prog) * 100%); } }
.chart__axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: var(--fs-micro); color: var(--text-faint); }
.device__row { margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid rgba(255,255,255,.07); display: grid; gap: var(--sp-5); }
.alloc { display: flex; align-items: center; gap: var(--sp-5); }
.donut { width: 116px; flex: none; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 11; }
.donut .seg { stroke-dasharray: calc(var(--prog) * var(--len) * 1px) 200; stroke-dashoffset: calc(var(--prog) * var(--start) * -1px); }
.donut .track { stroke: rgba(255,255,255,.05); }
.legend { flex: 1; display: grid; gap: 7px; font-size: var(--fs-sm); }
.legend li { display: flex; align-items: center; gap: 10px; color: var(--text-secondary); }
.legend i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.legend b { margin-left: auto; font-weight: 600; color: var(--text-primary); }
.bars { display: grid; gap: 13px; font-size: var(--fs-sm); }
.bar__top { display: flex; justify-content: space-between; margin-bottom: 6px; color: var(--text-secondary); }
.bar__top b { color: var(--text-primary); font-weight: 600; }
.bar__track { height: 6px; border-radius: 6px; background: rgba(255,255,255,.06); overflow: hidden; }
.bar__fill { height: 100%; width: calc(var(--w) * 1%); border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 55%, transparent), var(--c)); transform-origin: left; transform: scaleX(var(--prog)); }
@media (min-width: 700px) { .device__row { grid-template-columns: 1fr 1fr; align-items: center; gap: var(--sp-8); } }
.features { display: grid; gap: var(--sp-5); margin-top: var(--sp-7); }
.feature { display: grid; grid-template-columns: 40px 1fr; gap: var(--sp-4); }
.feature__ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--accent); background: var(--accent-dim); box-shadow: inset 0 0 0 1px var(--accent-line); }
.feature__ico svg { width: 20px; height: 20px; }
.feature h3 { font-size: var(--fs-lg); letter-spacing: var(--tracking-lg); }
.feature p { margin-top: 2px; color: var(--text-secondary); font-size: var(--fs-sm); }

/* --- safety: wall + ledger ------------------------------------------------ */
.section--dark { background: linear-gradient(180deg, transparent, rgba(0,0,0,.4) 18%, rgba(0,0,0,.4) 82%, transparent); }
.wall { display: grid; gap: 0; margin-top: clamp(32px, 5vw, 56px); }
.wall__item { padding: var(--sp-6) 0; border-top: 1px solid rgba(255,255,255,.1); display: grid; grid-template-columns: minmax(0, auto) 1fr; gap: var(--sp-5); align-items: end; }
.wall__n { font-size: var(--fs-mega); font-weight: 700; letter-spacing: var(--tracking-mega); line-height: .85; background: linear-gradient(180deg, #fff 25%, #5aa88c 130%); -webkit-background-clip: text; background-clip: text; color: transparent; min-width: .62em; }
.wall__t { color: var(--text-secondary); max-width: 28ch; padding-bottom: .35em; }
@media (min-width: 900px) { .wall { grid-template-columns: repeat(3, 1fr); gap: var(--sp-7); } .wall__item { grid-template-columns: 1fr; align-items: start; border-top-color: rgba(255,255,255,.14); } .wall__t { padding: 0; } }
.ledger { margin-top: clamp(32px, 5vw, 56px); display: grid; gap: var(--sp-3); }
.ledger__item { display: grid; grid-template-columns: 40px 1fr; gap: var(--sp-4); padding: var(--sp-5); }
.ledger__k { font-size: var(--fs-sm); font-weight: 700; color: var(--accent); padding-top: 2px; }
.ledger h3 { font-size: var(--fs-lg); letter-spacing: var(--tracking-lg); }
.ledger p { margin-top: 4px; color: var(--text-secondary); font-size: var(--fs-sm); max-width: 62ch; }
@media (min-width: 900px) { .ledger { grid-template-columns: repeat(2, 1fr); } .ledger__item:last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* --- downloads ------------------------------------------------------------ */
.dl { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-6); }
.dl .btn { margin-top: auto; }
.dl__ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--accent); background: var(--accent-dim); box-shadow: inset 0 0 0 1px var(--accent-line); }
.dl__ico svg { width: 24px; height: 24px; }
.dl h3 { font-size: var(--fs-xl); letter-spacing: var(--tracking-xl); }
.dl p { color: var(--text-secondary); font-size: var(--fs-sm); flex: 1; }
.dl__top { display: flex; justify-content: space-between; align-items: flex-start; }
.grid--4 { grid-template-columns: repeat(2, 1fr); }
.dl__top { flex-wrap: wrap; gap: 10px; }
@media (max-width: 599px) { .grid--4 .dl { padding: var(--sp-4); } .grid--4 .dl h3 { font-size: var(--fs-lg); } .grid--4 .dl .btn { min-height: 42px; padding: 0 12px; } }
@media (min-width: 1000px) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* --- changelog list ------------------------------------------------------- */
.log li { display: grid; gap: 4px var(--sp-5); padding: var(--sp-5) 0; border-top: 1px solid rgba(255,255,255,.07); }
.log li:last-child { border-bottom: 1px solid rgba(255,255,255,.07); }
.log__meta { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-xs); color: var(--text-muted); }
.log h3 { font-size: var(--fs-lg); letter-spacing: var(--tracking-lg); }
.log p { color: var(--text-secondary); font-size: var(--fs-sm); }
@media (min-width: 800px) { .log li { grid-template-columns: 200px 1fr; align-items: baseline; } .log__meta { grid-row: 1 / span 2; } }

/* --- community ------------------------------------------------------------ */
.community { overflow: hidden; padding: clamp(24px, 5vw, 56px); display: grid; gap: var(--sp-7); align-items: center; }
.community::marker { content: none; }
.community__glow { position: absolute; z-index: -1; right: -10%; top: -40%; width: 70%; aspect-ratio: 1; background: radial-gradient(circle, rgba(88,101,242,.28), transparent 65%); pointer-events: none; }
.channels { padding: var(--sp-5); border-radius: var(--radius); background: rgba(0,0,0,.32); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); display: grid; gap: 2px; font-size: var(--fs-sm); }
.channels li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-secondary); }
.channels li::before { content: '#'; color: var(--text-faint); font-weight: 600; }
.channels li:first-child { background: rgba(255,255,255,.05); color: var(--text-primary); }
@media (min-width: 900px) { .community { grid-template-columns: 1.2fr 0.8fr; } }

/* --- faq ------------------------------------------------------------------ */
.faq { max-width: 820px; margin-inline: auto; }
.faq details { border-top: 1px solid rgba(255,255,255,.08); }
.faq details:last-child { border-bottom: 1px solid rgba(255,255,255,.08); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); padding: 22px 4px; font-size: var(--fs-lg); font-weight: 600; letter-spacing: var(--tracking-lg); transition: color .25s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary::after { content: ''; flex: none; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(currentColor, currentColor) center / 12px 1.5px no-repeat, linear-gradient(currentColor, currentColor) center / 1.5px 12px no-repeat, rgba(255,255,255,.06); transition: transform .45s var(--ease), background-color .25s; }
.faq details[open] summary::after { transform: rotate(135deg); }
.faq details[open] summary { color: var(--accent); }
.faq .answer { padding: 0 4px 24px; color: var(--text-secondary); max-width: 64ch; }
html.motion .faq details[open] .answer { animation: ans .55s var(--ease-out) both; }
@keyframes ans { from { opacity: 0; transform: translate3d(0, -8px, 0); } to { opacity: 1; transform: none; } }

/* --- final CTA ------------------------------------------------------------ */
.final { text-align: center; overflow: hidden; padding: clamp(40px, 8vw, 96px) var(--sp-5); }
.final .btn-row { justify-content: center; }
.final::before { content: ''; position: absolute; inset: auto -20% -60% -20%; height: 120%; z-index: -1; background: radial-gradient(50% 50% at 50% 100%, rgba(52,211,153,.28), transparent 70%); pointer-events: none; }

/* --- inner pages ---------------------------------------------------------- */
.page-hero { padding: calc(var(--header-h) + clamp(40px, 8vw, 96px)) 0 clamp(32px, 5vw, 64px); }
.page-hero > .container > * + * { margin-top: var(--sp-5); }
.breadcrumb { font-size: var(--fs-xs); color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text-primary); }
.prose { max-width: 70ch; }
.prose > * + * { margin-top: var(--sp-4); }
.prose h2 { font-size: var(--fs-display); letter-spacing: var(--tracking-display); line-height: 1.12; margin-top: clamp(40px, 6vw, 72px); }
.prose h3 { font-size: var(--fs-xl); letter-spacing: var(--tracking-xl); margin-top: var(--sp-8); }
.prose p, .prose li { color: var(--text-secondary); }
.prose a:not(.btn) { color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
.prose a:not(.btn):hover { text-decoration-color: var(--accent); }
.prose ul { list-style: disc; padding-left: 1.25em; display: grid; gap: 6px; }
.prose ol { list-style: decimal; padding-left: 1.25em; display: grid; gap: 6px; }
.prose code, code.inline { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: .9em; padding: 2px 7px; border-radius: 6px; background: rgba(255,255,255,.07); color: var(--text-primary); }
.callout { padding: var(--sp-5); border-radius: var(--radius); background: var(--accent-dim); box-shadow: inset 0 0 0 1px var(--accent-line); color: var(--text-primary); }
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.06); }
.table th { font-size: var(--fs-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }

/* 10. SECOND PASS: DESKTOP SCALE, STORY, APP WINDOW, DEPTH ----------------- */
/* Everything here ADDS to the system above; no earlier class changes meaning.
   Motion rules stay behind html.motion; depth effects use `translate`/`transform`/`opacity` only. */

.container--wide { width: min(100% - 2 * var(--gutter), 1320px); margin-inline: auto; }
@media (min-width: 1100px) { .h-display--xl { font-size: clamp(2.6rem, 1.4rem + 2.2vw, 3.75rem); } }
@media (min-width: 1200px) { .statement { font-size: 4.5rem; max-width: 17em; } }
.chip-delta--violet { color: var(--dv-5); background: rgba(167, 139, 250, .14); }

/* Scroll progress line along the bottom edge of the header (site.js adds the element). */
.site-header__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, var(--accent), #22d3ee); transform-origin: left; transform: scaleX(0); pointer-events: none; }

/* Seams: a hairline that draws itself outward from the centre at the top of a section. */
.seam { position: relative; }
.seam::before { content: ''; position: absolute; top: 0; left: 50%; width: min(100% - 2 * var(--gutter), 1160px); height: 1px; translate: -50% 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .16), transparent); pointer-events: none; }
html.motion .seam::before { transform: scaleX(0); transition: transform 1.5s var(--ease-out); }
html.motion .seam.in::before { transform: scaleX(1); }

/* Eyebrow rule grows when its block reveals. */
html.motion .eyebrow.reveal::before, html.motion .reveal .eyebrow::before { transform: scaleX(0); transform-origin: left; transition: transform .9s var(--ease-out) .25s; }
html.motion .eyebrow.reveal.in::before, html.motion .reveal.in .eyebrow::before { transform: scaleX(1); }

/* Light that moves: the pointer also lights the hairline edge of a surface. */
@media (hover: hover) {
  .glass:hover::before, .card:hover::before { background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .6), transparent 62%), var(--glass-edge); }
  .ledger__item, .dl, .door { transition: translate .45s var(--ease); }
  .ledger__item:hover, .dl:hover, .door:hover { translate: 0 -3px; }
  html.motion .ledger__item.reveal, html.motion .dl.reveal { transition: opacity 1s var(--ease-out), transform 1s var(--ease-out), translate .45s var(--ease); transition-delay: calc(var(--i, 0) * 80ms), calc(var(--i, 0) * 80ms), 0s; }
}
.btn[data-magnet] { transition: transform .18s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), translate .35s var(--ease-out); }

/* --- hero at desktop scale ------------------------------------------------- */
.hero__stage { position: relative; }
.hero__orb { position: absolute; z-index: -1; right: -14%; top: 4%; width: min(62vw, 960px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(52, 211, 153, .17), transparent 62%); pointer-events: none; }
.hero__spot { display: none; position: absolute; z-index: -1; left: 0; top: 0; width: 680px; height: 680px; border-radius: 50%; background: radial-gradient(circle, rgba(52, 211, 153, .12), transparent 62%); pointer-events: none; opacity: 0; transition: opacity .7s var(--ease); }
.hero__spot.is-on { opacity: 1; }
.orbits { display: none; position: absolute; left: -14%; top: 50%; width: 128%; margin-top: -64%; height: auto; pointer-events: none; z-index: -1; }
.orbits circle { fill: none; stroke: rgba(255, 255, 255, .15); stroke-width: .35; stroke-dasharray: .8 2.2; stroke-linecap: round; }
.orbits .orbits__node { fill: var(--accent); stroke: none; }
.orbits__spin { transform-box: view-box; transform-origin: 0 0; }
html.motion .orbits__spin { animation: orbit 120s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }

.float { position: absolute; z-index: 3; display: none; align-items: center; gap: 12px; padding: 12px 18px 12px 12px; border-radius: 18px; background: rgba(13, 19, 16, .9); font-size: var(--fs-xs); white-space: nowrap; }
.float b { display: block; font-size: var(--fs-sm); font-weight: 600; letter-spacing: -.01em; }
.float div > span { color: var(--text-muted); display: block; }
.float__ico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none; color: var(--accent); background: var(--accent-dim); box-shadow: inset 0 0 0 1px var(--accent-line); }
.float__ico svg { width: 18px; height: 18px; }
.float__ico--up { color: var(--dv-1); }
.float__big { display: block; font-size: var(--fs-lg); font-weight: 700; color: var(--text-primary) !important; letter-spacing: -.03em; }
.float--c { flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 18px; }
.float--c svg { width: 90px; height: 30px; }
.float--a { left: -10%; top: 33%; }
.float--b { right: -9%; top: 56%; }
.float--c { left: 6%; bottom: -17%; }
@media (min-width: 1180px) { .float { display: flex; } .float--c { display: flex; } }
html.motion .stage .float { transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
html.motion .stage:not(.is-settled) .float { opacity: 0; transform: translate3d(0, 16px, 0) scale(.96); }
html.motion .stage .float--b { transition-delay: .18s; }
html.motion .stage .float--c { transition-delay: .36s; }
.stage:not(.is-ready) .stage__label { opacity: 0; } /* settled (static) state shows no labels */

@media (min-width: 940px) { .orbits { display: block; } }
@media (min-width: 940px) and (hover: hover) { .hero__spot { display: block; } }
@media (min-width: 1100px) {
  .hero__grid { width: min(100% - 2 * var(--gutter), 1320px); grid-template-columns: .92fr 1.08fr; gap: clamp(24px, 3vw, 56px); }
  .hero .h-hero { font-size: clamp(3.25rem, 1.4rem + 3.2vw, 4.75rem); line-height: 1.02; }
  .hero__copy .lede { font-size: 1.25rem; max-width: 42ch; }
  .hero__copy > * + * { margin-top: var(--sp-6); }
  .stage { max-width: 780px; }
  .stage__value { font-size: clamp(3.6rem, 2rem + 3.2vw, 5rem); }
  .stage__card { padding: 26px 34px; }
}

/* --- story: two years in one pinned scroll ---------------------------------- */
.story__track { position: relative; }
html.motion .story__track { height: 330svh; }
html.motion .story__stage { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; padding: calc(var(--header-h) + 6px) 0 14px; }
html:not(.motion) .story__stage { padding-top: var(--sp-8); }
.story__grid { display: grid; gap: var(--sp-5); width: min(100% - 2 * var(--gutter), 1320px); margin-inline: auto; }
.story__events { position: relative; display: grid; padding-left: 28px; align-content: start; }
.story__side { display: grid; gap: var(--sp-5); }
.story__rail-wrap { position: absolute; left: 5px; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; background: rgba(255, 255, 255, .09); overflow: hidden; }
.story__rail { display: block; width: 100%; height: 100%; background: linear-gradient(var(--accent), #22d3ee); transform-origin: top; }
.ev { position: relative; display: grid; gap: 2px; padding: 10px 0; }
.ev::before { content: ''; position: absolute; left: -28px; top: 15px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22); transition: box-shadow .4s var(--ease), background .4s var(--ease); }
.ev__m { font-size: var(--fs-micro); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.ev h3 { font-size: var(--fs-lg); letter-spacing: var(--tracking-lg); line-height: 1.25; }
.ev p { margin-top: 2px; font-size: var(--fs-sm); color: var(--text-secondary); max-width: 40ch; }
.ev.is-past::before { box-shadow: inset 0 0 0 2px var(--accent); }
.ev.is-now::before { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-dim), 0 0 18px var(--accent); }
html.motion .ev { opacity: .32; transition: opacity .5s var(--ease); }
html.motion .ev.is-past { opacity: .62; }
html.motion .ev.is-now { opacity: 1; }
html.motion .ev > div { transition: transform .6s var(--ease-out); }
html.motion .ev.is-now > div { transform: translate3d(6px, 0, 0); }
html.motion .ev p { display: none; } /* motion: the active event's text is shown in .story__cap instead */

.story__cap { font-size: var(--fs-sm); color: var(--text-secondary); line-height: 1.5; min-height: 4.5em; }
.story__cap b { color: var(--text-primary); display: block; font-size: var(--fs-lg); letter-spacing: var(--tracking-lg); margin-bottom: 2px; }
.story__cap--side { display: none; }
.story__cap--side b { display: none; } /* the highlighted timeline row already shows the title */
html:not(.motion) .story__cap { display: none; }
html.motion .story__cap.is-new { animation: capIn .6s var(--ease-out) both; }
@keyframes capIn { from { opacity: 0; transform: translate3d(0, 8px, 0); } to { opacity: 1; transform: none; } }

.story__card { padding: clamp(14px, 2.4vw, 32px); }
.story__top { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--sp-3); }
.story__value { font-size: clamp(2.1rem, 1.1rem + 4.2vw, 4.25rem); font-weight: 700; letter-spacing: -.045em; line-height: 1.04; background: linear-gradient(180deg, #fff 30%, #9fe9c9 130%); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.story__meta { display: grid; justify-items: end; gap: 6px; padding-bottom: 6px; }
.story__date { font-size: var(--fs-sm); font-weight: 600; color: var(--text-secondary); }
.story__chart { margin-top: var(--sp-4); }
.story__svg { width: 100%; height: auto; overflow: visible; }
.story__grid-lines line { stroke: rgba(255, 255, 255, .06); vector-effect: non-scaling-stroke; }
.story__band { fill: var(--c); fill-opacity: .42; stroke: var(--c); stroke-opacity: .85; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.story__band[data-k='stocks'] { --c: var(--dv-2); } .story__band[data-k='cash'] { --c: var(--dv-3); } .story__band[data-k='earn'] { --c: var(--dv-5); }
.story__band[data-k='other'] { --c: var(--dv-6); } .story__band[data-k='crypto'] { --c: var(--dv-1); }
.story__line { fill: none; stroke: #eafff5; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.story__glow { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linejoin: round; opacity: .16; vector-effect: non-scaling-stroke; }
.story__scan { stroke: rgba(255, 255, 255, .28); stroke-width: 1; stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }
.story__dot { fill: #fff; stroke: var(--accent); stroke-width: 3; vector-effect: non-scaling-stroke; }
.story__dot-halo { fill: var(--accent); opacity: .22; transform-box: fill-box; transform-origin: center; }
html.motion .story__dot-halo { animation: halo 2.2s ease-in-out infinite; }
@keyframes halo { 50% { transform: scale(1.7); opacity: .06; } }
.story__mk-ring { fill: none; stroke: rgba(255, 255, 255, .4); stroke-width: 1; vector-effect: non-scaling-stroke; transform-box: fill-box; transform-origin: center; }
.story__mk-dot { fill: #fff; }
html.motion .story__mk { transition: opacity .5s var(--ease); }
html.motion .story__mk:not(.is-on) { opacity: 0; }
html.motion .story__mk.is-now .story__mk-ring { animation: ring 1.8s ease-out infinite; }
@keyframes ring { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }
.story__axis { display: flex; justify-content: space-between; margin-top: 8px; font-size: var(--fs-micro); color: var(--text-faint); }
.story__bottom { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid rgba(255, 255, 255, .07); display: grid; gap: var(--sp-4); }
.story__alloc { display: flex; align-items: center; gap: var(--sp-5); }
.sdonut { position: relative; width: 104px; flex: none; }
.sdonut svg { transform: rotate(-90deg); }
.sdonut circle { fill: none; stroke-width: 11; }
.sdonut .track { stroke: rgba(255, 255, 255, .05); }
.sdonut__c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.sdonut__c b { font-size: 1.5rem; font-weight: 700; letter-spacing: -.03em; }
.sdonut__c span { font-size: var(--fs-micro); color: var(--text-muted); }
.story__alloc .legend { gap: 5px; }
.story__alloc .legend li { transition: opacity .3s; }
.legend li.is-zero { opacity: .3; }
.story__srcs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 8px; align-content: center; }
.story__srcs li { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); font-size: var(--fs-xs); color: var(--text-secondary); white-space: nowrap; }
.story__srcs .mono { width: 24px; height: 24px; font-size: var(--fs-micro); }
.story__srcs .mono svg { width: 13px; height: 13px; }
html.motion .story__srcs li { transition: opacity .5s var(--ease), transform .5s var(--ease-out); }
html.motion .story__srcs li:not(.is-on) { opacity: .2; transform: scale(.96); }
.story__demo { margin-top: var(--sp-3); text-align: right; }

/* phone: heading above, card + one caption in the pinned frame */
@media (max-width: 939px) {
  html.motion .story__events { display: none; }
  html.motion .story__srcs { display: none; }
  .story__top { align-items: flex-start; }
  .story__alloc .legend { font-size: var(--fs-xs); }
  html.motion .story__demo { display: none; }
  html:not(.motion) .story__events { margin-top: var(--sp-5); }
}
@media (max-width: 939px) and (max-height: 700px) { html.motion .story__cap { min-height: 3.6em; } html.motion .story__cap b { font-size: var(--fs-md); } .story__chart { margin-top: var(--sp-2); } .story__bottom { margin-top: var(--sp-2); padding-top: var(--sp-3); } }
@media (min-width: 940px) {
  .story__grid { grid-template-columns: minmax(280px, .66fr) 1.34fr; gap: clamp(32px, 5vw, 96px); align-items: center; }
  .story__cap--side { display: block; margin-left: 28px; max-width: 36ch; }
  html.motion .story__card .story__cap { display: none; }
  html:not(.motion) .story__cap--side { display: none; }
  .story__bottom { grid-template-columns: auto 1fr; gap: var(--sp-7); align-items: center; }
  .sdonut { width: 116px; }
}
@media (min-width: 940px) and (max-height: 760px) { .ev { padding: 6px 0; } .ev::before { top: 11px; } .story__chart { margin-top: var(--sp-2); } }

/* --- product: the app window ----------------------------------------------- */
.prod__head { display: grid; gap: var(--sp-6); margin-bottom: clamp(28px, 5vw, 56px); }
.prod__head .features { margin-top: 0; }
@media (min-width: 1000px) { .prod__head { grid-template-columns: 1.1fr .9fr; align-items: end; gap: clamp(40px, 6vw, 96px); } }
.appstage { position: relative; will-change: transform; }
.appwin { overflow: hidden; padding: 0; }
.appwin__bar { display: flex; align-items: center; gap: var(--sp-4); padding: 11px 16px; background: rgba(0, 0, 0, .22); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.appwin__dots { display: inline-flex; gap: 6px; }
.appwin__dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.appwin__title { margin-inline: auto; font-size: var(--fs-xs); font-weight: 500; color: var(--text-muted); padding-left: 56px; }
.appwin__sync { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--accent); white-space: nowrap; }
.appwin__sync i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.appwin__body { display: grid; }
.appwin__side { display: none; }
.appwin__main { padding: clamp(14px, 2.6vw, 28px); min-width: 0; }
.appwin__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.03em; }
.appwin__nav { display: grid; gap: 2px; }
.appwin__nav > span { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; font-size: var(--fs-sm); font-weight: 500; color: var(--text-secondary); }
.appwin__nav svg { width: 18px; height: 18px; flex: none; }
.appwin__nav .is-active { color: var(--accent); background: var(--accent-dim); box-shadow: inset 0 0 0 1px var(--accent-line); }
.appwin__plan { margin-top: auto; display: grid; gap: 8px; justify-items: start; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); }
.appwin__title-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.appwin__title-row h3 { font-size: var(--fs-xl); letter-spacing: var(--tracking-xl); }
.range { display: inline-flex; padding: 3px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, .05); }
.range span { padding: 5px 12px; border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted); }
.range .is-active { background: var(--accent); color: var(--accent-contrast); }
.tiles { margin-top: var(--sp-4); display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile { position: relative; display: grid; gap: 5px; align-content: start; padding: 14px; border-radius: 16px; background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); overflow: hidden; }
.tile__k { font-size: var(--fs-xs); color: var(--text-muted); }
.tile__v { font-size: clamp(1.1rem, .85rem + 1.1vw, 1.65rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.tile .chip-delta { justify-self: start; }
.spark { width: 72px; height: 24px; }
.tile .spark { position: absolute; right: 12px; bottom: 12px; display: none; }
@media (min-width: 760px) { .tile .spark { display: block; } }
.spark path { stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--prog)); }
.spark.dn path { stroke: var(--danger); } .spark.flat path { stroke: var(--text-muted); }
.wgrid { margin-top: 10px; display: grid; gap: 10px; }
.wcard { padding: 16px; border-radius: 18px; background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); min-width: 0; }
.wcard__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; font-size: var(--fs-sm); font-weight: 600; color: var(--text-secondary); }
.wcard .chart { margin-top: 0; }
.wcard .alloc { gap: var(--sp-4); }
.wcard .legend { gap: 5px; }
.wchart { position: relative; touch-action: pan-y; }
.wchart:not(.is-live) .chart__dot { display: none; }
.wchart__cross, .wchart__pt, .wchart__tip { position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; transition: opacity .2s; }
.wchart__cross { width: 1px; height: calc(100% - 26px); background: rgba(255, 255, 255, .28); }
.wchart__pt { width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--accent), 0 0 16px var(--accent); }
.wchart__tip { width: 104px; padding: 6px 10px; border-radius: 10px; display: grid; background: rgba(9, 15, 12, .94); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .13); top: -6px; }
.wchart.is-hover .wchart__cross, .wchart.is-hover .wchart__pt, .wchart.is-hover .wchart__tip { opacity: 1; }
.hold { display: grid; }
.hold li { display: grid; grid-template-columns: 34px 1fr 56px auto; gap: 12px; align-items: center; padding: 9px 8px; border-radius: 10px; transition: background .25s; }
.hold li + li { box-shadow: 0 -1px 0 rgba(255, 255, 255, .05); }
.hold li:hover { background: rgba(255, 255, 255, .045); }
.hold .mono { width: 34px; height: 34px; }
.hold__n b, .hold__v b { display: block; font-size: var(--fs-sm); font-weight: 600; }
.hold__n small { font-size: var(--fs-xs); color: var(--text-muted); }
.hold__v { text-align: right; }
.hold__v i { font-style: normal; font-size: var(--fs-xs); color: var(--text-muted); }
.hold__v .up { color: var(--accent); } .hold__v .dn { color: var(--danger); }
.spark--s { width: 56px; height: 20px; }
.wcard--plat { display: flex; flex-direction: column; }
.wcard--plat .bars { flex: 1; align-content: space-around; }
.wcard--hold { display: none; }
.appstage .float--k, .appstage .float--s { display: none; }
.appstage__caption { margin-top: 14px; text-align: right; }
@media (min-width: 760px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .wcard--hold { display: block; }
  .wgrid { grid-template-columns: 1.5fr 1fr; }
}
@media (min-width: 900px) {
  .appwin__body { grid-template-columns: 216px 1fr; }
  .appwin__side { display: flex; flex-direction: column; gap: var(--sp-6); padding: 22px 16px; background: rgba(0, 0, 0, .14); border-right: 1px solid rgba(255, 255, 255, .06); }
}
@media (min-width: 1180px) {
  .appstage .float--k { display: flex; left: -2.4%; top: 58%; }
  .appstage .float--s { display: flex; right: -2.2%; bottom: -4.5%; }
  .appstage__caption { margin-top: 36px; }
  .appwin__main { padding: 30px 32px 32px; }
}

/* 11. REDUCED MOTION ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
}
