/* FoldFocus — site styles
 *
 * Drawn in the app's own material (FoldFocus/Views/Theme.swift): a dithered night sky, Silkscreen for
 * short uppercase headlines, Departure Mono for every number, stepped "pixel" corners, slab buttons
 * with a lip. Body copy stays in the rounded system face. Amber is window light: only the main action,
 * progress and the thing you're building are lit.
 *
 * Motion follows apple-design + emil-design-eng: feedback on press, transform/opacity only,
 * critically damped by default, bounce only where something lands, and gentler cross-fades under
 * prefers-reduced-motion. Mobile follows mobile-native: svh heroes, gated hover, no tap flash,
 * safe-area padding, 16px+ controls.
 */

@font-face { font-family: "Silkscreen"; src: url("/assets/fonts/Silkscreen-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("/assets/fonts/Silkscreen-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Departure Mono"; src: url("/assets/fonts/DepartureMono-Regular.woff2") format("woff2"); font-display: swap; }

:root {
  /* Colour — Theme.swift */
  --night: #070A18;
  --dusk: #0E1530;
  --panel: #121A3A;
  --line: #2A3566;
  --accent: #FFB547;
  --lip: #B97724;
  --window: #FFE0A3;
  --ember: #E5533D;
  --mist: #8C97C7;
  --text: #F4F5FB;

  /* Type */
  --font-pixel: "Silkscreen", ui-monospace, monospace;
  --font-digits: "Departure Mono", ui-monospace, monospace;
  --font-copy: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Space — 4-pt grid, in rem so it grows with the reader's text size */
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s6: 1.5rem; --s8: 2rem; --s12: 3rem; --s16: 4rem; --s24: 6rem;
  --gutter: max(1rem, env(safe-area-inset-left, 0px));

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --press: 120ms;

  color-scheme: dark;
}

/* ───────── Base ───────── */
*, *::before, *::after { box-sizing: border-box; }
html {
  background: var(--night);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}
body {
  margin: 0;
  min-height: 100svh;
  background-color: var(--night);
  background-image: url("/assets/stars.png"), linear-gradient(180deg, var(--night) 0%, var(--dusk) 38%, #121A3B 72%, #1A1D45 100%);
  background-size: 960px 960px, 100% 100%;
  image-rendering: pixelated;
  color: var(--text);
  font: 400 1.0625rem/1.5 var(--font-copy);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--window); text-underline-offset: .2em; text-decoration-thickness: 1px; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; }
ul, ol, dl, dd, figure { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
button, a, [role="button"], summary { touch-action: manipulation; }
button, [role="button"], .slab, .quiet, summary, .nav a { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: rgba(255, 181, 71, .35); color: #fff; }

.skip { position: absolute; left: var(--gutter); top: -100px; z-index: 100; background: var(--accent); color: var(--night); padding: var(--s2) var(--s4); font-family: var(--font-pixel); text-transform: uppercase; text-decoration: none; }
.skip:focus { top: var(--s2); }

.wrap { width: min(100% - 2 * var(--gutter), 72rem); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--gutter), 46rem); }

/* ───────── Type ───────── */
/* Silkscreen is drawn on an 8-unit pixel grid: sizes step in multiples of 8 so pixels stay square. */
.display {
  font-family: var(--font-pixel);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 2rem;            /* 32 */
  line-height: 1.18;          /* the app's pixelHeadline leading */
  letter-spacing: 0;
  text-wrap: balance;
}
.display--sm { font-size: 1.5rem; }
.title {
  font-family: var(--font-pixel);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.5rem;          /* 24 */
  line-height: 1.2;
  text-wrap: balance;
}
@media (min-width: 40rem) {
  .display { font-size: 3rem; }            /* 48 */
  .display--sm { font-size: 2rem; }
  .title { font-size: 2rem; }              /* 32 */
}
@media (min-width: 64rem) {
  .display { font-size: 3.5rem; }          /* 56 */
  .display--sm { font-size: 2.5rem; }
  .title { font-size: 2.5rem; }            /* 40 */
}
.eyebrow, .px-label {
  font-family: var(--font-pixel);
  font-size: .75rem;          /* 12 */
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: .04em;      /* small text: slightly open */
}
.eyebrow { color: var(--accent); margin-bottom: var(--s3); }
.px-label { color: var(--text); }
.lede { color: var(--mist); font-size: 1.0625rem; line-height: 1.55; max-width: 36rem; text-wrap: pretty; }
@media (min-width: 64rem) { .lede { font-size: 1.1875rem; } }
.digits { font-family: var(--font-digits); font-variant-numeric: tabular-nums; }
.lit { color: var(--accent); }
.ember { color: var(--ember); }
.footnote { color: var(--mist); font-size: .9375rem; margin-top: var(--s8); text-wrap: pretty; }
.center { text-align: center; margin-inline: auto; max-width: 40rem; }

/* ───────── Pixel corners ─────────
   The app's PixelRect: two steps per corner. --st is the step size. */
.px {
  --st: 3px;
  clip-path: polygon(
    calc(var(--st) * 2) 0, calc(100% - var(--st) * 2) 0, calc(100% - var(--st) * 2) var(--st), calc(100% - var(--st)) var(--st),
    calc(100% - var(--st)) calc(var(--st) * 2), 100% calc(var(--st) * 2), 100% calc(100% - var(--st) * 2), calc(100% - var(--st)) calc(100% - var(--st) * 2),
    calc(100% - var(--st)) calc(100% - var(--st)), calc(100% - var(--st) * 2) calc(100% - var(--st)), calc(100% - var(--st) * 2) 100%, calc(var(--st) * 2) 100%,
    calc(var(--st) * 2) calc(100% - var(--st)), var(--st) calc(100% - var(--st)), var(--st) calc(100% - var(--st) * 2), 0 calc(100% - var(--st) * 2),
    0 calc(var(--st) * 2), var(--st) calc(var(--st) * 2), var(--st) var(--st), calc(var(--st) * 2) var(--st));
}
/* A pixel panel: dark fill, 2-pt border, stepped corners (border + fill are two clipped layers). */
.card, .plan, .faq details, .frame, .stepper, .plaque, .demo__status {
  position: relative;
  isolation: isolate;
}
.card::before, .plan::before, .faq details::before, .frame::before, .stepper::before, .plaque::before,
.card::after, .plan::after, .faq details::after, .stepper::after, .plaque::after {
  content: "";
  position: absolute;
  --st: 3px;
  clip-path: polygon(
    calc(var(--st) * 2) 0, calc(100% - var(--st) * 2) 0, calc(100% - var(--st) * 2) var(--st), calc(100% - var(--st)) var(--st),
    calc(100% - var(--st)) calc(var(--st) * 2), 100% calc(var(--st) * 2), 100% calc(100% - var(--st) * 2), calc(100% - var(--st)) calc(100% - var(--st) * 2),
    calc(100% - var(--st)) calc(100% - var(--st)), calc(100% - var(--st) * 2) calc(100% - var(--st)), calc(100% - var(--st) * 2) 100%, calc(var(--st) * 2) 100%,
    calc(var(--st) * 2) calc(100% - var(--st)), var(--st) calc(100% - var(--st)), var(--st) calc(100% - var(--st) * 2), 0 calc(100% - var(--st) * 2),
    0 calc(var(--st) * 2), var(--st) calc(var(--st) * 2), var(--st) var(--st), calc(var(--st) * 2) var(--st));
}
.card::before, .plan::before, .faq details::before, .frame::before, .stepper::before, .plaque::before { inset: 0; background: var(--line); z-index: -2; }
.card::after, .plan::after, .faq details::after, .stepper::after, .plaque::after { inset: 2px; background: var(--panel); z-index: -1; }

/* ───────── Buttons ───────── */
/* The slab: a pixel block with a darker lip under it. The face drops onto the lip on press-down. */
.slab {
  --lift: 4px;
  position: relative;
  display: inline-flex;
  padding: 0 0 var(--lift);
  border: 0;
  background: none;
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font-pixel);
  font-size: 1rem;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--night);
}
.slab::before {
  content: "";
  position: absolute;
  inset: var(--lift) 0 0;
  background: var(--lip);
}
.slab::before, .slab > span {
  --st: 3px;
  clip-path: polygon(
    calc(var(--st) * 2) 0, calc(100% - var(--st) * 2) 0, calc(100% - var(--st) * 2) var(--st), calc(100% - var(--st)) var(--st),
    calc(100% - var(--st)) calc(var(--st) * 2), 100% calc(var(--st) * 2), 100% calc(100% - var(--st) * 2), calc(100% - var(--st)) calc(100% - var(--st) * 2),
    calc(100% - var(--st)) calc(100% - var(--st)), calc(100% - var(--st) * 2) calc(100% - var(--st)), calc(100% - var(--st) * 2) 100%, calc(var(--st) * 2) 100%,
    calc(var(--st) * 2) calc(100% - var(--st)), var(--st) calc(100% - var(--st)), var(--st) calc(100% - var(--st) * 2), 0 calc(100% - var(--st) * 2),
    0 calc(var(--st) * 2), var(--st) calc(var(--st) * 2), var(--st) var(--st), calc(var(--st) * 2) var(--st));
}
.slab > span {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0 var(--s6);
  background: var(--accent);
  transition: transform var(--press) var(--ease-out), background-color var(--press) ease;
}
.slab:active > span, .slab[data-pressed] > span { transform: translateY(var(--lift)); transition-duration: 60ms; }
@media (hover: hover) and (pointer: fine) {
  .slab:hover > span { background: #FFC266; }
}
.slab--small { font-size: .75rem; --lift: 3px; }
.slab--small > span { min-height: 2.25rem; padding: 0 var(--s4); }
.slab[disabled] { opacity: .45; cursor: default; }

.quiet {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 2.75rem;
  padding: 0 var(--s2);
  color: var(--mist);
  font-family: var(--font-pixel);
  font-size: .75rem;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 150ms ease, opacity var(--press) ease;
}
.quiet:active { opacity: .5; }
@media (hover: hover) and (pointer: fine) { .quiet:hover { color: var(--text); } }

/* ───────── Nav: a translucent material over the scrolling night ───────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(7, 10, 24, .62);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
}
/* Scroll-edge effect instead of a hard divider: appears only once content is underneath. */
.nav::after {
  content: "";
  position: absolute;
  inset: 100% 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(140, 151, 199, .22), transparent);
  opacity: 0;
  transition: opacity 200ms ease;
}
.nav[data-scrolled]::after { opacity: 1; }
.nav__inner {
  width: min(100% - 2 * var(--gutter), 72rem);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--s6);
  min-height: 3.75rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: .875rem;
  text-transform: uppercase;
  min-height: 2.75rem;
}
.brand img { width: 32px; height: 32px; image-rendering: auto; }
.nav__links { display: none; gap: var(--s1); margin-left: auto; }
.nav__links a {
  color: var(--mist);
  text-decoration: none;
  font-size: .9375rem;
  padding: var(--s2) var(--s3);
  transition: color 150ms ease;
}
@media (hover: hover) and (pointer: fine) { .nav__links a:hover { color: var(--text); } }
.nav .slab { margin-left: auto; }
@media (min-width: 52rem) {
  .nav__links { display: flex; }
  .nav .slab { margin-left: var(--s2); }
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--night); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ───────── Hero ───────── */
.hero {
  position: relative;
  min-height: calc(100svh - 3.75rem);
  display: grid;
  align-items: center;
  padding: var(--s8) 0 var(--s12);
  background: url("/assets/sky.png") center top / cover no-repeat;
  image-rendering: pixelated;
  overflow: clip;
}
.hero::after {      /* melt the dithered sky into the page */
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 18%;
  background: linear-gradient(180deg, rgba(7, 10, 24, 0), var(--night));
  pointer-events: none;
  z-index: 0;
}
.hero__moon { position: absolute; width: 40px; height: 40px; top: -4%; right: 4%; image-rendering: pixelated; opacity: .95; }
.hero__inner { position: relative; z-index: 1; display: grid; gap: var(--s8); align-items: center; }
.hero__copy { position: relative; z-index: 1; }
.hero .lede { margin-top: var(--s4); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); margin-top: var(--s8); }
.facts { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); list-style: none; margin-top: var(--s6); color: var(--mist); font-size: .875rem; }
.facts li { display: inline-flex; align-items: center; gap: var(--s2); }
.facts li::before { content: ""; width: 6px; height: 6px; background: var(--accent); }
.hero__city { position: relative; }
.haze {
  position: absolute;
  inset: 20% -10% -10%;
  background: radial-gradient(closest-side, rgba(255, 181, 71, .16), transparent);
  pointer-events: none;
}
@media (min-width: 60rem) {
  .hero__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s12); }
  .hero__moon { width: 64px; height: 64px; top: -18%; right: 2%; }
}

/* ───────── City (CityView's layout maths, in % of the box) ───────── */
.city {
  position: relative;
  width: 100%;
  /* (2r+1) tiles wide, (2r+1)/2 + 2 tiles of headroom tall */
  aspect-ratio: var(--span) / calc(var(--span) / 2 + 2);
  --span: 7;
}
.city[data-radius="2"] { --span: 5; }
.city img {
  position: absolute;
  height: auto;
  max-width: none;
  image-rendering: auto;
  pointer-events: none;
}
.city .building { transform-origin: 50% 100%; }

/* ───────── Sections ───────── */
.section { padding: var(--s16) 0; }
@media (min-width: 64rem) { .section { padding: var(--s24) 0; } }
.section__head { margin-bottom: var(--s8); }
.section__head .lede { margin-top: var(--s4); }
.section__head--center { text-align: center; }
.section__head--center .lede { margin-inline: auto; }
@media (min-width: 64rem) { .section__head { margin-bottom: var(--s12); } }

/* Reveal: only when JS is on, and only once. */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); transition-delay: var(--d, 0ms); }
.js .reveal[data-in] { opacity: 1; transform: none; }

/* ───────── Demo: the folding phone ───────── */
.demo__stage { display: grid; justify-items: center; gap: var(--s6); }
.duo {
  --w: min(100%, 38rem);
  width: var(--w);
  perspective: 1600px;
  perspective-origin: 50% 40%;
  cursor: grab;
  touch-action: pan-y;          /* the phone owns horizontal drags; the page keeps vertical scroll */
  outline-offset: 12px;
  -webkit-user-select: none;
  user-select: none;
}
.duo:active { cursor: grabbing; }
.duo__body {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  aspect-ratio: 1.42;           /* two halves of the inner display, each ~0.71 */
  transform-style: preserve-3d;
  will-change: transform;
}
.duo__half, .duo__face {
  position: relative;
  overflow: hidden;
  background: var(--night);
  border: clamp(4px, 1.4cqi, 9px) solid #10121F;
  box-shadow: inset 0 0 0 1px #3A3D52;
}
.duo__left { border-radius: 18px 0 0 18px; border-right-width: 1px; box-shadow: inset 0 0 0 1px #3A3D52, 0 30px 60px -20px rgba(0, 0, 0, .7); }
.duo__flap {
  position: relative;
  transform-origin: 0 50%;
  transform-style: preserve-3d;
  will-change: transform;
}
.duo__face {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.duo__front { border-radius: 0 18px 18px 0; border-left-width: 1px; }
.duo__back  { border-radius: 18px 0 0 18px; transform: rotateY(180deg); background: var(--night); border-color: #161A2C; }
/* Faces darken as they turn away from you. */
.duo__face::after, .duo__left::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--shade, 0);
  pointer-events: none;
}
.duo__hinge { display: none; }

/* Every screen is its own size container so its contents scale with the phone. */
.screen {
  container-type: inline-size;
  background:
    url("/assets/stars.png") 0 0 / 480px 480px,
    linear-gradient(180deg, #070A18 0%, #0E1530 55%, #1A1D45 100%);
  image-rendering: pixelated;
}
.screen img { image-rendering: auto; }

/* Left half: city + plaques + grace number */
.duo__left .city { position: absolute; left: 4%; right: 4%; top: 52%; translate: 0 -50%; width: auto; }
.screen__plaques { position: absolute; top: 5cqi; left: 6cqi; display: flex; gap: 3cqi; }
.plaque {
  display: inline-flex; align-items: center; gap: 2cqi;
  padding: 2cqi 3.5cqi;
  font-family: var(--font-pixel); font-size: 5.5cqi; line-height: 1;
}
.plaque b { width: 5cqi; height: 5cqi; display: block; }
.plaque .flame { background: var(--accent); clip-path: polygon(50% 0, 75% 30%, 100% 55%, 85% 100%, 15% 100%, 0 55%, 30% 35%); }
.plaque .blocks { background: var(--window); clip-path: polygon(0 30%, 40% 30%, 40% 0, 100% 0, 100% 100%, 0 100%); }
.grace-count {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-digits); font-size: 46cqi; line-height: 1; color: #fff;
  opacity: 0;
  transition: opacity 200ms ease;
}

/* Right half, front: the controls panel. One state visible at a time. */
.panel-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4cqi;
  padding: 9cqi 9cqi 10cqi;
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 0s 220ms;
}
.duo[data-state="idle"] [data-show="idle"],
.duo[data-state="running"] [data-show="idle"],
.duo[data-state="grace"] [data-show="grace"],
.duo[data-state="broken"] [data-show="broken"],
.duo[data-state="done"] [data-show="done"] { opacity: 1; visibility: visible; transition: opacity 220ms ease, visibility 0s; }
.panel-state .px-label { font-size: 5cqi; }
.panel-state .hint { font-size: 5.6cqi; line-height: 1.4; color: var(--mist); }
.px-head { font-family: var(--font-pixel); font-weight: 700; text-transform: uppercase; font-size: 9cqi; line-height: 1.2; }
.mini-progress { display: flex; gap: .8cqi; height: 2.4cqi; }
.mini-progress i { flex: 1; background: var(--line); }
.mini-progress i.on { background: var(--accent); }
.big-digits { font-family: var(--font-digits); font-size: 24cqi; line-height: 1; display: flex; align-items: baseline; gap: 2cqi; margin-top: 2cqi; }
.big-digits small { font-family: var(--font-pixel); font-size: 5cqi; color: var(--mist); text-transform: uppercase; }
.builds { display: flex; align-items: center; gap: 3cqi; }
.builds img { width: 14cqi; }
.builds .px-label { font-size: 4.6cqi; color: var(--window); }
.fake-slab {
  display: grid; place-items: center;
  min-height: 15cqi;
  margin-top: 2cqi;
  font-family: var(--font-pixel); font-size: 5.2cqi; text-transform: uppercase;
  background: var(--accent); color: var(--night);
  box-shadow: 0 1.6cqi 0 var(--lip);
  clip-path: polygon(2cqi 0, calc(100% - 2cqi) 0, 100% 2cqi, 100% 100%, 0 100%, 0 2cqi);
}

/* Grace: the inner display goes ember. */
.duo[data-state="grace"] .duo__left, .duo[data-state="grace"] .duo__front { background: linear-gradient(180deg, #2A1020 0%, #3A1622 100%); }
.duo[data-state="grace"] .grace-count { opacity: 1; }
.duo[data-state="grace"] .duo__left .city, .duo[data-state="grace"] .screen__plaques { opacity: .18; }
.duo__left .city, .screen__plaques { transition: opacity 250ms ease; }

/* Outer display (back of the flap) */
.screen--outer { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.2em; padding: 8%; text-align: center; }
.screen--outer > * { margin: 0; }
.rise { position: relative; width: 46cqi; aspect-ratio: 1 / 1.05; margin-bottom: 2cqi; }
.rise img { position: absolute; left: 50%; translate: -50% 0; }
.rise__ground { width: 104%; bottom: 0; }
.rise__scaffold, .rise__building { width: 88%; bottom: 23%; }
.rise__building { clip-path: inset(calc((1 - var(--step, 0)) * 100%) 0 0 0); transition: clip-path 420ms var(--ease-out); filter: drop-shadow(0 0 6px rgba(255, 181, 71, calc(var(--step, 0) * .45))); }
.rise__scaffold { opacity: max(.15, calc(1 - var(--step, 0) * 1.1)); transition: opacity 420ms ease; }
.rise__rubble { width: 100%; bottom: 20%; opacity: 0; }
.duo[data-state="broken"] .rise__building, .duo[data-state="broken"] .rise__scaffold { opacity: 0; }
.duo[data-state="broken"] .rise__rubble { opacity: 1; }
.outer-label { font-size: 5cqi; }
.outer-digits { font-family: var(--font-digits); font-size: 25cqi; line-height: 1; letter-spacing: -.02em; }
.blocks-bar { display: flex; gap: .9cqi; width: 100%; height: 3cqi; }
.blocks-bar i { flex: 1; background: var(--line); }
.blocks-bar i.on { background: var(--accent); }
.outer-hint { font-size: 5cqi; color: var(--mist); line-height: 1.35; }

.demo__controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--s4); }
.stepper { display: inline-flex; align-items: center; padding: 2px; }
.stepper__btn {
  width: 3rem; height: 3rem;
  border: 0; background: none; cursor: pointer;
  font-family: var(--font-digits); font-size: 1.5rem; color: var(--text);
  transition: transform var(--press) var(--ease-out), opacity 150ms ease;
}
.stepper__btn:active { transform: scale(.9); }
.stepper__btn:disabled { opacity: .3; cursor: default; }
.stepper__value { min-width: 6.5rem; text-align: center; font-family: var(--font-digits); font-size: 1.125rem; }
.demo__status { color: var(--mist); font-size: .9375rem; text-align: center; min-height: 1.5em; max-width: 34rem; }

/* ───────── Start modes ───────── */
.cards { display: grid; gap: var(--s4); list-style: none; }
.card { padding: var(--s6); }
.card__art { width: 6rem; height: 4.5rem; margin: 0 0 var(--s4) -.5rem; }
.card__title { font-family: var(--font-pixel); font-size: 1rem; text-transform: uppercase; margin-bottom: var(--s2); }
.card p { color: var(--mist); }
@media (min-width: 48rem) { .cards { grid-template-columns: repeat(3, 1fr); } }

/* ───────── Building ladder ───────── */
.ladder {
  list-style: none;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(9.5rem, 1fr);
  gap: var(--s4);
  align-items: end;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  padding-bottom: var(--s2);
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
}
.ladder::-webkit-scrollbar { display: none; }
.ladder__step { scroll-snap-align: start; text-align: center; }
.plot { position: relative; width: 100%; aspect-ratio: 1 / 1.7; margin-bottom: var(--s3); }
.plot__ground { position: absolute; left: -2%; width: 104%; bottom: 0; }
.plot__building { position: absolute; left: 6%; width: 88%; bottom: 23%; transform-origin: 50% 100%; }
.ladder__step:nth-child(1) .plot__building { width: 70%; left: 15%; }
.ladder__step:nth-child(2) .plot__building { width: 76%; left: 12%; }
.ladder__step:nth-child(3) .plot__building { width: 82%; left: 9%; }
.ladder__step .px-label { font-size: .875rem; }
.ladder__step .digits { color: var(--accent); font-size: 1rem; margin-top: var(--s1); }
@media (min-width: 60rem) { .ladder { overflow: visible; margin-inline: 0; padding-inline: 0; } }
@media (hover: hover) and (pointer: fine) {
  .plot__building { transition: transform 300ms var(--ease-out); }
  .ladder__step:hover .plot__building { transform: translateY(-4%); }
}

/* ───────── Screenshots ───────── */
.frame { padding: 6px; }
.frame img { position: relative; width: 100%; border-radius: 22px; }
.frame--ember::before { background: #5A2333; }
.shots { list-style: none; display: grid; gap: var(--s8); }
.shot figure { display: grid; gap: var(--s4); }
.shot .frame { width: min(100%, 17rem); margin-inline: auto; }
.shot figcaption { color: var(--mist); max-width: 19rem; margin-inline: auto; text-align: center; }
.shot figcaption .px-label { display: block; margin-bottom: var(--s2); }
@media (min-width: 48rem) {
  .shots { grid-template-columns: repeat(3, 1fr); gap: var(--s6); }
  .shot:nth-child(2) { margin-top: var(--s12); }
}

/* ───────── Progress split ───────── */
.split { display: grid; gap: var(--s12); align-items: center; }
.split__media .frame { width: min(78%, 19rem); margin-inline: auto; }
.points { display: grid; gap: var(--s6); margin-top: var(--s8); }
.points dt { margin-bottom: var(--s1); }
.points dd { color: var(--mist); }
@media (min-width: 56rem) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--s16); }
  .split__media { order: 0; }
}

/* ───────── Pricing ───────── */
.plans { display: grid; gap: var(--s4); max-width: 40rem; margin-inline: auto; }
.plan { padding: var(--s6); display: grid; gap: var(--s2); align-content: start; }
.plan h3 { font-size: .875rem; }
.plan__price { font-size: 1rem; color: var(--mist); }
.plan__price .digits { font-size: 2.75rem; line-height: 1.1; color: var(--text); margin-right: var(--s1); }
.plan__note { color: var(--mist); font-size: .9375rem; }
.plan--best::before { background: var(--accent); }
.plan__tag {
  position: absolute; top: -12px; left: var(--s6);
  background: var(--accent); color: var(--night);
  font-family: var(--font-pixel); font-size: .6875rem; text-transform: uppercase;
  padding: 4px 8px;
}
.includes { list-style: none; display: grid; gap: var(--s3); max-width: 40rem; margin: var(--s8) auto 0; }
.includes li { display: flex; gap: var(--s3); align-items: baseline; }
.includes li::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--accent); translate: 0 -1px; }
@media (min-width: 40rem) {
  .plans { grid-template-columns: 1fr 1fr; }
  .includes { grid-template-columns: 1fr 1fr; }
}

/* ───────── FAQ ───────── */
.faq { display: grid; gap: var(--s3); }
.faq details { padding: 0 var(--s6); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s4);
  min-height: 3.5rem;
  padding: var(--s3) 0;
  font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  font-family: var(--font-digits);
  font-size: 1.25rem;
  color: var(--accent);
  transition: transform 200ms var(--ease-out);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--mist); padding-bottom: var(--s6); max-width: 38rem; }

/* ───────── Closing ───────── */
.closing { padding: var(--s16) 0 var(--s24); text-align: center; }
.closing__inner { display: grid; justify-items: center; gap: var(--s6); }
.closing__icon { width: 96px; height: 96px; filter: drop-shadow(0 18px 40px rgba(255, 181, 71, .25)); }
.closing .footnote { margin-top: 0; }

/* ───────── Footer ───────── */
.footer { padding: var(--s8) 0 calc(var(--s8) + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(42, 53, 102, .6); }
.footer__inner { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s8); align-items: center; }
.footer nav { display: flex; gap: var(--s2); }
.footer nav a { color: var(--mist); text-decoration: none; padding: var(--s2); min-height: 2.75rem; display: inline-flex; align-items: center; }
@media (hover: hover) and (pointer: fine) { .footer nav a:hover { color: var(--text); } }
.footer__small { color: var(--mist); font-size: .8125rem; margin-left: auto; }
@media (max-width: 40rem) { .footer__small { margin-left: 0; width: 100%; } }

/* ───────── Legal / support pages ───────── */
.doc { padding: var(--s12) 0 var(--s16); }
.doc h1 { margin-bottom: var(--s3); }
.doc .updated { color: var(--mist); font-size: .9375rem; margin-bottom: var(--s8); }
.doc h2 { font-family: var(--font-pixel); text-transform: uppercase; font-size: 1rem; line-height: 1.3; margin: var(--s12) 0 var(--s3); color: var(--accent); }
.doc h3 { font-size: 1.0625rem; margin: var(--s6) 0 var(--s2); }
.doc p, .doc li { color: #D3D7EA; max-width: 42rem; text-wrap: pretty; }
.doc p + p { margin-top: var(--s3); }
.doc ul { padding-left: 1.2em; display: grid; gap: var(--s2); margin-top: var(--s3); }
.doc li::marker { color: var(--accent); }
.doc table { width: 100%; border-collapse: collapse; margin-top: var(--s4); font-size: .9375rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: var(--s3) var(--s3) var(--s3) 0; border-bottom: 1px solid var(--line); color: #D3D7EA; }
.doc th { color: var(--text); font-weight: 600; }
.doc .table-wrap { overflow-x: auto; }
.doc .callout { margin-top: var(--s6); padding: var(--s4) var(--s6); border-left: 4px solid var(--accent); background: rgba(18, 26, 58, .8); }

/* ───────── Reduced motion: fewer, gentler changes — cross-fades, no travel ───────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { transform: none; transition: opacity 300ms ease; }
  .rise__building { transition: none; }
  .slab > span { transition: background-color 120ms ease; }
  .slab:active > span { transform: none; filter: brightness(.9); }
}
@media (prefers-contrast: more) {
  :root { --mist: #C5CBE6; --line: #5866A8; }
}
