/* The Quiet Dark: the site's one stylesheet.
   The palette is the game's (game/scripts/Ui/UiStyle.cs): the void dominates, cold light is the universe,
   and warm amber is reserved for life, and for you. Nothing else on the page is warm. */

:root {
  --void: #05070c;
  --void-2: #080b13;
  --panel: rgba(9, 12, 19, 0.82);
  --panel-solid: #0a0d15;
  --edge: rgba(140, 166, 230, 0.18);
  --edge-bright: rgba(179, 204, 255, 0.45);
  --text: #e3e8f2;
  --dim: #8f9ab0;
  --faint: #566078;
  --own: #ffa53d;
  --own-hot: #ffd27a;
  --signal: #62c8ff;
  --danger: #ff4b3e;
  --rival-1: #6fb6ff;
  --rival-2: #58e0d0;
  --rival-3: #c08cff;
  --head: 'Barlow Condensed', 'Bahnschrift', 'Arial Narrow', sans-serif;
  --body: 'Barlow', 'Bahnschrift', 'Segoe UI', system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --measure: 34rem;
  --wide: 72rem;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--body);
  overflow-x: hidden;
}
/* Film grain over everything, the art's own texture. */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--signal); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: #9ddcff; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }
::selection { background: rgba(255, 165, 61, 0.35); color: #fff; }

.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 200; background: var(--panel-solid); padding: 8px 14px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

h1, h2, h3 { font-family: var(--head); font-weight: 600; line-height: 1.1; margin: 0; }
h2 {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
h3 {
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}
.eyebrow {
  font-family: var(--head);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0 0 1rem;
}
.eyebrow .warm { color: var(--own); }
p { margin: 0 0 1em; }
.lede { font-size: 1.2rem; color: #c9d1e0; max-width: var(--measure); }
.dim { color: var(--dim); }
.small { font-size: 0.9rem; }

/* ---- header ---------------------------------------------------------------------------------------- */

.site-header {
  position: absolute; top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 18px var(--gutter);
}
.plain .site-header { position: relative; border-bottom: 1px solid var(--edge); background: var(--void-2); }
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--head); font-weight: 600; font-size: 1rem;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--text); text-decoration: none;
}
.brand:hover { color: #fff; }
.brand .ember {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--own);
  box-shadow: 0 0 6px 2px rgba(255, 165, 61, 0.7), 0 0 22px 6px rgba(255, 140, 40, 0.25);
}
.site-nav { display: flex; gap: clamp(0.9rem, 2.5vw, 2rem); }
.site-nav a {
  font-family: var(--head); font-weight: 500; font-size: 0.9rem;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--dim); text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
@media (max-width: 560px) {
  .brand .word { display: none; }
  .site-nav { gap: 0.85rem; }
  .site-nav a { letter-spacing: 0.14em; font-size: 0.8rem; }
}

/* ---- buttons ----------------------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 48px; padding: 0 1.5rem;
  font-family: var(--head); font-weight: 600; font-size: 1rem;
  letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none;
  color: var(--text);
  background: rgba(10, 14, 22, 0.6);
  border: 1px solid var(--edge-bright);
  border-radius: 3px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s, box-shadow 0.2s;
}
.btn:hover { color: #fff; border-color: rgba(200, 220, 255, 0.8); background: rgba(20, 26, 40, 0.75); }
.btn-warm {
  color: #1b0f02;
  background: linear-gradient(180deg, var(--own-hot), var(--own));
  border-color: var(--own);
  box-shadow: 0 0 24px rgba(255, 165, 61, 0.25);
}
.btn-warm:hover { color: #000; background: linear-gradient(180deg, #ffe0a0, #ffb257); box-shadow: 0 0 34px rgba(255, 165, 61, 0.4); }
.btn[aria-disabled="true"] {
  cursor: default;
  color: var(--dim);
  background: rgba(10, 14, 22, 0.5);
  border-color: var(--edge);
  box-shadow: none;
}
.btn .steam-mark { width: 18px; height: 18px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* ---- hero -------------------------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid; align-items: start;
  /* The copy sits high so the one amber light in the art (low, left of centre) stays clear of it. */
  padding: clamp(104px, 17vh, 190px) var(--gutter) 48px;
  isolation: isolate;
  overflow: hidden;
}
.hero-art { position: absolute; inset: 0; z-index: -2; }
.hero-art img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 34% 70%;
  animation: drift 60s ease-in-out infinite alternate;
  transform-origin: 34% 75%;
}
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.09); } }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(5,7,12,0.6) 0%, rgba(5,7,12,0.15) 55%, rgba(5,7,12,0) 75%, rgba(5,7,12,0.7) 92%, var(--void) 100%),
    linear-gradient(90deg, rgba(5,7,12,0.55), rgba(5,7,12,0) 60%);
}
.hero-copy { max-width: var(--wide); width: 100%; margin: 0 auto; }
.wordmark {
  font-family: var(--head);
  font-weight: 600;
  font-size: clamp(2.9rem, 10vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f2f5fa;
  margin: 0 0 1.4rem;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.6);
}
.wordmark .the {
  display: block;
  font-size: 0.3em;
  letter-spacing: 0.6em;
  color: var(--dim);
  margin-bottom: 0.25em;
}
.tagline {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  line-height: 1.45;
  max-width: 36rem;
  color: #d5dcea;
  margin: 0 0 2rem;
}
.hero-meta {
  margin: 1.6rem 0 0;
  font-family: var(--head); font-size: 0.85rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--dim);
}
.hero-meta span { white-space: nowrap; display: inline-block; }
.hero-meta span + span::before { content: "·"; margin: 0 0.8em; color: var(--faint); }

/* ---- sections --------------------------------------------------------------------------------------- */

.section { padding: clamp(64px, 10vh, 128px) var(--gutter); position: relative; }
.wrap { max-width: var(--wide); margin: 0 auto; }
.narrow { max-width: 46rem; margin: 0 auto; }
.section-head { margin-bottom: clamp(2rem, 5vh, 3.5rem); }
h2 + .lede, .section-head h2 + p { margin-top: 1.1rem; }
.rule {
  height: 1px; border: 0; margin: 0;
  background: linear-gradient(90deg, transparent, var(--edge), transparent);
}

/* The premise: a quote alone in the dark. */
.premise { text-align: center; }
.quote {
  margin: 0 auto;
  max-width: 44rem;
}
.quote blockquote {
  margin: 0;
  font-family: var(--body);
  font-style: italic;
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  line-height: 1.15;
  color: #f0f3f8;
}
.quote figcaption {
  margin-top: 1.2rem;
  font-family: var(--head); font-size: 0.85rem; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--dim);
}
.quote figcaption .src { display: block; margin-top: 0.4rem; letter-spacing: 0.08em; text-transform: none; font-family: var(--body); font-size: 0.8rem; color: var(--faint); }
.premise-body {
  max-width: 38rem; margin: clamp(3rem, 8vh, 5rem) auto 0;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  color: #c9d1e0;
}
.premise-body p:last-child { color: var(--text); }
.quote-small { margin-top: clamp(3rem, 8vh, 5rem); }
.quote-small blockquote { font-size: clamp(1.15rem, 2.4vw, 1.5rem); line-height: 1.45; color: #c9d1e0; }

/* How it plays: the board, and the rules that make noise matter. */
.shot {
  position: relative;
  margin: 0;
  border: 1px solid var(--edge);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.6);
  background: var(--void-2);
}
.shot figcaption {
  padding: 0.8rem 1rem;
  font-size: 0.9rem; color: var(--dim);
  border-top: 1px solid var(--edge);
}
.pillars {
  list-style: none; margin: clamp(3rem, 7vh, 4.5rem) 0 0; padding: 0;
  display: grid; gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
}
.pillars li { background: var(--void-2); border: 1px solid var(--edge); border-radius: 4px; padding: 1.8rem 1.5rem 1.6rem; }
.pillars .n {
  display: block;
  font-family: var(--head); font-size: 0.85rem; letter-spacing: 0.3em; color: var(--faint);
  margin-bottom: 0.9rem;
}
.pillars h3 { margin-bottom: 0.7rem; }
.pillars p { margin: 0; color: var(--dim); font-size: 1rem; }
.pillars .opt { color: var(--faint); font-family: var(--head); letter-spacing: 0.2em; font-size: 0.75rem; text-transform: uppercase; display: block; margin-top: 0.8rem; }

/* Signature readout: a quiet nod to the HUD's own panel. */
.readout {
  display: inline-grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 2.5rem;
  margin-top: 2rem; padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 165, 61, 0.35);
  background: rgba(10, 12, 18, 0.85);
  border-radius: 3px;
}
.readout .k { font-family: var(--head); letter-spacing: 0.28em; font-size: 0.8rem; color: var(--own); text-transform: uppercase; }
.readout .v { font-family: var(--head); font-size: 2rem; font-weight: 600; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.readout .note { grid-column: 1 / -1; font-size: 0.85rem; color: var(--dim); margin-top: 0.2rem; }

/* Victories: four ways to end it. */
.victories {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}
.victory {
  position: relative; isolation: isolate;
  min-height: 25rem;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.5rem;
  border: 1px solid var(--edge);
  border-radius: 4px;
  overflow: hidden;
}
.victory img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s ease;
}
.victory:hover img { transform: scale(1.04); }
.victory::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(5,7,12,0.05) 20%, rgba(5,7,12,0.92) 72%);
}
.victory h3 { font-size: 1.5rem; letter-spacing: 0.14em; margin-bottom: 0.6rem; }
.victory p { margin: 0; color: #c1c9d8; font-size: 0.98rem; }
.victory .opt { position: absolute; top: 1rem; left: 1.5rem; font-family: var(--head); font-size: 0.75rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--dim); }

/* Weapons that leave no trace: an image beside a list. */
.split {
  display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}
.weapons { list-style: none; margin: 1.8rem 0 0; padding: 0; }
.weapons li { padding: 1rem 0; border-top: 1px solid var(--edge); }
.weapons li:last-child { border-bottom: 1px solid var(--edge); }
.weapons strong {
  display: block;
  font-family: var(--head); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.16em; text-transform: uppercase;
  margin-bottom: 0.2rem;
}
.weapons span { color: var(--dim); font-size: 0.98rem; }

/* Civilizations: sigils tinted the way the game tints them. Yours is warm. */
.civs {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
}
.civ {
  text-align: center;
  padding: 2rem 1rem 1.6rem;
  border: 1px solid var(--edge);
  border-radius: 4px;
  background: radial-gradient(circle at 50% 38%, rgba(120, 150, 220, 0.07), transparent 65%);
}
.sigil {
  width: 128px; height: 128px; margin: 0 auto 1.2rem;
  background: var(--tint, var(--rival-1));
  -webkit-mask: var(--glyph) center / contain no-repeat;
  mask: var(--glyph) center / contain no-repeat;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--tint, var(--rival-1)) 45%, transparent));
}
.civ h3 { letter-spacing: 0.32em; font-size: 1.15rem; }
.civ p { margin: 0.4rem 0 0; font-size: 0.85rem; color: var(--faint); letter-spacing: 0.08em; }
.civ-vela   { --glyph: url(/assets/img/sigil-vela.png);   --tint: var(--own); }
.civ-lyra   { --glyph: url(/assets/img/sigil-lyra.png);   --tint: var(--rival-1); }
.civ-orion  { --glyph: url(/assets/img/sigil-orion.png);  --tint: var(--rival-2); }
.civ-cygnus { --glyph: url(/assets/img/sigil-cygnus.png); --tint: var(--rival-3); }
.civ-vela h3 { color: var(--own-hot); }

/* The story: one arc of the intro, as panels. */
.story { background: #000; }
.panels { display: grid; gap: 14px; grid-template-columns: repeat(6, 1fr); }
.panel { margin: 0; position: relative; grid-column: span 6; }
.panel img { width: 100%; border: 3px solid #0b0d12; outline: 1px solid #1d2230; }
.panel figcaption {
  max-width: 36rem;
  margin: 0.9rem 0 0;
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.5;
  color: #d9dfea;
}
.panel.half { grid-column: span 3; }
@media (max-width: 760px) { .panel.half { grid-column: span 6; } }
.panel.silent figcaption { color: var(--dim); font-style: italic; }
.story-end { margin-top: clamp(2.5rem, 7vh, 4rem); text-align: center; }
.story-end p { font-family: var(--head); letter-spacing: 0.26em; text-transform: uppercase; color: var(--dim); font-size: 0.95rem; }
.story-end .warm { color: var(--own); }

/* Reveal on scroll: only when motion is allowed and JS has run. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 1.1s ease, transform 1.1s ease; }
.js .reveal.seen { opacity: 1; transform: none; }

/* Sign-up. */
.signup { text-align: center; }
.signup-box {
  max-width: 34rem; margin: 2.5rem auto 0; text-align: left;
  padding: clamp(1.4rem, 4vw, 2.2rem);
  border: 1px solid var(--edge);
  background: var(--panel);
  border-radius: 4px;
}
.field label {
  display: block;
  font-family: var(--head); font-size: 0.85rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--dim);
  margin-bottom: 0.5rem;
}
.field-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.field input[type="email"] {
  flex: 1 1 14rem; min-width: 0;
  min-height: 48px; padding: 0 1rem;
  font: inherit; color: var(--text);
  background: #05070c;
  border: 1px solid var(--edge-bright);
  border-radius: 3px;
}
.field input[type="email"]::placeholder { color: var(--faint); }
.field input[type="email"]:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px rgba(98, 200, 255, 0.18); }
.turnstile { margin: 1rem 0 0; min-height: 65px; }
.form-note { margin: 1rem 0 0; font-size: 0.88rem; color: var(--dim); }
.form-status { margin: 1rem 0 0; min-height: 1.6em; font-size: 0.98rem; }
.form-status.ok { color: var(--own-hot); }
.form-status.err { color: #ff8a7f; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- plain pages (releases, press, privacy) -------------------------------------------------------- */

.page { padding: clamp(48px, 9vh, 96px) var(--gutter) clamp(64px, 12vh, 140px); }
.page-head { max-width: 46rem; margin: 0 auto clamp(2.5rem, 6vh, 4rem); }
.page-head h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1rem; }
.prose { max-width: 46rem; margin: 0 auto; }
.prose h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 3rem 0 1rem; }
.prose h3 { margin: 2rem 0 0.7rem; font-size: 1.05rem; color: var(--dim); }
.prose ul { padding-left: 1.2rem; margin: 0 0 1em; }
.prose li { margin: 0.35rem 0; }
.prose li::marker { color: var(--faint); }

.release { padding: 2.2rem 0; border-top: 1px solid var(--edge); scroll-margin-top: 24px; }
.release:target { border-top-color: var(--own); }
.release:target h2 { color: var(--own-hot); }
.release h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); letter-spacing: 0.04em; text-transform: none; margin: 0.4rem 0 1rem; }
.release .lede { font-size: 1.08rem; max-width: none; }
.release-meta { margin: 0; font-family: var(--head); font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }
.release-meta time { margin-left: 0.6rem; }
.release .permalink { margin-left: 0.4rem; color: var(--faint); text-decoration: none; }
.release .permalink:hover { color: var(--signal); }
.tag { display: inline-block; padding: 0.15rem 0.55rem; border: 1px solid var(--edge-bright); border-radius: 2px; color: var(--text); }
.tag-update { border-color: rgba(255, 165, 61, 0.6); color: var(--own-hot); }
.tag-patch { border-color: rgba(98, 200, 255, 0.5); color: var(--signal); }

.facts {
  display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr; gap: 0;
  margin: 0; border-top: 1px solid var(--edge);
}
.facts dt, .facts dd { margin: 0; padding: 0.8rem 0; border-bottom: 1px solid var(--edge); }
.facts dt { font-family: var(--head); letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.85rem; color: var(--dim); padding-right: 1rem; }
@media (max-width: 520px) {
  .facts { grid-template-columns: 1fr; }
  .facts dt { border-bottom: 0; padding-bottom: 0; }
}
.downloads { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); margin: 1.5rem 0 0; padding: 0; list-style: none; }
.downloads li { border: 1px solid var(--edge); border-radius: 4px; overflow: hidden; background: var(--void-2); }
.downloads a { display: block; text-decoration: none; color: var(--text); }
.downloads img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: #000; }
.downloads .sq img { object-fit: contain; padding: 1.2rem; }
.downloads span { display: block; padding: 0.7rem 0.9rem; font-size: 0.88rem; color: var(--dim); }
.downloads a:hover span { color: var(--text); }

/* ---- footer ------------------------------------------------------------------------------------------ */

.site-footer {
  padding: 3rem var(--gutter) 2.5rem;
  border-top: 1px solid var(--edge);
  background: var(--void-2);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; align-items: flex-start; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.6rem 1.8rem; }
.site-footer nav a { color: var(--dim); text-decoration: none; font-family: var(--head); letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.85rem; }
.site-footer nav a:hover { color: var(--text); }
.site-footer p { margin: 0; color: var(--faint); font-size: 0.85rem; max-width: 30rem; }

/* ---- 404 --------------------------------------------------------------------------------------------- */

.lost { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: var(--gutter); }
.lost h1 { font-size: clamp(2.4rem, 8vw, 5rem); letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 1rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-art img { animation: none; transform: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .victory img { transition: none; }
}

.signup .lede { margin-inline: auto; }
.latest { list-style: none; margin: 0 0 2rem; padding: 0; }
.latest li { padding: 1.4rem 0; border-top: 1px solid var(--edge); }
.latest li:last-child { border-bottom: 1px solid var(--edge); }
.latest h3 { text-transform: none; letter-spacing: 0.03em; font-size: 1.35rem; font-weight: 600; margin: 0.4rem 0 0.5rem; }
.latest h3 a { color: var(--text); text-decoration: none; }
.latest h3 a:hover { color: var(--signal); }
.latest p { margin: 0; color: var(--dim); }
