/* Merit — Kinetic Vault on the web.
   Tokens mirror src/shared/theme/ (see .claude/skills/kinetic-vault-design).
   Dark only, no shadows, radius capped at 12px, green only where value is earned. */

@font-face { font-family: 'Space Grotesk'; font-weight: 500; font-display: swap; src: url('fonts/space-grotesk-500.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-weight: 700; font-display: swap; src: url('fonts/space-grotesk-700.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('fonts/inter-700.woff2') format('woff2'); }

:root {
  color-scheme: dark;
  --background: #000000;
  --surface1: #0e0e0e;
  --surface2: #131313;
  --surface3: #262626;
  --border: rgba(72, 72, 72, 0.15);
  --text1: #ffffff;
  --text2: #9e9e9e;
  --text3: #6b6b6b;
  --tick-idle: #333333;
  --accent: #36f814;
  --accent-subtle: #072802;

  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --xs: 4px; --sm: 8px; --md: 12px; --lg: 16px; --xl: 24px; --xxl: 32px; --xxxl: 48px;
  --r-element: 4px; --r-control: 8px; --r-component: 12px;
  --gutter: 16px;
  --section: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text1);
  font: 400 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r-element); }

.wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  padding: var(--md) var(--lg); background: var(--surface3); border-radius: var(--r-control);
  font-weight: 500; text-decoration: none;
}
.skip:focus { top: var(--md); }

/* ---------------------------------------------------------------- type */

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(32px, 7.5vw, 48px); line-height: 1.05; letter-spacing: -0.5px; }
h2 { font-size: clamp(26px, 5.5vw, 36px); line-height: 1.1; }
h3 { font-size: 20px; line-height: 1.25; font-weight: 500; }
p { margin: 0; }

.eyebrow, .label {
  font: 500 12px/1.2 var(--font-body);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text2);
}
.eyebrow { margin-bottom: var(--md); }

.lead, .body-lg { font-size: 18px; line-height: 1.55; color: var(--text2); max-width: 36em; }

/* -------------------------------------------------------------- header */

.site-header { position: sticky; top: 0; z-index: 5; background: rgba(0, 0, 0, 0.88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: var(--sm); text-decoration: none; font: 700 20px/1 var(--font-display); }
.brand img { border-radius: var(--r-control); }
.lang-switch {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 36px; padding: 0 var(--md);
  background: var(--surface3); border-radius: var(--r-control);
  font: 500 12px/1 var(--font-body); letter-spacing: 1px; text-decoration: none;
  transition: background-color 120ms ease-out;
}
.lang-switch:hover { background: #333333; }

/* ---------------------------------------------------------------- hero */

/* The monument: today's amount, set as large as the screen allows, inside the
   app's 60-tick ring drawn so big the screen crops it. On desktop the stage is
   pinned while the first scroll zooms and turns the ring away (--q, 0 → 1). */
.hero { position: relative; --q: 0; margin-top: -60px; }
.hero-stage {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  display: grid; grid-template-rows: 1fr auto; padding-top: 60px;
}
.hero-stage::before {
  content: ''; position: absolute; left: 50%; top: var(--ring-y, 44%); width: min(70vw, 900px); aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(54, 248, 20, 0.13), rgba(54, 248, 20, 0.04) 55%, transparent);
  opacity: calc(1 - var(--q) * 1.4);
}
.hero-ring {
  position: absolute; left: 50%; top: var(--ring-y, 44%); width: min(124svh, 172vw); aspect-ratio: 1; pointer-events: none;
  transform: translate(-50%, -50%) rotate(calc(var(--q) * 55deg)) scale(calc(1 + var(--q) * 0.7));
  opacity: calc(1 - var(--q) * 0.9);
}
.ring-ticks { width: 100%; height: 100%; display: block; }
.ring-ticks line { stroke: var(--tick-idle); stroke-width: 7; stroke-linecap: round; transition: opacity 500ms ease-out var(--d, 0ms), stroke 300ms ease-out; }
.ring-ticks line.is-earned { stroke: var(--accent); }
.ring-ticks line.is-live { stroke: var(--text1); animation: kinetic-pulse 900ms cubic-bezier(0.5, 1, 0.89, 1) forwards; }
.js .hero:not(.is-lit) .ring-ticks line { opacity: 0; }
@keyframes kinetic-pulse {
  from { opacity: 1; stroke-width: 14; }
  to { opacity: 0; stroke-width: 7; }
}

.monument {
  position: relative; z-index: 1; margin: 0; align-self: center;
  display: grid; justify-items: center; gap: clamp(8px, 1.4vh, 16px); text-align: center;
  transform: translateY(calc(var(--q) * -10vh)) scale(calc(1 - var(--q) * 0.25));
  opacity: calc(1 - var(--q) * 1.3);
}
.monument .label { font-size: clamp(12px, 1vw, 15px); color: var(--text2); }
.monument-amount {
  display: block; font: 700 22vw/0.9 var(--font-display); letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ring-rate { font: 500 clamp(12px, 1vw, 15px)/1.2 var(--font-body); letter-spacing: 1px; text-transform: uppercase; color: var(--text2); }

/* The odometer: each digit is a strip of 0-9 that rolls to its value. */
.odo { display: inline-flex; }
.odo-d { display: inline-block; height: 0.9em; overflow: hidden; }
.odo-strip { display: flex; flex-direction: column; transition: transform 380ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.odo-strip > span { height: 0.9em; line-height: 0.9; }
.odo-x { display: inline-block; }
.odo-cents { color: var(--text2); }

.hero-band {
  position: relative; z-index: 1; display: grid; gap: var(--lg); align-items: end;
  padding-top: var(--xl); padding-bottom: 72px;
  opacity: calc(1 - var(--q) * 2.6); transform: translateY(calc(var(--q) * -48px));
}
/* A plain scrim under the band, so the ring's ticks never sit behind text. */
.hero-band::before {
  content: ''; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; top: -80px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #000 90px);
}
.hero-title { display: grid; gap: var(--md); }
.hero-title .eyebrow { margin-bottom: 0; color: var(--accent); }
.hero h1 { font-size: clamp(30px, 2.3vw, 46px); letter-spacing: -0.02em; white-space: nowrap; }
.hero .lead { font-size: clamp(15px, 1vw, 17px); color: #c4c4c4; max-width: 36em; }
.hero-act { display: grid; gap: var(--md); justify-items: start; }
.hero-rate { position: relative; z-index: 2; justify-self: center; opacity: calc(1 - var(--q) * 2.6); }
.hero-rate .rate-control { justify-items: center; text-align: center; }
.hero-note { font-size: 14px; color: var(--text2); }

/* the live thing */
.rate-control { display: grid; gap: var(--sm); }
.rate-fields {
  display: inline-flex; align-items: center; gap: var(--sm); padding: 6px 6px 6px var(--lg);
  background: var(--surface2); border-radius: var(--r-control);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.rate-input {
  width: 6.5ch; padding: 6px 0; border: 0; background: none; color: var(--text1);
  font: 700 28px/1 var(--font-display); font-variant-numeric: tabular-nums; -moz-appearance: textfield;
}
.rate-input::-webkit-outer-spin-button, .rate-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rate-input:focus { outline: none; }
.rate-fields:focus-within { box-shadow: inset 0 -2px 0 var(--accent), 0 0 0 2px var(--accent); }
.rate-symbol { font: 700 28px/1 var(--font-display); color: var(--text2); }
.rate-type {
  margin-left: var(--sm); padding: 12px 34px 12px 14px; border: 0; border-radius: var(--r-control);
  background: var(--surface3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='none' stroke='%239e9e9e' stroke-linecap='round' stroke-linejoin='round' stroke-width='48' d='M112 184l144 144 144-144'/%3E%3C/svg%3E") no-repeat right 12px center / 14px;
  color: var(--text1); font: 500 15px/1 var(--font-body); appearance: none; cursor: pointer;
}
.rate-type:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* scroll cue: a rail with a dot that keeps travelling down */
.scroll-cue {
  position: fixed; z-index: 4; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: grid; justify-items: center; gap: 12px; text-decoration: none; color: var(--text1);
  font: 500 13px/1 var(--font-body); letter-spacing: 2px; text-transform: uppercase;
  opacity: calc(1 - var(--q) * 14); transition: color 120ms ease-out, opacity 300ms ease-out;
}
.hero.is-scrolled .scroll-cue { opacity: 0; pointer-events: none; }
.scroll-cue:hover { color: var(--accent); }
.scroll-cue i { position: relative; width: 3px; height: 64px; border-radius: 3px; background: var(--surface3); overflow: hidden; }
.scroll-cue i::after {
  content: ''; position: absolute; left: 0; top: -22px; width: 3px; height: 22px; border-radius: 3px; background: var(--accent);
  animation: cue-drop 1500ms cubic-bezier(0.5, 0, 0.5, 1) infinite;
}
.scroll-cue .icon { width: 22px; height: 22px; color: var(--accent); margin-top: -4px; animation: cue-nudge 1500ms cubic-bezier(0.5, 0, 0.5, 1) infinite; }
@keyframes cue-drop { to { transform: translateY(86px); } }
@keyframes cue-nudge { 50% { transform: translateY(6px); } }

/* store badges: the official artwork, stacked */
.store-badges { display: grid; gap: 10px; justify-items: start; }
.store-soon { font: 500 11px/1.2 var(--font-body); letter-spacing: 1px; text-transform: uppercase; color: var(--text2); }
.store-badge { display: block; line-height: 0; border-radius: 9px; transition: transform 120ms ease-out, opacity 120ms ease-out; }
.store-badge img { height: 48px; width: auto; }
a.store-badge:hover { transform: translateY(-2px); }
.cta .store-badges { justify-items: center; }

/* ------------------------------------------------------------ chapters */

section { scroll-margin-top: 72px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.chapter-grid { display: grid; gap: var(--xxl); align-items: center; }
.chapter-grid > * { min-width: 0; }
.chapter-copy { display: grid; gap: var(--lg); align-content: center; }
.chapter-copy .eyebrow { margin-bottom: 0; }
.chapter-copy h2 { max-width: 16em; }
.chapter-visual { display: grid; justify-items: center; }

.label.is-accent { color: var(--accent); }
.c0 { background: #36f814; }
.c1 { background: #14b8f8; }
.c2 { background: #f8a114; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* -------- pinned scenes: the section is tall, its content sticks, the scroll drives it.
   The background never moves; only what is on the stage changes. */
.scrolly { padding-bottom: var(--section); }
.js .scrolly { padding-bottom: 0; }
/* Height is set by the script from the step count (--scene-h). */
.js .scrolly { position: relative; height: var(--scene-h, 300svh); }
.snap { position: absolute; left: 0; width: 1px; height: 1px; scroll-snap-align: start; pointer-events: none; }
html.js { scroll-snap-type: y proximity; }
/* Touch screens scroll freely: snapping fights momentum scrolling on a phone. */
html.js.is-touch { scroll-snap-type: none; }
.snap { scroll-margin-top: 0; }
/* Measures the small viewport once (see the script's stableVh). */
.vh-probe { position: absolute; top: 0; left: 0; width: 0; height: 100vh; height: 100svh; visibility: hidden; pointer-events: none; }
.js .scrolly-sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; align-items: center; padding-top: 60px; overflow: hidden;
}
.js .scrolly-sticky > .wrap { width: 100%; }

/* the step list beside a scene */
.scene-steps { list-style: none; margin: var(--sm) 0 0; padding: 0; display: grid; gap: var(--md); }
.scene-step { position: relative; padding-left: var(--xl); transition: opacity 300ms ease-out; }
.scene-step::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 2px; border-radius: 999px; background: var(--surface3); transition: background-color 300ms ease-out; }
.scene-step h3 { font-size: 18px; margin-bottom: var(--xs); }
.scene-step p { color: var(--text2); font-size: 15px; }
.js .scene-step { opacity: 0.35; }
.js .scene-step.is-active { opacity: 1; }
.js .scene-step.is-active::before { background: var(--accent); }

/* elements that join the stage at a given step */
.js [data-from] { opacity: 0; transform: translateY(14px); transition: opacity 400ms ease-out, transform 400ms ease-out; }
.js [data-from].is-on { opacity: 1; transform: none; }

/* -------- chapter 1: the month, two clients */
.stepper { display: grid; gap: var(--md); }
.stepper-tabs { display: inline-flex; gap: 4px; padding: 4px; justify-self: start; background: var(--surface2); border-radius: var(--r-control); }
.stepper-tab {
  padding: 10px 16px; border: 0; border-radius: 6px; background: none; cursor: pointer;
  color: var(--text2); font: 500 12px/1 var(--font-body); letter-spacing: 1px; text-transform: uppercase;
  transition: background-color 200ms ease-out, color 200ms ease-out;
}
.stepper-tab:hover { color: var(--text1); }
.stepper-tab.is-active { background: var(--surface3); color: var(--text1); }
.stepper-tab.is-merit.is-active { background: var(--accent); color: #000; }
.day-track { display: grid; grid-template-columns: repeat(22, 1fr); gap: 3px; max-width: 420px; }
.day-track i { height: 6px; border-radius: 2px; background: var(--surface3); opacity: 1; transition: background-color 160ms ease-out; }
.day-track i:not(.is-on) { background: var(--surface3) !important; }
.day-count { font: 500 13px/1 var(--font-body); color: var(--text2); font-variant-numeric: tabular-nums; }
.js .scene-step { cursor: pointer; }
.js .scene-step:hover h3 { color: var(--accent); }
.js .scene-step:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.js .click-steps { display: grid; }
.js .click-step { grid-area: 1 / 1; opacity: 0; transform: translateY(16px); transition: opacity 450ms ease-out, transform 450ms ease-out; pointer-events: none; }
.js .click-step.is-active { opacity: 1; transform: none; pointer-events: auto; }
.click-step { display: grid; gap: var(--lg); align-content: start; }
.click-step + .click-step { margin-top: var(--xxl); }
.js .click-step + .click-step { margin-top: 0; }
.step-tag {
  justify-self: start; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--text3); color: var(--text2);
  font: 500 11px/1.2 var(--font-body); letter-spacing: 1px; text-transform: uppercase;
}
.step-tag.is-merit { border-color: var(--accent); color: var(--accent); }

.month { width: 100%; max-width: 460px; min-width: 0; margin: 0; display: grid; gap: var(--md); padding: var(--xl); background: var(--surface2); border-radius: var(--r-component); }
.month-top { display: grid; gap: var(--sm); justify-items: start; }
.month.is-earning .month-label { color: var(--accent); }
.month-amount {
  font: 700 clamp(34px, 9vw, 48px)/1 var(--font-display); letter-spacing: -1px;
  font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text3); transition: color 200ms ease-out;
}
.month.is-invoiced .month-amount, .month.is-earning .month-amount { color: var(--text1); }
.month-invoice {
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent);
  font: 500 11px/1.2 var(--font-body); letter-spacing: 1px; text-transform: uppercase; white-space: nowrap;
  opacity: 0; transform: translateY(6px); transition: opacity 200ms ease-out, transform 200ms ease-out;
}
.month.is-invoiced .month-invoice { opacity: 1; transform: none; }
.month-grid, .ledger-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.weekday { text-align: center; font: 500 11px/1 var(--font-body); color: var(--text3); padding-bottom: 4px; }
.day, .cell {
  position: relative; aspect-ratio: 1; display: grid; place-items: center;
  background: var(--surface3); border-radius: var(--r-element);
  font: 500 13px/1 var(--font-display); color: var(--text1);
}
.day > span, .cell > span { transform: translateY(-3px); }
.day.is-blank, .cell.is-blank { background: none; }
.day.is-weekend, .cell.is-weekend { background: var(--surface1); color: #6b6b6b; }
.day i, .cell i { position: absolute; left: 22%; right: 22%; bottom: 18%; height: 3px; border-radius: 999px; transform-origin: left; transform: scaleX(0); transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.day.is-earned { animation: day-pop 260ms cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes day-pop { from { transform: scale(0.86); } }
.day { color: var(--text3); transition: color 200ms ease-out; }
.day.is-passed { color: var(--text2); }
.day.is-earned { color: var(--text1); }
.day.is-earned i { transform: scaleX(1); }
.month.is-invoiced .day.is-invoice { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.month-caption { color: var(--text3); }
.ledger-legend { display: flex; flex-wrap: wrap; gap: var(--sm) var(--lg); font: 500 11px/1.2 var(--font-body); letter-spacing: 1px; text-transform: uppercase; color: var(--text2); }
.ledger-legend i { display: inline-block; width: 14px; height: 3px; margin-right: 6px; vertical-align: middle; border-radius: 999px; }

/* -------- the iPhone. An illustration of hardware, so it is the one place that
   rounds past 12px: the frame follows the real device's corners. */
.device {
  --w: min(400px, calc((100svh - 150px) / 2.07));
  position: relative; width: var(--w); padding: 3.2%;
  background: #050505; border: 3px solid #2f2f31; border-radius: 17% / 8.3%;
}
.device::before, .device::after { content: ''; position: absolute; width: 3px; background: #2f2f31; }
.device::before { right: -6px; top: 27%; height: 11%; border-radius: 0 2px 2px 0; }
.device::after {
  left: -6px; top: 17%; height: 22%; border-radius: 2px 0 0 2px;
  background: linear-gradient(#2f2f31 0 18%, transparent 18% 32%, #2f2f31 32% 62%, transparent 62% 70%, #2f2f31 70%);
}
.device-screen {
  position: relative; aspect-ratio: 1206 / 2622; overflow: hidden;
  border-radius: 13.6% / 6.25%; background: #000; container-type: inline-size;
}
.island, .sb-island {
  position: absolute; z-index: 2; top: 3.2cqw; left: 50%; width: 31cqw; height: 9cqw;
  transform: translateX(-50%); border-radius: 999px; background: #000;
}
.sb-island { box-shadow: inset 0 0 0 1px #141414; }

/* -------- chapter 3: the camera moves across real captures */
.layer {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 500ms ease-out, transform 1000ms cubic-bezier(0.25, 0.8, 0.25, 1), transform-origin 1000ms cubic-bezier(0.25, 0.8, 0.25, 1);
}
.layer-timer { opacity: 1; }
.layer-timer img { width: 100%; height: 100%; object-fit: cover; }
.layer-lock { transform-origin: 50% 70%; transform: scale(1.18); }
.layer-island { transform-origin: 50% 0%; transform: scale(1.25); }
[data-step='1'] .layer-lock { opacity: 1; transform: scale(1); }
[data-step='2'] .layer-island { opacity: 1; transform: scale(1.5); }
[data-step='3'] .layer-island { opacity: 1; transform-origin: 12% 14%; transform: scale(2); }
[data-step='1'] .layer-timer, [data-step='2'] .layer-timer, [data-step='3'] .layer-timer { opacity: 0; transform: scale(0.94); }

/* -------- app screens rebuilt in HTML, sized on the screen width (cqw) */
.app-screen { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 0 5cqw; color: var(--text1); font-family: var(--font-body); }
.sb { position: relative; flex: none; display: flex; justify-content: space-between; align-items: center; height: 14cqw; padding: 2cqw 4cqw 0; font: 700 4cqw/1 var(--font-body); }
.sb-right { display: flex; align-items: center; gap: 1.6cqw; }
.sb-signal { width: 4.4cqw; height: 3cqw; background: linear-gradient(90deg, #fff 0 18%, transparent 18% 27%, #fff 27% 45%, transparent 45% 55%, #fff 55% 73%, transparent 73% 82%, #fff 82%); clip-path: polygon(0 70%, 100% 0, 100% 100%, 0 100%); }
.sb-battery { width: 6.4cqw; height: 3cqw; border-radius: 0.9cqw; background: #fff; }
.ts-label { font: 500 2.5cqw/1.2 var(--font-body); letter-spacing: 0.25cqw; text-transform: uppercase; color: var(--text2); }
.ts-label.is-accent { color: var(--accent); }
.tabbar { margin-top: auto; flex: none; display: flex; justify-content: space-around; padding: 3cqw 0 7cqw; color: var(--text3); }
.tabbar .icon { width: 6cqw; height: 6cqw; }
.tabbar .is-active { color: var(--accent); }

/* timer */
.ts-ring { position: relative; width: 88cqw; aspect-ratio: 1; margin: 6cqw auto 0; }
.ts-ring svg { width: 100%; height: 100%; }
.ts-ring line { stroke: #333; stroke-width: 1.1; stroke-linecap: round; }
.ts-ring line.is-earned { stroke: var(--accent); }
.ts-card {
  position: absolute; inset: 22% 18%; display: grid; place-content: center; justify-items: center; gap: 2.4cqw;
  background: var(--surface2); border-radius: 2.4cqw; text-align: center;
}
.ts-amount { font: 700 10cqw/1 var(--font-display); letter-spacing: -0.3cqw; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ts-pill { display: inline-flex; align-items: center; gap: 1.6cqw; padding: 0.8cqw 0.8cqw 0.8cqw 2.4cqw; border-radius: 999px; border: 1px solid rgba(54, 248, 20, 0.3); background: var(--surface1); font: 500 1.9cqw/1 var(--font-body); letter-spacing: 0.15cqw; text-transform: uppercase; color: var(--text2); white-space: nowrap; }
.ts-pill b { color: var(--accent); font-weight: 500; }
.ts-pct { padding: 0.8cqw 1.4cqw; border-radius: 999px; background: var(--surface3); color: var(--text1); font-variant-numeric: tabular-nums; }
.ts-rate { display: inline-flex; align-items: center; gap: 1cqw; font: 500 2.4cqw/1 var(--font-body); letter-spacing: 0.2cqw; text-transform: uppercase; color: var(--text2); }
.ts-rate .icon { width: 3cqw; height: 3cqw; color: var(--accent); }
.ts-session { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 6cqw; padding: 4cqw; background: var(--surface2); border-radius: 2.4cqw; box-shadow: inset 0.9cqw 0 0 var(--accent); }
.ts-session strong { display: block; margin: 1.6cqw 0 2.4cqw; font: 700 3.6cqw/1.1 var(--font-display); text-transform: uppercase; }
.ts-chip { display: inline-flex; align-items: center; gap: 1.4cqw; font: 500 2.4cqw/1 var(--font-body); letter-spacing: 0.2cqw; text-transform: uppercase; }
.ts-chip .dot { width: 1.6cqw; height: 1.6cqw; }
.ts-elapsed { text-align: right; }
.ts-elapsed strong { margin-bottom: 0; font-size: 5.4cqw; font-variant-numeric: tabular-nums; }
.ts-pause { display: flex; align-items: center; justify-content: center; gap: 2cqw; margin-top: 5cqw; font: 500 3cqw/1 var(--font-body); letter-spacing: 0.3cqw; text-transform: uppercase; }
.ts-pause .icon { width: 5cqw; height: 5cqw; padding: 1.2cqw; border-radius: 50%; background: var(--surface3); }

/* ledger */
.ls-title { font: 700 8cqw/1 var(--font-display); margin: 2cqw 0 4cqw; }
.ls-week { padding: 3cqw; background: var(--surface2); border-radius: 2.4cqw; }
.ls-week > div { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: 2cqw; text-align: center; }
.ls-week span span, .ls-week > div > span { display: grid; justify-items: center; gap: 1.2cqw; }
.ls-week small { font: 500 2.1cqw/1 var(--font-body); letter-spacing: 0.2cqw; text-transform: uppercase; color: var(--text3); }
.ls-week b { font: 700 4.4cqw/1 var(--font-display); }
.ls-week i { width: 1.1cqw; height: 1.1cqw; border-radius: 50%; background: var(--accent); }
.ls-week .is-today b { color: var(--accent); }
.ls-month { font: 700 5cqw/1 var(--font-display); text-transform: uppercase; margin: 5cqw 0 2.4cqw; }
.ledger-screen .ledger-legend { gap: 1.4cqw 3cqw; margin-bottom: 3cqw; font-size: 2.1cqw; letter-spacing: 0.2cqw; }
.ledger-screen .ledger-legend i { width: 3cqw; height: 0.7cqw; margin-right: 1.2cqw; }
.ledger-screen .ledger-grid { gap: 1.3cqw; }
.ledger-screen .weekday { font-size: 2.2cqw; padding-bottom: 0.6cqw; }
.ledger-screen .cell { border-radius: 1.1cqw; font-size: 3cqw; }
.ledger-screen .cell i { height: 0.7cqw; }
.cell.is-drawn i { transform: scaleX(1); }
.cell.is-today { transition: color 300ms ease-out, box-shadow 300ms ease-out; }
.scene-ledger[data-step='2'] .cell.is-today { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ls-detail { display: grid; gap: 1.6cqw; margin-top: 4cqw; transition: opacity 400ms ease-out, transform 400ms ease-out; }
.js .ls-detail { opacity: 0; transform: translateY(3cqw); }
.js .scene-ledger[data-step='2'] .ls-detail { opacity: 1; transform: none; }
.ls-detail strong { font: 700 4cqw/1 var(--font-display); text-transform: uppercase; }
.ls-slot { display: flex; justify-content: space-between; align-items: center; padding: 3cqw; background: var(--surface2); border-radius: 2cqw; box-shadow: inset 0.9cqw 0 0 var(--accent); font: 700 3.4cqw/1 var(--font-display); }
.ls-slot b { font: 500 2.4cqw/1 var(--font-body); letter-spacing: 0.2cqw; text-transform: uppercase; color: var(--accent); }

/* profile */
.ps-head { display: flex; align-items: center; gap: 3cqw; margin-top: 3cqw; padding: 3.6cqw; background: var(--surface2); border-radius: 2.4cqw; }
.ps-head > span:nth-child(2) { display: grid; gap: 1.2cqw; flex: 1; }
.ps-head b { font: 700 4.2cqw/1 var(--font-display); text-transform: uppercase; }
.ps-head small { font: 500 2.4cqw/1 var(--font-body); letter-spacing: 0.2cqw; text-transform: uppercase; color: var(--accent); }
.ps-avatar { position: relative; display: grid; place-items: center; width: 12cqw; height: 12cqw; background: var(--surface3); border-radius: 1.6cqw; font: 700 5cqw/1 var(--font-display); }
.ps-avatar i { position: absolute; right: -0.8cqw; bottom: -0.8cqw; width: 2.6cqw; height: 2.6cqw; border-radius: 50%; background: var(--accent); }
.ps-gear { display: grid; place-items: center; width: 8cqw; height: 8cqw; background: var(--surface3); border-radius: 1.6cqw; }
.ps-gear .icon { width: 4.4cqw; height: 4.4cqw; }
.ps-yield { display: grid; gap: 2.6cqw; justify-items: start; margin-top: 3cqw; padding: 4.4cqw; background: var(--surface2); border-radius: 2.4cqw; }
.profile-screen .yield-tabs { display: flex; gap: 1.6cqw; }
.profile-screen .yield-tabs span { padding: 1cqw 2.2cqw; border-radius: 1cqw; background: var(--surface3); color: var(--text2); font: 500 2.4cqw/1 var(--font-body); letter-spacing: 0.2cqw; }
.profile-screen .yield-tabs .is-active { background: var(--accent); color: #000; }
.ps-amount { font: 700 9.4cqw/1 var(--font-display); letter-spacing: -0.3cqw; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ps-delta { display: inline-flex; align-items: center; gap: 1.2cqw; color: var(--accent); font: 500 2.8cqw/1 var(--font-display); transition: opacity 400ms ease-out; }
.ps-delta .icon { width: 3.4cqw; height: 3.4cqw; }
.js .ps-delta { opacity: 0; }
.js .scene-progress:not([data-step='0']) .ps-delta { opacity: 1; }
.ps-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 3cqw; margin-top: 3cqw; }
.ps-tiles span { display: grid; gap: 2cqw; padding: 3.6cqw; background: var(--surface2); border-radius: 2.4cqw; }
.ps-tiles span:first-child, .ps-tiles .is-wide { box-shadow: inset 0.9cqw 0 0 var(--accent); }
.ps-tiles .is-wide { grid-column: 1 / -1; }
.ps-tiles small { font: 500 2.4cqw/1 var(--font-body); letter-spacing: 0.2cqw; text-transform: uppercase; color: var(--text2); }
.ps-tiles b { font: 700 7cqw/1 var(--font-display); }
.ps-impact { margin: 5cqw 0 2.6cqw; }
.impact { list-style: none; margin: 0; padding: 0; display: grid; gap: 3cqw; }
.impact li { display: grid; grid-template-columns: 1fr auto; gap: 1.6cqw; font: 500 3.4cqw/1.1 var(--font-display); }
.impact b { font-weight: 700; font-variant-numeric: tabular-nums; }
.track { grid-column: 1 / -1; height: 0.7cqw; background: var(--surface3); border-radius: 999px; overflow: hidden; }
.track i { display: block; height: 100%; width: var(--w, 0%); border-radius: inherit; transition: width 900ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .track i { width: 0; }
.js .scene-progress[data-step='2'] .track i { width: var(--w, 0%); }

/* -------- chapter 6: clients */
.client-list { list-style: none; margin: 0; padding: 0; width: 100%; max-width: 440px; display: grid; gap: var(--sm); }
.client-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--md); padding: var(--lg) var(--xl); background: var(--surface2); border-radius: var(--r-component); }
.client-row .dot { width: 10px; height: 10px; }
.client-name { font: 500 18px/1.2 var(--font-display); }
.client-rate { font: 700 20px/1 var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.client-rate small { font: 400 13px/1 var(--font-body); color: var(--text2); }

/* -------- chapter 7: privacy */
.privacy-card { width: 100%; max-width: 440px; display: grid; gap: var(--xl); padding: var(--xl); background: var(--surface2); border-radius: var(--r-component); }
.privacy-lock { display: grid; place-items: center; width: 64px; height: 64px; background: var(--surface3); border-radius: var(--r-component); }
.privacy-lock .icon { width: 28px; height: 28px; }
.privacy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--md); }
.privacy-list li { display: flex; align-items: center; gap: var(--md); font: 500 18px/1.3 var(--font-display); }
.privacy-list .icon { width: 18px; height: 18px; flex: none; color: var(--accent); }

/* -------- end of page */
.faq { padding-block: var(--section); }
.faq h2 { margin-bottom: var(--xl); max-width: 22em; }
.cta { display: grid; justify-items: center; gap: var(--lg); padding-bottom: var(--section); text-align: center; }
/* The app icon, drawn as an icon: its own squircle, a hairline so it doesn't
   dissolve into the black page (illustration, like the iPhone frame). */
.cta > img { width: 72px; height: 72px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.12); }
.cta .body-lg { max-width: 30em; }
.maker { max-width: 34em; margin-top: var(--lg); color: var(--text2); font-size: 14px; }

/* faq */
.faq-list { display: grid; gap: var(--sm); max-width: 760px; }
details { background: var(--surface2); border-radius: var(--r-component); }
summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--lg);
  padding: var(--lg); cursor: pointer; list-style: none;
  font: 500 17px/1.35 var(--font-display);
  border-radius: var(--r-component);
}
summary::-webkit-details-marker { display: none; }
summary .icon { width: 18px; height: 18px; flex: none; color: var(--text2); transition: transform 200ms ease-out; }
details[open] summary .icon { transform: rotate(180deg); }
details p { padding: 0 var(--lg) var(--lg); color: var(--text2); font-size: 15px; }
details a { color: var(--text1); }

/* -------------------------------------------------------------- footer */

.site-footer { background: var(--surface1); padding: var(--xxl) 0 calc(var(--xxl) + env(safe-area-inset-bottom)); }
.footer-row { display: grid; gap: var(--lg); }
.footer-tagline { display: inline-flex; align-items: center; gap: var(--sm); font: 500 15px/1.3 var(--font-display); }
.footer-tagline img { border-radius: 6px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sm) var(--xl); }
.footer-links a { display: inline-block; padding: var(--xs) 0; color: var(--text2); font-size: 14px; text-decoration: none; }
.footer-links a:hover { color: var(--text1); text-decoration: underline; }
.footer-copy { color: var(--text2); font-size: 13px; }

/* --------------------------------------------------------------- legal */

.legal { max-width: 760px; padding-top: var(--xl); padding-bottom: var(--section); }
.back { display: inline-block; color: var(--text2); font-size: 14px; text-decoration: none; padding: var(--xs) 0; }
.back:hover { color: var(--text1); }
.legal h1 { margin: var(--lg) 0 var(--xl); font-size: clamp(28px, 6vw, 40px); }
.prose { color: #d6d6d6; font-size: 16px; }
.prose > * + * { margin-top: var(--lg); }
.prose h2 { font-size: 22px; line-height: 1.25; margin-top: var(--xxl); color: var(--text1); }
.prose h3 { font-size: 18px; margin-top: var(--xl); color: var(--text1); }
.prose strong { color: var(--text1); font-weight: 500; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: var(--sm); }
.prose code { font-family: var(--font-body); background: var(--surface3); padding: 1px 6px; border-radius: var(--r-element); font-size: 0.92em; }
.prose a { color: var(--text1); text-underline-offset: 2px; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; background: var(--surface2); border-radius: var(--r-component); }
.prose table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: var(--md) var(--lg); }
.prose th { font: 500 11px/1.2 var(--font-body); letter-spacing: 1px; text-transform: uppercase; color: var(--text2); }
.prose tbody tr:nth-child(odd) { background: var(--surface1); }

/* ----------------------------------------------------------------- 404 */

.not-found { min-height: 100vh; display: grid; align-content: center; justify-items: start; gap: var(--xl); padding-block: var(--xxxl); }
.not-found img { border-radius: var(--r-component); }
.not-found h1 { font-size: 32px; margin-bottom: var(--sm); }
.not-found p { color: var(--text2); }
.not-found a { color: var(--text1); }

/* ------------------------------------------------------------- layouts */

/* Phones: a pinned scene must fit one screen, so it shows the essentials. */
@media (max-width: 899px) {
  .js .scrolly-sticky { align-items: flex-start; padding-top: 76px; }
  .js .scrolly .chapter-grid { gap: var(--lg); }
  .js .scrolly .chapter-copy { gap: var(--sm); }
  .js .scrolly h2 { font-size: clamp(22px, 6.4vw, 30px); }
  .js .scrolly .body-lg { font-size: 15px; }
  /* All steps share one cell, so the panel keeps the height of the longest
     step and the visual below never jumps when the step changes. */
  .js .scene-steps { display: grid; }
  .js .scene-step { grid-area: 1 / 1; opacity: 0; transform: translateY(8px); transition: opacity 300ms ease-out, transform 300ms ease-out; pointer-events: none; }
  .js .scene-step.is-active { opacity: 1; transform: none; pointer-events: auto; }
  .js .scene-step { padding-left: var(--lg); }
  .js .scene-click .month { padding: var(--lg); gap: var(--sm); }
  .js .scene-click .month-grid { gap: 4px; }
  .device { --w: min(58vw, calc((100svh - 300px) / 2.07)); }
}
@media (max-width: 899px) {
  .hero h1 { white-space: normal; }
  .monument { padding-block: 8vh 0; }
  /* On a phone the content fills the first screen, so the cue sits in the
     flow right under the amount instead of floating over the buttons. */
  /* Same proportion as on a laptop: the amount, as wide as the screen allows,
     fills 80 % of the ring, which overflows the sides a little. */
  .hero-ring { width: calc((100vw - 40px) * 1.25); }
  .scroll-cue { position: relative; left: auto; bottom: auto; transform: none; justify-self: center; margin-top: 44px; }
  .scroll-cue i { height: 44px; }
  @keyframes cue-drop { to { transform: translateY(66px); } }
  .hero-stage { grid-template-rows: auto; align-content: start; }
  .monument { order: 0; }
  .hero-rate { order: 1; margin-top: var(--xl); }
  .scroll-cue { order: 2; }
  .hero-band { order: 3; }
}
/* Small phones: the definition and both badges stay above the fold. */
@media (max-width: 480px) {
  .lead { font-size: 16px; }
  .hero .store-badges { grid-template-columns: auto auto; justify-content: start; column-gap: var(--sm); }
  .hero .store-soon { grid-column: 1 / -1; }
  .store-badge img { height: 44px; }
}
@media (max-width: 899px) and (max-height: 700px) {
  .js .scrolly .body-lg { display: none; }
  .js .scene-click .month-caption { display: none; }
  .js .scene-click .stepper { gap: var(--sm); }
}

@media (min-width: 640px) {
  :root { --gutter: 24px; --section: 112px; }
  .footer-row { grid-template-columns: 1fr auto; align-items: center; }
  .footer-copy { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
  :root { --section: 160px; }
  /* The stage pins while the first scroll turns the ring away. */
  .js .hero { height: 130vh; }
  .js .hero-stage { position: sticky; top: 0; height: 100vh; height: 100svh; }
  .hero-band {
    max-width: none; padding-inline: clamp(24px, 3vw, 56px); padding-top: 0; padding-bottom: 76px;
    grid-template-columns: auto auto; justify-content: space-between; column-gap: clamp(32px, 3.5vw, 72px);
  }
  .hero-act { justify-items: end; }
  .hero-act .store-badges { justify-items: end; }
  /* Centred halfway between the rate line and the scroll cue (--rate-y, set by the script). */
  .hero-rate { position: absolute; left: 50%; top: var(--rate-y, 70%); transform: translate(-50%, -50%); }

  /* The zigzag: text and visual swap sides from one scene to the next. */
  .chapter-grid { grid-template-columns: 1fr 1fr; gap: 96px; }
  .chapter-grid.is-flipped > .chapter-visual { order: -1; }
  .scrolly h2, .faq h2, .cta h2 { font-size: clamp(40px, 3.1vw, 60px); letter-spacing: -0.02em; }
  .scene-step h3 { font-size: clamp(18px, 1.35vw, 24px); }
  .scene-step p { font-size: clamp(15px, 1.05vw, 18px); }
  .scene-steps { gap: clamp(12px, 1.6vh, 24px); }
  .month, .client-list, .privacy-card { max-width: clamp(440px, 34vw, 600px); }
  .click-step .body-lg { font-size: clamp(18px, 1.2vw, 21px); }
  .month { padding: var(--xxl); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ring-ticks line.is-live { opacity: 1; }
}
