/* Oortbound site. One deliberate dark look that matches the game UI:
   deep-space navy, cyan HUD accent, black-hole gold for calls to action. */
:root {
  --bg: #070b14;
  --bg-2: #0b1220;
  --panel: #0f1828;
  --line: #1e2c43;
  --fg: #dce7f4;
  --muted: #8ea1ba;
  --accent: #59c8ff;
  --gold: #f2b54a;
  --gold-ink: #1a1206;
  --display: "Orbitron", "Segoe UI", system-ui, sans-serif;
  --body: "Exo 2", "Segoe UI", system-ui, sans-serif;
  --radius: 8px;
  --wrap: 1180px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 var(--body);
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }   /* keeps the footer at the bottom on short pages */
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); letter-spacing: .03em; line-height: 1.2; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(22px, 3vw, 30px); }
h3 { font-size: 18px; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }
.eyebrow { font: 600 13px var(--display); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ── header ─────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(7, 11, 20, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; }
.site-header .logo img { height: 30px; width: auto; }
.site-nav { display: flex; gap: 22px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.site-nav a { color: var(--fg); font: 600 13px var(--display); letter-spacing: .1em; text-transform: uppercase; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius);
  font: 700 14px var(--display); letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid transparent; cursor: pointer;
}
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-line { border-color: var(--line); color: var(--fg); background: rgba(15, 24, 40, .7); }
.site-nav .btn { padding: 8px 14px; font-size: 12px; }

/* ── hero ───────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  height: min(88vh, 900px); min-height: 520px;
  container-type: size;
  display: flex; align-items: flex-end;
  background: var(--bg);
}
/* The stage is the hero render at its own 16:9 shape, scaled like "cover" and
   centred. The wordmark is placed inside it in image percentages measured from
   the X banner / Steam header capsule, so it always sits exactly as there. */
.hero-stage {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: max(100cqw, calc(100cqh * 16 / 9)); aspect-ratio: 16 / 9;
}
.hero-stage picture { display: block; width: 100%; height: 100%; }
.hero-stage .hero-art { width: 100%; height: 100%; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(7,11,20,.25) 0%, rgba(7,11,20,0) 22%, rgba(7,11,20,0) 62%, rgba(7,11,20,.75) 84%, var(--bg) 100%);
}
.hero .wrap { position: relative; z-index: 1; width: 100%; padding-block: 48px 56px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero .wordmark {
  position: absolute; left: 15.53%; top: 34.79%; width: 68.97%; max-width: none;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,.65));
}
/* Portrait screens: the vertical capsule composition, text below the art. */
@media (max-aspect-ratio: 5/4) {
  .hero { height: auto; min-height: 0; container-type: normal; display: block; }
  .hero-stage { position: relative; left: auto; top: auto; transform: none; width: 100%; max-width: 760px; margin-inline: auto; aspect-ratio: 1202 / 1440; }
  .hero .wordmark { left: -0.86%; top: 39.42%; width: 101.52%; }
  .hero::after { background: linear-gradient(180deg, rgba(7,11,20,0) 0%, rgba(7,11,20,0) 55%, var(--bg) 82%); }
  .hero .wrap { margin-top: -18vw; padding-block: 0 48px; }
}
.hero .hero-foot { position: relative; z-index: 1; display: grid; gap: 22px; justify-items: center; }
.hero .tagline { max-width: 62ch; font-size: clamp(17px, 2vw, 20px); color: #e9f1fb; text-shadow: 0 2px 12px rgba(0,0,0,.9); margin: 0; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ── sections ───────────────────────────────────────────── */
section.block { padding-block: 72px; }
section.block + section.block { border-top: 1px solid var(--line); }
.block-head { display: grid; gap: 10px; margin-bottom: 30px; max-width: 70ch; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.features > .feature:last-child:nth-child(3n+1) { grid-column: 1 / -1; }   /* no lone card in the last row */
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; align-content: start; }
.feature h3 { color: var(--accent); font-size: 16px; }
.feature p { color: #c6d3e3; }

.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.shots a { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.shots img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; transition: transform .25s ease; }
.shots a:hover img { transform: scale(1.03); }

.steam-card { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 24px; align-items: center; max-width: 860px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.steam-card img { border-radius: 6px; }
.steam-card p { color: #c6d3e3; margin: 0 0 16px; }
@media (max-width: 640px) { .steam-card { grid-template-columns: minmax(0, 1fr); } }

/* ── news ───────────────────────────────────────────────── */
.post-list { display: grid; gap: 14px; }
.post-card {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  color: var(--fg);
}
.post-card:hover { text-decoration: none; border-color: var(--accent); }
.post-card img { width: 100%; height: 100%; object-fit: cover; min-height: 130px; }
.post-card .body { padding: 18px 18px 18px 0; display: grid; gap: 8px; align-content: start; min-width: 0; }
.post-card.no-image { grid-template-columns: minmax(0, 1fr); }
.post-card.no-image .body { padding-left: 18px; }
.meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pill { font: 700 11px var(--display); letter-spacing: .12em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid currentColor; }
.pill.patch { color: var(--gold); }
.pill.devlog { color: var(--accent); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs button { font: 700 12px var(--display); letter-spacing: .1em; text-transform: uppercase; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; }
.tabs button[aria-pressed="true"] { color: var(--bg); background: var(--accent); border-color: var(--accent); }

.article { max-width: 760px; margin: 0 auto; padding-block: 56px 80px; display: grid; gap: 20px; }
.article .cover { border-radius: var(--radius); border: 1px solid var(--line); }
.prose { display: grid; gap: 16px; color: #d2deec; }
.prose h2 { font-size: 22px; color: var(--fg); margin-top: 12px; }
.prose h3 { font-size: 17px; color: var(--accent); margin-top: 8px; }
.prose ul { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.prose img { border-radius: var(--radius); border: 1px solid var(--line); }
.prose code { background: var(--panel); padding: 1px 6px; border-radius: 4px; }
.prose .table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.prose th { text-align: left; font: 600 12px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); background: var(--panel); }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose tr:last-child td { border-bottom: 0; }
.prose td:first-child { color: var(--fg); font-weight: 600; white-space: nowrap; }

/* ── codex ──────────────────────────────────────────────── */
.codex { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; padding-block: 40px 80px; }
.codex-side { position: sticky; top: 84px; align-self: start; display: grid; gap: 8px; }
.codex-side input { width: 100%; padding: 11px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); color: var(--fg); font: 15px var(--body); }
.codex-cats { display: grid; gap: 6px; }
.codex-cats button { display: flex; justify-content: space-between; gap: 10px; text-align: left; padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); color: var(--fg); font: 600 13px var(--display); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.codex-cats button span { color: var(--muted); font-variant-numeric: tabular-nums; }
.codex-cats button[aria-pressed="true"] { background: #1c4f86; border-color: var(--accent); }
.codex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; align-content: start; }
.codex-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.codex-card header { display: flex; gap: 14px; align-items: center; }
.medallion { position: relative; flex: none; width: 64px; height: 64px; border-radius: 50%; background: #0c1422; border: 3px solid var(--ring, var(--accent)); box-shadow: 0 0 22px -4px var(--ring, var(--accent)); display: grid; place-items: center; }
.medallion img { width: 46px; height: 38px; object-fit: contain; }  /* keeps 2:1 weapon renders in proportion */
.medallion .badge { position: absolute; right: -6px; bottom: -6px; width: 24px; height: 24px; border-radius: 50%; background: var(--ring, var(--accent)); color: #0a0f19; font: 800 14px/24px var(--display); text-align: center; border: 2px solid var(--panel); }
.codex-card h3 { font-size: 16px; }
.codex-card .tag { font-size: 13px; color: var(--ring-text, var(--accent)); }
.codex-card .entry-body { font-size: 15px; color: #cfdbea; overflow-wrap: anywhere; }
.codex-empty { color: var(--muted); padding: 30px 0; }
.codex-meta { color: var(--muted); font-size: 14px; margin-bottom: 14px; }

/* ── press kit ──────────────────────────────────────────── */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.fact { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.fact b { font: 600 12px var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ── footer ─────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding-block: 36px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; gap: 16px 30px; flex-wrap: wrap; justify-content: space-between; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

@media (max-width: 820px) {
  .codex { grid-template-columns: minmax(0, 1fr); }
  .codex-side { position: static; }
  .codex-cats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .post-card { grid-template-columns: minmax(0, 1fr); }
  .post-card .body { padding: 0 18px 18px; }
  .site-nav { margin-left: 0; gap: 14px; }
}
/* Phones: logo + Wishlist on the first row, the three links on the second. */
@media (max-width: 560px) {
  .site-header .wrap { display: grid; grid-template-columns: auto 1fr auto; gap: 10px 12px; padding-block: 10px; }
  .site-nav { display: contents; }
  .site-header .logo { grid-row: 1; grid-column: 1 / 3; align-self: center; }
  .site-nav .btn { grid-row: 1; grid-column: 3; }
  .site-nav > a:not(.btn):nth-child(1) { grid-row: 2; grid-column: 1; }
  .site-nav > a:not(.btn):nth-child(2) { grid-row: 2; grid-column: 2; justify-self: center; }
  .site-nav > a:not(.btn):nth-child(3) { grid-row: 2; grid-column: 3; justify-self: end; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shots img { transition: none; }
}

/* ── screenshot viewer ─────────────────────────────────── */
.lightbox { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; background: rgba(4,7,14,.94); }
.lightbox.open { display: grid; }
.lightbox figure { margin: 0; display: grid; gap: 12px; justify-items: center; max-width: min(92vw, 1600px); }
.lightbox img { max-width: 100%; max-height: 80vh; width: auto; border-radius: 6px; border: 1px solid var(--line); }
.lightbox figcaption { color: #c6d3e3; font-size: 15px; display: flex; gap: 18px; align-items: center; }
.lightbox button { position: absolute; background: rgba(15,22,38,.85); color: var(--fg); border: 1px solid var(--line); border-radius: 999px;
  width: 52px; height: 52px; font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lightbox button:hover { border-color: var(--accent); color: var(--accent); }
.lightbox .lb-close { top: 18px; right: 18px; }
.lightbox .lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 18px; transform: none; } }

/* ── press kit key art ─────────────────────────────────── */
.keyart { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.keyart-item { margin: 0; display: grid; gap: 8px; }
.keyart-item.wide { grid-column: 1 / -1; }
.keyart-item a { display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.keyart-item a:hover { border-color: var(--accent); }
.keyart-item figcaption { font-size: 14px; color: var(--fg); }
