/*
 * The page: the game's own console, opened on the hauler.
 *
 * Same palette and the same housing language as `client/style.css`, and — in
 * the hero — the same renderer: the ship is drawn live by the game's
 * `intro.js`, served here as `/hero.js`. The page hands it the box its own
 * layout leaves for the hull (`landing.js`), so what the visitor sees is the
 * game's ship placed by the page's rules, and nothing here has to know how the
 * ship is drawn.
 *
 * Self-contained: no web fonts, no CDN, nothing fetched from anywhere else.
 */
:root {
  --void: #04060b;
  --bg: #0a0d16;
  --bg-deep: #080b12;
  --accent: #4fb6d8;
  --hazard: #c9a63e;
  --amber: #e3963c;
  --text: #e8eef7;
  --dim: rgba(232, 238, 247, 0.62);
  --dimmer: rgba(232, 238, 247, 0.6);
  --meta: rgba(140, 175, 215, 0.55);
  --meta-hi: rgba(200, 226, 250, 0.8);
  --hairline: rgba(140, 175, 215, 0.14);
  --line: rgba(79, 182, 216, 0.2);
  --card: rgba(20, 27, 40, 0.62);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  text-wrap: pretty;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { color: #8ad6ec; }
::selection { background: rgba(79, 182, 216, 0.3); }

img, video { max-width: 100%; height: auto; display: block; }

h2, h3, h4 { margin: 0; }

/* ------------------------------------------------------- shared readouts */

/*
 * The instrument strip everything shares with the game: lamp, designation,
 * rule, note — mono, small, spaced. The page head and foot are instances of
 * it, and every section below the fold opens with one.
 */
.page-head, .page-foot, .section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--meta);
  white-space: nowrap;
  min-width: 0;
}
.desig {
  color: var(--meta-hi);
  overflow: hidden;
  text-overflow: ellipsis;
}
.head-rule {
  flex: 1;
  min-width: 16px;
  height: 1px;
  background: linear-gradient(90deg, rgba(140, 175, 215, 0.26), transparent);
}
.warn-note { color: var(--hazard); }

.lamp {
  flex: none;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 9px var(--accent);
  animation: lampPulse 2.6s ease-in-out infinite;
}
.lamp.still { animation: none; }
.lamp.gold { background: var(--hazard); box-shadow: 0 0 9px rgba(201, 166, 62, 0.9); }
@keyframes lampPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* The page's own head: fixed, owning the top edge like the game's. */
.page-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  padding: 12px 24px 11px;
  letter-spacing: 0.2em;
  background: rgba(5, 8, 13, 0.86);
  border-bottom: 1px solid var(--hairline);
  backdrop-filter: blur(6px);
}
.page-head .desig { color: rgba(200, 226, 250, 0.82); }
.head-nav { display: flex; gap: 12px; }
.head-nav a {
  color: rgba(140, 175, 215, 0.6);
  text-decoration: none;
  letter-spacing: 0.2em;
}
.head-nav a:hover { color: var(--meta-hi); }
.head-cta {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #e6c260;
  text-decoration: none;
  border: 1px solid rgba(201, 166, 62, 0.45);
  border-radius: 3px;
  padding: 6px 12px 5px;
  background: rgba(201, 166, 62, 0.08);
}
.head-cta:hover { color: #f2d47a; background: rgba(201, 166, 62, 0.16); }

.page-foot {
  padding: 18px 24px 20px;
  letter-spacing: 0.2em;
  border-top: 1px solid var(--hairline);
  background: rgba(5, 8, 13, 0.7);
}

/* The hazard rule, closing a threshold — the same stripe every doorway on the
   deck carries. */
.hazard-rule {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: repeating-linear-gradient(
    -45deg, var(--hazard) 0 7px, rgba(43, 36, 19, 0.95) 7px 14px);
  opacity: 0.4;
}

/* ------------------------------------------------------------ the hauler */

.hero {
  position: relative;
  height: 100vh;
  min-height: 660px;
  overflow: hidden;
  background: var(--void);
}
#introBg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
/* Space darkens under the panel, so the card sits on a quiet ground rather
   than fighting the stars for the eye. */
.hero-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    rgba(4, 6, 11, 0) 0%, rgba(4, 6, 11, 0) 40%,
    rgba(4, 6, 11, 0.72) 66%, rgba(4, 6, 11, 0.92) 100%);
  pointer-events: none;
}

/* The ship's annotation, as instrument text over the scene. */
.hero-hud {
  position: absolute;
  left: 28px;
  top: 96px;
  display: flex;
  gap: 14px;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(140, 175, 215, 0.5);
}
.hud-name { color: rgba(200, 226, 250, 0.7); }
.hud-warn { color: var(--hazard); }

/* The pitch, in a panel over the right of the scene — where the game's menu
   sits, and roughly its width. */
.hero-panel {
  position: absolute;
  top: 96px;
  right: 24px;
  width: min(560px, 40vw);
  min-width: 330px;
  padding: 0 4px;
}
.hero-card {
  position: relative;
  padding: 26px 30px 26px;
  background:
    linear-gradient(155deg, rgba(64, 80, 107, 0.34), rgba(17, 23, 34, 0.94) 44%),
    rgba(15, 20, 30, 0.96);
  border: 1px solid rgba(140, 175, 215, 0.22);
  border-radius: 5px;
  box-shadow:
    0 36px 90px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(160, 200, 245, 0.10);
}
.hero-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: 5px 5px 0 0;
  background: repeating-linear-gradient(
    -45deg, var(--hazard) 0 7px, rgba(43, 36, 19, 0.95) 7px 14px);
  opacity: 0.55;
}

.eyebrow {
  margin: 8px 0 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--hazard);
}
.wordmark {
  margin: 0 0 6px;
  font-size: clamp(34px, 3.6vw, 52px);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}
.wordmark span { color: var(--accent); }
.tagline {
  margin: 0 0 18px;
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 600;
  color: rgba(232, 238, 247, 0.92);
}
.hero-card .lede {
  margin: 0 0 14px;
  font-size: clamp(14.5px, 1.1vw, 17px);
  line-height: 1.62;
  color: rgba(232, 238, 247, 0.86);
}
.pull {
  margin: 0 0 22px;
  padding-left: 14px;
  border-left: 2px solid rgba(201, 166, 62, 0.7);
  font-size: clamp(14px, 1.05vw, 16px);
  color: #f2e2c0;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.commit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.03em;
  color: #06131a;
  text-decoration: none;
  background: linear-gradient(180deg, #7fd3ea, #41a8cc);
  border: 1px solid rgba(150, 220, 240, 0.7);
  border-radius: 4px;
  box-shadow: 0 10px 26px rgba(65, 168, 204, 0.22);
}
.commit:hover { color: #06131a; filter: brightness(1.08); }
.commit .mark { font-size: 11px; }
.ghost {
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  font-size: 14.5px;
  color: rgba(232, 238, 247, 0.72);
  text-decoration: none;
  border: 1px solid rgba(140, 175, 215, 0.28);
  border-radius: 4px;
}
.ghost:hover { color: var(--text); border-color: rgba(140, 175, 215, 0.5); }
.hero-meta {
  margin: 16px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(140, 175, 215, 0.5);
}

/* The story, as the instrument it claims to be — the same log the game's
   menu keeps in the same corner. */
.scan-log {
  position: absolute;
  left: 28px;
  bottom: 56px;
  width: min(430px, 34vw);
  min-width: 300px;
  padding: 14px 16px 15px;
  background: rgba(5, 8, 13, 0.74);
  border: 1px solid rgba(140, 175, 215, 0.16);
  border-left: 2px solid rgba(79, 182, 216, 0.5);
  border-radius: 3px;
  backdrop-filter: blur(2px);
}
.log-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 11px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.log-mark { font-size: 9px; }
.log-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(79, 182, 216, 0.35), transparent);
}
.beat {
  margin: 0 0 9px;
  padding-left: 14px;
  text-indent: -14px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  color: rgba(205, 222, 242, 0.8);
}
.beat:last-child { margin-bottom: 0; }
.beat::before { content: "\00B7  "; color: rgba(79, 182, 216, 0.6); }
.beat em { color: var(--accent); font-style: normal; font-weight: 500; }
.beat.warn { color: #ffd9a8; }
.beat.warn::before { color: var(--hazard); }

.hero-more {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  color: rgba(140, 175, 215, 0.6);
  font-size: 13px;
  text-decoration: none;
  animation: sink 2.4s ease-in-out infinite;
}
@keyframes sink {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.55; }
  50% { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

/* ------------------------------------------------------------- the creed */

.creed {
  scroll-margin-top: 52px;
  background: linear-gradient(180deg, var(--bg-deep), var(--bg));
  border-bottom: 1px solid rgba(140, 175, 215, 0.1);
}
.creed .inner { padding: 74px 24px 66px; }
.kicker {
  margin: 0 0 20px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
}
.statement {
  margin: 0 0 48px;
  max-width: 22ch;
  font-size: clamp(30px, 4.4vw, 62px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.creed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  overflow: hidden;
}
.creed-cell {
  padding: 22px 22px 24px;
  background: #0a0e17;
}
.cell-k {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--hazard);
}
.creed-cell h3 { margin: 12px 0 8px; font-size: 19px; font-weight: 600; }
.creed-cell p { margin: 0; font-size: 14px; color: var(--dim); }

/* -------------------------------------------------------------- the bands */

/*
 * Every section below the creed: a full-width band with a designation strip
 * across the top and a 1160 column inside. Alternating flat and graded, so
 * the page reads as decks rather than as one long wall.
 */
.inner { max-width: 1160px; margin: 0 auto; }
.band {
  scroll-margin-top: 52px;
  background: var(--bg);
  border-bottom: 1px solid rgba(140, 175, 215, 0.1);
}
.band.alt { background: linear-gradient(180deg, var(--bg-deep), var(--bg)); }
.band .inner { padding: 70px 24px 72px; }
.section-head { margin-bottom: 34px; }

h2 {
  margin: 0 0 18px;
  font-size: clamp(27px, 3vw, 42px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
h2 em { color: var(--hazard); font-style: normal; }

.band .lede {
  margin: 0 0 16px;
  font-size: 17px;
  line-height: 1.62;
  color: rgba(232, 238, 247, 0.88);
  max-width: 52ch;
}
.aside {
  margin: 0 0 26px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--dimmer);
  max-width: 56ch;
}
.aside em { color: var(--text); font-style: normal; }
.aside.small { margin: 0; font-size: 13.5px; color: rgba(232, 238, 247, 0.5); }
.mono-note {
  margin: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: rgba(140, 175, 215, 0.6);
}
.note { color: var(--dim); font-family: var(--mono); font-size: 12px; }

/* ------------------------------------------------------- splits & media */

.split {
  display: grid;
  gap: 44px;
  align-items: start;
}
.split-dark { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); }
.split-sound { grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr); }
.split-airlock { grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr); }

figure { margin: 0; }
figure video {
  width: 100%;
  aspect-ratio: 16 / 7.4;
  max-height: 330px;
  object-fit: cover;
  border: 1px solid rgba(140, 175, 215, 0.18);
  border-radius: 4px;
  background: var(--void);
}
figure img {
  width: 100%;
  aspect-ratio: 16 / 8.6;
  max-height: 320px;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(140, 175, 215, 0.18);
  border-radius: 4px;
}
figcaption {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.55;
  color: rgba(140, 175, 215, 0.62);
}
.cap-mark { color: var(--accent); font-size: 9px; }

/* ------------------------------------------------------------ the ledger */

.ledger {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 30px;
  margin-top: 54px;
  padding-top: 30px;
  border-top: 1px solid rgba(140, 175, 215, 0.12);
}
.ledger-rule { background: var(--hairline); }
.ledger h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(200, 226, 250, 0.86);
}
.on-dot, .off-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex: none;
}
.on-dot { background: var(--amber); box-shadow: 0 0 10px rgba(227, 150, 60, 0.85); }
.off-dot { background: #1b2431; box-shadow: inset 0 0 0 1px rgba(140, 175, 215, 0.35); }

.ticks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
/* Mark, then whatever follows. A hanging indent rather than a grid, because a
   row with a <strong> in it has several inline children and a grid would give
   each one a cell of its own — one word per line, as the first cut showed. */
.ticks li {
  padding-left: 20px;
  text-indent: -20px;
  font-size: 14.5px;
  color: rgba(232, 238, 247, 0.86);
}
.ticks li::before {
  content: "\25AA";
  display: inline-block;
  width: 20px;
  text-indent: 0;
  vertical-align: 1px;
  color: var(--accent);
  font-size: 10px;
}
.ticks li.cost { color: rgba(232, 238, 247, 0.56); }
.ticks li.cost::before { content: "\00D7"; color: var(--hazard); font-size: 12px; vertical-align: 0; }

.big-ticks { gap: 16px; margin-top: 30px; }
.big-ticks li {
  padding-left: 22px;
  text-indent: -22px;
  line-height: 1.6;
  color: rgba(232, 238, 247, 0.66);
}
.big-ticks li::before { width: 22px; }
.big-ticks li strong { color: var(--text); font-weight: 600; }
.big-ticks li em { color: var(--text); font-style: normal; }
.split-sound .lede { margin-bottom: 0; }

/* ------------------------------------------------------------- the cards */

.carries-label {
  margin: 52px 0 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(140, 175, 215, 0.5);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.card {
  padding: 16px 16px 15px;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 2px solid rgba(201, 166, 62, 0.75);
  border-radius: 4px;
}
/* Loudest first: the gold on the top edge fades down the row. */
.card:nth-child(2) { border-top-color: rgba(201, 166, 62, 0.5); }
.card:nth-child(3) { border-top-color: rgba(201, 166, 62, 0.3); }
.card:nth-child(4) { border-top-color: rgba(201, 166, 62, 0.15); }
.card h4 { margin: 0 0 7px; font-size: 16px; font-weight: 600; }
.card p { margin: 0; font-size: 13.5px; color: var(--dimmer); }

.headphones {
  margin: 26px 0 0;
  padding: 15px 18px;
  font-size: 14.5px;
  border: 1px solid rgba(201, 166, 62, 0.3);
  border-left: 3px solid var(--hazard);
  border-radius: 4px;
  background: rgba(43, 36, 19, 0.28);
  color: rgba(232, 238, 247, 0.86);
}
.headphones strong { font-weight: 600; }

/* ------------------------------------------------------------- the modes */

.modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.mode {
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 2px solid rgba(79, 182, 216, 0.4);
  border-radius: 4px;
}
.mode-mark {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--hazard);
}
.mode h3 { margin: 10px 0 8px; font-size: 19px; font-weight: 600; }
.mode p { margin: 0; font-size: 14px; color: var(--dim); }

.shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}

/* ---------------------------------------------------------- the controls */

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  margin-top: 48px;
  padding-top: 30px;
  border-top: 1px solid rgba(140, 175, 215, 0.12);
}
.cols h3 {
  margin: 0 0 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(200, 226, 250, 0.86);
}
.cols p { margin: 0; font-size: 14px; color: var(--dim); }
.keys { line-height: 2.2; margin-bottom: 8px !important; }
kbd {
  display: inline-block;
  padding: 2px 7px;
  margin: 0 1px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text);
  background: rgba(20, 27, 40, 0.9);
  border: 1px solid rgba(140, 175, 215, 0.3);
  border-bottom-width: 2px;
  border-radius: 4px;
}

/* ----------------------------------------------------------- the airlock */

.airlock { background: linear-gradient(180deg, var(--bg-deep), #05070d); border-bottom: 0; }
.airlock .inner { padding-bottom: 78px; }
.airlock h2 { margin-bottom: 14px; }
.airlock .lede { margin-bottom: 24px; max-width: 46ch; color: rgba(232, 238, 247, 0.86); }
.airlock .hero-actions { margin-bottom: 14px; }
.airlock .note { max-width: 46ch; line-height: 1.6; }

.airlock-notes { display: flex; flex-direction: column; gap: 14px; }
.alpha-note {
  padding: 20px 22px;
  border: 1px solid rgba(140, 175, 215, 0.16);
  border-radius: 4px;
  background: rgba(6, 9, 15, 0.6);
}
.alpha-note h3 { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.alpha-note p {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--dimmer);
}
.alpha-note p:last-child { margin-bottom: 0; }
.alpha-note strong { color: var(--text); font-weight: 600; }
.alpha-note em { font-style: normal; color: var(--text); }
.status {
  margin-top: 16px !important;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--meta) !important;
}
.status.open { color: #7bed9f !important; }
.status.closed { color: #ff6b6b !important; }

/* ---------------------------------------------------------------- narrow */

@media (max-width: 1079px) {
  /* Below the game's own layout breakpoint the hero is a scroll of its own:
     the ship first, as a short full-width viewport, then the card and the log
     in flow under it. intro.js is handed the same break by landing.js. */
  .hero { height: auto; min-height: 0; padding: 84px 16px 44px; }
  #introBg { position: relative; inset: auto; height: 40vh; min-height: 230px; }
  .hero-fade { display: none; }
  .hero-hud {
    position: static;
    margin: 0 0 12px;
    flex-wrap: wrap;
    row-gap: 6px;
  }
  .hero-panel {
    position: static;
    width: 100%;
    min-width: 0;
    margin: 16px 0 0;
    padding: 0;
  }
  .scan-log {
    position: static;
    width: 100%;
    min-width: 0;
    margin: 14px 0 0;
  }
  .hero-more { display: none; }

  .split, .split-dark, .split-sound, .split-airlock { grid-template-columns: 1fr; gap: 28px; }
  .ledger { grid-template-columns: 1fr; gap: 26px; }
  .ledger-rule { display: none; }
  .shots { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .head-nav { display: none; }
}

@media (max-width: 560px) {
  #introBg { height: 32vh; min-height: 180px; }
  .page-foot .head-note { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lamp, .hero-more { animation: none; }
}
