@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/geist.woff2) format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/geist-mono.woff2) format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/instrument-serif.woff2) format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/instrument-serif-italic.woff2) format("woff2"); }

/* ============ Tokens ============
   One studio accent (amber). App colors appear only inside each app's own cards.
   Warm grays throughout; shadows carry the background's hue.
   Dark is the default; light follows the system unless the visitor picks one. */
:root {
  color-scheme: dark;
  --bg: #0d0c0b;
  --ink: #f2efe9;
  --ink-2: #d9d4cb;
  --muted: #a9a39a;
  --dim: #847e74;
  --line: rgb(255 246 230 / .08);
  --line-2: rgb(255 246 230 / .15);
  --fill: rgb(255 246 230 / .035);
  --fill-2: rgb(255 246 230 / .075);
  --nav-bg: rgb(20 18 16 / .62);
  --nav-solid: rgb(20 18 16 / .9);
  --nav-edge: rgb(255 246 230 / .07);
  --panel-bg: #181614;
  --cta-bg: #f2efe9;
  --cta-fg: #0d0c0b;
  --cta-hover: #ffffff;
  --cta-sub: #6b655c;
  --cta-glow: rgb(255 238 210 / .2);
  --shadow: rgb(3 2 1 / .78);
  --grid: rgb(255 246 230 / .055);
  --ambient: rgb(230 160 70 / .15);
  --grain: .05;
  --accent: #e6b35e;
  --pip: #9089e8;
  --spend: #52c99a;
  --stage-glow: rgb(144 137 232 / .32);
  --mac-bg: #1e1d1f; --mac-bar: #2a292b; --mac-bar-line: #38373a; --mac-title: #8f8b88;
  --money-bg: radial-gradient(90% 90% at 85% 15%, #1d5e45 0%, #0c2c20 45%, #081a12 100%);
  --money-border: rgb(82 201 154 / .2);
  --money-ink: #ffffff; --money-sub: rgb(255 255 255 / .72); --money-line: rgb(255 255 255 / .16);
  --money-label: #8fdcb8; --money-amount: linear-gradient(180deg, #ffffff 30%, #a6ecc9); --money-glow: #3fbf8a;
  --serif: "Instrument Serif", "Iowan Old Style", "Times New Roman", serif;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --z-nav: 50; --z-grain: 80; --z-skip: 100;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f2ec; --ink: #1b1916; --ink-2: #3a362f; --muted: #5c574f; --dim: #6c665d;
  --line: rgb(60 45 25 / .1); --line-2: rgb(60 45 25 / .17);
  --fill: rgb(255 255 255 / .55); --fill-2: rgb(255 255 255 / .92);
  --nav-bg: rgb(250 248 243 / .72); --nav-solid: rgb(250 248 243 / .92); --nav-edge: rgb(255 255 255 / .9);
  --panel-bg: #fdfbf7;
  --cta-bg: #1b1916; --cta-fg: #f5f2ec; --cta-hover: #000000; --cta-sub: #a49d92; --cta-glow: rgb(60 40 15 / .3);
  --shadow: rgb(70 52 25 / .22); --grid: rgb(60 45 25 / .07);
  --ambient: rgb(240 180 90 / .22); --grain: .035;
  --accent: #9a6416; --pip: #6d63e0; --spend: #2a9a6c; --stage-glow: rgb(109 99 224 / .2);
  --mac-bg: #f4f2fb; --mac-bar: #ebe8f1; --mac-bar-line: #dbd7e4; --mac-title: #6b6680;
  --money-bg: radial-gradient(90% 90% at 85% 15%, #d7eadd 0%, #e6f0e8 50%, #eef3ec 100%);
  --money-border: rgb(31 122 82 / .18);
  --money-ink: #12291f; --money-sub: #3c5a4b; --money-line: rgb(18 41 31 / .14);
  --money-label: #1f7a52; --money-amount: linear-gradient(180deg, #0f2a1f 30%, #1f7a52); --money-glow: #8fdcb8;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f5f2ec; --ink: #1b1916; --ink-2: #3a362f; --muted: #5c574f; --dim: #6c665d;
    --line: rgb(60 45 25 / .1); --line-2: rgb(60 45 25 / .17);
    --fill: rgb(255 255 255 / .55); --fill-2: rgb(255 255 255 / .92);
    --nav-bg: rgb(250 248 243 / .72); --nav-solid: rgb(250 248 243 / .92); --nav-edge: rgb(255 255 255 / .9);
    --panel-bg: #fdfbf7;
    --cta-bg: #1b1916; --cta-fg: #f5f2ec; --cta-hover: #000000; --cta-sub: #a49d92; --cta-glow: rgb(60 40 15 / .3);
    --shadow: rgb(70 52 25 / .22); --grid: rgb(60 45 25 / .07);
    --ambient: rgb(240 180 90 / .22); --grain: .035;
    --accent: #9a6416; --pip: #6d63e0; --spend: #2a9a6c; --stage-glow: rgb(109 99 224 / .2);
    --mac-bg: #f4f2fb; --mac-bar: #ebe8f1; --mac-bar-line: #dbd7e4; --mac-title: #6b6680;
    --money-bg: radial-gradient(90% 90% at 85% 15%, #d7eadd 0%, #e6f0e8 50%, #eef3ec 100%);
    --money-border: rgb(31 122 82 / .18);
    --money-ink: #12291f; --money-sub: #3c5a4b; --money-line: rgb(18 41 31 / .14);
    --money-label: #1f7a52; --money-amount: linear-gradient(180deg, #0f2a1f 30%, #1f7a52); --money-glow: #8fdcb8;
  }
}

/* Theme-specific screenshots */
.for-light { display: none !important; }
:root[data-theme="light"] .for-dark { display: none !important; }
:root[data-theme="light"] .for-light { display: block !important; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .for-dark { display: none !important; }
  :root:not([data-theme="dark"]) .for-light { display: block !important; }
}

/* ============ Base ============ */
* { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
a, button, summary, label { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body::after { /* film grain */
  content: ""; position: fixed; inset: 0; z-index: var(--z-grain); pointer-events: none; opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: var(--z-skip); padding: 10px 16px; border-radius: 10px; background: var(--cta-bg); color: var(--cta-fg); text-decoration: none; }
.skip-link:focus { top: 16px; }
.wrap { width: min(1180px, 100% - 64px); margin-inline: auto; }
main:focus, header:focus, section:focus { outline: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.label { font: 500 13px/1.4 var(--mono); letter-spacing: -.01em; color: var(--dim); }
.on-white { background: #fff; }
.narrow { display: none; }

/* ============ Controls ============ */
.btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 16px; padding: 14px 24px; border-radius: 999px; transition: transform 140ms var(--ease), background 160ms ease; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-light { background: var(--cta-bg); color: var(--cta-fg); box-shadow: 0 14px 40px -14px var(--cta-glow); }
.text-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 4px; border: 0; background: none; cursor: pointer; font: 600 15.5px var(--sans); color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--line-2); text-decoration-thickness: 1.5px; text-underline-offset: 6px; transition: text-decoration-color 160ms ease, color 160ms ease, transform 140ms var(--ease); }
.text-link svg { width: 13px; height: 13px; }
.mini { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; text-decoration: none; transition: background 160ms ease, transform 140ms var(--ease); }
.mini svg { width: 13px; height: 13px; }
.mini.solid { background: var(--cta-bg); color: var(--cta-fg); border-color: var(--cta-bg); }

/* ============ Nav ============ */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: var(--z-nav);
  width: min(1100px, calc(100% - 24px)); display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 7px 7px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--nav-bg); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: 0 10px 40px -14px var(--shadow), inset 0 1px 0 var(--nav-edge);
  transition: background 180ms ease, box-shadow 180ms ease;
}
.nav.scrolled { background: var(--nav-solid); box-shadow: 0 18px 50px -18px var(--shadow), inset 0 1px 0 var(--nav-edge); }
.progress { position: absolute; left: 26px; right: 26px; bottom: -1px; height: 2px; border-radius: 2px; pointer-events: none; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 16px; letter-spacing: -.02em; }
.mark { width: 28px; height: 28px; border-radius: 8px; background: var(--ink); display: grid; place-items: center; position: relative; flex: none; }
.mark svg { width: 18px; height: 18px; stroke: var(--bg); }
.mark::after { content: ""; position: absolute; top: 4px; right: 4px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.nav-links { position: relative; display: flex; align-items: center; gap: 2px; font-size: 14.5px; font-weight: 500; }
.nav-links a { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--muted); min-height: 44px; padding: 8px 14px 8px 10px; border-radius: 999px; transition: color 160ms ease, background 160ms ease; }
.nav-links a[aria-current="true"] { color: var(--ink); background: var(--fill-2); box-shadow: inset 0 0 0 1px var(--line); }
.nav-links img { width: 20px; height: 20px; border-radius: 23%; box-shadow: 0 0 0 1px var(--line); }
.pulse, .live { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.pulse { margin: 0 6px 0 7px; }

.dl { position: relative; }
.dl summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 9px 16px; border-radius: 999px; background: var(--cta-bg); color: var(--cta-fg); font-size: 14.5px; font-weight: 600; transition: background 160ms ease, transform 140ms var(--ease); }
.dl summary::-webkit-details-marker { display: none; }
.dl summary svg { width: 14px; height: 14px; transition: transform 180ms var(--ease); }
.dl[open]:not([data-enhanced]) summary svg, .dl.is-open summary svg { transform: rotate(180deg); }
.dl-panel { position: absolute; right: 0; top: calc(100% + 14px); width: 350px; padding: 8px; border-radius: 22px; border: 1px solid var(--line-2);
  background: var(--panel-bg); box-shadow: 0 30px 60px -24px var(--shadow); transform-origin: top right; }
.dl[data-enhanced] .dl-panel { opacity: 0; transform: translateY(-4px) scale(.98); transition: opacity 120ms ease, transform 120ms var(--ease); }
.dl[data-enhanced].is-open .dl-panel { opacity: 1; transform: none; transition-duration: 180ms; }
.dl-jump { display: none; }
.dl-title { margin: 0; padding: 10px 12px 4px; font: 500 13px var(--mono); letter-spacing: -.01em; color: var(--dim); }
.dl-app { display: grid; grid-template-columns: 48px 1fr; gap: 2px 14px; align-items: center; padding: 12px; }
.dl-app + .dl-app { border-top: 1px solid var(--line); }
.dl-app img { width: 48px; height: 48px; border-radius: 23%; grid-row: span 2; }
.dl-app b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.dl-app span { display: block; color: var(--dim); font-size: 13px; }
.dl-btns { grid-column: 2; display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.dl-btns .text-link { font-size: 14px; padding: 6px 2px; }

/* ============ Hero ============ */
.hero { position: relative; isolation: isolate; overflow: hidden; padding: 144px 0 64px; }
.hero::before { /* one warm light source, top left */
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(60% 55% at 8% -5%, var(--ambient), transparent 70%), radial-gradient(35% 40% at 100% 18%, color-mix(in srgb, var(--ambient) 45%, transparent), transparent 70%);
}
.hero::after { /* lab floor grid */
  content: ""; position: absolute; left: -50%; right: -50%; bottom: -10%; height: 55%; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px; transform: perspective(700px) rotateX(62deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 75%); mask-image: linear-gradient(to top, #000 0%, transparent 75%);
}
.hero-top { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 56px; align-items: end; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0; font: 500 14px/1.4 var(--mono); letter-spacing: -.01em; color: var(--muted); }
h1 { font-size: clamp(52px, 7.4vw, 108px); line-height: .98; letter-spacing: -.055em; font-weight: 600; margin: 22px 0 0; }
h1 em { display: inline-block; padding: 0 .08em .1em 0; margin-bottom: -.1em; font-size: 1.06em; letter-spacing: -.025em; color: var(--accent); }
.hero-aside { padding-bottom: 12px; }
.lede { font-size: clamp(17px, 1.45vw, 19px); line-height: 1.55; color: var(--muted); max-width: 29em; margin: 0; }
.promises { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 18px 0 0; padding: 0; list-style: none; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.promises li { display: inline-flex; align-items: center; gap: 9px; }
.promises li::before { content: ""; width: 6px; height: 6px; border-radius: 1.5px; background: var(--accent); transform: rotate(45deg); }

/* Launch cards: one per app, with the phone rising out of the card */
.launch { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 92px; }
.pad { --app: var(--pip); position: relative; isolation: isolate; display: grid; grid-template-columns: 1fr 42%; grid-template-rows: 1fr auto; column-gap: 12px; min-height: 284px; padding: 28px 0 24px 30px; border-radius: 28px; border: 1px solid var(--line-2);
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--app) 15%, transparent), transparent 60%), linear-gradient(180deg, var(--fill-2), var(--fill));
  box-shadow: 0 30px 60px -36px var(--shadow), inset 0 1px 0 var(--nav-edge); }
.pad.spend { --app: var(--spend); }
.pad::before { content: ""; position: absolute; right: 8%; top: 4%; width: 46%; aspect-ratio: 1; border-radius: 50%; background: var(--app); filter: blur(70px); opacity: .16; z-index: -1; }
.pad-body { grid-column: 1; grid-row: 1; }
.pad-id { display: flex; align-items: center; gap: 14px; }
.pad-id img { width: 60px; height: 60px; border-radius: 23%; box-shadow: 0 0 0 1px var(--line), 0 12px 24px -12px var(--shadow); }
.pad-id h2 { margin: 0; font-size: 24px; line-height: 1.15; letter-spacing: -.03em; font-weight: 650; }
.pad-id span { font-size: 13.5px; color: var(--dim); }
.pad-body p { margin: 18px 0 0; max-width: 21em; font-size: 16px; line-height: 1.5; color: var(--muted); }
.pad-actions { grid-column: 1; grid-row: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 22px; }
.get { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 9px; border-radius: 999px; background: var(--cta-bg); color: var(--cta-fg); font-size: 15px; font-weight: 600; text-decoration: none; box-shadow: 0 10px 24px -12px var(--cta-glow); transition: background 160ms ease, transform 140ms var(--ease); }
.get svg { width: 24px; height: 24px; color: var(--cta-fg); }
.pad-shot { grid-column: 2; grid-row: 1 / 3; position: relative; height: 326px; margin-top: -76px; margin-bottom: -24px; padding: 12px 22px 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 98%); mask-image: linear-gradient(to bottom, #000 62%, transparent 98%); }
.pad-shot .device { width: 100%; max-width: 210px; margin: 0 auto; transform: rotate(var(--tilt, 4deg)); transition: transform 220ms var(--ease); }
.pad.spend .pad-shot .device { --tilt: -4deg; }

.next-line { display: inline-flex; align-items: center; gap: 12px; margin-top: 30px; font-size: 15.5px; color: var(--muted); text-decoration: none; }
.next-line .q { position: relative; display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; font: italic 18px/1 var(--serif); color: var(--ink); background: var(--fill-2); }
.next-line .q { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); }
.next-line b { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-2); text-decoration-thickness: 1.5px; text-underline-offset: 6px; transition: text-decoration-color .2s; }
.next-line b svg { width: 14px; height: 14px; transition: transform 180ms var(--ease); }

/* ============ Studio principles ============ */
.principles { border-block: 1px solid var(--line); background: var(--fill); }
.principles-list { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 32px; margin-block: 0; list-style: none; padding-block: 28px; padding-inline: 0; }
.principles-list li { display: flex; align-items: baseline; gap: 14px; }
.principle-mark { color: var(--accent); font: 500 11px/1 var(--mono); }
.principles-list b { display: block; font-size: 14px; font-weight: 550; letter-spacing: -.01em; }
.principles-list div > span { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }

/* ============ Chapters ============ */
.chapter { --section-space: 140px; position: relative; padding: var(--section-space) 0 0; scroll-margin-top: calc(24px - var(--section-space)); }
.chapter-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 64px; align-items: end; }
.kicker { display: inline-flex; align-items: center; gap: 12px; margin: 0 0 24px; }
.kicker img { width: 40px; height: 40px; border-radius: 23%; box-shadow: 0 0 0 1px var(--line); }
h2 { font-size: clamp(42px, 6vw, 90px); line-height: 1.02; letter-spacing: -.05em; font-weight: 600; margin: 0; }
h2 em { display: inline-block; padding: 0 .08em .1em 0; margin-bottom: -.1em; font-size: 1.05em; letter-spacing: -.025em; color: var(--accent); }
.chapter-side { padding-bottom: 8px; }
.lead { font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 30em; margin: 0 0 26px; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.store { display: inline-flex; align-items: center; gap: 12px; padding: 10px 22px 10px 12px; border-radius: 16px; background: var(--cta-bg); color: var(--cta-fg); text-decoration: none; transition: transform 140ms var(--ease), background 160ms ease; box-shadow: 0 14px 40px -14px var(--cta-glow); }
.store svg { width: 28px; height: 28px; flex: none; color: var(--cta-fg); }
.store small { display: block; font-size: 12px; line-height: 1.1; color: var(--cta-sub); font-weight: 500; text-align: left; }
.store b { display: block; font-size: 18px; font-weight: 600; line-height: 1.15; letter-spacing: -.015em; }
.links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; margin-top: 22px; }
.links a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line-2); padding-bottom: 2px; transition: color .2s, border-color .2s; }

/* iPhone frame: metal edge > black border > full screenshot */
.device { container-type: inline-size; position: relative; }
.device .frame { padding: 1.5cqw; border-radius: 17cqw; background: linear-gradient(140deg, #9a9893 0%, #46443f 22%, #1c1b19 50%, #3d3b37 78%, #a4a29c 100%); box-shadow: 0 0 0 1px rgb(0 0 0 / .35), 0 40px 80px -30px var(--shadow); }
.device .bezel { padding: 3.2cqw; border-radius: 15.5cqw; background: #030303; }
.device .screen { position: relative; overflow: hidden; border-radius: 12.4cqw; background: #000; }
.device .screen img { width: 100%; }
.device .screen::after { content: ""; position: absolute; top: 2.6cqw; left: 50%; width: 29cqw; height: 8.4cqw; transform: translateX(-50%); background: #000; border-radius: 99px; }
.device .screen::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(115deg, rgb(255 255 255 / .12), rgb(255 255 255 / 0) 30%); }

/* Mac window */
.mac { position: relative; border-radius: 14px; overflow: hidden; background: var(--mac-bg); box-shadow: 0 0 0 1px var(--line-2), 0 60px 120px -40px var(--shadow); }
.mac .bar { height: 34px; display: flex; align-items: center; gap: 8px; padding-left: 14px; background: var(--mac-bar); border-bottom: 1px solid var(--mac-bar-line); }
.mac .bar i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.mac .bar i:nth-child(2) { background: #febc2e; }
.mac .bar i:nth-child(3) { background: #28c840; }
.mac .bar span { margin-inline: auto; transform: translateX(-26px); font-size: 12.5px; color: var(--mac-title); font-weight: 500; }

/* Pip Clipboard stage */
.stage { position: relative; isolation: isolate; width: min(1040px, 100%); margin: 80px auto 0; padding: 0 8% 7%; }
.stage::before { content: ""; position: absolute; left: 10%; right: 10%; top: 20%; bottom: 0; z-index: -1; background: radial-gradient(closest-side, var(--stage-glow), transparent); filter: blur(30px); }
.stage .device { position: absolute; width: 21%; bottom: 0; }
.stage .device.l { left: 0; transform: rotate(-4deg); }
.stage .device.r { right: 0; transform: rotate(4deg); }

/* SpendCue money card: deep green in dark mode, pale green in light mode */
.money { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 40px; margin-top: 80px; border-radius: 36px; padding: 64px 0 0 72px; min-height: 600px; color: var(--money-ink);
  background: var(--money-bg); border: 1px solid var(--money-border); box-shadow: 0 40px 80px -50px var(--shadow); }
.money::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; background-image: linear-gradient(var(--money-line) 1px, transparent 1px), linear-gradient(90deg, var(--money-line) 1px, transparent 1px); background-size: 40px 40px; -webkit-mask-image: radial-gradient(70% 70% at 30% 50%, #000, transparent); mask-image: radial-gradient(70% 70% at 30% 50%, #000, transparent); }
.money-copy { min-width: 0; container-type: inline-size; padding-bottom: 72px; }
.money .label { color: var(--money-label); }
.amount { font-size: clamp(58px, 27cqi, 156px); line-height: .9; letter-spacing: -.065em; font-weight: 600; margin: 18px 0 6px; font-variant-numeric: tabular-nums; white-space: nowrap;
  background: var(--money-amount); -webkit-background-clip: text; background-clip: text; color: transparent; }
.amount sup { font-size: .42em; vertical-align: .95em; letter-spacing: -.02em; margin-right: .04em; }
.per { font-size: 20px; color: var(--money-sub); margin: 0 0 40px; }
.per em { color: var(--money-ink); font-size: 1.15em; }
.money-stats { display: flex; border-top: 1px solid var(--money-line); max-width: 520px; font-variant-numeric: tabular-nums; }
.money-stats div { flex: 1; padding: 18px 18px 0 0; }
.money-stats div + div { border-left: 1px solid var(--money-line); padding-left: 22px; }
.money-stats b { display: block; font-size: 28px; letter-spacing: -.03em; font-weight: 600; }
.money-stats span { font-size: 14.5px; color: var(--money-sub); }
.sample { margin: 26px 0 0; font-size: 13px; color: var(--money-sub); }
.money .device { width: min(320px, 100%); justify-self: center; align-self: end; margin-bottom: -150px; transform: rotate(4deg); }
.money .glow { position: absolute; right: 8%; bottom: -10%; width: 420px; height: 420px; border-radius: 50%; background: var(--money-glow); filter: blur(110px); opacity: .35; z-index: -1; }

/* ============ Lab ============ */
.lab { --section-space: 140px; padding: var(--section-space) 0 0; scroll-margin-top: calc(24px - var(--section-space)); }
.lab-card { display: grid; grid-template-columns: auto 1fr auto; gap: 36px; align-items: center; padding: 40px 48px; border-radius: 30px; border: 1.5px dashed var(--line-2); background: var(--fill); }
.flask { width: 96px; height: 96px; border-radius: 26px; position: relative; display: grid; place-items: center; font: italic 56px/1 var(--serif);
  background: var(--fill-2); box-shadow: 0 0 70px -10px color-mix(in srgb, var(--accent) 45%, transparent); }
.flask::after { content: ""; position: absolute; inset: -2px; border-radius: 28px; padding: 2px; background: linear-gradient(135deg, var(--line-2), var(--accent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .6; }
.lab-card .label { display: block; margin-bottom: 10px; }
.lab-card h2 { font-size: clamp(30px, 3.4vw, 46px); margin: 0 0 8px; letter-spacing: -.04em; }
.lab-card p { margin: 0; color: var(--muted); max-width: 34em; }

/* ============ Footer ============ */
footer { position: relative; margin-top: 150px; padding-top: 110px; border-top: 1px solid var(--line); overflow: hidden; isolation: isolate; }
footer::before { content: ""; position: absolute; left: -10%; top: -260px; width: 900px; height: 560px; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, var(--ambient), transparent); }
.contact { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 64px; align-items: end; }
.contact .label { display: block; margin-bottom: 18px; }
.contact h2 { font-size: clamp(40px, 5.4vw, 78px); }
.contact p { margin: 0 0 22px; color: var(--muted); font-size: 18px; max-width: 26em; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.copy { min-width: 132px; min-height: 44px; justify-content: center; }
.copy svg { width: 16px; height: 16px; }
.copy.done { text-decoration-color: var(--accent); color: var(--accent); }
.contact .copy-status { min-height: 1.5em; margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.contact-actions .btn { max-width: 100%; }
.contact-actions .btn span { overflow-wrap: anywhere; }

.foot { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 16px; margin-top: 100px; }
.foot-brand { padding: 8px 24px 8px 0; }
.foot-brand p { margin: 16px 0 22px; color: var(--muted); font-size: 15.5px; max-width: 24em; }
.foot-studio { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; }
.foot-studio a { color: var(--muted); text-decoration: none; }
.foot-app { display: grid; gap: 16px; align-content: start; padding: 24px; border-radius: 22px; background: var(--fill-2); }
.foot-app-head { display: flex; align-items: center; gap: 14px; }
.foot-app-head img { width: 52px; height: 52px; border-radius: 23%; box-shadow: 0 0 0 1px var(--line), 0 10px 20px -12px var(--shadow); }
.foot-app-head b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.foot-app-head span { font-size: 13.5px; color: var(--dim); }
.foot-app .mini { justify-content: center; padding: 10px 14px; font-size: 14.5px; gap: 8px; }
.foot-app .mini svg { width: 20px; height: 20px; }
.foot-app nav { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14.5px; }
.foot-app nav a { color: var(--muted); text-decoration: none; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }

.legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 56px; padding: 20px 0; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--dim); }
.to-top { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--muted); text-decoration: none; }
.to-top svg { width: 14px; height: 14px; transform: rotate(-90deg); transition: transform 180ms var(--ease); }

/* Appearance: Auto / Light / Dark */
.appearance { display: inline-flex; gap: 2px; margin: 0; padding: 3px; border: 0; border-radius: 999px; background: var(--fill); box-shadow: inset 0 0 0 1px var(--line); }
.appearance legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.appearance label { position: relative; }
.appearance input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.appearance span { display: block; min-height: 38px; padding: 9px 13px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--muted); transition: background 160ms ease, color 160ms ease; }
.appearance input:checked + span { background: var(--cta-bg); color: var(--cta-fg); }
.appearance input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.giant { font-weight: 700; font-size: clamp(70px, 19vw, 290px); line-height: .78; letter-spacing: -.065em; text-align: center; white-space: nowrap; user-select: none; margin: 10px 0 -.16em;
  background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 14%, transparent), transparent 85%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.giant em { font-weight: 400; letter-spacing: -.035em; padding-right: .04em; }

/* ============ 404 ============ */
.nf { position: relative; isolation: isolate; min-height: 100svh; display: grid; align-content: center; padding: 140px 0 80px; overflow: hidden; }
.nf::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 55% at 8% -5%, var(--ambient), transparent 70%); }
.nf .code { display: block; font: italic 400 clamp(140px, 26vw, 360px)/.8 var(--serif); letter-spacing: -.04em; color: var(--accent); margin-bottom: 28px; }
.nf h1 { font-size: clamp(40px, 6vw, 84px); margin: 0 0 20px; max-width: 14ch; }
.nf p { color: var(--muted); font-size: 18px; max-width: 30em; margin: 0 0 32px; }
.nf .actions { gap: 12px 22px; }

/* ============ Motion ============ */
/* Only sections below the hero reveal. Content stays visible if enhancement fails. */
.reveal-ready { opacity: 0; transform: translateY(8px); transition: opacity 240ms var(--ease), transform 240ms var(--ease); transition-delay: var(--d, 0s); }
.reveal-ready.in { opacity: 1; transform: none; }
.d1 { --d: 40ms; } .d2 { --d: 80ms; }
:root[data-input="keyboard"] { scroll-behavior: auto; }
:root[data-input="keyboard"] *, :root[data-input="keyboard"] *::before, :root[data-input="keyboard"] *::after { transition: none !important; animation: none !important; }
:root[data-input="keyboard"] :is(.btn, .get, .store, .mini, .text-link, .dl summary):active { transform: none; }

/* ============ Responsive ============ */
@media (max-width: 1023px) {
  .hero-top, .chapter-head, .contact { grid-template-columns: 1fr; gap: 28px; }
  .hero-aside, .chapter-side { padding-bottom: 0; }
  .launch { grid-template-columns: 1fr; max-width: 640px; margin-inline: auto; gap: 72px; }
  .principles-list { gap: 22px; }
  .money { grid-template-columns: 1fr; padding: 56px 40px 0; min-height: 0; }
  .money-copy { padding-bottom: 0; }
  .money .device { width: 280px; margin-bottom: -180px; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; padding-right: 0; }
  .lab-card { grid-template-columns: auto 1fr; }
  .lab-card .btn { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 767px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 40px); }
  .wide { display: none; }
  .narrow { display: inline; }
  .nav { top: 10px; }
  .nav-links { display: none; }
  .dl-panel { position: absolute; right: 0; top: calc(100% + 18px); width: calc(100vw - 40px); max-height: calc(100svh - 104px); overflow-y: auto; overscroll-behavior: contain; }
  .dl-jump { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 4px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
  .dl-jump .dl-title { grid-column: 1 / -1; padding: 10px 8px 4px; }
  .dl-jump a { display: grid; justify-items: center; gap: 8px; padding: 14px 6px; border-radius: 16px; background: var(--fill); border: 1px solid var(--line); text-decoration: none; font-size: 13.5px; font-weight: 600; text-align: center; }
  .dl-jump img, .dl-jump .q { width: 40px; height: 40px; border-radius: 23%; }
  .dl-jump .q { display: grid; place-items: center; border: 1.5px dashed var(--line-2); font: italic 24px/1 var(--serif); color: var(--muted); }
  .progress { left: 22px; right: 22px; }
  .hero { padding: 116px 0 48px; }
  h1 { font-size: clamp(48px, 14vw, 80px); }
  .eyebrow { font-size: 13px; }
  .launch { gap: 68px; margin-top: 78px; }
  .pad { grid-template-columns: 1fr 40%; min-height: 0; padding: 22px 0 20px 20px; border-radius: 24px; }
  .pad-id { flex-direction: column; align-items: flex-start; gap: 10px; }
  .pad-id img { width: 52px; height: 52px; }
  .pad-id h2 { font-size: 21px; }
  .pad-body p { font-size: 15px; margin-top: 12px; }
  .pad-actions { grid-column: 1 / -1; position: relative; z-index: 2; margin: 18px 20px 0 0; }
  .pad-actions .get { flex: 1; justify-content: center; }
  .pad-shot { grid-row: 1; height: 240px; margin: -66px 0 0; padding: 12px 12px 0 2px; }
  .next-line { font-size: 14.5px; }
  .principles-list { grid-template-columns: 1fr; gap: 22px; padding-block: 26px; }
  .principles-list li { gap: 18px; }
  .chapter { --section-space: 110px; }
  .stage { padding: 0 4% 12%; margin-top: 56px; }
  .stage .device { width: 27%; }
  .money { border-radius: 28px; padding: 40px 24px 0; margin-top: 56px; }
  .money .device { width: 220px; margin-bottom: -150px; }
  .money-stats b { font-size: 22px; }
  .lab { --section-space: 100px; }
  .lab-card { grid-template-columns: 1fr; gap: 22px; padding: 28px 24px; border-radius: 24px; }
  .flask { width: 72px; height: 72px; font-size: 42px; border-radius: 20px; }
  .flask::after { border-radius: 22px; }
  footer { margin-top: 110px; padding-top: 90px; }
  .foot { grid-template-columns: 1fr; margin-top: 64px; }
  .legal { flex-direction: column; align-items: flex-start; }
  .contact-actions .btn { padding-inline: 18px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; transition-delay: 0s !important; }
  .reveal-ready { opacity: 1; transform: none; }
  .dl[data-enhanced] .dl-panel { transform: none; }
  :is(.btn, .get, .store, .mini, .text-link, .dl summary):active { transform: none; }
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); }
  .btn-light:hover { background: var(--cta-hover); }
  .text-link:hover { text-decoration-color: var(--accent); }
  .mini:hover { background: var(--fill-2); }
  .mini.solid:hover { background: var(--cta-hover); }
  .dl summary:hover { background: var(--cta-hover); }
  .get:hover { background: var(--cta-hover); transform: translateY(-1px); }
  .next-line:hover b { text-decoration-color: var(--accent); }
  .next-line:hover b svg { transform: translateX(3px); }
  .store:hover { transform: translateY(-2px); background: var(--cta-hover); }
  .links a:hover { color: var(--ink); border-color: var(--ink); }
  .foot-studio a:hover { color: var(--ink); }
  .foot-app nav a:hover { color: var(--ink); border-color: var(--line-2); }
  .to-top:hover { color: var(--ink); }
  .to-top:hover svg { transform: rotate(-90deg) translateX(3px); }
  .appearance label:hover input:not(:checked) + span { color: var(--ink); }
  .nav-links a:hover { color: var(--ink); }
  .pad:hover .pad-shot .device { transform: rotate(var(--tilt, 4deg)) translateY(-4px); }
}
.btn:active, .get:active, .store:active, .mini:active, .dl summary:active, .text-link:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) {
  .pad:hover .pad-shot .device { transform: rotate(var(--tilt, 4deg)); }
  :is(.btn, .get, .store, .mini, .text-link, .dl summary):active { transform: none; }
  :is(.btn, .get, .store):hover { transform: none; }
  .next-line:hover b svg { transform: none; }
  .to-top:hover svg { transform: rotate(-90deg); }
}
