/*
 * legacycollect.app — the home page. The app's "Archive" identity at page scale:
 * canvas #10100F, bone #F2EFE7, one amber signal; Schibsted Grotesk for words,
 * Martian Mono for figures and labels; no pills. The Axis mark (two axes, a
 * value line, the amber point of what it is worth now) is the page's one motif.
 *
 * Motion: transforms and opacity, composited; one spring for things that are
 * dealt (the phones, the holders), one out-curve for things that rise; nothing
 * loops forever. Without script, or with reduced motion, the page is complete
 * and still. A store badge is never moved, faded, angled or recoloured: the
 * light around it belongs to our own plate (Apple's and Google's badge rules).
 */

@font-face { font-family: "Schibsted Grotesk"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/schibsted-400.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/schibsted-500.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/schibsted-600.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/schibsted-700.woff2") format("woff2"); }
@font-face { font-family: "Martian Mono"; font-weight: 300; font-style: normal; font-display: swap; src: url("fonts/martian-300.woff2") format("woff2"); }
@font-face { font-family: "Martian Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/martian-400.woff2") format("woff2"); }
@font-face { font-family: "Martian Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/martian-500.woff2") format("woff2"); }

/* The plate's edge light: an angle that can travel (where @property exists; elsewhere it simply jumps). */
@property --a { syntax: "<angle>"; inherits: true; initial-value: 210deg; }

:root {
  color-scheme: dark;
  /* Palette — apps/mobile/src/theme/tokens.ts (Archive). */
  --canvas: #10100F;
  --raised: #191917;
  --pressed: #23231F;
  --line: #2A2925;
  --line-strong: #3A3833;
  --bone: #F2EFE7;
  --secondary: #AAA69C;
  --quiet: #827F76;
  --faint: #5C5A54;
  --amber: #EFB45B;
  --amber-rgb: 239, 180, 91;
  --bone-rgb: 242, 239, 231;
  /* Type */
  --sans: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* Space */
  --gutter: clamp(20px, 5.2vw, 96px);
  --gx: max(var(--gutter), env(safe-area-inset-left), env(safe-area-inset-right));
  --page: 1680px;
  --bar: 68px;
  --section: clamp(104px, 17vh, 200px);
  /* Motion — the app's curves (docs/reference-spec.md Amendment 2), and a spring for what is dealt. */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
  --spring: cubic-bezier(0.2, 1.08, 0.36, 1);
  --t-fast: 160ms;
  --t-base: 280ms;
}
@supports (transition-timing-function: linear(0, 1)) {
  /* A damped spring (ζ 0.68, a 5 % overshoot), sampled. */
  :root { --spring: linear(0, 0.0349 2.9%, 0.1221 5.9%, 0.2391 8.8%, 0.3687 11.8%, 0.4985 14.7%, 0.6199 17.6%, 0.7275 20.6%, 0.8188 23.5%, 0.8928 26.5%, 0.9503 29.4%, 0.9928 32.4%, 1.0222 35.3%, 1.0407 38.2%, 1.0507 41.2%, 1.0542 44.1%, 1.053 47.1%, 1.0487 50%, 1.0426 52.9%, 1.0356 55.9%, 1.0285 58.8%, 1.0218 61.8%, 1.0158 64.7%, 1.0107 67.6%, 1.0065 70.6%, 1.0032 73.5%, 1.0008 76.5%, 0.9991 79.4%, 0.9979 82.4%, 0.9973 85.3%, 0.9971 88.2%, 0.9971 91.2%, 0.9973 94.1%, 0.9976 97.1%, 1); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: var(--bar); background: var(--canvas); }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--secondary);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
/* Film grain: one static texture over everything, never animated. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background: url("grain.png") repeat;
  background-size: 128px 128px;
  opacity: 0.5;
}
img, svg, picture { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--bone); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
p, h1, h2, ol, ul, figure { margin: 0; }
h1, h2 { color: var(--bone); font-weight: 700; text-wrap: balance; }
button { font: inherit; color: inherit; }
::selection { background: rgba(var(--amber-rgb), 0.32); color: var(--bone); }
.amber { color: var(--amber); }
.vh { 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: absolute; left: -9999px; top: 0; z-index: 200; }
.skip:focus { left: 16px; top: 12px; background: var(--raised); color: var(--bone); padding: 10px 14px; border-radius: 8px; }

/* Labels: the app's mono caps. */
.mark { font: 500 11px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--quiet); }
.mark .dot { color: var(--faint); padding: 0 0.3em; }
.index { display: flex; align-items: center; gap: 14px; font: 500 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--secondary); }
.index__n { color: var(--amber); letter-spacing: 0.06em; }
.index::after { content: ""; flex: 0 0 34px; height: 1px; background: var(--line-strong); order: -1; display: none; }

/* ---------------------------------------------------------------- bar */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: calc(var(--bar) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  transition: background-color 300ms ease, box-shadow 300ms ease;
}
.bar.is-solid { background: rgba(16, 16, 15, 0.8); box-shadow: 0 1px 0 var(--line); -webkit-backdrop-filter: saturate(140%) blur(16px); backdrop-filter: saturate(140%) blur(16px); }
.bar__inner { height: var(--bar); display: flex; align-items: center; gap: 24px; padding: 0 var(--gx); max-width: calc(var(--page) + 2 * var(--gutter)); margin: 0 auto; }
.bar__brand { display: block; flex: none; border-radius: 4px; }
.bar__brand img { height: 26px; width: auto; }
.bar__nav { display: flex; gap: 2px; margin-left: auto; }
.bar__nav a {
  position: relative; padding: 12px 12px;
  font: 500 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--secondary); text-decoration: none;
  transition: color var(--t-fast) ease;
}
.bar__nav a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px;
  background: var(--amber); transform: scaleX(0); transform-origin: left;
  transition: transform 240ms var(--ease-in-out);
}
.bar__nav a:hover { color: var(--bone); }
.bar__nav a[aria-current="location"] { color: var(--bone); }
.bar__nav a[aria-current="location"]::after { transform: scaleX(1); }

/* ---------------------------------------------------------------- phone */
/* A plain house frame (no device art): the app's raised surface, a hairline, a deep shadow. */
.phone {
  --pw: 300px;
  position: relative;
  width: var(--pw);
  padding: calc(var(--pw) * 0.03);
  border-radius: calc(var(--pw) * 0.148);
  background: linear-gradient(150deg, #35342f 0%, #1c1c1a 20%, #121211 58%, #1e1d1b 100%);
  box-shadow:
    inset 0 0 0 1px rgba(var(--bone-rgb), 0.14),
    inset 0 1px 0 rgba(var(--bone-rgb), 0.2),
    0 0 0 1px #000,
    0 70px 110px -40px rgba(0, 0, 0, 0.9),
    0 30px 50px -30px rgba(0, 0, 0, 0.85);
}
.phone__screen {
  position: relative;
  aspect-ratio: 430 / 932;
  border-radius: calc(var(--pw) * 0.12);
  overflow: hidden;
  background: var(--canvas);
  box-shadow: 0 0 0 1px #000;
  isolation: isolate;
}
.phone__screen img { width: 100%; height: 100%; object-fit: cover; }
.phone__glass {
  position: absolute; inset: calc(var(--pw) * 0.03);
  border-radius: calc(var(--pw) * 0.12);
  pointer-events: none; overflow: hidden;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.018) 24%, rgba(255, 255, 255, 0) 40%);
}
/* One pass of light across the glass when a phone arrives. */
.phone__glass::after {
  content: ""; position: absolute; inset: -10% -60%;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0.1) 48%, rgba(255, 255, 255, 0.02) 53%, rgba(255, 255, 255, 0) 60%);
  transform: translate3d(-70%, 0, 0);
  opacity: 0;
}

/* ---------------------------------------------------------------- the stores */
/*
 * A dock of two slots. Before a store has the app, its slot is our own plate —
 * the store's name and "Coming soon", no badge, no store logo, not a link.
 * Once it does (scripts/build-site.mjs writes it), the plate holds the store's
 * official badge, unmodified, with clear space of at least a quarter of the
 * badge's height on every side (both stores' rules), and the plate is the link.
 * The badge is shown once, in the first screen; the close's plate says "Out now".
 */
.dock {
  --bh: 44px; /* the badge's height: Apple ≥ 40 px on screen, Google ≥ 28 px; Google's never smaller than Apple's */
  /* Equal plates where they fit; never narrower than a badge and its padding (Google's badge is the wider). */
  display: grid; grid-template-columns: repeat(2, minmax(min-content, 1fr));
  gap: 14px; width: 100%; max-width: 430px;
}
.slot { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.store {
  --edge: 0.5;
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  height: calc(var(--bh) * 1.62);
  padding: 0 calc(var(--bh) * 0.34);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(var(--bone-rgb), 0.05), rgba(var(--bone-rgb), 0.012) 60%),
    var(--raised);
  box-shadow: inset 0 1px 0 rgba(var(--bone-rgb), 0.05), 0 18px 34px -22px rgba(0, 0, 0, 0.95);
  color: var(--bone); text-decoration: none;
  transition: background-color var(--t-base) ease, box-shadow var(--t-base) ease, --a 1500ms var(--ease-in-out) var(--d, 0ms);
}
/* The edge: a hairline whose light sits at --a — it follows the pointer, and sweeps once as the dock arrives. */
.store::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  border-radius: inherit; padding: 1px;
  background: conic-gradient(from var(--a), rgba(var(--bone-rgb), 0.12) 0deg, rgba(var(--bone-rgb), 0.7) 34deg, rgba(var(--bone-rgb), 0.12) 92deg, rgba(var(--bone-rgb), 0.12) 268deg, rgba(var(--amber-rgb), 0.45) 322deg, rgba(var(--bone-rgb), 0.12) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: var(--edge);
  transition: opacity var(--t-base) var(--ease-out);
}
/* The glow under a plate that can be pressed. */
.store::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  border-radius: inherit;
  box-shadow: 0 0 0 1px rgba(var(--bone-rgb), 0.06), 0 22px 46px -18px rgba(var(--bone-rgb), 0.26), 0 0 60px -20px rgba(var(--amber-rgb), 0.35);
  opacity: 0;
  transition: opacity 320ms var(--ease-out);
}
.store.is-tracking { transition: background-color var(--t-base) ease, box-shadow var(--t-base) ease; }
.store__status { display: flex; align-items: center; gap: 8px; font: 500 10px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--quiet); }
.store__dot { position: relative; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.store__dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(var(--amber-rgb), 0.55); opacity: 0; }
.store__name { font: 600 19px/1.1 var(--sans); letter-spacing: -0.015em; color: var(--bone); white-space: nowrap; }
a.store { align-items: center; cursor: pointer; }
/* The close's plate for a live store: our own words, not the badge (Apple allows one App Store badge per layout). */
a.store--text { align-items: stretch; }
.store__badge { display: block; height: var(--bh); width: auto; max-width: none; }
.slot__for { font: 500 10px/1.2 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--quiet); padding-left: 2px; transition: color var(--t-base) ease; }
.slot:is([data-state="live"], [data-state="link"]) .slot__for::after { content: "↗"; display: inline-block; margin-left: 7px; letter-spacing: 0; opacity: 0; transform: translate3d(-3px, 2px, 0); transition: opacity var(--t-base) ease, transform 420ms var(--ease-out); }
@media (hover: hover) {
  .store:hover { --edge: 0.85; }
  a.store:hover { --edge: 1; background-color: #1c1c1a; }
  a.store:hover::after { opacity: 1; }
  .slot:is([data-state="live"], [data-state="link"]):hover .slot__for { color: var(--bone); }
  .slot:is([data-state="live"], [data-state="link"]):hover .slot__for::after { opacity: 1; transform: none; }
}
/* Pressed: the plate sinks (its shadow and fill) and its whole edge lights; the badge itself stays exactly as it is. */
a.store:active { --edge: 1; background: var(--pressed); box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.6), 0 4px 10px -8px rgba(0, 0, 0, 0.9); transition-duration: 60ms; }
a.store:active::before { background: linear-gradient(rgba(var(--bone-rgb), 0.62), rgba(var(--amber-rgb), 0.5)); transition-duration: 60ms; }
a.store:active::after { opacity: 0.5; transition-duration: 60ms; }
a.store:focus-visible { outline-offset: 4px; border-radius: 14px; }
a.store:focus-visible::after { opacity: 1; }
.notify { margin-top: 28px; font: 500 15px/1.3 var(--sans); }
.notify a { color: var(--secondary); text-decoration: none; padding: 8px 4px; transition: color var(--t-fast) ease; }
.notify a span { display: inline-block; transition: transform 320ms var(--ease-out); }
.notify a:hover { color: var(--bone); }
.notify a:hover span { transform: translateX(4px); }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative;
  min-height: max(700px, 100svh);
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  align-items: center;
  column-gap: clamp(16px, 2.6vw, 56px);
  padding: calc(var(--bar) + clamp(12px, 3vh, 40px)) max(var(--gx), calc((100% - var(--page)) / 2)) clamp(36px, 6vh, 72px);
  overflow: clip;
}
.hero__atmos { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
/* The key light: one soft disc that drifts toward the pointer (moved, never repainted). */
.hero__aura {
  position: absolute; left: 66%; top: 46%;
  width: 110vmax; height: 110vmax; margin: -55vmax 0 0 -55vmax;
  background:
    radial-gradient(closest-side, rgba(var(--bone-rgb), 0.085), rgba(var(--bone-rgb), 0.03) 45%, rgba(var(--bone-rgb), 0) 72%);
  will-change: transform;
}
.hero__floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 46%;
  background: radial-gradient(60% 100% at 68% 100%, rgba(var(--amber-rgb), 0.06), rgba(var(--amber-rgb), 0) 70%);
}
.hero__copy { position: relative; z-index: 2; min-width: 0; }
.hero__mark { margin-bottom: clamp(18px, 2.6vh, 30px); }
.hero__title {
  font-size: clamp(46px, min(7.1vw, 12.2svh), 132px);
  line-height: 0.93;
  letter-spacing: -0.05em;
  max-width: 9.2em;
}
.hero__title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.hero__title .w > span { display: inline-block; }
.hero__lede { margin-top: clamp(20px, 3vh, 32px); font-size: clamp(17px, 1.3vw, 21px); line-height: 1.5; color: var(--secondary); max-width: 27em; text-wrap: pretty; }
.hero__copy .dock { margin-top: clamp(26px, 4.4vh, 48px); }

.hero__stage { position: relative; z-index: 1; height: min(82svh, 800px); min-height: 560px; display: grid; place-items: center; perspective: 1800px; }
/* The Axis at page scale: its two axes frame the phones, its value line runs behind them to the amber point. */
.axis { position: absolute; inset: 3% 0 5% 0; pointer-events: none; }
.axis__y { position: absolute; left: 2%; top: 0; bottom: 0; width: 1px; background: linear-gradient(to top, var(--line-strong), rgba(58, 56, 51, 0.2)); transform-origin: 50% 100%; }
.axis__x { position: absolute; left: 2%; right: 0; bottom: 0; height: 1px; background: linear-gradient(to right, var(--line-strong), rgba(58, 56, 51, 0.2)); transform-origin: 0 50%; }
.axis__x::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 1px; height: 6px;
  background: repeating-linear-gradient(90deg, rgba(58, 56, 51, 0.9) 0 1px, transparent 1px calc(100% / 18));
}
.axis__trace { position: absolute; left: 2%; right: 0; top: 0; bottom: 0; }
.axis__trace svg { width: 100%; height: 100%; overflow: visible; }
.axis__trace path { fill: none; stroke: rgba(var(--bone-rgb), 0.17); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
/* The point: amber, cut out of the line by a ring of canvas, as in the mark. */
.axis__point {
  position: absolute; left: 96%; top: 11%; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; background: var(--amber);
  box-shadow: 0 0 0 5px var(--canvas), 0 0 34px 10px rgba(var(--amber-rgb), 0.22);
}
.axis__ring { position: absolute; inset: -9px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(var(--amber-rgb), 0.5); }

/* Three phones, fanned like a hand of cards from a pivot below them. */
.spread {
  --pw: clamp(220px, min(19vw, 33svh), 340px);
  position: relative; width: var(--pw);
  transform-style: preserve-3d;
  will-change: transform;
}
.spread .phone { --pw: inherit; width: 100%; transform-origin: 50% 160%; }
.spread__c { --deal: none; z-index: 3; transform: var(--deal); }
.spread__l, .spread__r { position: absolute; left: 0; top: 0; z-index: 1; }
.spread__l { --deal: translate3d(-4%, 3%, 0) rotate(-13deg) scale(0.9); transform: var(--deal); }
.spread__r { --deal: translate3d(4%, 3%, 0) rotate(13deg) scale(0.9); transform: var(--deal); }
.spread__l .phone__screen, .spread__r .phone__screen { filter: brightness(0.82) saturate(0.95); }

/* ---------------------------------------------------------------- scenes */
.scene {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; column-gap: clamp(40px, 6vw, 140px);
  padding: var(--section) max(var(--gx), calc((100% - var(--page)) / 2));
  overflow: clip; /* the glow behind a phone is wider than a phone's screen; it must never widen the page */
}
.scene::before, .slabs::before, .finale::before { content: ""; position: absolute; left: var(--gx); right: var(--gx); top: 0; height: 1px; background: linear-gradient(90deg, rgba(42, 41, 37, 0), var(--line) 14%, var(--line) 86%, rgba(42, 41, 37, 0)); }
.scene__copy { min-width: 0; max-width: 620px; }
.scene--prices .scene__copy { order: 2; }
.scene .index, .slabs__head .index { margin-bottom: clamp(20px, 3vh, 30px); }
.scene__title { font-size: clamp(38px, min(5vw, 8.6svh), 88px); line-height: 0.97; letter-spacing: -0.045em; max-width: 11em; }
.scene__lede { margin-top: clamp(18px, 2.6vh, 28px); font-size: clamp(17px, 1.25vw, 20px); line-height: 1.55; color: var(--secondary); max-width: 30em; text-wrap: pretty; }
.scene__note { margin-top: 26px; font-size: 15px; color: var(--bone); }
.scene__fine { margin-top: 12px; font-size: 13px; line-height: 1.6; color: var(--quiet); max-width: 38em; }
.scene__stage { position: relative; min-width: 0; display: flex; justify-content: center; align-items: center; }
.phone--scene { --pw: clamp(236px, min(23vw, 40svh), 360px); }
/* AI Grading: the phone rises from the section's floor, showing the instrument — the card and what is measured. */
.scene--grade { padding-bottom: 0; }
.scene--grade .scene__copy { padding-bottom: var(--section); }
.scene--grade .scene__stage { align-self: end; padding-top: clamp(32px, 6vh, 72px); }
/* A phone is 2.097 widths tall; the floor cuts it just under the example card's label (46 % down its screen). */
.scene--grade .phone--scene { --pw: clamp(270px, min(30vw, 56svh), 470px); margin-bottom: calc(var(--pw) * -1.12); }
.scene--grade .scene__stage::before { top: 36%; }
.scene__stage::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 120%; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--bone-rgb), 0.06), rgba(var(--bone-rgb), 0) 70%);
}
.scene--grade .scene__stage::before { background: radial-gradient(closest-side, rgba(var(--amber-rgb), 0.08), rgba(var(--amber-rgb), 0) 70%); }

/* The app's own terminal lines, typed at page scale. */
.terminal {
  list-style: none; padding: 20px 0 0; margin-top: clamp(26px, 4vh, 40px);
  border-top: 1px solid var(--line);
  font: 400 clamp(13px, 0.95vw, 15px)/2 var(--mono); letter-spacing: -0.01em;
  color: var(--secondary);
  max-width: 30em;
}
.terminal li { position: relative; padding-left: 2.2ch; white-space: nowrap; }
.terminal li::before { content: ">"; position: absolute; left: 0; color: var(--faint); }
.terminal li:last-child { color: var(--bone); }
.terminal .t { display: inline-block; vertical-align: bottom; overflow: hidden; white-space: nowrap; }
.terminal .caret { display: inline-block; width: 0.62ch; height: 1.08em; margin-left: 3px; vertical-align: -0.16em; background: var(--amber); }

/* Two phones, the printings in front of the price. */
.pair { --pw: clamp(200px, min(19vw, 35svh), 310px); position: relative; width: calc(var(--pw) * 1.62); height: calc(var(--pw) * 2.44); }
.pair .phone { --pw: inherit; position: absolute; width: var(--pw); }
.pair__back { right: 0; top: 0; --rest: rotate(6deg); transform: var(--rest); }
.pair__front { left: 0; bottom: 0; z-index: 2; --rest: rotate(-4deg); transform: var(--rest); }
.pair__back .phone__screen { filter: brightness(0.86); }

/* ---------------------------------------------------------------- slabs */
.slabs {
  position: relative;
  padding: var(--section) 0 clamp(88px, 13vh, 150px);
  overflow: clip;
  background:
    radial-gradient(56% 42% at 50% 0%, rgba(var(--bone-rgb), 0.06), rgba(var(--bone-rgb), 0) 70%),
    radial-gradient(70% 30% at 50% 100%, rgba(var(--amber-rgb), 0.035), rgba(var(--amber-rgb), 0) 70%),
    var(--canvas);
}
.slabs__head { padding: 0 var(--gx); max-width: calc(var(--page) + 2 * var(--gutter)); margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; }
.slabs__head .scene__title { max-width: 13em; }
.slabs__head .scene__lede { max-width: 30em; }
.slabs__row {
  list-style: none; margin: clamp(56px, 9vh, 104px) auto 0; padding: 0 var(--gx) 24px;
  display: flex; gap: clamp(24px, 3.4vw, 72px); justify-content: center; align-items: flex-end;
  max-width: calc(var(--page) + 2 * var(--gutter));
}
.slab { flex: 0 1 clamp(170px, min(19vw, calc((100svh - 300px) / 1.72)), 330px); perspective: 1400px; display: flex; flex-direction: column; align-items: center; }
.slab__body {
  position: relative; width: 100%;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 900ms var(--ease-out);
  will-change: transform;
}
.slab__body.is-tracking { transition: transform 120ms linear; }
.slab__body img { width: 100%; height: auto; filter: drop-shadow(0 34px 34px rgba(0, 0, 0, 0.62)); }
.slab__light {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.3) 46%, rgba(255, 255, 255, 0.06) 54%, rgba(255, 255, 255, 0) 66%);
  background-size: 300% 100%;
  background-position: var(--lpos, 100%) 0;
  mix-blend-mode: soft-light;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
/* The light is masked to each holder's own outline — fetched only as the section approaches, and only with motion. */
.slab__light { display: none; }
.motion .slabs.is-near .slab__light { display: block; }
.motion .slabs.is-near .slab:nth-child(1) .slab__light { -webkit-mask-image: url("shots/slab-psa-320.webp"); mask-image: url("shots/slab-psa-320.webp"); }
.motion .slabs.is-near .slab:nth-child(2) .slab__light { -webkit-mask-image: url("shots/slab-bgs-320.webp"); mask-image: url("shots/slab-bgs-320.webp"); }
.motion .slabs.is-near .slab:nth-child(3) .slab__light { -webkit-mask-image: url("shots/slab-cgc-320.webp"); mask-image: url("shots/slab-cgc-320.webp"); }
.slab::after {
  content: ""; display: block; width: 78%; height: 22px; margin-top: -4px; order: 1;
  background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0) 70%);
}
.slab__cap { order: 2; margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; }
.slab__grade { font: 400 clamp(14px, 1.05vw, 17px)/1 var(--mono); color: var(--bone); letter-spacing: -0.02em; }
.slab__name { font-size: 14px; color: var(--quiet); }

/* ---------------------------------------------------------------- finale */
.finale {
  position: relative;
  min-height: max(620px, 92svh);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: var(--section) var(--gx) clamp(96px, 14vh, 160px);
  overflow: clip;
  background: radial-gradient(48% 40% at 50% 40%, rgba(var(--amber-rgb), 0.06), rgba(var(--amber-rgb), 0) 70%);
}
.finale__mark { width: clamp(96px, 10vw, 176px); height: auto; margin-bottom: clamp(36px, 6vh, 60px); overflow: hidden; }
.finale__title { font-size: clamp(40px, min(6vw, 10svh), 116px); line-height: 0.95; letter-spacing: -0.05em; max-width: 10.5em; }
.dock--center { margin: clamp(36px, 6vh, 56px) auto 0; }
.dock--center .store { align-items: center; text-align: center; }
.dock--center .store__status { justify-content: center; }
.dock--center .slot__for { position: relative; text-align: center; padding-left: 0; }
.dock--center .slot__for::after { position: absolute; } /* the link's arrow takes no room, so the words stay centred */

/* ---------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--line); padding: 64px var(--gx) calc(44px + env(safe-area-inset-bottom)); }
.foot__inner { max-width: var(--page); margin: 0 auto; display: grid; gap: 36px; grid-template-columns: 1fr; }
.foot__brand img { height: 24px; width: auto; }
.foot__brand p { margin-top: 14px; font-size: 15px; color: var(--secondary); }
.foot__nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.foot__nav a { color: var(--secondary); text-decoration: none; font-size: 15px; padding: 7px 0; }
.foot__nav a:hover { color: var(--bone); text-decoration: underline; }
.foot__fine { display: grid; gap: 12px; font-size: 13px; line-height: 1.6; color: var(--quiet); max-width: 72em; }
.foot__legal { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 6px; }
.foot__legal a { color: var(--quiet); }

/* ---------------------------------------------------------------- wide */
@media (min-width: 900px) {
  .foot__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); grid-template-areas: "brand fine" "nav fine"; }
  .foot__brand { grid-area: brand; }
  .foot__nav { grid-area: nav; flex-direction: column; align-content: start; }
  .foot__fine { grid-area: fine; }
}
@media (min-width: 1680px) { body { font-size: 18px; } }

/* ---------------------------------------------------------------- narrower */
/* Tablets and small laptops in portrait, and every phone: one column, the stores before the phones. */
@media (max-width: 1023px) and (max-aspect-ratio: 5/4), (max-width: 759px) {
  .hero { display: block; min-height: 0; padding-top: calc(var(--bar) + clamp(18px, 4vh, 40px)); padding-bottom: 0; }
  .hero__title { max-width: 8.4em; font-size: clamp(46px, 12.6vw, 104px); }
  .hero__stage { height: auto; min-height: 0; margin-top: clamp(28px, 5vh, 56px); padding: 6% 0 clamp(48px, 8vh, 88px); }
  .spread { --pw: min(52vw, 300px, calc((100svh - 150px) * 0.42)); }
  .axis { inset: 0 0 8% 0; }
  .hero__aura { left: 50%; top: 70%; }
  .hero__floor { height: 40%; background: radial-gradient(70% 100% at 50% 100%, rgba(var(--amber-rgb), 0.07), rgba(var(--amber-rgb), 0) 70%); }
}
/* Landscape between 760 and 1023 px (a small laptop, a browser pane, a phone on its side): side by side. */
@media (min-width: 760px) and (max-width: 1023px) and (min-aspect-ratio: 5/4) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); padding-top: calc(var(--bar) + 12px); padding-bottom: 20px; }
  .hero__title { font-size: clamp(38px, min(6.4vw, 11svh), 72px); }
  .hero__lede { font-size: 16px; margin-top: 14px; }
  .hero__copy .dock { margin-top: 22px; }
  .hero__stage { height: min(86svh, 640px); min-height: 0; }
  .spread { --pw: min(24vw, calc((100svh - 110px) * 0.42)); }
}
@media (max-width: 899px) {
  .bar__nav a:not([href="support.html"]) { display: none; }
  .scene { grid-template-columns: minmax(0, 1fr); row-gap: clamp(44px, 7vh, 72px); }
  .scene--prices .scene__copy { order: 0; }
  .scene--grade .scene__copy { padding-bottom: 0; }
  .scene--grade .scene__stage { padding-top: 0; }
  .scene--grade .phone--scene { --pw: min(74vw, 340px); margin-bottom: calc(var(--pw) * -1.12); }
  .phone--scene { --pw: min(66vw, 320px, calc((100svh - 150px) * 0.42)); }
  .pair { --pw: min(50vw, 260px, calc((100svh - 160px) * 0.38)); }
  /* One holder at a time, never taller than the screen (a holder is about 1.68 times as tall as it is wide). */
  .slabs { --sw: min(60vw, 340px, calc((100svh - 200px) / 1.76)); }
  .slabs__row {
    justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 12px calc(50vw - var(--sw) / 2) 28px; gap: 22px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .slabs__row::-webkit-scrollbar { display: none; }
  .slab { flex: 0 0 var(--sw); scroll-snap-align: center; }
}
@media (max-width: 759px) {
  :root { --bar: 58px; }
  .bar__brand img { height: 22px; }
  .dock { --bh: 40px; gap: 12px; }
  .store { padding: 0 12px; border-radius: 13px; }
  .store__name { font-size: 17px; }
  .scene__note { font-size: 14px; }
}
/* The narrowest phones: the two stores stack, so a badge always has its clear space. */
@media (max-width: 359px) {
  .dock { grid-template-columns: minmax(0, 1fr); max-width: 300px; }
  .hero__mark { font-size: 10px; letter-spacing: 0.08em; }
}
/* A phone on its side (or any screen under 520 px tall and wide): the words and the stores fit the first screen, and the words' column is never narrower than the dock. */
@media (max-height: 520px) and (min-aspect-ratio: 5/4) {
  :root { --bar: 52px; }
  .bar__brand img { height: 21px; }
  .hero { display: grid; grid-template-columns: minmax(min-content, 1.08fr) minmax(0, 0.92fr); min-height: max(100svh, 360px); padding-top: calc(var(--bar) + 4px); padding-bottom: 10px; }
  .hero__mark { margin-bottom: 8px; }
  .hero__title { font-size: min(9.6svh, 6vw); max-width: 12em; }
  .hero__lede { font-size: 15px; line-height: 1.45; margin-top: 10px; max-width: 32em; }
  .hero__copy .dock { margin-top: 14px; }
  .dock { --bh: 40px; gap: 10px; max-width: 400px; }
  .slot { gap: 6px; }
  .hero__stage { height: calc(100svh - var(--bar) - 14px); min-height: 0; margin: 0; padding: 0; }
  .spread { --pw: calc((100svh - var(--bar) - 44px) * 0.45); }
}
@media (max-height: 400px) and (min-aspect-ratio: 5/4) {
  .hero__mark { display: none; }
}

/* ---------------------------------------------------------------- motion */
/* boot.js marks <html> "motion" when the visitor has not asked for reduced motion. */
.motion [data-rise] { opacity: 0; transform: translate3d(0, 26px, 0); }
.motion .is-in [data-rise], .motion [data-rise].is-in {
  opacity: 1; transform: none;
  transition: opacity 860ms var(--out-cubic), transform 1100ms var(--ease-out);
  transition-delay: var(--d, 0ms);
}
/*
 * The first screen runs on CSS alone, from the first paint — it never waits for the script,
 * so a slow phone shows the words and the stores as soon as it can draw them.
 * The headline's words rise from behind their own masks; the eyebrow, the lede and the
 * "Coming soon" plates follow; the centre phone rises.
 */
.motion .hero__title .w > span { animation: lc-word 1150ms var(--ease-out) both; animation-delay: calc(60ms + var(--i, 0) * 65ms); }
.hero__title .w:nth-child(2) { --i: 1; } .hero__title .w:nth-child(3) { --i: 2; } .hero__title .w:nth-child(4) { --i: 3; }
.hero__title .w:nth-child(5) { --i: 4; } .hero__title .w:nth-child(6) { --i: 5; }
.motion .hero [data-rise] { animation: lc-rise 900ms var(--ease-out) both; }
.motion .hero .hero__lede { animation-delay: 300ms; }
.motion .hero .dock .slot[data-state="soon"] { animation: lc-rise 1000ms var(--ease-out) both; animation-delay: 420ms; }
.motion .hero .dock .slot[data-state="soon"] + .slot[data-state="soon"] { animation-delay: 520ms; }
.motion .hero .dock .slot[data-state="live"] .slot__for { animation: lc-fade 600ms var(--out-cubic) 420ms both; }
.motion .spread .spread__c { animation: lc-lift 1300ms var(--spring) 120ms both; }
@keyframes lc-word { from { transform: translate3d(0, 112%, 0); } to { transform: none; } }
@keyframes lc-rise { from { opacity: 0; transform: translate3d(0, 22px, 0); } to { opacity: 1; transform: none; } }
@keyframes lc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lc-lift { from { opacity: 0; transform: translate3d(0, 9%, 0) scale(0.96); } to { opacity: 1; transform: none; } }

/* The dock: our own plates ("Coming soon", "Out now") rise; a badge's plate is there from the first frame (the badge never moves). */
.motion .dock .slot:is([data-state="soon"], [data-state="link"]) { opacity: 0; transform: translate3d(0, 18px, 0); }
.motion .dock.is-in .slot:is([data-state="soon"], [data-state="link"]) { opacity: 1; transform: none; transition: opacity 760ms var(--out-cubic), transform 1000ms var(--ease-out); transition-delay: var(--d, 0ms); }
.motion .dock .slot[data-state="live"] .slot__for { opacity: 0; }
.motion .dock.is-in .slot[data-state="live"] .slot__for { opacity: 1; transition: opacity 600ms var(--out-cubic) var(--d, 0ms); }
.motion .dock .store { --a: 150deg; }
.motion .dock.is-in .store { --a: 510deg; }
.motion .dock.is-in .store__dot::after { animation: lc-ring 1500ms var(--out-cubic) 900ms 2; }
@keyframes lc-ring { from { opacity: 1; transform: scale(0.6); } to { opacity: 0; transform: scale(2.1); } }

/* The other two are dealt from behind it, once all three screens are decoded (the script says when). */
.motion .spread .spread__l, .motion .spread .spread__r { opacity: 0; transform: translate3d(0, 6%, 0) scale(0.92); }
.motion .spread.is-dealt .spread__l, .motion .spread.is-dealt .spread__r { opacity: 1; transform: var(--deal); }
.motion .spread.is-dealt .spread__l { transition: opacity 500ms var(--out-cubic) var(--deal-at, 0ms), transform 1500ms var(--spring) var(--deal-at, 0ms); }
.motion .spread.is-dealt .spread__r { transition: opacity 500ms var(--out-cubic) calc(var(--deal-at, 0ms) + 90ms), transform 1500ms var(--spring) calc(var(--deal-at, 0ms) + 90ms); }
.motion .spread.is-dealt .phone__glass::after { opacity: 1; transform: translate3d(70%, 0, 0); transition: transform 1800ms var(--ease-in-out) 500ms, opacity 200ms ease 500ms; }

/* The Axis draws itself behind them: the axes, then the value line, then the amber point lands and calls twice. */
.motion .axis__y { animation: lc-grow-y 1300ms var(--ease-in-out) 300ms both; }
.motion .axis__x { animation: lc-grow-x 1500ms var(--ease-in-out) 620ms both; }
.motion .axis__x::after { animation: lc-fade 900ms ease 1500ms both; }
.motion .axis__trace svg { animation: lc-wipe-in 1800ms var(--ease-in-out) 950ms both; }
.motion .axis__point { animation: lc-pop 900ms var(--spring) 2600ms both; }
.motion .axis__ring { opacity: 0; animation: lc-ring 1600ms var(--out-cubic) 3000ms 2 forwards; }
@keyframes lc-grow-y { from { transform: scaleY(0); } to { transform: none; } }
@keyframes lc-grow-x { from { transform: scaleX(0); } to { transform: none; } }
@keyframes lc-wipe-in { from { clip-path: inset(-10% 100% -10% 0); } to { clip-path: inset(-10% -10% -10% 0); } }
@keyframes lc-pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: none; } }

/* Scene phones arrive from below and settle. */
.motion [data-lift] { opacity: 0; transform: translate3d(0, 72px, 0) rotate(0deg) scale(0.97); }
.motion .is-in [data-lift] { opacity: 1; transform: var(--rest, none); transition: opacity 760ms var(--out-cubic), transform 1500ms var(--spring); transition-delay: var(--d, 0ms); }
.motion .is-in [data-lift] .phone__glass::after { opacity: 1; transform: translate3d(70%, 0, 0); transition: transform 1800ms var(--ease-in-out) 600ms, opacity 200ms ease 600ms; }
.motion .pair .pair__back { --d: 140ms; }
.motion .pair__front { transform: translate3d(14%, 80px, 0) rotate(0deg); }
.motion .pair__back { transform: translate3d(-14%, 60px, 0) rotate(0deg); }

/* The terminal types, one line after another, with the app's amber caret. */
.motion .terminal .t { width: 0; }
.motion .terminal.is-typing .t { width: calc(var(--n) * 1ch); transition: width calc(var(--n) * 34ms) steps(var(--n), end) var(--td, 0ms); }
.motion .terminal .caret { animation: lc-blink 1060ms steps(1, end) 4 both; }
.terminal .caret.is-done { animation: none; opacity: 0.85; }
@keyframes lc-blink { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }

/* Holders are dealt from a stack into the row, each catching one pass of light. */
@media (min-width: 900px) {
  .motion .slab { opacity: 0; transform: translate3d(var(--deal-x, 0), 70px, 0) rotate(var(--deal-r, 0deg)); }
  .motion .slabs.is-in .slab { opacity: 1; transform: none; transition: opacity 600ms var(--out-cubic), transform 1500ms var(--spring); transition-delay: var(--d, 0ms); }
  .slab:nth-child(1) { --deal-x: 108%; --deal-r: -5deg; }
  .slab:nth-child(2) { --deal-x: 0%; --deal-r: 0deg; }
  .slab:nth-child(3) { --deal-x: -108%; --deal-r: 5deg; }
}
@media (max-width: 899px) {
  .motion .slab { opacity: 0; transform: translate3d(44px, 0, 0); }
  .motion .slabs.is-in .slab { opacity: 1; transform: none; transition: opacity 600ms var(--out-cubic), transform 1100ms var(--ease-out); transition-delay: var(--d, 0ms); }
}

/* The close: the Axis mark draws itself — the axes, the value line, then the amber point. */
.finale__mark .axis-y { transform-box: fill-box; transform-origin: 50% 100%; }
.finale__mark .axis-x { transform-box: fill-box; transform-origin: 0 50%; }
.finale__mark .axis-point { transform-box: fill-box; transform-origin: 50% 50%; }
.motion .finale__mark .axis-y { transform: scaleY(0); }
.motion .finale__mark .axis-x { transform: scaleX(0); }
.motion .finale__mark .axis-line { stroke-dasharray: 420; stroke-dashoffset: 420; }
.motion .finale__mark .axis-point { transform: scale(0.4); opacity: 0; }
.motion .finale.is-in .axis-y { transform: none; transition: transform 700ms var(--ease-in-out); }
.motion .finale.is-in .axis-x { transform: none; transition: transform 700ms var(--ease-in-out) 520ms; }
.motion .finale.is-in .axis-line { stroke-dashoffset: 0; transition: stroke-dashoffset 900ms var(--ease-in-out) 1000ms; }
.motion .finale.is-in .axis-point { transform: none; opacity: 1; transition: transform 700ms var(--spring) 1820ms, opacity 160ms ease 1820ms; }

/* Safety: what waits for the script (everything below the first screen, and the fan) is shown, finished, after 4 s if it never runs. */
.motion:not(.ready) :is(.scene, .slabs, .finale) [data-rise], .motion:not(.ready) [data-lift], .motion:not(.ready) .slab, .motion:not(.ready) .finale .dock .slot,
.motion:not(.ready) .finale__mark .axis-y, .motion:not(.ready) .finale__mark .axis-x, .motion:not(.ready) .finale__mark .axis-point { animation: lc-show-rise 1ms 4s forwards; }
.motion:not(.ready) .spread__l, .motion:not(.ready) .spread__r { animation: lc-deal 1ms 4s forwards; }
.motion:not(.ready) .finale__mark .axis-line { animation: lc-draw 1ms 4s forwards; }
.motion:not(.ready) .terminal .t { animation: lc-type 1ms 4s forwards; }
.motion:not(.ready) .finale .dock .slot__for { animation: lc-show 1ms 4s forwards; }
@keyframes lc-show { to { opacity: 1; } }
@keyframes lc-show-rise { to { opacity: 1; transform: none; } }
@keyframes lc-deal { to { opacity: 1; transform: var(--deal); } }
@keyframes lc-draw { to { stroke-dashoffset: 0; } }
@keyframes lc-type { to { width: auto; } }

/* Reduced motion: everything in place, nothing travels; state changes are a short cross-fade. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .store, .store::before, .store::after, .slot__for, .slot__for::after, .notify a span, .bar__nav a::after { transition-duration: 120ms !important; }
  .slab__body, .spread { transform: none !important; }
}

/* Print: a plain document. */
@media print {
  body::before, .bar, .hero__atmos, .axis, .phone__glass { display: none !important; }
  body { background: #fff; color: #222; }
  h1, h2 { color: #000; }
}
