@font-face {
  font-family: Jost;
  src: url("/assets/fonts/jost-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Jost;
  src: url("/assets/fonts/jost-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  --ground: oklch(0.14 0.008 70);
  --ground-2: oklch(0.17 0.012 65);
  --ink: oklch(0.97 0.02 85);
  --ink-2: oklch(0.84 0.018 80);
  --muted: oklch(0.55 0.03 75);
  --amber: oklch(0.74 0.14 75);
  --band: oklch(0.94 0.02 80);
  --band-ink: oklch(0.2 0.01 70);
  --line: oklch(0.97 0.02 85 / 0.14);
  --safelight: oklch(0.6 0.25 28);
  --display: Jost, Futura, "Avenir Next", "Helvetica Neue", sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Inter, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Roboto Mono", monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --rebate-h: 56px;
  --shell: 1280px;
  --gutter: clamp(16px, 4vw, 64px);
  --phone-finish-a: oklch(0.34 0.004 70);
  --phone-finish-b: oklch(0.17 0.004 70);
  color-scheme: dark;
  font-family: var(--body);
  color: var(--ink-2);
  background: var(--ground);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--rebate-h) + 12px);
}
@media (prefers-reduced-motion: no-preference) {
  :root { scroll-behavior: smooth; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  overflow-x: clip;
  line-height: 1.6;
  font-size: 1.0625rem;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, dl, figure { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  padding: 10px 14px; background: var(--amber); color: var(--band-ink); border-radius: 8px;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Layers: ground < bench (1) < stage canvas (2) < .above (3) < grain (4) < rebate (10) */
.stage {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 2; pointer-events: none; display: none;
}
html[data-stage="3d"] .stage { display: block; }
.above { position: relative; z-index: 3; }
.grain {
  position: fixed; inset: -50%; z-index: 4; pointer-events: none; opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

/* Rebate bar */
.rebate {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  background: var(--band); color: var(--band-ink);
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
}
.rebate-holes {
  height: 10px;
  background: radial-gradient(ellipse 5px 3px at 50% 50%, var(--ground) 96%, transparent 100%) 0 0 / 22px 10px repeat-x;
}
.rebate-row {
  height: calc(var(--rebate-h) - 10px); display: flex; align-items: center; gap: 20px;
  padding-inline: var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; white-space: nowrap; }
.brand img { border-radius: 7px; }
.rebate-nav { margin-inline-start: auto; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; padding: 6px 10px; border-radius: 6px; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: " ▾"; }
.menu[open] summary { background: oklch(0 0 0 / 0.08); }
.menu-panel {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 260px;
  display: grid; gap: 2px; padding: 8px;
  background: var(--band); border: 1px solid oklch(0 0 0 / 0.1); border-radius: 12px;
  box-shadow: 0 16px 40px oklch(0 0 0 / 0.35);
  text-transform: none; letter-spacing: 0.02em; font-family: var(--body); font-size: 0.95rem;
}
.menu-panel a { padding: 8px 10px; border-radius: 8px; text-decoration: none; }
.menu-panel a:hover, .menu-panel a[aria-current] { background: oklch(0 0 0 / 0.07); }
.rebate-links { display: flex; align-items: center; gap: 14px; }
.rebate-iso { color: oklch(0.5 0.03 75); }
.rebate-store { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; padding: 6px 10px; border-radius: 999px; border: 1px solid oklch(0 0 0 / 0.35); }
.rebate-store svg { width: 14px; height: 14px; }
.rebate-store:hover { background: var(--band-ink); color: var(--band); }
@media (max-width: 760px) {
  .rebate-iso, .rebate-store span { display: none; }
  .rebate-row { gap: 10px; }
}

/* Type */
.section-shell { max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }
.section-shell.narrow { max-width: 820px; }
.kicker {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  display: flex; gap: 14px; align-items: baseline;
}
.kicker-number { color: var(--amber); }
.headline {
  font-family: var(--display); font-weight: 450; color: var(--ink);
  font-size: clamp(2.5rem, 6.2vw, 6.2rem); line-height: 0.98; letter-spacing: -0.022em;
  margin-top: 16px; text-wrap: balance;
}
.headline span { display: block; }
.caption { font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.45; color: var(--ink-2); margin-top: 22px; max-width: 34ch; }
.intro { margin-top: 26px; color: var(--ink-2); max-width: 60ch; }
.chips {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px;
  margin-top: 26px; padding: 11px 16px; background: var(--band); color: var(--band-ink);
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; border-radius: 4px;
}
.small { font-size: 0.95rem; color: var(--muted); }
.button {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 500; line-height: 1.2;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.button svg { width: 18px; height: 18px; }
.button:hover { background: oklch(1 0 0 / 0.08); }
.button-primary { background: var(--ink); color: var(--band-ink); border-color: var(--ink); }
.button-primary:hover { background: var(--amber); border-color: var(--amber); }
.store-buttons { display: flex; flex-wrap: wrap; gap: 12px; }

/* Device frames (2D fallback; hidden when the 3D stage is live) */
.device-slot {
  position: relative; container-type: size;
  height: min(68vh, 720px); aspect-ratio: 1024 / 2224; margin-inline: auto;
}
.device-slot[data-device="pixel"] { aspect-ratio: 1024 / 2284; }
.device-frame {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.7s var(--ease);
  border-radius: 15cqw; padding: 2.6cqw;
  background: linear-gradient(135deg, var(--phone-finish-a), var(--phone-finish-b) 55%, oklch(0.28 0.004 70));
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.25), inset 0 0 0 2.2cqw oklch(0.1 0.01 60), 0 40px 80px oklch(0 0 0 / 0.55), 0 8px 24px oklch(0 0 0 / 0.4);
}
.device-frame[data-active] { opacity: 1; }
.device-frame--pixel {
  background: linear-gradient(135deg, oklch(0.4 0.005 260), oklch(0.22 0.005 260) 60%, oklch(0.34 0.005 260));
  border-radius: 13cqw;
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.18), inset 0 0 0 2cqw oklch(0.08 0 0), 0 40px 80px oklch(0 0 0 / 0.55);
}
.device-display { display: block; height: 100%; border-radius: 12.4cqw; overflow: hidden; background: #000; }
.device-frame--pixel .device-display { border-radius: 11cqw; }
.device-display img, .device-display video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Landscape clips: the whole phone turns on its side; the clip inside stays upright. */
.device-slot[data-orientation="landscape"] { height: auto; width: min(100%, 900px); aspect-ratio: 2284 / 1024; }
.device-frame--landscape { inset: 0 auto; left: 50%; top: 50%; height: 100cqw; width: 44.8cqw; transform: translate(-50%, -50%) rotate(-90deg); transform-origin: center; }
.device-frame--landscape .device-display { position: relative; overflow: hidden; }
.device-frame--landscape .device-display > * { position: absolute; left: 50%; top: 50%; width: 223cqw; height: 100cqw; max-width: none; transform: translate(-50%, -50%) rotate(90deg); }
.device-island {
  position: absolute; top: 5.2cqw; left: 50%; transform: translateX(-50%);
  width: 32cqw; height: 9.2cqw; border-radius: 999px; background: #000;
}
.device-frame--pixel .device-island { width: 6cqw; height: 6cqw; top: 6cqw; }
.device-volume, .device-power { position: absolute; width: 1.2cqw; border-radius: 1cqw; background: var(--phone-finish-b); }
.device-volume { left: -1.1cqw; top: 25%; height: 16%; box-shadow: 0 -8cqw 0 0 var(--phone-finish-b); }
.device-power { right: -1.1cqw; top: 29%; height: 13%; }
.device-frame--pixel .device-volume { display: none; }
.device-frame--pixel .device-power { background: oklch(0.3 0.005 260); }
html[data-stage="3d"] .device-frame { visibility: hidden; }

/* Opening */
.opening { position: relative; height: 320vh; height: 320dvh; }
.opening-pin {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: clip; z-index: 3;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center;
  max-width: var(--shell); margin-inline: auto; padding: calc(var(--rebate-h) + 24px) var(--gutter) 0;
}
.opening-bench {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 100vw; z-index: 1; opacity: var(--bench-opacity, 0.55);
  pointer-events: none;
}
.opening-bench img { width: 100%; height: auto; }
.opening-copy { max-width: 620px; }
.opening-kicker { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber); }
.opening-title {
  font-family: var(--display); font-weight: 450; color: var(--ink);
  font-size: clamp(3rem, 8.4vw, 8.2rem); line-height: 0.94; letter-spacing: -0.03em; margin-top: 18px;
}
.opening-title .line { display: block; }
.opening-lead { font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.45; max-width: 32ch; margin-top: 26px; color: var(--ink-2); }
.opening-buttons { margin-top: 30px; }
.opening-scroll { display: inline-flex; align-items: center; gap: 8px; margin-top: 40px; color: var(--muted); text-decoration: none; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; }
.opening-scroll svg { width: 16px; height: 16px; transform: rotate(90deg); }
.opening-device { position: relative; z-index: 2; display: grid; place-items: end center; height: 100%; padding-bottom: 12vh; }
.device-slot--opening { height: min(72vh, 760px); }
html[data-stage="3d"] .opening-copy [data-line] { opacity: 0; transform: translateY(14px); }
html[data-stage="3d"] .opening-bench { display: none; }

/* Tools */
.tools { padding-block: clamp(96px, 12vw, 180px) clamp(72px, 9vw, 140px); background: linear-gradient(to bottom, transparent, var(--ground-2) 30%, var(--ground)); }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 48px; }
.tool {
  display: grid; gap: 10px; align-content: start; padding: 20px; border-radius: 16px; text-decoration: none;
  border: 1px solid var(--line); background: oklch(1 0 0 / 0.025);
  transition: transform 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease);
}
.tool:hover { transform: translateY(-3px); background: oklch(1 0 0 / 0.05); border-color: oklch(0.97 0.02 85 / 0.3); }
.tool img { width: 56px; height: 56px; }
.tool-name { font-family: var(--display); font-size: 1.15rem; color: var(--ink); line-height: 1.2; }
.tool-blurb { font-size: 0.9rem; color: var(--muted); line-height: 1.4; }

/* Chapters */
.chapter { position: relative; padding-block: clamp(32px, 4vw, 64px); }
.chapter:nth-of-type(even) { background: linear-gradient(to bottom, transparent, var(--ground-2) 20%, var(--ground-2) 80%, transparent); }
.chapter-grid {
  display: grid; grid-template-columns: minmax(0, 0.44fr) minmax(0, 0.56fr); gap: clamp(24px, 4vw, 72px);
  max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); align-items: start;
}
.chapter-stage {
  position: sticky; top: calc(var(--rebate-h) + 24px); height: calc(100vh - var(--rebate-h) - 48px); height: calc(100dvh - var(--rebate-h) - 48px);
  display: grid; align-content: center; justify-items: center; gap: 18px;
}
.chapter-copy { padding-top: 8vh; padding-bottom: 4vh; min-height: 100vh; }
.chapter--wide .chapter-grid { grid-template-columns: 1fr; }
.chapter--wide .chapter-stage { position: relative; top: auto; height: auto; padding-block: 24px 8px; }
.chapter--wide .chapter-copy { min-height: 0; padding-top: 24px; }
.screen-dots { display: flex; gap: 10px; }
.screen-dot { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--muted); background: transparent; padding: 0; cursor: pointer; }
.screen-dot[aria-current="true"] { background: var(--amber); border-color: var(--amber); }
.details { margin-top: 40px; border-top: 1px solid var(--line); }
.details summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 18px 0;
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink);
}
.details summary::-webkit-details-marker { display: none; }
.details-count { color: var(--muted); }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px 36px; padding-bottom: 12px; }
.detail-group h3 { font-family: var(--display); font-weight: 500; font-size: 1.15rem; color: var(--amber); margin-bottom: 10px; }
.detail-group ul { display: grid; gap: 8px; }
.detail-group li { position: relative; padding-left: 18px; font-size: 0.95rem; line-height: 1.5; color: var(--ink-2); }
.detail-group li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
#darkroom .detail-group h3, #darkroom .kicker-number, #darkroom .screen-dot[aria-current="true"] { color: var(--safelight); }
#darkroom .screen-dot[aria-current="true"] { background: var(--safelight); border-color: var(--safelight); }
#darkroom .chips { background: oklch(0.2 0.05 28); color: oklch(0.85 0.17 28); }

/* Pricing, platforms */
.pricing, .platforms { padding-block: clamp(80px, 10vw, 160px); }
.pricing { background: linear-gradient(to bottom, transparent, var(--ground-2) 25%, var(--ground-2) 75%, transparent); }
.pricing-grid, .platform-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 48px; }
.plan, .platform { padding: 28px; border-radius: 20px; border: 1px solid var(--line); background: oklch(1 0 0 / 0.025); display: grid; gap: 14px; align-content: start; }
.plan--pro { border-color: var(--amber); background: linear-gradient(160deg, oklch(0.74 0.14 75 / 0.12), transparent 60%); }
.plan h3, .platform h3 { font-family: var(--display); font-weight: 500; font-size: 1.6rem; color: var(--ink); display: flex; align-items: center; gap: 12px; }
.platform h3 svg { width: 22px; height: 22px; }
.plan-price { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); }
.plan ul { display: grid; gap: 10px; }
.plan li { position: relative; padding-left: 18px; }
.plan li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.plan-note { color: var(--muted); font-size: 0.9rem; }
.platform { grid-template-columns: 1fr auto; grid-template-areas: "title title" "copy copy" "badge qr"; align-items: end; }
.platform h3 { grid-area: title; }
.platform p { grid-area: copy; }
.platform .badge { grid-area: badge; width: fit-content; }
.platform .badge img { height: 56px; width: auto; }
.platform .qr { grid-area: qr; width: 96px; height: 96px; background: #fff; padding: 6px; border-radius: 8px; }
.languages { margin-top: 40px; color: var(--muted); max-width: 90ch; font-size: 0.95rem; }
.languages strong { color: var(--ink-2); font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 72px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 48px; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }
.site-footer .brand { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; }
.footer-tagline { margin-top: 12px; color: var(--muted); font-family: var(--display); font-size: 1.2rem; }
.site-footer nav { display: grid; gap: 10px; justify-items: start; }
.site-footer nav a { text-decoration: none; color: var(--ink-2); }
.site-footer nav a:hover { color: var(--amber); }
.footer-meta { grid-column: 1 / -1; color: var(--muted); font-size: 0.85rem; display: grid; gap: 8px; }

/* Secondary pages */
.page { padding: calc(var(--rebate-h) + clamp(56px, 8vw, 120px)) 0 clamp(72px, 8vw, 120px); }
.page h2 { font-family: var(--display); font-weight: 500; font-size: 1.8rem; color: var(--ink); margin-top: 56px; }
.page .caption { max-width: 48ch; }
.page p + p, .page h2 + * { margin-top: 18px; }
.page .button { margin-top: 24px; }
.faq { display: grid; gap: 22px; margin-top: 24px; }
.faq dt { font-family: var(--display); font-size: 1.2rem; color: var(--ink); }
.faq dd { margin: 6px 0 0; color: var(--ink-2); }
.legal-links { display: grid; gap: 8px; margin-top: 16px; }
.legal-links a { color: var(--ink); }
.not-found { text-align: left; }

/* Responsive */
@media (max-width: 900px) {
  .opening { height: 260vh; height: 260dvh; }
  .opening-pin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: start; padding-top: calc(var(--rebate-h) + 18px); }
  .opening-copy { max-width: none; }
  .opening-title { font-size: clamp(2.6rem, 13vw, 4.6rem); }
  .opening-lead { font-size: 1.05rem; margin-top: 16px; }
  .opening-buttons { margin-top: 20px; }
  .opening-scroll { display: none; }
  .opening-device { padding-bottom: 6vh; }
  .device-slot--opening { height: min(44vh, 460px); }
  .chapter-grid { grid-template-columns: 1fr; }
  .chapter-stage { position: relative; top: auto; height: auto; padding-top: 8px; }
  .device-slot { height: min(56vh, 540px); }
  .chapter-copy { padding-top: 24px; min-height: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .platform { grid-template-columns: 1fr; grid-template-areas: "title" "copy" "badge" "qr"; }
}
@media (prefers-reduced-motion: reduce) {
  .device-frame, .tool, .button { transition: none; }
  .grain { display: none; }
}
