/* ==========================================================================
   Junkyard Astronauts: the 3D landing page (landing3d.css)

   The page's only stylesheet. It carries the promo site's "Corner Set" look
   (the game HUD's palette and two faces; nothing contains anything; painted
   rules; the hazard stripe as the one ornament) and adds the hero stage:
   night sky, Moon, the tiny rust planet, the rocket canvas, part tags, the
   view controls and the build-readout panel. assets/site.css is untouched
   and is not loaded here, because support.html and privacy.html share it.

   Colour roles (DESIGN.md): amber = go to Steam; teal = the rocket and its
   data; hazard yellow = dividers only; rust = the planet and bad builds.
   ========================================================================== */

@font-face {
  font-family: 'Chakra Petch';
  src: url('../fonts/ChakraPetch-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Share Tech Mono';
  src: url('../fonts/ShareTechMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink:       #0A0B0D;
  --ink-2:     #121317;
  --night:     #1A1C2E;   /* sky, low */
  --dusk:      #2A2E4A;   /* sky, high */
  --cream:     #F0E6CC;
  --cream-dim: #F0DFAF;
  --tan:       #9C8F7E;
  --amber:     #FFC23A;   /* Steam actions only */
  --amber-hi:  #FFD36B;
  --rust:      #D4631F;
  --hazard:    #FFD400;
  --flight:    #5FE8CE;   /* the rocket, its data, its controls */
  --danger:    #FF6E54;
  --p1: #FF7A1A;
  --p2: #3399FF;
  --p3: #FFD42B;
  --p4: #46E65C;

  --display: 'Chakra Petch', 'Arial Narrow', Impact, sans-serif;
  --mono: 'Share Tech Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --measure: 68ch;
  --pad: clamp(16px, 5vw, 56px);
  --maxw: 1320px;
  --rule: rgba(156, 143, 126, .22);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* the sticky header would cover whatever an in-page link or a Tab lands on */
  scroll-padding-top: calc(64px + var(--safe-top));
  background: var(--ink);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream-dim);
  font-family: var(--mono);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.65;
  letter-spacing: .01em;
  overflow-x: hidden;
  overflow-x: clip;
}

img, svg { max-width: 100%; }
/* author display rules (.stage-ui{display:flex}) would otherwise beat the UA's [hidden] */
[hidden] { display: none !important; }

/* ---------- type ---------- */

h1, h2, h3, h4, .display {
  font-family: var(--display);
  font-weight: 700;
  color: var(--cream);
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: .95;
  margin: 0;
  text-shadow: 3px 3px 0 var(--ink);
  text-wrap: balance;
}
h2 { font-size: clamp(28px, 4vw, 46px); }
h3 { font-size: clamp(19px, 2vw, 24px); text-shadow: 2px 2px 0 var(--ink); }
h4 { font-size: clamp(18px, 1.7vw, 21px); text-shadow: 2px 2px 0 var(--ink); }

p { margin: 0 0 1.1em; max-width: var(--measure); }
h2 + .rule { margin-top: 12px; }
a { color: var(--amber); text-decoration: none; border-bottom: 1px solid rgba(255, 194, 58, .35); }
a:hover { color: var(--ink); background: var(--amber); border-bottom-color: transparent; }
strong { color: var(--cream); font-weight: 400; }
ul, ol { padding-left: 1.1em; margin: 0 0 1.2em; max-width: var(--measure); }
li { margin-bottom: .35em; }
li::marker { color: var(--tan); }
code { font-family: var(--mono); color: var(--flight); word-break: break-word; }

:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 60;
  padding: 10px 14px;
  background: var(--amber);
  color: var(--ink);
  border: 0;
  font-family: var(--display);
  text-transform: uppercase;
}
.skip:focus { top: calc(12px + var(--safe-top)); }

.label {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--tan);
  text-shadow: none;
  display: block;
  margin: 0 0 10px;
}

.lede { font-size: clamp(17px, 1.45vw, 20px); color: var(--cream); max-width: 60ch; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
section { padding: clamp(44px, 6vw, 84px) 0; }
.gap-top { margin-top: 28px; }
.aside { color: var(--tan); font-size: 14px; margin-top: 16px; }

.rule {
  height: 1px;
  background: linear-gradient(90deg, var(--tan), rgba(156, 143, 126, 0));
  margin: 0 0 clamp(24px, 3vw, 40px);
}

/* the hazard stripe from the key art: a divider, never a container */
.hazard {
  height: 10px;
  background: repeating-linear-gradient(-45deg, var(--hazard) 0 14px, var(--ink) 14px 28px);
}

/* ---------- top bar ---------- */

.top {
  position: sticky;
  top: var(--safe-top);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px var(--pad);
  background: rgba(10, 11, 13, .86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.top a { border: 0; color: var(--cream-dim); }
.top a:hover { background: none; color: var(--amber); }
.top .brand { font-family: var(--display); letter-spacing: .04em; color: var(--cream); font-size: 15px; white-space: nowrap; }
.top nav { display: flex; align-items: center; gap: clamp(14px, 2.2vw, 26px); flex-wrap: wrap; justify-content: flex-end; }
.top .top-cta {
  font-family: var(--display);
  letter-spacing: .06em;
  color: var(--ink);
  background: var(--amber);
  padding: 5px 10px 4px;
  box-shadow: 3px 3px 0 var(--ink);
}
.top .top-cta:hover { color: var(--ink); background: var(--amber-hi); }

/* ---------- calls to action: amber means Steam ---------- */

.cta-row { display: flex; flex-wrap: wrap; gap: 16px clamp(18px, 2.6vw, 30px); align-items: center; }
.cta {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: clamp(17px, 1.55vw, 21px);
  letter-spacing: .02em;
  line-height: 1;
  border: 0;
  text-decoration: none;
  display: inline-block;
}
.cta--steam {
  color: var(--ink);
  background: var(--amber);
  padding: 17px 24px 15px;
  outline: 3px solid var(--ink);
  outline-offset: 0;
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform .12s ease-out, box-shadow .12s ease-out, background-color .12s;
}
.cta--steam:hover { color: var(--ink); background: var(--amber-hi); transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.cta--steam:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.cta--steam:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }
.cta--demo {
  color: var(--cream);
  border-bottom: 3px solid var(--amber);
  padding: 6px 0 5px;
  text-shadow: 2px 2px 0 var(--ink);
}
.cta--demo:hover { background: var(--amber); color: var(--ink); text-shadow: none; }
.cta--small { font-size: 16px; padding: 13px 18px 11px; box-shadow: 4px 4px 0 var(--ink); }

/* ==========================================================================
   HERO: one stage. The canvas spans the whole hero; the copy sits either side.
   ========================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  /* clip, not hidden: a hidden box is still a scroll container, and the 1500 px planet gives it
     room to scroll sideways, so a scroll-into-view inside the hero could slide the whole hero
     left with no way for the visitor to slide it back */
  overflow: hidden;
  overflow: clip;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(190px, 22vw, 320px) minmax(0, .72fr);
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "title . teaser"
    "lede  . teaser"
    "cta   . teaser";
  column-gap: clamp(20px, 3vw, 48px);
  align-content: center;
  min-height: clamp(660px, calc(100svh - 58px), 940px);
  padding-block: clamp(36px, 6vh, 80px) clamp(120px, 17vh, 170px);
  padding-inline: max(var(--pad), calc((100% - var(--maxw)) / 2 + var(--pad)));
  background:
    url('../stars.svg') 0 0 / 480px 480px,
    url('../stars.svg') 170px 90px / 760px 760px,
    radial-gradient(120% 70% at 50% 108%, rgba(212, 99, 31, .28), rgba(212, 99, 31, 0) 60%),
    linear-gradient(180deg, var(--dusk) 0%, var(--night) 72%);
}
.hero > :not(.stage) { position: relative; z-index: 2; }

.hero-title { grid-area: title; }
.hero-lede  { grid-area: lede; }
.hero-cta   { grid-area: cta; }
.teaser     { grid-area: teaser; align-self: center; justify-self: end; width: min(100%, 300px); }

.eyebrow {
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--tan);
  margin: 0 0 16px;
  text-wrap: balance;
}
.wordmark {
  font-size: clamp(44px, 5.6vw, 96px);
  line-height: .86;
  letter-spacing: -.005em;
  margin: 0 0 16px;
}
.wordmark span { display: block; text-shadow: 4px 4px 0 var(--ink); }
.wordmark .a { color: var(--cream); }
.wordmark .b { color: var(--amber); }
.tagline {
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--cream-dim);
  font-size: clamp(11px, 1.1vw, 14px);
  margin: 0 0 22px;
}
.hero .lede {
  font-size: clamp(16px, 1.25vw, 18px);
  max-width: 44ch;
  text-shadow: 0 2px 10px rgba(10, 11, 13, .95), 0 0 2px var(--ink);
  margin-bottom: 26px;
}
.dates {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cream-dim);
}
/* each date carries its own marker, so a wrapped line never starts with a stray separator */
.dates li { margin: 0; white-space: nowrap; }
.dates li::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 .7em 0 1px;
  vertical-align: .2em;
  background: var(--tan);
  transform: rotate(45deg);
}
.dates li:first-child { color: var(--flight); }
.dates li:first-child::before { background: var(--flight); }
.steam-app { display: none; font-size: 13px; color: var(--tan); margin: 10px 0 0; }
@media (hover: hover) and (pointer: fine) { .steam-app { display: block; } }

/* ---------- the stage: sky furniture, poster, canvas, tags, controls ---------- */

.stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* where the rocket sits, shared with scene3d.js (FRAME): 74% of the height, middle at 46% */
  --rocket-fill: .74;
  --rocket-mid: .46;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.moon {
  position: absolute;
  z-index: 0;
  /* sized and placed to clear the readout teaser below it on short desktop screens (1440x900) */
  top: clamp(16px, 4%, 48px);
  right: max(var(--pad), calc((100% - var(--maxw)) / 2 + var(--pad)));
  width: clamp(96px, 10vw, 172px);
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 0 40px rgba(204, 224, 255, .18));
}
.planet {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: calc(100% - clamp(64px, 11%, 118px));
  width: max(1500px, 190vw);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 5px solid var(--ink);
  background:
    radial-gradient(circle at 50% 0%, #C8601F 0, #A34B1A 3.5%, #6E3217 9%, #3A1C14 17%, #1E1210 30%);
  box-shadow: inset 0 8px 0 rgba(255, 179, 71, .30), 0 -18px 60px rgba(212, 99, 31, .25);
  pointer-events: none;
}
.poster {
  position: absolute;
  z-index: 1;
  left: 50%;
  /* the poster's rocket fills 90% of the image height (5% margin): scale the image so the rocket
     fills --rocket-fill of the stage, centred on --rocket-mid, matching the 3D camera */
  height: calc(100% * var(--rocket-fill) / .9);
  width: auto;
  top: calc(100% * var(--rocket-mid) - 100% * var(--rocket-fill) / .9 / 2);
  transform: translateX(-50%);
  pointer-events: none;
  transition: opacity .4s ease-out;
}
.stage canvas {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity .4s ease-out;
  touch-action: pan-y;
  cursor: grab;
  -webkit-tap-highlight-color: transparent;
}
.stage canvas:active { cursor: grabbing; }
.stage[data-hover] canvas { cursor: pointer; }
.stage canvas:focus-visible { outline: 2px solid var(--cream); outline-offset: -8px; }
.stage[data-state="live"] canvas { opacity: 1; }
.stage[data-state="live"] .poster { opacity: 0; }

.tags { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.tag {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: center;
  padding: 6px 0;
  margin: 0;
  border: 0;
  background: none;
  color: var(--cream);
  font: 12px/1.2 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 1px 1px 0 var(--ink), 0 0 6px var(--ink), 0 0 2px var(--ink);
  pointer-events: auto;
  cursor: pointer;
  will-change: transform;
}
.tag[data-side="l"] { flex-direction: row-reverse; }
.tag-dot {
  flex: none;
  width: 11px;
  height: 11px;
  margin: 0 -5.5px;
  border-radius: 50%;
  background: var(--flight);
  border: 2px solid var(--ink);
}
.tag-line { flex: none; width: var(--lead, 40px); height: 2px; background: rgba(240, 223, 175, .75); box-shadow: 0 1px 0 var(--ink); }
.tag-text { padding: 4px 8px; }
.tag .count { color: var(--flight); }
.tag:hover .tag-text, .tag:focus-visible .tag-text, .tag[aria-current="true"] .tag-text { color: var(--flight); }
.tag:hover .tag-line, .tag:focus-visible .tag-line, .tag[aria-current="true"] .tag-line { background: var(--flight); }
.tag:focus-visible { outline: none; }
.tag:focus-visible .tag-text { outline: 2px solid var(--cream); outline-offset: 0; }

.stage-ui {
  /* full width so the hint never wraps early; only the buttons take the pointer */
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: clamp(12px, 3%, 30px);
  padding: 0 12px;
  pointer-events: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.controls { display: flex; gap: 8px; align-items: center; pointer-events: auto; }
.ctl {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(240, 223, 175, .55);
  background: rgba(10, 11, 13, .8);
  color: var(--cream);
  cursor: pointer;
  padding: 0;
  transition: border-color .12s, color .12s, background-color .12s;
}
.ctl svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ctl:hover, .ctl:focus-visible { border-color: var(--flight); color: var(--flight); }
.ctl .i-play { display: none; fill: currentColor; stroke: none; }
.ctl[aria-pressed="true"] { background: var(--cream-dim); color: var(--ink); border-color: var(--cream-dim); }
.ctl[aria-pressed="true"] .i-pause { display: none; }
.ctl[aria-pressed="true"] .i-play { display: block; }
.ctl--fire {
  width: 54px;
  height: 54px;
  margin-left: 6px;
  background: var(--danger);
  border: 3px solid var(--ink);
  color: var(--ink);
  font: 13px/1 var(--display);
  text-transform: uppercase;
  letter-spacing: .04em;
  box-shadow: 0 5px 0 #7A2A1D, 0 5px 0 2px var(--ink);
  transform: translateY(-3px);
  transition: transform .08s, box-shadow .08s;
}
.ctl--fire:hover, .ctl--fire:focus-visible { background: #FF8A73; color: var(--ink); border-color: var(--ink); }
.ctl--fire:active, .ctl--fire[data-firing] { transform: translateY(1px); box-shadow: 0 1px 0 #7A2A1D, 0 1px 0 2px var(--ink); }
.hint {
  margin: 0;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cream-dim);
  text-shadow: 1px 1px 0 var(--ink), 0 0 8px var(--ink);
  transition: opacity .6s;
}
.hint[data-done] { opacity: 0; }
.hint .on-fine { display: none; }
@media (hover: hover) and (pointer: fine) {
  .hint .on-fine { display: inline; }
  .hint .on-touch { display: none; }
}
.load3d {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: clamp(16px, 4%, 36px);
  transform: translateX(-50%);
  font: 15px/1 var(--display);
  text-transform: uppercase;
  color: var(--flight);
  background: rgba(10, 11, 13, .8);
  border: 2px solid var(--flight);
  padding: 12px 16px 10px;
  cursor: pointer;
}

/* ---------- the readout teaser (right third) ---------- */

.teaser .verdict { margin-bottom: 14px; }
.verdict {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: clamp(19px, 1.6vw, 24px);
  line-height: 1.05;
  color: var(--flight);
  text-shadow: 2px 2px 0 var(--ink);
  margin: 0 0 6px;
  max-width: 24ch;
}
.integrity { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--cream-dim); margin: 0 0 16px; }
.integrity span { color: var(--tan); margin-right: .6em; }

.mini { margin: 0 0 22px; }
.mini div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rule);
}
.mini dt { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--tan); }
.mini dd { margin: 0; font-family: var(--display); font-size: 19px; color: var(--cream); text-align: right; text-shadow: 2px 2px 0 var(--ink); }
.mini dd small, .readout dd small {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--tan);
  text-shadow: none;
  text-transform: none;
  margin-top: 3px;
}
.teaser .label { color: var(--cream-dim); }

.stats-btn {
  font: clamp(16px, 1.3vw, 19px)/1 var(--display);
  text-transform: uppercase;
  color: var(--flight);
  background: none;
  border: 0;
  border-bottom: 3px solid var(--flight);
  padding: 6px 0 5px;
  cursor: pointer;
  text-shadow: 2px 2px 0 var(--ink);
}
.stats-btn:hover { background: var(--flight); color: var(--ink); text-shadow: none; }

/* ---------- the readout rows (panel + spec section) ---------- */

.readout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 22px;
  margin: 0;
}
.readout div { padding: 9px 0 10px; border-bottom: 1px solid var(--rule); }
.readout dt { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--tan); }
.readout dd {
  margin: 2px 0 0;
  font-family: var(--display);
  font-size: clamp(19px, 1.7vw, 23px);
  line-height: 1.1;
  color: var(--cream);
  text-shadow: 2px 2px 0 var(--ink);
}
.readout div:last-child dd { color: var(--flight); }

/* ==========================================================================
   The build-readout panel (a popover). Closed + unsupported browsers: it
   renders as a plain section at the end of the page, which is still correct.
   ========================================================================== */

.panel {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--cream-dim);
  background: var(--ink);
}
.panel:popover-open, .panel.is-open {
  position: fixed;
  inset: auto;
  top: calc(66px + var(--safe-top));
  right: 16px;
  bottom: 16px;
  left: auto;
  width: min(440px, calc(100vw - 32px));
  height: auto;
  max-height: none;
  overflow: auto;
  overscroll-behavior: contain;
  z-index: 50;
  background: var(--ink);
  box-shadow: 10px 10px 0 rgba(10, 11, 13, .55);
  transition: transform .22s ease-out, opacity .22s ease-out;
  transform: none;
  opacity: 1;
}
@starting-style {
  .panel:popover-open { transform: translateX(28px); opacity: 0; }
}
.panel .hazard { height: 8px; position: sticky; top: 0; z-index: 1; }
.panel-in { padding: 18px 22px 26px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.panel-title { font-size: clamp(22px, 2vw, 28px); outline: none; }
.panel-close {
  flex: none;
  width: 44px;
  height: 44px;
  margin: -4px -8px 0 0;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: var(--cream);
  cursor: pointer;
}
.panel-close svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; fill: none; }
.panel-close:hover { color: var(--flight); }

.panel-part { margin-top: 18px; }
.panel-sub { margin-top: 26px; }
.panel .readout div { padding: 7px 0 8px; }
.panel .readout dd { font-size: clamp(18px, 1.5vw, 21px); }
.part-links { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.part-links li { margin: 0; }
.part-link {
  display: inline-block;
  font: 15px/1 var(--display);
  text-transform: uppercase;
  color: var(--cream-dim);
  border: 0;
  border-bottom: 2px solid rgba(240, 223, 175, .3);
  padding: 9px 0 6px;
}
.part-link .count { color: var(--flight); }
.part-link:hover { background: none; color: var(--flight); border-bottom-color: var(--flight); }
.part-link[aria-current="true"] { color: var(--flight); border-bottom-color: var(--flight); }
.part-prompt { font-size: 14px; color: var(--tan); margin: 12px 0 0; }
.part-prompt[hidden] { display: none; }

.part-card { margin-top: 16px; }
.part-card .label { margin-bottom: 6px; }
.part-name { font-size: clamp(22px, 2vw, 28px); color: var(--cream); }
.part-name .count { color: var(--flight); }
.part-pos { font-size: 14px; color: var(--cream-dim); margin: 6px 0 10px; }
.rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; margin: 0 0 14px; }
.rows div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.rows div[hidden] { display: none; }
.rows dt { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--tan); }
.rows dd { margin: 0; font-family: var(--display); font-size: 17px; color: var(--cream); white-space: nowrap; }
.flavour {
  border-left: 3px solid var(--rust);
  padding-left: 14px;
  color: var(--cream);
  font-size: 15px;
  margin: 0;
}
.panel-foot { font-size: 13px; color: var(--tan); margin: 22px 0 18px; }
.panel-foot a { white-space: nowrap; }

/* ==========================================================================
   Below the hero: the promo site's Corner Set, unchanged in spirit
   ========================================================================== */

.split { display: grid; gap: clamp(28px, 5vw, 72px); grid-template-columns: 1.05fr .95fr; align-items: start; }
.split > div > *:last-child { margin-bottom: 0; }

/* the Moon rocket spec */
.spec .sub { font-size: clamp(18px, 1.6vw, 21px); color: var(--tan); margin: 0 0 16px; text-shadow: none; }
.spec .sub--gap { margin-top: clamp(40px, 5vw, 64px); }
.spec .lede { margin-bottom: clamp(28px, 4vw, 44px); }
.variants { list-style: none; padding: 0; margin: 0; max-width: none; }
.variants li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "what result" "readout readout";
  column-gap: 16px;
  padding: 11px 0 12px;
  margin: 0;
  border-bottom: 1px solid var(--rule);
}
.v-what { grid-area: what; color: var(--cream); }
.v-result { grid-area: result; font-family: var(--display); text-transform: uppercase; color: var(--flight); white-space: nowrap; font-size: 17px; }
.v-readout { grid-area: readout; font-size: 12px; letter-spacing: .12em; color: var(--rust); margin-top: 2px; }
.v-good .v-readout { color: var(--flight); }
.v-miss .v-result { color: var(--danger); }

.partlist {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: none;
  display: grid;
  gap: clamp(26px, 3.5vw, 44px) clamp(28px, 4vw, 56px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.partlist li { margin: 0; border-top: 2px solid var(--flight); padding-top: 12px; }
.partlist h4 { margin-bottom: 4px; }
.partlist .count { color: var(--flight); }
.partlist .role { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--tan); margin: 0 0 8px; }
.kv { margin: 0 0 12px; }
.kv div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.kv dt { color: var(--tan); }
.kv dd { margin: 0; color: var(--cream); }
.partlist .flavour { font-size: 14px; }
.source { font-size: 13px; color: var(--tan); margin-top: clamp(28px, 4vw, 44px); max-width: 80ch; }

/* beats: a real sequence, so numbered */
.beats {
  list-style: none;
  padding: 0;
  margin: clamp(32px, 5vw, 56px) 0 0;
  max-width: none;
  display: grid;
  gap: clamp(28px, 4vw, 52px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.beat { margin: 0; }
.beat .num {
  font-family: var(--display);
  font-size: clamp(38px, 5vw, 58px);
  color: transparent;
  -webkit-text-stroke: 1.5px var(--rust);
  display: block;
  line-height: 1;
  margin-bottom: 10px;
}
.beat h3 { margin-bottom: 10px; color: var(--amber); }
.beat p { color: var(--cream-dim); max-width: 42ch; margin-bottom: 0; }

.awards { list-style: none; padding: 0; margin: 0; }
.awards li { padding: 0 0 16px; margin: 0 0 16px; border-bottom: 1px solid var(--rule); }
.awards li:last-child { border-bottom: 0; }
.awards .name {
  font-family: var(--display);
  text-transform: uppercase;
  font-size: clamp(24px, 3.2vw, 40px);
  color: var(--amber);
  line-height: 1;
  display: block;
  text-shadow: 3px 3px 0 var(--ink);
}
.awards .for { display: block; color: var(--tan); font-size: 14px; margin-top: 6px; }

.note { border-left: 3px solid var(--rust); padding-left: 16px; color: var(--cream-dim); }

.crew { display: grid; gap: clamp(20px, 3vw, 34px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.crew div { border-top: 2px solid currentColor; padding-top: 12px; }
.crew h3 { font-size: clamp(22px, 2.4vw, 30px); color: currentColor; }
.crew p { color: var(--cream-dim); margin: 6px 0 0; font-size: 15px; }
.c1 { color: var(--p1); } .c2 { color: var(--p2); } .c3 { color: var(--p3); } .c4 { color: var(--p4); }

.ladder { max-width: 720px; margin: 0; padding: 0; list-style: none; }
.ladder li { display: flex; align-items: baseline; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--rule); margin: 0; }
.ladder .step { flex: 1; color: var(--cream-dim); }
.ladder .h { font-family: var(--display); color: var(--flight); font-size: clamp(16px, 1.6vw, 20px); white-space: nowrap; }
.ladder li:last-child .step, .ladder li:last-child .h { color: var(--amber); }

/* the trailer: a poster that links to Steam (no iframes under this CSP) */
.trailer { display: block; position: relative; border: 0; margin: 0 0 18px; color: var(--amber); }
.trailer:hover { background: none; color: var(--amber-hi); }
.trailer img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.trailer-play {
  position: absolute;
  left: 50%;
  top: calc(50% - 22px);
  width: clamp(64px, 8vw, 92px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--amber);
  border: 4px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform .12s ease-out;
}
.trailer-play::after {
  content: '';
  position: absolute;
  left: 54%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 14px 0 14px 23px;
  border-color: transparent transparent transparent var(--ink);
}
.trailer:hover .trailer-play { transform: translate(-50%, -50%) scale(1.06); }
.trailer-cap {
  display: block;
  padding-top: 10px;
  font-family: var(--display);
  text-transform: uppercase;
  font-size: clamp(16px, 1.5vw, 19px);
  text-shadow: 2px 2px 0 var(--ink);
}

.shots { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }
.shots img { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; }
.shots figure { margin: 0; }
.shots figcaption { font-size: 13px; color: var(--tan); letter-spacing: .12em; text-transform: uppercase; padding-top: 8px; }

.ledger { display: grid; gap: clamp(24px, 4vw, 56px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.ledger h3 { margin-bottom: 14px; }
.ledger .in h3 { color: var(--flight); }
.ledger .out h3 { color: var(--tan); }
.ledger ul { list-style: none; padding: 0; }
.ledger li { padding-left: 1.5em; position: relative; }
.ledger .in li::before { content: '+'; position: absolute; left: 0; color: var(--flight); }
.ledger .out li::before { content: '\2013'; position: absolute; left: 0; color: var(--tan); }

.specs { display: grid; gap: clamp(24px, 4vw, 56px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 7px 12px 7px 0; border-bottom: 1px solid var(--rule); }
th { color: var(--tan); font-weight: 400; white-space: nowrap; width: 34%; }
td { color: var(--cream-dim); }
caption { text-align: left; font-family: var(--display); text-transform: uppercase; color: var(--cream); padding-bottom: 10px; font-size: 19px; }

/* last call */
.finale { padding-bottom: clamp(56px, 8vw, 110px); }
.finale h2 {
  font-size: clamp(64px, 12vw, 168px);
  line-height: .85;
  color: var(--amber);
  text-shadow: 5px 5px 0 var(--ink), 8px 8px 0 var(--rust);
  margin-bottom: 22px;
}
.finale .cta-row { margin-top: 26px; }

footer { padding: clamp(36px, 5vw, 60px) 0 44px; color: var(--tan); font-size: 14px; }
footer nav { display: flex; flex-wrap: wrap; gap: 22px; margin-bottom: 16px; }
footer a { color: var(--cream-dim); border-bottom-color: rgba(156, 143, 126, .4); }
footer p { max-width: none; margin: 0; }

.dock { display: none; }

/* ==========================================================================
   Tablet and phone: the hero stacks. Name + Steam first, then the stage.
   ========================================================================== */

@media (max-width: 1080px) {
  .top nav a[href="#crew"], .top nav a[href="#game"] { display: none; }
}

@media (max-width: 959px) {
  .hero {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding-block: 28px 44px;
  }
  .wordmark { font-size: clamp(40px, 11.4vw, 72px); }
  /* the Steam buttons stay first; the dates strip (and the desktop-only Steam-app line) drop under
     the stage, so the whole rocket fits in the first screen of a phone */
  .hero-cta { display: contents; }
  .hero-cta > * { position: relative; z-index: 2; }
  .hero-cta .cta-row { order: 1; }
  .hero-cta .dates, .hero-cta .steam-app { order: 3; }
  .hero-cta .dates { margin-top: 20px; }
  .stage {
    order: 2;
    position: relative;
    inset: auto;
    height: clamp(430px, 66svh, 680px);
    margin: 18px calc(-1 * var(--pad)) 0;
    --rocket-fill: .70;
    --rocket-mid: .42;
  }
  .hero-lede { order: 4; margin-top: 18px; }
  .teaser { order: 5; justify-self: auto; width: 100%; max-width: 440px; margin-top: 6px; }
  /* the part tags run to the right of the rocket here, so the Moon moves to the left */
  .moon { top: 18px; right: auto; left: var(--pad); width: clamp(76px, 20vw, 140px); }
  .planet { top: calc(100% - 64px); }
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 759px) {
  .panel:popover-open, .panel.is-open {
    inset: auto 0 0 0;
    top: auto;
    width: 100%;
    max-height: min(80svh, 720px);
    box-shadow: 0 -8px 0 rgba(10, 11, 13, .5);
    padding-bottom: var(--safe-bottom);
  }
  @starting-style {
    .panel:popover-open { transform: translateY(40px); opacity: 0; }
  }
  .readout, .rows { column-gap: 16px; }
  html { scroll-padding-bottom: calc(84px + var(--safe-bottom)); }
  .dock {
    display: flex;
    position: sticky;
    bottom: 0;
    z-index: 30;
    align-items: center;
    gap: 18px;
    padding: 10px 16px calc(12px + var(--safe-bottom));
    background: rgba(10, 11, 13, .94);
    border-top: 2px solid var(--ink);
    transition: transform .25s ease-out;
  }
  .dock.is-away { transform: translateY(115%); }
  .dock .cta--steam { flex: 1; text-align: center; padding: 14px 12px 12px; box-shadow: 4px 4px 0 var(--ink); font-size: 16px; }
  .dock .cta--demo { font-size: 15px; }
  .top .top-cta { display: none; }
}

@media (max-width: 640px) {
  th { white-space: normal; width: 42%; }
  td { overflow-wrap: anywhere; }
  .top { gap: 10px; }
  .top nav { gap: 16px; font-size: 12px; }
  .top nav a[href^="#"] { display: none; }
  .cta-row { gap: 14px 22px; }
  .dates { font-size: 12px; }
  .eyebrow { font-size: 11px; letter-spacing: .12em; }
  .hint { font-size: 11px; letter-spacing: .08em; }
  .controls { gap: 6px; }
  .tag { font-size: 11px; letter-spacing: .1em; }
  .tag-text { padding: 4px 5px; }
}

@media (max-width: 380px) {
  .top .brand { font-size: 13px; }
  .cta--steam { padding: 15px 18px 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage canvas, .poster, .hint, .dock, .panel:popover-open, .panel.is-open,
  .cta--steam, .trailer-play { transition: none; }
  .cta--steam:hover, .cta--steam:active { transform: none; }
  @starting-style {
    .panel:popover-open { transform: none; opacity: 1; }
  }
}
