/* Every page of the website: the colours, the type, the header and its phone
   menu, buttons, the early-access form, the iPhone frame, questions and the
   footer. Each page keeps its own layout in its own <style>. Charcoal like the
   app, mono caps labels, lime for live and gold for open. The header and
   footer themselves are written into each page by tools/site-chrome.mjs. */
:root {
  --bg: #121212; --panel: #1b1b1b; --raised: #262626; --line: #2f2f2f; --line-strong: #4a4a4a;
  --ink: #f0efeb; --ink-2: #b3b3b3; --ink-3: #8f8f8f;
  --red: #ff5b1f; --red-soft: rgba(255, 91, 31, .12); --yellow: #f2c14e; --lime: #c4f06a; --on-red: #0d0d0d;
  --disc: #0b0b0b; --gold: #FFB507;
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f2f0ea; --panel: #fbfaf7; --raised: #e8e5dd; --line: #d9d5cb; --line-strong: #aca79b;
    --ink: #151514; --ink-2: #45443f; --ink-3: #64625c;
    --red: #b83c0a; --red-soft: rgba(184, 60, 10, .1); --yellow: #8a5d00; --lime: #386e0a; --on-red: #ffffff;
    --disc: #111111; --gold: #9a6400;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f2f0ea; --panel: #fbfaf7; --raised: #e8e5dd; --line: #d9d5cb; --line-strong: #aca79b;
  --ink: #151514; --ink-2: #45443f; --ink-3: #64625c;
  --red: #b83c0a; --red-soft: rgba(184, 60, 10, .1); --yellow: #8a5d00; --lime: #386e0a; --on-red: #ffffff;
  --disc: #111111; --gold: #9a6400;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
/* Never sideways: a glow or a bleed that reaches past the edge is cut there, not scrolled to (clip, unlike hidden, leaves sticky alone). */
html, body { overflow-x: clip; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.label { font: 700 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.label.red { color: var(--red); }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
h2 { font-weight: 800; font-stretch: 88%; font-size: clamp(34px, 5vw, 58px); line-height: 1.02; letter-spacing: -.02em; }
h3 { font-weight: 800; font-stretch: 92%; font-size: clamp(26px, 3vw, 36px); line-height: 1.05; letter-spacing: -.015em; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 20px; border-radius: 5px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); font: 700 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn.primary { background: var(--red); border-color: var(--red); color: var(--on-red); }
.btn:hover { filter: brightness(1.08); }

/* ---------- header: the name, the pages, Sign in and Sign up. Under 920px the pages fold into a menu.
   Glass: the page shows through it, blurred. Over a dark section (home's night map, or anything marked
   data-dark) it turns dark glass whatever the page's theme, so the night runs up under it instead of a pale
   band (site.js marks it .over-dark). A page that starts dark runs under it with var(--top-h). */
:root { --top-h: 65px; }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; color: var(--ink); background: color-mix(in srgb, var(--bg) 62%, transparent); backdrop-filter: blur(20px) saturate(1.8); -webkit-backdrop-filter: blur(20px) saturate(1.8); border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); transition: background-color .3s, border-color .3s; }
.top.over-dark:not(:has(.menu-btn[aria-expanded="true"])) {
  --bg: #121212; --line: #2f2f2f; --line-strong: #4a4a4a; --ink: #f0efeb; --ink-2: #b3b3b3; --ink-3: #8f8f8f; --red: #ff5b1f; --on-red: #0d0d0d;
  color-scheme: dark; background: color-mix(in srgb, #121212 40%, transparent);
}
/* The phone menu hangs off it solid, so the bar goes solid with it. */
.top:has(.menu-btn[aria-expanded="true"]) { background: var(--bg); }
.top > .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
/* The name as in the artwork: wide, heavy capitals, spaced out. */
.brand b { font: 800 15px/1 var(--display); font-stretch: 125%; letter-spacing: .3em; text-transform: uppercase; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; font: 700 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; padding-block: 8px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--red); }
.top .btn { height: 38px; }
.menu-btn { display: none; flex: none; place-items: center; width: 42px; height: 38px; padding: 0; border-radius: 5px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer; }
.menu-btn .x { display: none; }
.menu-btn[aria-expanded="true"] .bars { display: none; }
.menu-btn[aria-expanded="true"] .x { display: block; }
/* LIGHT OR DARK (site.js): the page follows the system until this is pressed, then it's yours. The icon is the other
   side, a sun on the dark page and a moon on the light one, by the same rules as the colours at the top. */
.theme-btn { display: grid; flex: none; place-items: center; width: 42px; height: 38px; padding: 0; border-radius: 5px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer; }
.theme-btn:hover { border-color: var(--ink-3); }
.theme-btn svg { grid-area: 1 / 1; }
.theme-btn .moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-btn .sun { display: none; }
  :root:not([data-theme="dark"]) .theme-btn .moon { display: block; }
}
:root[data-theme="light"] .theme-btn .sun { display: none; }
:root[data-theme="light"] .theme-btn .moon { display: block; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
.menu { position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100svh - 64px); overflow-y: auto; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 30px 50px -30px rgba(0, 0, 0, .6); }
.menu[hidden] { display: none; }
.menu .wrap { display: grid; padding-block: 4px 24px; }
.menu .page { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 18px 0 16px; border-bottom: 1px solid var(--line); text-decoration: none; }
.menu .page b { font: 800 30px/1 var(--display); font-stretch: 86%; letter-spacing: -.02em; }
.menu .page span { font: 500 13px/1.3 var(--body); color: var(--ink-3); text-align: right; }
.menu .page[aria-current="page"] b { color: var(--red); }
.menu .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
@media (max-width: 920px) {
  .nav { display: none; }
  .theme-btn { margin-left: auto; }
  .menu-btn { display: grid; }
  .top > .wrap { gap: 10px; }
}
@media (min-width: 921px) { .menu { display: none; } }
@media (max-width: 520px) {
  .top > .wrap { padding-inline: 16px; gap: 8px; }
  .top .btn { padding: 0 12px; font-size: 11px; letter-spacing: .1em; }
  .menu-btn, .theme-btn { width: 38px; }
  .brand { gap: 8px; }
  .brand svg { width: 36px; }
  .brand b { font-size: 13px; letter-spacing: .22em; }
}
/* The narrowest phones: the name draws in so the wings, the name, light or dark, Sign up and the menu all fit at 360. */
@media (max-width: 400px) {
  .top .btn { padding: 0 10px; }
  .brand svg { width: 32px; }
  .brand b { font-size: 12px; letter-spacing: .16em; }
}

/* ---------- the early-access form */
/* EMAIL EARLY ACCESS jumps here: clear of the sticky header, not under it. */
.join { margin-top: 28px; display: grid; gap: 10px; max-width: 460px; scroll-margin-top: 96px; }
.join .row { display: flex; gap: 8px; }
.join input[type=email] { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border-radius: 5px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink); font: 16px var(--body); }
.join input[type=email]::placeholder { color: var(--ink-3); }
.join .btn { height: 48px; }
@media (max-width: 520px) { .join .row { flex-wrap: wrap; } .join input[type=email], .join .btn { flex: 1 1 100%; } }
.check { display: flex; gap: 8px; align-items: center; color: var(--ink-2); font-size: 15px; }
.check input { accent-color: var(--red); width: 16px; height: 16px; }
.note { font: 500 12px/1.5 var(--mono); color: var(--ink-3); letter-spacing: .02em; }
.note.ok { color: var(--ink); }
.join button:disabled { opacity: .6; cursor: progress; }

/* ---------- a page's opening, under the header (every page but home) */
.page-head { padding-block: 88px 64px; border-bottom: 1px solid var(--line); }
.page-head .wrap { display: grid; gap: 18px; }
.page-head h1 { font-weight: 900; font-stretch: 82%; font-size: clamp(48px, 7vw, 96px); line-height: .94; letter-spacing: -.03em; max-width: 12em; }
/* The yellow of the wing's third blade, darker on paper so it reads. */
.page-head h1 em { font-style: normal; color: var(--gold); }
.page-head .lede { max-width: 34em; font-size: 20px; color: var(--ink-2); }
.page-head .lede b { color: var(--ink); font-weight: 600; }
@media (max-width: 620px) { .page-head { padding-block: 56px 44px; } .page-head .lede { font-size: 18px; } }

/* A band of the page: a section with room around it and a rule under it. */
.band { padding-block: 96px; border-bottom: 1px solid var(--line); }
.band .head { display: grid; gap: 14px; max-width: 40em; }
.band .head p { color: var(--ink-2); font-size: 18px; }
@media (max-width: 620px) { .band { padding-block: 64px; } }

/* ---------- an iPhone in black titanium: the screen inside (status bar, island and home indicator are in the shots,
   tools/site-phones.py), the buttons on its sides. Sized by --w; the rest follows it. */
.phone {
  --w: 320px; position: relative; width: var(--w); padding: calc(var(--w) * .034); border-radius: calc(var(--w) * .175);
  background: linear-gradient(140deg, #48484a 0%, #1f1f21 18%, #0d0d0e 55%, #1c1c1e 82%, #3a3a3c 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), inset 0 0 0 calc(var(--w) * .014) #050505, 0 40px 70px -34px rgba(0, 0, 0, .6);
}
.phone::before, .phone::after { content: ""; position: absolute; width: calc(var(--w) * .012); background: linear-gradient(90deg, #2c2c2e, #48484a); }
/* Volume up and down on the left; the side button on the right. */
.phone::before { left: calc(var(--w) * -.01); top: 25%; height: 8.5%; border-radius: 3px 0 0 3px; box-shadow: 0 calc(var(--w) * .21) 0 #3a3a3c; }
.phone::after { right: calc(var(--w) * -.01); top: 30%; height: 13%; border-radius: 0 3px 3px 0; }
.screen { position: relative; aspect-ratio: 393 / 852; border-radius: calc(var(--w) * .142); overflow: hidden; background: #000; }
.phone img, .phone video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- questions */
details { border-top: 1px solid var(--line); padding: 18px 0; }
details:last-child { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font: 600 18px/1.4 var(--body); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font: 500 20px/1 var(--mono); color: var(--ink-3); }
details[open] summary::after { content: "–"; }
details p { margin-top: 10px; color: var(--ink-2); font-size: 16px; max-width: 38em; }
details p + p { margin-top: 10px; }
.qa { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: 40px; }
@media (max-width: 860px) { .qa { grid-template-columns: minmax(0, 1fr); gap: 20px; } }

/* ---------- closing: early access */
.close { padding-block: 104px; text-align: center; }
.close h2 { font-size: clamp(42px, 7vw, 88px); font-stretch: 82%; font-weight: 900; }
.close .mark { margin: 0 auto 18px; }
.close .join { margin: 30px auto 0; text-align: left; }
.close .sub { margin: 16px auto 0; max-width: 30em; color: var(--ink-2); font-size: 18px; }

/* ---------- footer: every page, and the fine print */
/* The dock: the app coming to both stores, riding the bottom of the window, then resting under the footer (site.js).
   The page is a hole: the line along its top is how far you've scrolled, and the bottom of the page is an ace. */
.dock { position: sticky; bottom: 0; z-index: 15; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 -20px 40px -26px rgba(0, 0, 0, .7); transition: background .25s, box-shadow .25s; }
.dock::before { content: ""; position: absolute; left: 0; top: -1px; width: var(--flown, 0%); height: 2px; background: linear-gradient(90deg, #DB0101, #FF8B07 60%, #FFB507); }
.dock.docked { background: var(--bg); box-shadow: none; }
.dock .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; min-height: 76px; padding-block: 12px; }
.dock p { display: grid; gap: 2px; }
.dock .flight { font: 700 10px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dock .flight b { color: var(--ink); }
.dock.ace .flight, .dock.ace .flight b { color: var(--gold); }
.dock.ace .flight b { display: inline-block; animation: ace .6s cubic-bezier(.2, 1.7, .4, 1); }
@keyframes ace { from { transform: scale(.4) rotate(-8deg); } to { transform: none; } }
.dock .title { font: 700 16px/1.3 var(--body); }
.dock .say { color: var(--ink-2); font-size: 14px; }
.stores { display: flex; gap: 10px; flex: none; }
.store { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px 0 13px; border-radius: 12px; background: #050505; border: 1px solid #3a3a3a; color: #f5f5f5; text-decoration: none; transition: border-color .2s; }
.store:hover { border-color: #8a8a8a; }
.store span { display: grid; font: 700 16px/1.1 var(--body); }
.store small { font: 700 9px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #a8a8a8; }
@media (max-width: 720px) {
  .dock .say { display: none; }
  .dock .wrap { min-height: 64px; padding-block: 10px; }
  .store { height: 44px; padding: 0 12px 0 10px; gap: 8px; }
  .store span { font-size: 14px; }
  .store svg { display: none; }
}
/* A narrow phone: the count on its own line, the two buttons sharing the width under it. */
@media (max-width: 460px) { .dock .wrap { flex-wrap: wrap; gap: 8px; } .dock .title { display: none; } .stores { flex: 1 1 100%; } .store { flex: 1; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .dock { transition: none; } .dock.ace .flight b { animation: none; } }
footer { border-top: 1px solid var(--line); padding-top: 48px; }
/* The treeline the page ends on: a halftone dusk behind the trees, and the basket the page has been playing toward. */
footer .treeline { height: clamp(150px, 19vw, 340px); background: url(/img/treeline.png?v=1) center bottom / auto 100% no-repeat; }
footer > .wrap { padding-bottom: 40px; }
footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 48px; }
footer .say { display: grid; gap: 14px; align-content: start; }
footer .say > p { color: var(--ink-2); font-size: 15px; max-width: 24em; }
footer .join { margin-top: 10px; }
footer nav { display: grid; grid-template-columns: repeat(3, auto); gap: 24px 56px; }
footer nav div { display: grid; gap: 10px; align-content: start; }
footer nav a { color: var(--ink-2); font-size: 15px; text-decoration: none; }
footer nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
footer .fine { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 13px; max-width: none; }
/* What the previews are and whose work is in them: on About (#credits). */
footer .fine a { color: var(--ink-2); margin-left: 10px; text-underline-offset: 3px; }
footer .fine a:hover { color: var(--ink); }
@media (max-width: 860px) { footer .wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { footer nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; } }

/* ---------- bag tags: site/tags.js draws each one and turns it, like the app */
.tag { position: relative; width: 100%; aspect-ratio: 400 / var(--h, 470); perspective: 1600px; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.tag:active { cursor: grabbing; }
/* A drag spins the tag; it never selects its letters. */
.tag, .tag svg text { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.tag .spin { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.tag .layer { position: absolute; inset: 0; }
.tag .layer svg { width: 100%; height: 100%; display: block; }
.tag .front, .tag .back { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.tag .floor { position: absolute; left: 14%; right: 14%; bottom: -7%; height: 7%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); pointer-events: none; }
.tag-case { display: flex; flex-wrap: wrap; justify-content: center; gap: 36px 40px; align-items: flex-end; margin-top: 48px; padding: 40px 32px 32px; border-radius: 16px; border: 1px solid var(--line); background: radial-gradient(120% 90% at 50% 20%, var(--raised) 0%, var(--bg) 70%); }
.tag-case figure { flex: 0 1 220px; min-width: 0; margin: 0; display: grid; gap: 22px; justify-items: center; }
.tag-case figcaption { text-align: center; display: grid; gap: 4px; }
.tag-case figcaption b { font: 700 11px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.tag-case figcaption span { color: var(--ink-3); font-size: 14px; line-height: 1.35; }
.tag-case.three { gap: 36px 56px; }
@media (max-width: 960px) { .tag-case figure { flex-basis: calc((100% - 80px) / 3); } }
@media (max-width: 520px) { .tag-case { gap: 28px 14px; padding: 28px 16px 22px; } .tag-case figure { flex-basis: calc((100% - 14px) / 2); } }
@media (max-width: 520px) { .tag-case.three { gap: 24px 14px; } }
.tag-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 56px; border-top: 1px solid var(--line-strong); }
.tag-notes div { padding: 22px 24px 4px 0; display: grid; gap: 8px; align-content: start; }
.tag-notes div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.tag-notes strong { font: 800 21px/1.15 var(--display); font-stretch: 92%; }
.tag-notes p { color: var(--ink-2); font-size: 16px; margin: 0; }
@media (max-width: 860px) { .tag-notes { grid-template-columns: minmax(0, 1fr); } .tag-notes div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); } }
