/* SplitFree site. One ground (paper), one ink, one accent (the app's plum).
   Display and figures: Anek Latin, whose width axis runs from condensed to wide.
   Reading: Literata. */

:root {
  --paper: #f6efe3;
  --surface: #fcf9f3;
  --step: #ece2d2;
  --step-2: #e2d6c3;
  --ink: #2b1621;
  --muted: #6c5662;
  --accent: #6f044d;
  --accent-ink: #fbf6ee;
  --night: #1c0612;
  --stage: #33091f;
  --night-ink: #f6efe3;
  --night-muted: #c9b3bf;
  --pink: #f4d9e6;
  --green: #0b7a45;
  --red: #b3261e;
  --line: #dccfbd;
  --gold: #ffcb45;

  --display: "Anek Latin", "Arial Narrow", system-ui, sans-serif;
  --text: "Literata", Georgia, "Times New Roman", serif;

  --step-small: 0.875rem;
  --step-body: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);
  --step-ui: 1.0625rem;
  --step-lead: clamp(1.25rem, 1.05rem + 0.75vw, 1.625rem);
  --step-head: clamp(2.25rem, 1.35rem + 3.4vw, 4.5rem);
  --step-display: clamp(5.5rem, 13.2vw, 16rem);

  --gutter: 20px;
  --margin: clamp(20px, 4.4vw, 64px);
  --radius: 12px;
  --nav-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --sb-thumb: #b9709a;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; scroll-behavior: smooth;
  /* A thin plum rail instead of the grey system bar; site.js swaps the thumb
     colour with the ground under it so it stays visible on dark and on paper. */
  scrollbar-width: thin; scrollbar-color: var(--sb-thumb) transparent;
}
html[data-ground="light"] { --sb-thumb: var(--accent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--sb-thumb); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-body)/1.6 var(--text);
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
img, video, canvas { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
a { color: inherit; text-decoration-thickness: 0.07em; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--accent); }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 600; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 16px; top: -60px; z-index: 120; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 999px; }
.skip:focus { top: 16px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font: 600 var(--step-ui)/1 var(--display); font-stretch: 100%; letter-spacing: 0.005em;
  text-decoration: none; border: 0; cursor: pointer;
  transition: transform 160ms var(--ease), background-color 160ms;
}
.btn:hover { background: #860a5e; }
.btn:active { transform: scale(0.97); }
.btn-light { background: var(--night-ink); color: var(--night); }
.btn-light:hover { background: #fff; }

/* ----------------------------------------------------------------- loader */
.loader { display: none; }
.js .loader {
  display: block; position: fixed; inset: 0; z-index: 100;
  --c: clamp(92px, 11vmin, 132px); --t: calc(var(--c) * 0.085); --rx: 0.01px; --ry: 0.01px;
  /* failsafe: if the script that removes it never runs, it still goes */
  animation: gone 1ms linear 7s forwards;
}
@keyframes gone { to { opacity: 0; visibility: hidden; } }
.loader-sheet {
  position: absolute; inset: 0;
  -webkit-mask: radial-gradient(var(--rx) var(--ry) at 50% 50%, transparent 99.4%, #000 100%);
  mask: radial-gradient(var(--rx) var(--ry) at 50% 50%, transparent 99.4%, #000 100%);
}
.loader-paper { position: absolute; inset: 0; background: #f7f1e5; }
.loader-word {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #6f044d; transition: transform 700ms var(--ease), opacity 400ms;
}
.loader.has-coin .loader-word { transform: translateY(calc(var(--c) * -1.25)); }
.loader.is-leaving .loader-word { opacity: 0; transition-duration: 700ms, 260ms; }
.loader-mark { height: clamp(2.6rem, 6vw, 4rem); width: auto; overflow: visible; }
/* The app's own write-on: each letter stroked, then inked, 46ms apart. */
.loader-mark path {
  fill: currentColor; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  animation: draw 260ms linear both, ink 260ms ease-out both;
  animation-delay: calc(80ms + var(--i) * 46ms), calc(180ms + var(--i) * 46ms);
}
.loader.is-quick .loader-mark path, .loader.is-quick .loader-tag { animation: none; }
@keyframes draw { from { stroke-dasharray: 1; stroke-dashoffset: 1; } to { stroke-dasharray: 1; stroke-dashoffset: 0; } }
@keyframes ink { from { fill-opacity: 0; } to { fill-opacity: 1; } }
.loader-tag {
  margin: 0.9rem 0 0; font: 600 var(--step-small)/1 var(--display); letter-spacing: 0.16em; text-transform: uppercase;
  opacity: 0.72; animation: rise 320ms ease 520ms both;
}
@keyframes rise { from { opacity: 0; transform: translateY(0.5rem); } to { opacity: 0.72; transform: none; } }

/* the wind it leaves while it rises: --v is its upward speed, 0..1, from site.js */
.coin-trail {
  position: absolute; left: 50%; top: 88%; width: 70%; height: calc(var(--c) * 0.9);
  transform: translateX(-50%) scaleY(calc(0.35 + 0.65 * var(--v, 0))); transform-origin: 50% 0;
  display: flex; justify-content: space-between; opacity: var(--v, 0); pointer-events: none;
}
.coin-trail i { width: 3px; border-radius: 3px; background: linear-gradient(rgb(111 4 77 / 0.5), rgb(111 4 77 / 0)); }
.coin-trail i:nth-child(1) { height: 55%; margin-top: 4%; }
.coin-trail i:nth-child(2) { height: 100%; }
.coin-trail i:nth-child(3) { height: 65%; margin-top: 2%; }
/* ripples on the paper under the floating coin */
.loader-waves {
  position: absolute; left: 50%; top: calc(50% + var(--c) * 0.72); width: var(--c); height: calc(var(--c) * 0.32);
  margin-left: calc(var(--c) / -2); pointer-events: none;
}
.loader-waves i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgb(111 4 77 / 0.4); opacity: 0; }
.loader.has-coin .loader-waves i { animation: ripple 2.4s cubic-bezier(0.2, 0.6, 0.3, 1) infinite; animation-delay: calc(var(--n) * 0.8s + 0.5s); }
@keyframes ripple { from { transform: scale(0.7); opacity: 0.7; } to { transform: scale(3.4); opacity: 0; } }
.loader.is-leaving .loader-waves { opacity: 0; transition: opacity 300ms; }
.loader-coin {
  position: absolute; left: 50%; top: 50%; width: var(--c); height: var(--c);
  margin: calc(var(--c) / -2) 0 0 calc(var(--c) / -2);
  perspective: 900px; opacity: 0;
  transform: translateY(calc(var(--c) * 0.55));
}
.coin3d { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.coin3d-face {
  position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%;
  backface-visibility: hidden; transform: translateZ(calc(var(--t) / 2));
}
.coin3d-back {
  transform: rotateY(180deg) translateZ(calc(var(--t) / 2));
  background: var(--gold); padding: 20%; object-fit: contain;
  box-shadow: inset 0 0 0 calc(var(--c) * 0.05) #f2b632;
}
.coin3d-ring { display: none; background: none; border: calc(var(--c) * 0.06) solid #f2b632; box-shadow: 0 0 0 1px #b07a0c, inset 0 0 0 1px #b07a0c; transform: rotateY(180deg) translateZ(calc(var(--t) / 2)); }
.coin3d.is-open .coin3d-ring { display: block; }
.coin3d.is-open .coin3d-back { visibility: hidden; }
.coin3d-edge { position: absolute; inset: 0; transform-style: preserve-3d; }
.coin3d-edge i {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--c) * 3.1416 / 36 + 1px); height: var(--t);
  margin: calc(var(--t) / -2) 0 0 calc((var(--c) * 3.1416 / 36 + 1px) / -2);
  background: repeating-linear-gradient(90deg, #f2b632 0 2px, #b07a0c 2px 3px);
  transform: rotateZ(var(--a)) translateY(calc(var(--c) / -2)) rotateX(90deg);
}

/* -------------------------------------------------------------------- nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--margin); color: var(--night-ink);
  font: 500 var(--step-ui)/1 var(--display); letter-spacing: 0.01em;
  transition: transform 420ms var(--ease), background-color 300ms, color 300ms, backdrop-filter 300ms;
}
.nav.is-solid { background: rgb(28 6 18 / 0.34); -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2); }
.nav[data-ground="light"] { color: var(--ink); }
.nav[data-ground="light"].is-solid { background: rgb(246 239 227 / 0.5); }
.nav.is-hidden { transform: translateY(-100%); }
.nav-mark { display: inline-block; padding: 11px 0; font: 700 1.625rem/1 var(--display); font-stretch: 125%; letter-spacing: -0.045em; text-decoration: none; }
.nav nav { display: flex; align-items: center; gap: 28px; }
.nav nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; transition: opacity 160ms; }
.nav nav a:hover { opacity: 0.7; }
.nav .nav-action { padding: 12px 18px; border-radius: 999px; background: var(--night-ink); color: var(--night); transition: transform 160ms var(--ease), background-color 300ms, color 300ms; }
.nav[data-ground="light"] .nav-action { background: var(--accent); color: var(--accent-ink); }
.nav .nav-action:hover { opacity: 1; transform: translateY(-1px); }

/* ------------------------------------------------------------- the scene */
.scene { position: relative; isolation: isolate; background: var(--night); color: var(--night-ink); }
.stage {
  position: sticky; top: 0; z-index: 1; height: 100svh;
  overflow: hidden; pointer-events: none;
}
/* the screens scroll over the pinned stage */
.flow { position: relative; margin-top: -100svh; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: auto; touch-action: pan-y; }
.stage-ui { position: absolute; inset: 0; pointer-events: none; }

/* No WebGL: the same phone, flat. */
.phone-dom {
  display: none; position: absolute; left: 50%; top: 47%;
  height: 64svh; aspect-ratio: 1052 / 2282; padding: 1.1%;
  border-radius: 9% / 4.2%; background: #120309;
  box-shadow: 0 0 0 2px #4a2a3a, 0 40px 80px rgb(0 0 0 / 0.45);
  transform: translate(-50%, -50%); transition: left 700ms var(--ease), top 700ms var(--ease), transform 700ms var(--ease);
}
.phone-dom img, .phone-dom video { width: 100%; height: 100%; object-fit: cover; border-radius: 7.4% / 3.4%; }
.phone-dom video { position: absolute; inset: 1.1%; width: 97.8%; height: 97.8%; opacity: 0; transition: opacity 300ms; }
.phone-dom.has-video video { opacity: 1; }
.no-webgl .phone-dom { display: block; }
.no-webgl .stage[data-ch]:not([data-ch="-1"]) .phone-dom { left: 70%; transform: translate(-50%, -50%) rotate(-3deg); height: 76svh; }

.tag {
  position: absolute; left: 0; top: 0; transform: translate(-50%, 0); white-space: nowrap; text-align: center;
  font: 600 var(--step-small)/1.2 var(--display); color: var(--night-ink); transition: opacity 300ms;
}
.tag b { display: block; font-size: var(--step-ui); font-weight: 700; color: var(--gold); }

/* ------------------------------------------------------------------- hero */
.hero { position: relative; height: 100svh; min-height: 560px; }
/* "split" and "free" either side of the phone, which stands in the gap */
.wordmark {
  position: absolute; z-index: 0; left: 0; right: 0; top: 44%; transform: translateY(-50%);
  display: flex; justify-content: center; gap: calc(100svh * 0.62 * 0.4646 + 4vw);
  margin: 0; white-space: nowrap; pointer-events: none;
  font: 700 clamp(4rem, 12.5vw, 15rem)/0.8 var(--display); font-stretch: 125%;
  letter-spacing: -0.05em; color: var(--night-ink);
}
.wordmark span:first-child { text-align: right; }
.wordmark, .hero-copy { transition: opacity 120ms linear; }
.hero-copy {
  position: absolute; z-index: 2; left: 50%; bottom: max(36px, 5svh); transform: translateX(-50%);
  width: min(560px, calc(100% - 2 * var(--margin)));
  display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center;
}
.hero-line { margin: 0; font-size: var(--step-lead); line-height: 1.38; color: var(--night-ink); text-wrap: balance; }

/* ------------------------------------------------------------------ story */
.story { position: relative; }
.story-steps { display: none; }
.story-copy { padding: 96px var(--margin); display: grid; gap: 96px; }
.chapter h2 { font: 600 var(--step-head)/1.02 var(--display); font-stretch: 92%; letter-spacing: -0.025em; max-width: 12ch; text-wrap: balance; }
.ch-line { margin: 24px 0 0; max-width: 34ch; font-size: var(--step-lead); line-height: 1.42; color: var(--night-ink); }
.ch-shot { width: min(300px, 70vw); margin-top: 32px; border-radius: 28px; }

/* Pinned: five screens in all, hero plus four chapters. */
.js .story { height: 400svh; }
.js .story-pin { position: sticky; top: 0; z-index: 2; height: 100svh; pointer-events: none; }
.js .story-copy { position: absolute; left: var(--margin); top: 0; bottom: 0; width: min(46ch, 35vw); padding: 0; display: block; }
.js .chapter {
  position: absolute; left: 0; right: 0; top: 50%; pointer-events: auto;
  opacity: 0; visibility: hidden; transform: translateY(calc(-50% + 28px));
  transition: opacity 200ms linear, transform 400ms var(--ease), visibility 0s 200ms;
}
.js .chapter.is-on { opacity: 1; visibility: visible; transform: translateY(-50%); transition: opacity 520ms var(--ease) 180ms, transform 720ms var(--ease) 180ms, visibility 0s; }
.js .chapter.is-past { transform: translateY(calc(-50% - 28px)); }
.js .ch-shot { display: none; }
.js .story-steps {
  display: flex; gap: 28px; position: absolute; left: var(--margin); bottom: 40px; margin: 0; padding: 0; list-style: none;
  font: 500 var(--step-small)/1 var(--display); color: var(--night-muted);
}
.story-steps li { display: flex; gap: 8px; align-items: baseline; transition: color 300ms; }
.story-steps li.is-on { color: var(--night-ink); }
.story-steps li::after { content: ""; display: block; width: 0; height: 2px; margin-left: 4px; align-self: center; background: var(--gold); transition: width 400ms var(--ease); }
.story-steps li.is-on::after { width: 28px; }

/* ------------------------------------------------------- receipt (privacy) */
/* ------------------------------------------------------- receipt (privacy) */
.receipt-band {
  background: var(--accent); padding: 200px var(--margin) 220px;
  display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); column-gap: clamp(32px, 6vw, 120px); align-items: start;
}
.zero { grid-column: 2; grid-row: 1; position: sticky; top: 15vh; color: var(--accent-ink); }
.zero-fig { margin: 0; font: 700 var(--step-display)/0.8 var(--display); font-stretch: 125%; letter-spacing: -0.05em; }
.zero-cap { margin: 28px 0 0; max-width: 22ch; font-size: var(--step-lead); line-height: 1.35; }
.receipt {
  grid-column: 1; grid-row: 1;
  position: relative; max-width: 640px; margin: 0; background: var(--surface); color: var(--ink);
  padding: 60px 60px 0;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), 98.21% 100%, 96.43% calc(100% - 10px), 94.64% 100%, 92.86% calc(100% - 10px), 91.07% 100%, 89.29% calc(100% - 10px), 87.5% 100%, 85.71% calc(100% - 10px), 83.93% 100%, 82.14% calc(100% - 10px), 80.36% 100%, 78.57% calc(100% - 10px), 76.79% 100%, 75% calc(100% - 10px), 73.21% 100%, 71.43% calc(100% - 10px), 69.64% 100%, 67.86% calc(100% - 10px), 66.07% 100%, 64.29% calc(100% - 10px), 62.5% 100%, 60.71% calc(100% - 10px), 58.93% 100%, 57.14% calc(100% - 10px), 55.36% 100%, 53.57% calc(100% - 10px), 51.79% 100%, 50% calc(100% - 10px), 48.21% 100%, 46.43% calc(100% - 10px), 44.64% 100%, 42.86% calc(100% - 10px), 41.07% 100%, 39.29% calc(100% - 10px), 37.5% 100%, 35.71% calc(100% - 10px), 33.93% 100%, 32.14% calc(100% - 10px), 30.36% 100%, 28.57% calc(100% - 10px), 26.79% 100%, 25% calc(100% - 10px), 23.21% 100%, 21.43% calc(100% - 10px), 19.64% 100%, 17.86% calc(100% - 10px), 16.07% 100%, 14.29% calc(100% - 10px), 12.5% 100%, 10.71% calc(100% - 10px), 8.929% 100%, 7.143% calc(100% - 10px), 5.357% 100%, 3.571% calc(100% - 10px), 1.786% 100%, 0% calc(100% - 10px));
}
.receipt-title { font: 600 var(--step-head)/1 var(--display); font-stretch: 88%; letter-spacing: -0.025em; margin-bottom: 32px; max-width: 12ch; }
.receipt > p { font-size: var(--step-body); line-height: 1.6; }
.receipt-items { width: 100%; border-collapse: collapse; margin: 36px 0 28px; font-family: var(--display); font-stretch: 84%; font-size: var(--step-body); }
.receipt-items th, .receipt-items td { padding: 9px 0; vertical-align: baseline; }
.receipt-items th { text-align: left; font-weight: 500; }
.receipt-items td { text-align: right; font-weight: 700; }
.receipt-items .total th, .receipt-items .total td { padding-top: 22px; font-size: var(--step-lead); font-weight: 700; color: var(--accent); }
.sign { font: italic 500 var(--step-lead)/1.2 var(--text); margin: 0 0 40px; }
.sign span { display: block; font: 400 var(--step-small)/1.4 var(--display); color: var(--muted); font-style: normal; margin-top: 4px; }
.tear {
  margin: 0 -60px; padding: 30px 60px 54px; background: var(--step);
  border-top: 5px dotted var(--surface);
  display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: center; justify-content: space-between;
}
.tear p { margin: 0; flex: 1 1 260px; font-size: var(--step-body); line-height: 1.5; }
.tear .btn-light { background: var(--accent); color: var(--accent-ink); }
.receipt-band { padding-bottom: 200px; }
.tear .btn { background: var(--accent); color: var(--accent-ink); }

/* -------------------------------------------- questions + get it, one screen */
.end {
  min-height: 100svh; background: var(--paper);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px clamp(40px, 7vw, 140px);
  padding: calc(var(--nav-h) + 40px) var(--margin) 48px;
}
.faq-title { font: 600 var(--step-head)/1 var(--display); font-stretch: 90%; letter-spacing: -0.03em; margin-bottom: 32px; }
.faq-list { display: grid; gap: 8px; }
.faq-list details { background: var(--surface); border-radius: 16px; transition: background-color 200ms; }
.faq-list details[open] { background: var(--step); }
.faq-list summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 18px 56px 18px 22px; font: 600 var(--step-ui)/1.3 var(--display); font-stretch: 100%;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before, .faq-list summary::after {
  content: ""; position: absolute; right: 24px; top: 50%; width: 14px; height: 2px; margin-top: -1px;
  background: var(--accent); border-radius: 2px; transition: transform 260ms var(--ease);
}
.faq-list summary::after { transform: rotate(90deg); }
.faq-list details[open] summary::after { transform: rotate(0deg); }
.faq-list summary:hover { color: var(--accent); }
.faq-list details p { margin: 0; padding: 0 56px 20px 22px; max-width: 60ch; font-size: var(--step-body); line-height: 1.55; }
@media (prefers-reduced-motion: no-preference) {
  .faq-list details[open] p { animation: rise-in 360ms var(--ease) both; }
  @keyframes rise-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
}

.get { display: flex; flex-direction: column; align-items: flex-start; padding-top: 6px; }
.get-title { font: 600 var(--step-head)/1 var(--display); font-stretch: 90%; letter-spacing: -0.03em; margin-bottom: 20px; }
.get-line { font-size: var(--step-lead); line-height: 1.4; margin: 0 0 28px; max-width: 24ch; }
.get-qr { margin: auto 0 0; align-self: flex-end; display: flex; align-items: flex-end; gap: 20px; padding-top: 40px; }
.get-qr img { width: 168px; height: 168px; padding: 14px; background: var(--surface); border-radius: 18px; }
.get-qr figcaption { max-width: 16ch; font: 500 var(--step-small)/1.45 var(--display); color: var(--muted); text-align: right; order: -1; }

/* ----------------------------------------------------------------- footer */
.foot {
  background: var(--night); color: var(--night-ink); padding: 56px var(--margin) 40px;
  display: grid; grid-template-columns: auto 1fr; gap: 24px 48px; align-items: baseline;
  font-family: var(--display);
}
/* a row of the app's coin faces, rising and falling one after another */
.foot-coins { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; min-height: 84px; margin-bottom: 12px; }
/* --s is the dock magnification site.js sets from the pointer's distance */
.foot-coins img {
  width: calc(44px * var(--s, 1)); height: auto; aspect-ratio: 1; transform-origin: 50% 100%;
  transition: width 120ms ease-out; animation: bob 3.2s ease-in-out infinite; animation-delay: calc(var(--n) * -0.28s);
}
.foot-coins:hover img { animation-play-state: paused; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-8px) rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) { .foot-coins img, .loader-waves i { animation: none; } }
.foot-mark { font: 700 var(--step-lead)/1 var(--display); font-stretch: 125%; letter-spacing: -0.04em; margin: 0; }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 32px; font: 500 var(--step-ui)/1.3 var(--display); }
.foot-links a { display: inline-block; padding: 12px 0; color: var(--night-ink); text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.foot-legal { grid-column: 1 / -1; margin: 24px 0 0; font: 400 var(--step-small)/1.5 var(--display); color: var(--night-muted); max-width: 70ch; }
.foot-legal a { color: var(--night-ink); }

/* ------------------------------------------------------------- reveal */
.js [data-reveal] { opacity: 0; transform: translateY(24px); }
.js [data-reveal].in {
  opacity: 1; transform: none;
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { transform: none; }
  .js [data-reveal].in { transition: opacity 300ms; }
  .js .chapter, .js .chapter.is-on, .js .chapter.is-past { transform: translateY(-50%); }
}

/* ------------------------------------------------------------- tablet */
@media (max-width: 1180px) {
  .receipt-band { grid-template-columns: 1fr; }
  .zero { grid-column: 1; grid-row: 1; position: static; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 0 0 64px; }
  .zero-cap { margin: 0; text-align: right; }
  .receipt { grid-row: 2; }
}

/* -------------------------------------------------------------- phone */
@media (max-width: 899px) {
  :root { --margin: 20px; --nav-h: 60px; }
  .nav { gap: 12px; }
  .nav-mark { font-size: 1.375rem; }
  .nav nav { gap: 18px; }
  .nav nav a:not(.nav-action):not([href="#get"]) { display: none; }
  .nav .nav-action { padding: 11px 16px; }


  .receipt-band { padding: 120px 0 140px; }
  .receipt { padding: 40px 24px 0; }
  .tear { margin: 0 -24px; padding: 26px 24px 46px; }
  .receipt-items { font-size: 1.0625rem; }
  .zero { margin-top: 0; padding: 0 var(--margin); }

  .end { grid-template-columns: 1fr; gap: 56px; padding-top: calc(var(--nav-h) + 32px); min-height: 0; }
  .faq-list summary { padding: 16px 52px 16px 18px; min-height: 52px; }
  .faq-list details p { padding: 0 20px 18px 18px; }
  .get-qr { display: none; }

  .foot { grid-template-columns: 1fr; }
  .foot-links { justify-content: flex-start; flex-direction: column; gap: 0; }
  .foot-legal { font-size: 1rem; }
}
/* Phone layout of the hero and the story: phone in the middle, words in the
   lower middle. The same test as stage.js's "wide", so the canvas and the
   words always agree (portrait tablets get this too). */
@media (max-width: 599px), (max-aspect-ratio: 21/20) {
  .wordmark { top: calc(var(--nav-h) + 6svh); transform: none; gap: 0; font-size: 21vw; }
  .hero-copy { bottom: max(28px, 4svh); gap: 18px; }
  .hero-line { font-size: 1.125rem; }

  /* phone in the middle, words in the lower middle */
  .js .story-copy { left: var(--margin); right: var(--margin); width: auto; top: auto; bottom: max(28px, env(safe-area-inset-bottom)); height: 34svh; text-align: center; }
  .js .chapter { top: auto; bottom: 0; transform: translateY(20px); }
  .js .chapter.is-on { transform: none; }
  .js .chapter.is-past { transform: translateY(-20px); }
  .chapter h2 { font-size: clamp(1.875rem, 8vw, 2.5rem); max-width: none; }
  .ch-line { margin: 12px auto 0; font-size: 1.0625rem; max-width: 32ch; }
  .js .story-steps { display: none; }
  .no-webgl .stage[data-ch]:not([data-ch="-1"]) .phone-dom { left: 50%; top: 36%; height: 52svh; transform: translate(-50%, -50%); }
  .phone-dom { height: 50svh; top: 50%; }
}
/* landscape phones: the desktop arrangement, scaled to a short screen */
@media (max-height: 500px) and (min-aspect-ratio: 21/20) {
  .hero { min-height: 0; }
  .wordmark { top: 38%; font-size: 9.5vw; gap: calc(100svh * 0.5 * 1.33); } /* room for the coin ring too */
  .tag { font-size: 0.75rem; }
  .tag b { font-size: 0.875rem; }
  .hero-copy { bottom: 14px; gap: 10px; }
  .hero-line { font-size: 1rem; }
  .chapter h2 { font-size: 1.75rem; }
  .ch-line { font-size: 1rem; margin-top: 12px; }
  .js .story-steps { display: none; }
}
@media (max-width: 599px) and (max-height: 700px), (max-aspect-ratio: 21/20) and (max-height: 700px) {
  .js .story-copy { height: 38svh; }
  .chapter h2 { font-size: 1.75rem; }
  .ch-line { font-size: 1rem; }
}

/* ================================================================ policy */
.policy-page { background: var(--paper); }
.policy-bar { display: flex; justify-content: space-between; align-items: center; padding: 22px var(--margin); }
.policy-mark { display: inline-block; padding: 11px 0; font: 700 1.75rem/1 var(--display); font-stretch: 125%; letter-spacing: -0.045em; text-decoration: none; }
.policy {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px;
  padding: 72px var(--margin) 160px;
}
.policy-head { grid-column: 6 / span 7; grid-row: 1; max-width: 68ch; }
.policy-side { grid-column: 1 / span 4; grid-row: 1 / span 2; }
.policy-side > * { position: sticky; }
.glance { top: 24px; background: var(--surface); padding: 28px 28px 34px; max-width: 360px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), 98.21% 100%, 96.43% calc(100% - 10px), 94.64% 100%, 92.86% calc(100% - 10px), 91.07% 100%, 89.29% calc(100% - 10px), 87.5% 100%, 85.71% calc(100% - 10px), 83.93% 100%, 82.14% calc(100% - 10px), 80.36% 100%, 78.57% calc(100% - 10px), 76.79% 100%, 75% calc(100% - 10px), 73.21% 100%, 71.43% calc(100% - 10px), 69.64% 100%, 67.86% calc(100% - 10px), 66.07% 100%, 64.29% calc(100% - 10px), 62.5% 100%, 60.71% calc(100% - 10px), 58.93% 100%, 57.14% calc(100% - 10px), 55.36% 100%, 53.57% calc(100% - 10px), 51.79% 100%, 50% calc(100% - 10px), 48.21% 100%, 46.43% calc(100% - 10px), 44.64% 100%, 42.86% calc(100% - 10px), 41.07% 100%, 39.29% calc(100% - 10px), 37.5% 100%, 35.71% calc(100% - 10px), 33.93% 100%, 32.14% calc(100% - 10px), 30.36% 100%, 28.57% calc(100% - 10px), 26.79% 100%, 25% calc(100% - 10px), 23.21% 100%, 21.43% calc(100% - 10px), 19.64% 100%, 17.86% calc(100% - 10px), 16.07% 100%, 14.29% calc(100% - 10px), 12.5% 100%, 10.71% calc(100% - 10px), 8.929% 100%, 7.143% calc(100% - 10px), 5.357% 100%, 3.571% calc(100% - 10px), 1.786% 100%, 0% calc(100% - 10px)); }
.glance-title { font: 600 var(--step-lead)/1.2 var(--display); margin: 0 0 8px; }
.glance-items { margin: 0; font-size: 1.0625rem; }
.toc { top: 390px; display: grid; gap: 4px; margin-top: 36px; max-width: 360px; }
.toc a { font: 500 1rem/1.3 var(--display); color: var(--muted); text-decoration: none; padding: 6px 0; transition: color 160ms, transform 160ms var(--ease); }
.toc a:hover { color: var(--ink); transform: translateX(4px); }
.policy-text { grid-column: 6 / span 7; grid-row: 2; max-width: 68ch; }
.policy-title { font: 600 var(--step-head)/1 var(--display); font-stretch: 90%; letter-spacing: -0.03em; margin-bottom: 28px; }
.policy-meta { font-size: var(--step-body); }
.policy-text h2 { font: 600 var(--step-lead)/1.2 var(--display); font-stretch: 100%; letter-spacing: -0.01em; margin: 72px 0 18px; scroll-margin-top: 24px; }
.policy-text ul { padding-left: 1.2em; margin: 0 0 1em; }
.policy-text li { margin: 0 0 10px; }
.policy-text b { font-weight: 600; }
.nowrap { white-space: nowrap; }
.table-wrap { margin: 8px 0 20px; }
.policy-table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.5; }
.policy-table th { text-align: left; font: 600 1rem/1.3 var(--display); color: var(--muted); padding: 0 16px 12px 0; }
.policy-table td { padding: 14px 16px 14px 0; vertical-align: top; border-top: 1px solid var(--line); }
.policy-table td:first-child { font: 600 1.0625rem/1.35 var(--display); width: 26%; }
.policy-table td:last-child { white-space: nowrap; font-family: var(--display); font-weight: 500; }
.policy-note { background: var(--step); border-radius: var(--radius); padding: 22px 24px 6px; margin: 24px 0; }
.policy-foot { background: var(--night); color: var(--night-ink); padding: 72px var(--margin) 40px; font-family: var(--display); }
.policy-foot .foot-mark { margin-bottom: 28px; }
.policy-foot a { color: var(--night-ink); }
.policy-foot .foot-legal { padding-top: 28px; }

@media (max-width: 1080px) {
  .policy-head, .policy-side, .policy-text { grid-column: 1 / -1; grid-row: auto; }
  .policy-side { margin-top: 40px; }
  .policy-side > * { position: static; }
  .toc { grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .policy-text { margin-top: 24px; }
  .policy-head, .policy-text { max-width: none; }
}
@media (max-width: 899px) {
  .policy { padding: 32px var(--margin) 96px; }
  .policy-bar .btn { min-height: 44px; padding: 0 18px; }
  .policy-mark { font-size: 1.375rem; }
  .glance { max-width: none; }
  .toc { max-width: none; }
  .policy-text h2 { margin-top: 56px; }
  .policy-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .policy-table, .policy-table tbody, .policy-table tr, .policy-table td { display: block; width: auto; }
  .policy-table tr { border-top: 1px solid var(--line); padding: 14px 0; }
  .policy-table td { border: 0; padding: 2px 0; }
  .policy-table td:first-child { width: auto; }
  .policy-table td:last-child { color: var(--muted); font-size: 1rem; }
  .t-collect td:last-child::before { content: "Needed: "; }
  .t-providers td:last-child::before { content: "Where: "; }
}

/* ------------------------------------------------------------------- 404 */
.lost { background: var(--night); color: var(--night-ink); }
.lost-main { min-height: 100svh; display: grid; place-content: center; justify-items: start; gap: 8px; padding: 40px var(--margin); max-width: 640px; margin: 0 auto; }
.lost-main img { width: 128px; height: 128px; border-radius: 50%; margin-bottom: 24px; }
.lost-main h1 { font: 600 var(--step-head)/1 var(--display); font-stretch: 90%; letter-spacing: -0.03em; margin-bottom: 16px; }
.lost-main p { font-size: var(--step-lead); line-height: 1.4; }
.lost-links { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 16px; font: 500 var(--step-ui)/1 var(--display); }
.lost .btn { background: var(--night-ink); color: var(--night); }
.lost-links a:not(.btn) { color: var(--night-ink); }

/* policy page additions */
.policy-lead { font-size: var(--step-lead); line-height: 1.4; margin-bottom: 20px; }
.toc a[aria-current] { color: var(--accent); }
.policy-fig { margin: 32px 0; width: min(280px, 100%); }
.policy-fig img { width: 100%; border-radius: 20px; background: var(--surface); }
.policy-fig figcaption { margin-top: 12px; font: 500 1rem/1.45 var(--display); color: var(--muted); }
.policy-figs { display: flex; flex-wrap: wrap; gap: 24px; margin: 32px 0; }
.policy-figs .policy-fig { margin: 0; flex: 1 1 220px; max-width: 280px; }
.policy-fig-side { float: right; margin: 6px 0 24px 32px; width: min(220px, 40%); }
@media (max-width: 899px) {
  .policy-fig-side { float: none; margin: 24px 0; width: min(260px, 100%); }
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .policy-fig img, .policy-text h2 {
      animation: settle linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 40%;
    }
    @keyframes settle { from { transform: translateY(28px) scale(0.97); opacity: 0.4; } to { transform: none; opacity: 1; } }
  }
  .policy-page [data-reveal].in { transition-duration: 900ms; }
}
