@font-face { font-family: Silkscreen; src: url(fonts/Silkscreen-Regular.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: VT323; src: url(fonts/VT323-Regular.ttf) format("truetype"); font-display: swap; }

/* The game's own palette: the sky, and ui/theme.tres' panels and buttons */
:root {
  --sky: #282240;
  --sky-deep: #1c1830;
  --panel: #312a50;
  --ink: #ece9f7;
  --muted: #a59fc4;
  --line: #3d3560;
  --flame: #ff9a2e;
  --flame-hot: #ffc266;
  --ocean: #3fa3f0;
  --steam: #1b2838;
  --cream: #f2e3c0;
  --cream-ink: #3b3024;
  --cream-muted: #7a6446;
  --edge: #8a7048;
  --well: #2b293d;
  --well-hover: #3d3a54;
}
* { box-sizing: border-box; }
html { background: var(--sky-deep); scroll-behavior: smooth; }
body {
  margin: 0;
  /* Tiled from the game's own star sprites (sky/stars), one art px each */
  background: var(--sky) url(img/starfield.png) repeat;
  image-rendering: auto;
  color: var(--ink);
  font: 400 17px/1.6 Inter, system-ui, sans-serif;
}
a { color: var(--ocean); }
img { max-width: 100%; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.pixel { font-family: Silkscreen, monospace; letter-spacing: .02em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Header: the studio name, with the nav bar beneath it */
header { border-bottom: 1px solid var(--line); }
.brand { display: inline-block; padding: 22px 0 10px; font-size: 22px; color: var(--ink); text-decoration: none; }
.brand span { color: var(--flame); }
nav ul { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; padding: 0 0 14px; list-style: none; }
nav a { color: var(--muted); text-decoration: none; font-size: 13px; padding: 4px 0; border-bottom: 2px solid transparent; }
nav a:hover, nav a:focus-visible, nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--flame); }

/* Hero still */
.hero { position: relative; }
.hero img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; max-height: 72vh; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, transparent 50%, var(--sky) 100%);
}

/* The menu's NEW WORLDS title, drawn live (title-logo.js) */
.title { position: relative; z-index: 1; margin-top: -48px; text-align: center; }
.title canvas { display: block; margin: 0 auto; image-rendering: pixelated; max-width: 100%; }

/* Call-to-action buttons */
.ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 26px 0 8px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 6px; border: 2px solid var(--edge);
  font: 400 15px/1.2 Silkscreen, monospace; letter-spacing: .02em;
  color: var(--ink); background: var(--well); text-decoration: none;
  transition: transform .12s ease, background-color .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.btn:hover, .btn:focus-visible { transform: translateY(-2px); background: var(--well-hover); border-color: var(--cream); }
.btn .gi { width: 32px; height: 32px; margin: -6px 0; image-rendering: pixelated; flex: none; }
.btn:focus-visible { outline: 2px solid var(--ocean); outline-offset: 3px; }
.btn.primary { color: var(--sky-deep); background: var(--flame); border-color: var(--edge); }
.btn.primary:hover, .btn.primary:focus-visible {
  background: var(--flame-hot); border-color: var(--flame-hot);
  box-shadow: 0 0 0 4px rgb(255 154 46 / .25), 0 8px 28px rgb(255 154 46 / .35);
}
.btn.steam { background: var(--steam); border-color: #2a475e; }
.btn.steam:hover, .btn.steam:focus-visible { border-color: #66c0f4; }
.btn small { display: block; font: 400 11px/1.2 Inter, system-ui, sans-serif; letter-spacing: 0; opacity: .8; }
.icon { width: 20px; height: 20px; flex: none; background: currentColor;
        -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; }

/* Feature rows: a still beside each part of the pitch, sides alternating */
.features { margin: 72px auto; display: grid; gap: 72px; }
.feature { display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px; align-items: center; }
.feature.flip .shot { order: 2; }
.feature .shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9;
               border: 1px solid var(--line); border-radius: 6px; }
.feature h2, .spread h2 { display: flex; align-items: center; gap: 14px;
                         margin: 0 0 10px; font-size: 22px; line-height: 1.2; color: var(--flame); }
.spread h2 { justify-content: center; }
.hicon { width: 48px; height: 48px; image-rendering: pixelated; flex: none; }
.feature p { margin: 0; }

/* Full-width spreads for the menu panels: text above, the still edge to
   edge, faded into the sky top and bottom like the hero */
.spread { margin: 24px 0 72px; }
.spread .wrap { text-align: center; }
.spread p { margin: 0 auto 8px; max-width: 64ch; }
.wide-shot { position: relative; margin: 0; }
.wide-shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.wide-shot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, var(--sky) 0%, transparent 18%, transparent 82%, var(--sky) 100%);
}
.wide-shot.placeholder { display: grid; place-items: center; aspect-ratio: 16 / 9; width: min(640px, calc(100% - 32px));
                         margin: 0 auto; border: 2px dashed var(--line); border-radius: 8px;
                         color: var(--muted); font-size: 14px; text-align: center; padding: 16px; }
.wide-shot.placeholder::after { content: none; }

/* The fleet: hull sprites at one shared scale (2 CSS px per texel), noses up */
.fleet { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 22px; margin: 22px 0 0; padding: 0; list-style: none; }
.fleet li { display: flex; flex-direction: column; align-items: center; gap: 6px;
            font: 400 20px/1 VT323, monospace; color: var(--muted); }
.fleet img { image-rendering: pixelated; }

/* Screenshot gallery */
.gallery-band { padding: 8px 0 64px; }
.gallery-band h2 { display: flex; align-items: center; justify-content: center; gap: 14px;
                   margin: 0 0 24px; font-size: 22px; color: var(--flame); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.gallery a { display: block; border: 2px solid var(--edge); border-radius: 6px; overflow: hidden;
             transition: transform .12s ease, border-color .12s ease; }
.gallery a:hover, .gallery a:focus-visible { transform: translateY(-2px); border-color: var(--cream); }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.gallery span { display: block; margin-top: 8px; font: 400 20px/1.1 VT323, monospace; color: var(--muted); }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }

/* Demo + follow bands */
.band { border-top: 1px solid var(--line); padding: 56px 0; text-align: center; }
.band h2 { margin: 0 0 12px; font-size: 26px; }
.band p { margin: 0 auto 8px; max-width: 64ch; }
.band .muted { color: var(--muted); }
.follow { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.follow .btn { padding: 10px 16px; font-size: 13px; }

.full-features { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px;
                 margin: 28px 0 8px; padding: 0; list-style: none; }
.full-features li { display: flex; flex-direction: column; align-items: center; gap: 10px;
                    width: 200px; padding: 20px 16px; border: 2px solid var(--edge);
                    border-radius: 6px; background: var(--cream); color: var(--cream-ink); }
.full-features img { width: 48px; height: 48px; image-rendering: pixelated; }
.full-features span { font: 400 28px/1 VT323, monospace; }

/* Releases page */
.page { padding: 48px 0 64px; }
.page h1 { font-size: 34px; margin: 0 0 8px; }
.page .lede { color: var(--muted); margin: 0 0 32px; }
.release { border: 2px solid var(--edge); border-radius: 6px; padding: 22px 24px; margin-bottom: 18px;
           background: var(--cream); color: var(--cream-ink); }
.release th { color: var(--cream-muted); }
.release th, .release td { border-bottom-color: #d9c79f; }
.release table { font: 400 22px/1.2 VT323, monospace; }
.release h2 { margin: 0 0 6px; font-size: 20px; }
.release .tag { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 4px; font-size: 12px; vertical-align: middle;
                color: var(--sky-deep); background: var(--flame); }
.release .tag.soon { background: var(--muted); }
.release p { margin: 0 0 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
td:last-child, th:last-child { text-align: right; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

@media (max-width: 760px) {
  .title { margin-top: -20px; }
  .features { gap: 48px; margin: 48px auto; }
  .feature { grid-template-columns: 1fr; gap: 16px; }
  .feature.flip .shot { order: 0; }
  .btn { width: 100%; justify-content: center; }
  .follow .btn { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover, .btn:focus-visible { transform: none; }
}
