*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--sans);
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: rgba(135,189,159,.35); color: #fff; }
:focus-visible { outline: 2px solid var(--mint-hi); outline-offset: 3px; border-radius: 6px; }
section[id] { scroll-margin-top: 88px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 200; background: var(--money); color: var(--canvas); padding: 10px 16px; border-radius: 10px; font-weight: 700; text-decoration: none; transition: top .2s; }
.skip:focus { top: 16px; }

/* ── THE SKY — fixed dreamscape behind every chapter ── */
.sky {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% -10%, #0C2217 0%, rgba(12,34,23,0) 60%),
    var(--canvas);
  --sp: 0; --px: 0; --py: 0;
}
.aurora { position: absolute; border-radius: 50%; will-change: transform; }
.aurora.a1 {
  width: 95vmax; height: 95vmax; left: -34vmax; top: -46vmax;
  background: radial-gradient(closest-side, rgba(31,92,64,.62), rgba(31,92,64,.18) 55%, rgba(31,92,64,0) 100%);
  translate: calc(var(--px) * -18px) calc(var(--sp) * -30vh);
  animation: drift1 38s var(--ease-soft) infinite alternate;
}
.aurora.a2 {
  width: 62vmax; height: 62vmax; right: -24vmax; top: 6vh;
  background: radial-gradient(closest-side, rgba(135,189,159,.20), rgba(135,189,159,0) 100%);
  translate: calc(var(--px) * 22px) calc(var(--sp) * -12vh);
  animation: drift2 46s var(--ease-soft) infinite alternate;
}
.aurora.a3 {
  width: 54vmax; height: 54vmax; left: 4vw; bottom: -34vmax;
  background: radial-gradient(closest-side, rgba(212,163,89,.13), rgba(212,163,89,0) 100%);
  translate: calc(var(--px) * 14px) calc(var(--sp) * -22vh);
  animation: drift3 54s var(--ease-soft) infinite alternate;
}
.aurora.a4 {
  width: 44vmax; height: 44vmax; right: 2vw; bottom: -14vmax;
  background: radial-gradient(closest-side, rgba(102,190,250,.08), rgba(102,190,250,0) 100%);
  translate: calc(var(--px) * -10px) calc(var(--sp) * -8vh);
  animation: drift4 62s var(--ease-soft) infinite alternate;
}
@keyframes drift1 { to { transform: translate(14vw, 10vh) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-16vw, 14vh) scale(.9); } }
@keyframes drift3 { to { transform: translate(22vw, -12vh) scale(1.18); } }
@keyframes drift4 { to { transform: translate(-12vw, -18vh) scale(1.1); } }
#motes { position: absolute; inset: 0; width: 100%; height: 100%; }
.grain {
  position: absolute; inset: 0; opacity: .055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.page { position: relative; z-index: 1; overflow-x: clip; }

/* ── REVEALS — blur-to-focus, like a dream sharpening ── */
.js .rv { opacity: 0; transform: translateY(26px); filter: blur(10px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease), filter 1.2s var(--ease); transition-delay: var(--d, 0ms); }
.js .rv.in { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) {
  .js .rv { transform: none; filter: none; transition: opacity .6s ease; }
  .aurora { animation: none !important; }
}

/* ── TYPE ── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font: 700 11px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  color: var(--mint);
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .55; }
.h2 {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(36px, 4.4vw, 72px); line-height: .98; letter-spacing: -.012em;
  margin: 22px 0 22px; text-wrap: balance;
}
.h2 em, .h1 em, .serif em { font-style: italic; color: var(--mint); padding-right: .04em; }
.lede { font-size: clamp(16px, 1.25vw, 19px); color: var(--ink-2); line-height: 1.65; max-width: 58ch; text-wrap: pretty; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }
.center .eyebrow::after { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .55; }
.caps { font: 700 11px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.num { font-family: var(--rounded); font-variant-numeric: tabular-nums; }
/* the dotted progress rule from the App Store frames */
.dots { display: flex; gap: 7px; margin-top: 26px; }
.dots i { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-4); }
.dots i:nth-child(-n+8) { background: var(--mint); box-shadow: 0 0 6px rgba(135,189,159,.8); }
.center .dots { justify-content: center; }

.section { position: relative; padding: clamp(104px, 13vw, 184px) var(--gutter); }
.wrap { max-width: 1200px; margin: 0 auto; position: relative; }

/* ── BUTTONS — MoneyGreenSolid + its hollow twin, QuietBordered ── */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 15px/1 var(--sans); letter-spacing: -.005em;
  padding: 17px 26px; border-radius: var(--r-btn); border: 0; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s, opacity .2s;
}
.btn:active { opacity: .85; transform: scale(.99); }
.btn[disabled] { opacity: .4; cursor: default; }
.btn-solid {
  background: var(--money); color: var(--canvas);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 12px 32px -14px rgba(123,180,148,.7);
}
.btn-solid::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.45) 50%, transparent 80%);
  transition: transform .9s var(--ease);
}
.btn-solid:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 22px 44px -16px rgba(123,180,148,.85); }
.btn-solid:hover::after { transform: translateX(120%); }
.btn-quiet { background: rgba(255,255,255,.015); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(255,255,255,.26); }
.btn-quiet:hover { background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); transform: translateY(-2px); }
.btn-pill { border-radius: 999px; padding: 12px 20px; font-size: 14px; }
.btn-block { width: 100%; }
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ── LOGO — the app icon's five bars, pure CSS ── */
.logo { display: inline-flex; align-items: center; gap: .32em; font-size: 22px; line-height: 1; text-decoration: none; white-space: nowrap; }
.bars { display: inline-flex; align-items: center; gap: .07em; height: .9em; flex-shrink: 0; }
.bars i { width: .12em; min-width: 2px; border-radius: 99px; background: linear-gradient(180deg, var(--icon-amber-a), var(--icon-amber-b)); animation: barWave 3.6s ease-in-out infinite; }
.bars i:nth-child(1), .bars i:nth-child(5) { height: 46%; }
.bars i:nth-child(2), .bars i:nth-child(4) { height: 78%; animation-delay: .45s; }
.bars i:nth-child(3) { height: 100%; background: linear-gradient(180deg, var(--icon-green-a), var(--icon-green-b)); animation-delay: .6s; }
@keyframes barWave { 0%,100% { transform: scaleY(1); } 50% { transform: scaleY(.76); } }
.logo-text { font-family: var(--sans); font-weight: 700; letter-spacing: -.025em; }
.logo-text b { font-weight: 700; color: #fff; }
.logo-text span { font-weight: 500; color: var(--mint); }
@media (prefers-reduced-motion: reduce) { .bars i { animation: none; } }
