/* Co-ordinate landing page. Each chapter is set in one of the dashboard's six designs; the tokens below are copied
   from web/style.css (Retrowave), web/designs/fantasy/art-deco.css, web/designs/wasteland/wasteland.css,
   DESIGN-SYSTEM.md (Edo), web/designs/stoneage/stoneage.css and web/designs/lunar/lunar.css. Fonts are the
   dashboard's own local files. */

@font-face { font-family: "Orbitron"; src: url(fonts/orbitron.woff2) format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Share Tech Mono"; src: url(fonts/share-tech-mono.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono-regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono-semibold.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Marcellus"; src: url(fonts/marcellus-latin.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Josefin Sans"; src: url(fonts/josefin-sans-latin.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Shippori Mincho"; src: url(fonts/shipporimincho-400-latin.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Shippori Mincho"; src: url(fonts/shipporimincho-600-latin.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Zen Kaku Gothic New"; src: url(fonts/zenkakugothicnew-400-latin.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Zen Kaku Gothic New"; src: url(fonts/zenkakugothicnew-500-latin.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Zen Kaku Gothic New"; src: url(fonts/zenkakugothicnew-700-latin.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  /* status colours: the dashboard's, never decoration */
  /* the city's own window colours (web/index.html's key, each scene.js MOOD) and the Codex trim */
  --st-busy: #ff9a3c; --st-idle: #8a7a5a; --st-needs: #ffe14d; --st-blocked: #ff4a4a; --st-asleep: #14161f; --st-sill: #00ffff;
  /* one spacing rhythm for every world */
  --s1: .5rem; --s2: 1rem; --s3: 1.5rem; --s4: 2.5rem; --s5: 4rem; --s6: clamp(5rem, 10vw, 9rem);
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --bar-h: 56px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

/* ---- worlds: every chapter (and the bar) reads these */
[data-world="original"], [data-world="next"] {
  --bg: #090014; --bg2: #120530; --ink: #ece8f6; --muted: #b3a9cf; --rule: #3a2462;
  --accent: #ff00ff; --accent2: #00ffff; --warm: #ff9900; --on-accent: #090014;
  --display: "Orbitron", "Bahnschrift", sans-serif; --body: "Share Tech Mono", Consolas, monospace; --label: "Share Tech Mono", Consolas, monospace;
  --display-case: none; --display-track: -.01em;
  --cta-clip: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); --cta-outline: none; --cta-radius: 0;
}
[data-world="fantasy"] {
  --bg: #0a0a0a; --bg2: #141414; --ink: #f2f0e4; --muted: #c9c3ad; --rule: #5c4b1a;
  --accent: #d4af37; --accent2: #ead89b; --warm: #d4af37; --on-accent: #0a0a0a;
  --display: "Marcellus", Georgia, serif; --body: "Josefin Sans", "Segoe UI", sans-serif; --label: "Josefin Sans", "Segoe UI", sans-serif;
  --display-case: uppercase; --display-track: .06em;
  --cta-clip: none; --cta-outline: 1px solid var(--accent); --cta-radius: 0;
}
[data-world="wasteland"] {
  --bg: #0a0a0f; --bg2: #121720; --ink: #e4eaee; --muted: #a3b1be; --rule: #30424c;
  --accent: #00ff88; --accent2: #8ce8ff; --warm: #86ffc5; --on-accent: #0a0a0f;
  --display: "Orbitron", "Bahnschrift", sans-serif; --body: "JetBrains Mono", Consolas, monospace; --label: "Share Tech Mono", Consolas, monospace;
  --display-case: uppercase; --display-track: .02em;
  --cta-clip: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%); --cta-outline: none; --cta-radius: 0;
}
[data-world="edo"] {
  /* --on-accent is a shade lighter than the paper: #f3ecdf on vermilion was 4.42:1; --accent-ink is the vermilion
     for text on paper (the brush red itself is 4.42:1 there too) */
  --bg: #f3ecdf; --bg2: #e9dfcc; --ink: #1b1a19; --muted: #4f4a42; --rule: #c9b99b;
  --accent: #c8372d; --accent2: #1f3a5f; --warm: #c9a24a; --on-accent: #fffaf3; --accent-ink: #a52a22;
  --display: "Shippori Mincho", "Yu Mincho", serif; --body: "Zen Kaku Gothic New", "Yu Gothic", sans-serif; --label: "Zen Kaku Gothic New", "Yu Gothic", sans-serif;
  --display-case: none; --display-track: 0;
  --cta-clip: none; --cta-outline: none; --cta-radius: 0;
  color-scheme: light;
}
[data-world="stoneage"] {
  /* parchment, rust, moss and ochre; Marcellus over Josefin Sans, small rounded corners, dashed rules */
  --bg: #e7d8b8; --bg2: #f0e4ca; --ink: #2b251d; --muted: #61523c; --rule: #ac936d;
  --accent: #944024; --accent2: #3b5a46; --warm: #7b4712; --on-accent: #fff7df;
  --display: "Marcellus", Georgia, serif; --body: "Josefin Sans", "Segoe UI", sans-serif; --label: "Josefin Sans", "Segoe UI", sans-serif;
  --display-case: none; --display-track: .035em;
  --cta-clip: none; --cta-outline: none; --cta-radius: 4px;
  color-scheme: light;
}
[data-world="lunar"] {
  /* mission control: near-black slate, instrument gold, sky blue; Josefin Sans over JetBrains Mono */
  --bg: #080b0f; --bg2: #10161d; --ink: #edf0f2; --muted: #aab5bd; --rule: #3d4a55;
  --accent: #e5ba6e; --accent2: #98caff; --warm: #ffa26a; --on-accent: #0c1117;
  --display: "Josefin Sans", "Segoe UI", sans-serif; --body: "JetBrains Mono", Consolas, monospace; --label: "JetBrains Mono", Consolas, monospace;
  --display-case: uppercase; --display-track: .08em;
  --cta-clip: none; --cta-outline: none; --cta-radius: 0;
}

/* ---- base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 8px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: #090014; color: #ece8f6; font: 1.0625rem/1.6 "Share Tech Mono", Consolas, monospace; overflow-x: clip; }
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); text-transform: var(--display-case); letter-spacing: var(--display-track); text-wrap: balance; margin: 0; font-weight: 600; line-height: 1.1; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent2); text-underline-offset: .2em; }
code { font-family: "JetBrains Mono", Consolas, monospace; font-size: .9em; color: var(--accent2); }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent2); outline-offset: 3px; }
html { scrollbar-color: #3a2462 #090014; }
.narrow-only { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; padding: 10px 14px; background: #ff00ff; color: #090014; font: 600 14px var(--label); }
.skip:focus { top: 8px; }
.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---- the bar: takes the colours of the chapter you are in */
.bar { position: fixed; inset: 0 0 auto; z-index: 20; height: var(--bar-h); display: flex; align-items: center; gap: var(--s3);
  padding-inline: var(--gutter); background: color-mix(in srgb, var(--bg) 88%, transparent); border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background-color .5s var(--ease), border-color .5s var(--ease), color .5s var(--ease); }
.mark { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 15px/1 "Orbitron", sans-serif; letter-spacing: .08em; text-transform: uppercase; min-height: 44px; }
.mark svg { width: 22px; height: 22px; }
.mark svg path { fill: none; stroke-width: 3.5; } .mark svg .ring { stroke: var(--ink); } .mark svg .bar { stroke: var(--accent2); }
/* the name's hyphen drawn as a bar (docs/dev/REBRAND-DIRECTION.md): the real "-" stays in the text */
.hy { display: inline-block; width: .45em; height: .13em; margin: 0 .06em; vertical-align: .3em; overflow: hidden; line-height: 0; color: transparent; background: var(--accent2); }
.nm { white-space: nowrap; }
.chapters { display: flex; gap: 20px; margin-left: auto; }
.chapters a { color: var(--muted); text-decoration: none; font: 14px var(--label); letter-spacing: .04em; padding: 12px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.chapters a:hover { color: var(--ink); }
.chapters a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.cta-small { margin-left: var(--s2); }

/* ---- buttons */
.cta { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; font: 700 15px/1 var(--display);
  letter-spacing: .06em; text-transform: uppercase; color: var(--on-accent); background: var(--accent); text-decoration: none; border: 0;
  clip-path: var(--cta-clip); outline: var(--cta-outline); outline-offset: 3px; border-radius: var(--cta-radius);
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .55);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .5s var(--ease), color .5s var(--ease); }
.cta:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -6px rgba(0, 0, 0, .6); }
.cta:active { transform: translateY(0); }
.cta-small { min-height: 40px; padding: 0 16px; font-size: 12px; }
/* one action on screen at a time: the bar's button steps aside while the form itself is in view */
.bar.at-launch .cta-small { visibility: hidden; }
.cta:focus-visible { outline: 2px solid var(--accent2); outline-offset: 5px; }

/* ---- hero */
.hero { position: relative; font-family: var(--body); min-height: 100svh; display: grid; align-items: end; padding: calc(var(--bar-h) + var(--s5)) var(--gutter) var(--s5); overflow: hidden; isolation: isolate; background: var(--bg); }
.hero-media { position: absolute; inset: 0; z-index: -1; }
.stage { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .9s var(--ease); }
.stage.is-on { opacity: 1; }
.stage img, .stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; }
.stage video { opacity: 0; transition: opacity .6s var(--ease); }
.stage video.is-playing { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to top, color-mix(in srgb, var(--bg) 92%, transparent) 0%, color-mix(in srgb, var(--bg) 55%, transparent) 30%, transparent 58%),
              linear-gradient(to right, color-mix(in srgb, var(--bg) 95%, transparent) 0%, color-mix(in srgb, var(--bg) 90%, transparent) 36%, color-mix(in srgb, var(--bg) 58%, transparent) 50%, transparent 66%);
  transition: background .9s var(--ease); }
.hero-copy { max-width: 40rem; display: grid; gap: var(--s2); }
.hero h1 { font-size: clamp(2.1rem, 1.1rem + 3.4vw, 4.25rem); line-height: 1.02; font-weight: 800; color: var(--ink);
  text-shadow: 0 2px 24px color-mix(in srgb, var(--bg) 80%, transparent); transition: color .6s var(--ease), letter-spacing .6s var(--ease); }
[data-world="fantasy"].hero h1, [data-world="stoneage"].hero h1 { font-weight: 400; line-height: 1.08; }
[data-world="edo"].hero h1 { font-weight: 600; line-height: 1.12; }
[data-world="lunar"].hero h1 { font-weight: 600; font-size: clamp(1.9rem, 1rem + 2.9vw, 3.6rem); line-height: 1.08; }
.hero-sub { font: 600 clamp(1.25rem, 1rem + 1.1vw, 1.9rem)/1.2 var(--display); text-transform: var(--display-case); letter-spacing: var(--display-track); color: var(--accent2); }
[data-world="original"] .hero-sub { color: var(--warm); }
[data-world="edo"] .hero-sub { color: var(--accent-ink); }
[data-world="stoneage"] .hero-sub { color: var(--accent); }
[data-world="lunar"] .hero-sub { color: var(--accent); font-weight: 600; }
.hero-lede { max-width: 36rem; font-size: 1.125rem; color: var(--ink); text-shadow: 0 1px 12px var(--bg); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s2); }
.hero-note { margin-top: calc(var(--s1) * -1); font: 14px/1.5 var(--label); color: var(--muted); text-shadow: 0 1px 10px var(--bg); }
.hero-copy > .switch { justify-self: start; margin-top: var(--s1); }
.switch { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px; background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid var(--rule);
  transition: background-color .6s var(--ease), border-color .6s var(--ease); }
.switch-label { font: 13px var(--label); color: var(--muted); padding: 0 8px 0 6px; }
.switch button { min-height: 40px; padding: 0 12px; font: 14px var(--label); color: var(--ink); background: transparent; border: 0; cursor: pointer; transition: background-color .25s, color .25s; }
.switch button:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.switch button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.hero-foot { position: absolute; right: var(--gutter); bottom: var(--s2); display: flex; align-items: center; gap: var(--s2); }
.demo-note { font: 12px var(--label); color: var(--muted); text-shadow: 0 1px 8px var(--bg); }
.motion { min-height: 32px; padding: 0 12px; font: 12px var(--label); color: var(--ink); background: color-mix(in srgb, var(--bg) 70%, transparent);
  border: 1px solid var(--rule); border-radius: var(--cta-radius); cursor: pointer; }
.motion:hover { border-color: var(--accent); }
.motion[hidden] { display: none; }
/* Edo and Stone Age are light designs: the hero keeps paper (or hide) behind the copy, nearly opaque so no city sign
   shows through the words */
[data-world="edo"].hero .hero-copy { background: color-mix(in srgb, var(--bg) 95%, transparent); padding: var(--s3); border-top: 3px solid var(--accent); }
[data-world="stoneage"].hero .hero-copy { background: color-mix(in srgb, var(--bg2) 95%, transparent); padding: var(--s3); border-top: 3px solid var(--accent); border-radius: 6px; }
:is([data-world="edo"], [data-world="stoneage"]).hero :is(h1, .hero-lede, .hero-note) { text-shadow: none; }

/* ---- chapters */
.chapter { position: relative; background: var(--bg); color: var(--ink); font-family: var(--body); padding-block: var(--s6); }
.chapter-head { display: grid; gap: var(--s2); max-width: 40rem; margin-bottom: var(--s4); }
.chapter-head h2 { font-size: clamp(1.9rem, 1.2rem + 2.8vw, 3.5rem); }
.chapter-head p { color: var(--muted); font-size: 1.125rem; }
figure { margin: 0; }
figcaption { font: 14px/1.5 var(--label); color: var(--muted); margin-top: var(--s1); }

/* Retrowave: read it */
.read { background: radial-gradient(120% 70% at 50% 0%, #1d0a45 0%, var(--bg) 60%); }
.read .chapter-head h2 { color: var(--ink); }
.annotated-frame { position: relative; border: 1px solid var(--rule); }
.annotated-frame img { width: 100%; }
.pin { position: absolute; left: var(--x); top: var(--y); translate: -50% -50%; width: 36px; height: 36px; border-radius: 50%; border: 2px solid #090014;
  background: var(--accent2); color: #090014; font: 700 15px/1 "Orbitron", sans-serif; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 0 0 3px rgba(9, 0, 20, .55), 0 4px 14px rgba(0, 0, 0, .6); transition: scale .25s var(--ease), background-color .2s; }
.pin::before { content: ""; position: absolute; inset: -6px; }
.pin:hover, .pin.is-lit { scale: 1.18; background: var(--warm); }
.key { list-style: none; counter-reset: k; margin: var(--s3) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--s2) var(--s3); }
.key li { counter-increment: k; position: relative; padding: var(--s1) 0 0 44px; font: 15px/1.55 var(--body); color: var(--muted); border-top: 1px solid var(--rule); transition: color .2s, border-color .2s; }
.key li::before { content: counter(k); position: absolute; left: 0; top: var(--s1); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent2); color: #090014; font: 700 13px/1 "Orbitron", sans-serif; }
.key li b { color: var(--ink); font-weight: 400; }
.key li.is-lit { color: var(--ink); border-top-color: var(--warm); }
.key li.is-lit::before { background: var(--warm); }
.legend { list-style: none; margin: var(--s4) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font: 15px var(--label); }
.legend li { display: flex; align-items: center; gap: 10px; }
.legend i { position: relative; width: 22px; height: 18px; background: var(--c); border: 1px solid #090014; outline: 1px solid var(--rule); }
.legend i.needs::after { content: "!"; position: absolute; inset: 0; display: grid; place-items: center; font: 900 12px/1 "Orbitron", sans-serif; color: #090014; }
.legend i.sill { background: #2b1d4f; border-bottom: 4px solid var(--st-sill); }
.aside { margin-top: var(--s3); color: var(--muted); max-width: 44rem; font-size: 15px; }

/* Fantasy: act */
.act { background: repeating-linear-gradient(90deg, transparent 0 79px, rgba(212, 175, 55, .045) 79px 80px), var(--bg); }
.act::before, .act::after { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); height: 7px; border-block: 1px solid var(--accent); opacity: .55; }
.act::before { top: var(--s4); } .act::after { bottom: var(--s4); }
.act-grid { display: grid; grid-template-columns: minmax(0, 1fr) 26rem; gap: var(--s5); align-items: start; justify-content: space-between; }
.act .chapter-head h2 { color: var(--accent); font-weight: 400; }
.act .chapter-head p { font-size: 1.1875rem; }
.ledger { list-style: none; margin: var(--s2) 0 0; padding: 0; }
.ledger li { position: relative; padding: var(--s2) 0 var(--s2) 28px; border-top: 1px solid var(--rule); font-size: 1.0625rem; line-height: 1.5; color: var(--muted); }
.ledger li:last-child { border-bottom: 1px solid var(--rule); }
.ledger li::before { content: ""; position: absolute; left: 4px; top: calc(var(--s2) + .45em); width: 8px; height: 8px; background: var(--accent); rotate: 45deg; }
.ledger b { color: var(--ink); font-weight: 600; }
.framed { padding: 10px; border: 1px solid var(--accent); outline: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 5px; background: var(--bg2); }
.framed figcaption { padding-inline: 4px; }
.card img { width: 100%; }
.strip { margin-top: var(--s5); }
.strip img { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; object-position: 50% 48%; border: 1px solid var(--rule); }

/* Wasteland: local */
.local { background: linear-gradient(rgba(0, 255, 136, .035) 1px, transparent 1px) 0 0 / 100% 32px, var(--bg);
  border-top: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.local-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--s5); align-items: start; }
.local-grid .cut { margin-top: calc(var(--s6) * .55); position: sticky; top: calc(var(--bar-h) + var(--s4)); }
.cut img { clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px)); }
.local .chapter-head h2 { color: var(--ink); text-shadow: 1px 0 0 rgba(255, 0, 170, .45); }
.local .chapter-head p { font-size: 1rem; line-height: 1.65; }
.spec { margin: 0; border-top: 1px solid var(--accent); font-size: .9375rem; }
.spec div { display: grid; grid-template-columns: 11rem 1fr; gap: var(--s2); padding: 12px 0; border-bottom: 1px solid var(--rule); }
.spec dt { font: 14px/1.5 var(--label); color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.spec dt::before { content: "> "; color: var(--muted); }
.spec dd { margin: 0; color: var(--ink); }
.spec div:first-child dd { font: 600 2rem/1 "JetBrains Mono", monospace; color: var(--accent); }

/* Edo: light */
.light { padding-bottom: var(--s5); }
.narrow { max-width: 48rem; }
.light .chapter-head { max-width: none; }
.light .chapter-head h2 { font-weight: 600; }
.light .chapter-head h2::after { content: ""; display: block; width: 3.5rem; height: 3px; background: var(--accent); margin-top: var(--s3); }
.measure { width: 100%; border-collapse: collapse; font-size: 1.0625rem; }
.measure caption { caption-side: bottom; text-align: left; font: 14px var(--label); color: var(--muted); padding-top: var(--s2); }
.measure th, .measure td { text-align: left; padding: 14px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.measure tr:first-child > * { border-top: 2px solid var(--ink); }
.measure th { font: 600 1.0625rem/1.4 var(--display); width: 42%; padding-right: var(--s3); }
.measure td { font-variant-numeric: tabular-nums; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin-top: var(--s5); }
.pair img { border: 1px solid var(--rule); }

/* Stone Age: the waste. Parchment, a hide-coloured card and the dashboard's own "+" fold marks */
.waste { background: radial-gradient(110% 80% at 15% 0%, #efe3c8 0%, var(--bg) 62%); }
.waste-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--s3) var(--s5); align-items: end; margin-bottom: var(--s4); }
.waste .chapter-head { margin-bottom: 0; }
.waste .chapter-head h2 { font-weight: 400; }
.waste .chapter-head p { color: var(--muted); }
.finds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2) var(--s3); }
.finds li { position: relative; padding: 12px 0 0 24px; border-top: 1px dashed var(--rule); color: var(--muted); font-size: 1rem; line-height: 1.5; }
.finds li::before { content: "+"; position: absolute; left: 3px; top: 9px; color: var(--accent); font: 600 1.15rem/1.4 var(--label); }
.finds b { color: var(--ink); font-weight: 600; }
.ledger-shot { padding: 10px; background: var(--bg2); border: 1px solid var(--rule); border-radius: 6px; }
.ledger-shot img { width: 100%; border-radius: 3px; }
.ledger-shot figcaption { padding-inline: 4px; }

/* Lunar: capped runs. Slate, hairline frames and an instrument-gold tick, like the base's own panels */
.caps { background: radial-gradient(80% 60% at 85% 0%, #141c25 0%, var(--bg) 68%); }
.caps .chapter-head h2 { font-weight: 600; font-size: clamp(1.75rem, 1.1rem + 2.4vw, 3rem); }
.caps .chapter-head p { color: var(--muted); font-size: 1rem; line-height: 1.7; }
.console { position: relative; padding: 12px; background: var(--bg2); border: 1px solid var(--rule); }
.console::before { content: ""; position: absolute; left: -1px; top: -1px; width: 56px; height: 3px; background: var(--accent); }
.console img { width: 100%; }
.console figcaption { padding-inline: 2px; }
.readout { margin: var(--s4) 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.readout div { padding: var(--s3) var(--s3) 0 0; }
.readout div + div { padding-left: var(--s3); border-left: 1px solid var(--rule); }
.readout dt { margin-bottom: 10px; font: 600 12px/1.4 var(--label); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.readout dd { margin: 0; color: var(--muted); font-size: .9375rem; line-height: 1.6; }

/* Back to Retrowave: next */
.next { background: linear-gradient(180deg, #120530 0%, var(--bg) 70%); }
.next .chapter-head p { color: var(--warm); font-family: var(--label); }
.phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); }
.phases > section { padding: var(--s3) var(--s3) var(--s3) 0; }
.phases > section + section { padding-left: var(--s3); border-left: 1px solid var(--rule); }
.phases h3 { font-size: 1.25rem; color: var(--accent2); margin-bottom: var(--s2); }
.phases > .paid h3 { color: var(--warm); }
.tier-line { margin-bottom: var(--s2); color: var(--ink); font-size: 15px; line-height: 1.55; }
.phases ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.phases ul li { color: var(--muted); font-size: 15px; line-height: 1.55; padding-left: 16px; position: relative; }
.phases ul li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 1px; background: var(--muted); }

/* launch */
.launch { background: var(--bg); color: var(--ink); font-family: var(--body); padding-block: var(--s6); border-top: 1px solid var(--rule); position: relative; overflow: hidden; }
.launch::before { content: ""; position: absolute; left: 50%; bottom: -46vw; width: 70vw; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; z-index: 0;
  background: repeating-linear-gradient(to bottom, #ff9900 0 5%, #ff3fa4 5% 9%, transparent 9% 11%); opacity: .22;
  mask: linear-gradient(to bottom, #000 0%, transparent 32%); -webkit-mask: linear-gradient(to bottom, #000 0%, transparent 32%); }
.launch .wrap { position: relative; z-index: 1; display: grid; justify-items: start; gap: var(--s3); }
.launch h2 { font-size: clamp(2.4rem, 1.4rem + 4.5vw, 5rem); font-weight: 800; }
.launch p { max-width: 34rem; color: var(--muted); font-size: 1.125rem; }

.foot { background: #05000d; color: #a198bd; padding-block: var(--s4); font: 14px/1.6 "Share Tech Mono", monospace; }
.foot .wrap { display: grid; gap: var(--s1); }
.foot b { color: #ece8f6; font-weight: 400; }

/* ---- reveal: chapters arrive once, already readable without JS */
.js .chapter-head, .js .annotated, .js .framed, .js .cut, .js .measure, .js .phases, .js .finds, .js .ledger-shot, .js .console, .js .readout { transition: opacity .9s var(--ease), translate .9s var(--ease); }
.js .pending { opacity: 0; translate: 0 24px; }
@media (prefers-reduced-motion: reduce) {
  .js .pending { opacity: 1; translate: none; }
  .stage, .stage video, .bar, .cta, .hero h1 { transition: none; }
}

/* Edo and Stone Age: the copy sits on its own panel, so the picture keeps its colour (a paper wash would bleach it) */
@media (min-width: 601px) {
  :is([data-world="edo"], [data-world="stoneage"]).hero::after { background: linear-gradient(to top, rgba(27, 26, 25, .38) 0%, transparent 35%); }
  :is([data-world="edo"], [data-world="stoneage"]).hero .demo-note { color: #f3ecdf; text-shadow: 0 1px 6px rgba(27, 26, 25, .8); }
}

/* ---- responsive */
@media (min-width: 1100px) {
  /* move the island right of the copy column */
  /* scale 1.22 then 8.5 % right: the picture still covers the left edge (no paper seam in the light designs) */
  .stage img, .stage video { transform: scale(1.22) translateX(8.5%); transform-origin: 50% 60%; }
}
@media (max-width: 1100px) {
  .act-grid, .local-grid, .waste-top { grid-template-columns: 1fr; gap: var(--s4); }
  .readout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readout div:nth-child(3) { padding-left: 0; border-left: 0; }
  .readout div:nth-child(n + 3) { margin-top: var(--s3); border-top: 1px solid var(--rule); }
  .card { max-width: 26rem; }
  .cut { order: 2; }
  .local-grid .cut { position: static; margin-top: 0; }
}
@media (max-width: 1200px) {
  /* seven chapter links, the mark and the button no longer fit on one line */
  .chapters { display: none; }
  .cta-small { margin-left: auto; }
}
@media (max-width: 860px) {
  .phases { grid-template-columns: 1fr; }
  .phases > section, .phases > section + section { padding: var(--s3) 0; border-left: 0; }
  .phases > section + section { border-top: 1px solid var(--rule); }
  .pair { grid-template-columns: 1fr; }
  .spec div { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 600px) {
  :root { --bar-h: 52px; }
  .mark span { font-size: 13px; }
  .hero { min-height: 0; padding: calc(var(--bar-h) + 46svh) var(--gutter) var(--s4); align-items: start; }
  .hero-media { bottom: auto; top: var(--bar-h); height: calc(46svh + 2rem); }
  .stage img, .stage video { object-position: 50% 60%; }
  .hero::after { background: linear-gradient(to top, var(--bg) 0%, var(--bg) calc(100% - 46svh - var(--bar-h) - 2rem), transparent calc(100% - 46svh - var(--bar-h) + 3rem)); }
  .hero h1 { text-shadow: none; }
  .bar.in-hero .cta-small { visibility: hidden; }
  .cta-small { min-height: 44px; }
  .wide-only { display: none; }
  .narrow-only { display: inline; }
  .hero-actions { gap: var(--s2); margin-top: var(--s1); }
  .hero-actions .cta { width: 100%; }
  /* the switch sits on the picture's lower edge, one row that scrolls sideways, so a pick changes a picture in view;
     the demo note and Pause go to the picture's top; the copy reads promise, button, note, lede */
  .hero h1 { order: 1; } .hero-sub { order: 2; } .hero-actions { order: 3; } .hero-note { order: 4; margin-top: 0; }
  .hero-lede { order: 6; font-size: 1rem; line-height: 1.55; }
  .hero-copy > .switch { position: absolute; z-index: 2; left: 0; right: 0; justify-self: stretch; top: calc(var(--bar-h) + 46svh - 52px); margin: 0;
    display: flex; flex-wrap: nowrap; gap: 6px; padding: 4px var(--gutter); scroll-padding-inline: var(--gutter); overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    background: none; border: 0; }
  .switch::-webkit-scrollbar { display: none; }
  .switch:not([data-end]) { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
  .switch-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .switch button { flex: 0 0 auto; min-height: 44px; padding: 0 14px; background: color-mix(in srgb, var(--bg) 82%, transparent); border: 1px solid var(--rule); }
  .hero { padding-top: calc(var(--bar-h) + 46svh + var(--s2)); }
  .hero-foot { top: calc(var(--bar-h) + 8px); bottom: auto; right: var(--gutter); left: var(--gutter); justify-content: flex-end; gap: var(--s1); }
  .demo-note { padding: 3px 8px; font-size: 12px; color: var(--ink); background: color-mix(in srgb, var(--bg) 82%, transparent); text-shadow: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .motion { min-height: 44px; min-width: 44px; }
  .pin { width: 30px; height: 30px; font-size: 12px; }
  .six { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s1) var(--s2); }
  .pin::before { inset: -7px; }
  .strip img { aspect-ratio: 16 / 9; }
  .measure th { width: auto; display: block; padding-bottom: 2px; border-bottom: 0; }
  .measure td { display: block; padding-top: 0; }
  .measure tr:first-child td { border-top: 0; }
  .act::before { top: var(--s3); } .act::after { bottom: var(--s3); }
  :is([data-world="edo"], [data-world="stoneage"]).hero .hero-copy { padding: 0; background: none; border-top: 0; border-radius: 0; }
}

/* ---- the tour clip, the waitlist and the privacy promise (marketing plan, 9 Oct 2026) */
.text-link { display: inline-flex; align-items: center; min-height: 44px; font: 15px var(--label); color: var(--accent2); }
.text-link:hover { color: var(--ink); }
.tour { background: var(--bg); color: var(--ink); font-family: var(--body); padding-block: var(--s5) var(--s4); }
.tour-frame video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #05000d; border: 1px solid var(--rule); }
.tour h2 { font-size: clamp(1.4rem, 1rem + 1.4vw, 2rem); margin-bottom: var(--s3); }
/* the six designs, each in its own colours: the caption takes the design's accent and type */
.six { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.six img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--rule); }
.six figcaption { margin-top: 6px; font: 14px var(--label); color: var(--ink); }
.six-note { margin-top: var(--s2); color: var(--muted); font-size: 15px; }
.tier { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 2px 8px; font: 12px/1.4 var(--label); letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); border: 1px solid var(--rule); }
.waitlist { width: min(100%, 36rem); display: grid; gap: var(--s1); margin-top: var(--s1); }
.waitlist label { font: 14px var(--label); color: var(--muted); }
.waitlist-row { display: flex; gap: var(--s1); }
.waitlist input { flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; font: 16px var(--body); color: var(--ink);
  background: var(--bg2); border: 1px solid var(--rule); border-radius: 0; }
.waitlist input::placeholder { color: var(--muted); opacity: .7; }
.waitlist input:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
.launch .waitlist-note { font-size: 14px; line-height: 1.5; }
.promise { list-style: none; margin: var(--s3) 0 0; padding: 0; width: min(100%, 52rem); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s4); }
.promise li { padding: 12px 0; border-top: 1px solid var(--rule); color: var(--muted); font-size: 15px; line-height: 1.5; }
.promise b { color: var(--ink); font-weight: 400; }
.launch .follow { font-size: 15px; }
.follow a { display: inline-block; padding: 10px 4px; }
@media (max-width: 600px) {
  .finds { grid-template-columns: 1fr; }
  .readout { grid-template-columns: 1fr; }
  .readout div, .readout div + div { padding: var(--s2) 0 0; border-left: 0; }
  .readout div + div { margin-top: var(--s2); border-top: 1px solid var(--rule); }
  .ledger-shot, .console { padding: 6px; }
  .tour { padding-block: var(--s4) var(--s3); }
  .waitlist-row { flex-direction: column; }
  .waitlist-row .cta { width: 100%; }
  .promise { grid-template-columns: 1fr; }
}
