/* Altair Alpha Games — site styles. No build step; edit directly. */

:root {
  --night: #070a1c;          /* page background; the banner fades into this */
  --night-2: #0d1230;        /* raised panels */
  --night-3: #161c44;        /* borders, rules */
  --text: #e6dff0;
  --muted: #b3abc4;
  --gold: #d8a038;
  --gold-hi: #f0c060;
  --star: #f4f8ff;
  --glow: #8fb4ff;
  --tarazed: #ffb060;
  --alshain: #ffe6a8;

  /* VIGIL */
  --v-bg: #0e0814;
  --v-bg-2: #1a0f22;
  --v-line: #3a2040;
  --crimson: #c8283c;
  --crimson-hi: #e8485a;

  --wrap: 68rem;
  --radius: 4px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background-color: var(--night);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

/* ---------- Starfield (pure CSS, fixed behind the page) ---------- */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--night);
  background-image:
    radial-gradient(1px 1px at 12% 18%, var(--star) 50%, transparent 51%),
    radial-gradient(1px 1px at 27% 72%, var(--glow) 50%, transparent 51%),
    radial-gradient(1px 1px at 41% 33%, var(--star) 50%, transparent 51%),
    radial-gradient(1px 1px at 58% 84%, var(--star) 50%, transparent 51%),
    radial-gradient(1px 1px at 66% 12%, var(--glow) 50%, transparent 51%),
    radial-gradient(1px 1px at 79% 56%, var(--star) 50%, transparent 51%),
    radial-gradient(1px 1px at 91% 27%, var(--star) 50%, transparent 51%),
    radial-gradient(1px 1px at 6% 91%, var(--glow) 50%, transparent 51%),
    radial-gradient(1px 1px at 35% 48%, var(--alshain) 50%, transparent 51%),
    radial-gradient(1px 1px at 87% 79%, var(--tarazed) 50%, transparent 51%);
  background-size: 340px 340px, 410px 410px, 290px 290px, 520px 520px, 380px 380px,
                   460px 460px, 310px 310px, 560px 560px, 640px 640px, 700px 700px;
}
.sky::after {
  /* a second, slower layer that twinkles very gently */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 22% 40%, var(--star) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 73% 22%, var(--star) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 48% 77%, var(--glow) 50%, transparent 51%);
  background-size: 600px 600px, 740px 740px, 820px 820px;
  animation: twinkle 7s ease-in-out infinite alternate;
}
@keyframes twinkle {
  from { opacity: 0.35; }
  to   { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .sky::after { animation: none; opacity: 0.7; }
}

/* ---------- Base ---------- */
img { max-width: 100%; height: auto; display: block; }
/* Pixel art: never smooth. crisp-edges is the Firefox fallback; pixelated wins where supported. */
.pixel { image-rendering: crisp-edges; image-rendering: pixelated; }

a { color: var(--gold-hi); text-underline-offset: 0.18em; }
a:hover { color: var(--alshain); }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; }
h2 {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 1.15rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}
h3 { color: var(--text); font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }
li { margin-bottom: 0.35em; }
code { font-family: var(--mono); font-size: 0.9em; background: rgba(255,255,255,0.06); padding: 0.1em 0.35em; border-radius: 3px; word-break: break-word; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 40rem) { .wrap { padding: 0 1.5rem; } }

.skip {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--gold); color: var(--night); padding: 0.5rem 0.9rem; z-index: 10; font-weight: 600;
}
.skip:focus { left: 0.5rem; }

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

/* ---------- Header / nav ---------- */
.site-header {
  border-bottom: 1px solid var(--night-3);
  background: rgba(7, 10, 28, 0.85);
  backdrop-filter: blur(4px);
  position: sticky; top: 0; z-index: 5;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 3.5rem; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--text); text-decoration: none;
  font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase;
}
.brand img { width: 32px; height: 32px; border-radius: 3px; }
.brand span b { color: var(--gold); font-weight: 600; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.1rem; flex-wrap: wrap; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-size: 0.9rem; letter-spacing: 0.06em;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--gold-hi); }

/* ---------- Sections ---------- */
section { padding: 3.5rem 0; }
section + section { border-top: 1px solid var(--night-3); }
.lede { font-size: 1.15rem; color: var(--text); max-width: 40rem; }
.muted { color: var(--muted); }

/* ---------- Hero ---------- */
.hero { padding: 2.5rem 0 3rem; text-align: center; }
.hero-banner { margin: 0 auto 1.75rem; width: 960px; max-width: 100%; }
.hero .lede { margin: 0 auto 1.75rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--mono); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  border: 2px solid var(--gold);
  background: var(--gold); color: var(--night);
  box-shadow: 0 0 0 0 transparent;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}
.btn:hover { background: var(--gold-hi); border-color: var(--gold-hi); color: var(--night); box-shadow: 0 0 18px rgba(216,160,56,0.35); }
.btn.ghost { background: transparent; color: var(--gold-hi); }
.btn.ghost:hover { background: rgba(216,160,56,0.12); color: var(--alshain); }
.btn.crimson { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.btn.crimson:hover { background: var(--crimson-hi); border-color: var(--crimson-hi); color: #fff; box-shadow: 0 0 18px rgba(200,40,60,0.4); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.actions.left { justify-content: flex-start; }

/* ---------- Game card (home page) ---------- */
.game-card {
  display: grid; gap: 1.5rem;
  background: linear-gradient(180deg, var(--v-bg-2), var(--v-bg));
  border: 1px solid var(--v-line);
  border-radius: 6px;
  padding: 1rem;
}
@media (min-width: 52rem) {
  .game-card { grid-template-columns: 315px 1fr; padding: 1.5rem; align-items: start; }
}
.game-card .cover { border-radius: 3px; border: 1px solid var(--v-line); width: 630px; }
@media (min-width: 52rem) { .game-card .cover { width: 315px; } }
.game-card h3 { color: var(--crimson-hi); font-size: 1.5rem; margin-bottom: 0.2em; }
.game-card h3 .kicker { display: block; color: var(--gold); font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.4em; margin-bottom: 0.3em; }
.tags { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tags li { margin: 0; font-size: 0.78rem; font-family: var(--mono); color: var(--muted); border: 1px solid var(--v-line); border-radius: 3px; padding: 0.1rem 0.5rem; }

.sequel {
  margin-top: 1.5rem;
  border: 1px dashed var(--night-3);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  color: var(--muted);
}
.sequel strong { color: var(--text); }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 2rem; }
@media (min-width: 52rem) { .about-grid { grid-template-columns: 1fr 220px; align-items: start; } }
.about-grid figure { margin: 0; text-align: center; }
.about-grid figure img { width: 128px; margin: 0 auto 0.5rem; border-radius: 4px; }
@media (min-width: 52rem) { .about-grid figure img { width: 192px; } }
.about-grid figcaption { font-size: 0.85rem; color: var(--muted); }
.star-names { list-style: none; padding: 0; }
.star-names li::before { content: "\2726"; margin-right: 0.5em; }
.star-names .altair::before { color: var(--star); text-shadow: 0 0 6px var(--glow); }
.star-names .tarazed::before { color: var(--tarazed); }
.star-names .alshain::before { color: var(--alshain); }

/* ---------- VIGIL page ---------- */
body.vigil { background-color: var(--v-bg); }
body.vigil .sky { background-color: var(--v-bg); opacity: 0.6; }
body.vigil section + section { border-top-color: var(--v-line); }
body.vigil .site-header { background: rgba(14, 8, 20, 0.88); border-bottom-color: var(--v-line); }
body.vigil h2 { color: var(--gold); }

.vigil-hero { padding: 2rem 0 2.5rem; text-align: center; }
.vigil-hero h1 { margin: 0; }
.vigil-hero h1 img { width: 960px; margin: 0 auto; }
.vigil-hero .tagline { font-size: 1.15rem; max-width: 38rem; margin: 1.25rem auto 1.5rem; }
.price-note { font-size: 0.9rem; color: var(--muted); margin-top: 0.9rem; }

.two-col { display: grid; gap: 2rem; }
@media (min-width: 56rem) { .two-col { grid-template-columns: 1fr 1fr; align-items: start; } }

.clip { margin: 0; }
.clip img { width: 864px; border: 1px solid var(--v-line); border-radius: 3px; margin: 0 auto; background: #000; }
.clip figcaption { text-align: center; font-size: 0.9rem; color: var(--muted); margin-top: 0.6rem; }

.shots { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
@media (min-width: 36rem) { .shots { grid-template-columns: 1fr 1fr; } }
@media (min-width: 60rem) { .shots { grid-template-columns: 1fr 1fr 1fr; } }
.shots li { margin: 0; }
.shots a { display: block; border: 1px solid var(--v-line); border-radius: 3px; overflow: hidden; }
.shots a:hover, .shots a:focus-visible { border-color: var(--gold); }
.shots img { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.shots figcaption { font-size: 0.85rem; color: var(--muted); padding: 0.35rem 0.1rem 0; }
.shots figure { margin: 0; }

.feature-list li strong { color: var(--alshain); }

table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--v-line); }
thead th { color: var(--gold); font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; }
tbody th { font-weight: 500; color: var(--muted); }
.table-scroll { overflow-x: auto; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1.25rem; margin: 0 0 1rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
@media (max-width: 30rem) { .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: 0.5rem; } }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--night-3);
  padding: 2.5rem 0 3rem;
  font-size: 0.95rem;
  color: var(--muted);
}
body.vigil .site-footer { border-top-color: var(--v-line); }
.site-footer .wrap { display: grid; gap: 1.5rem; }
@media (min-width: 48rem) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: end; } }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.site-footer p { margin: 0.25rem 0; }

/* Grid children default to min-width:auto, which lets a wide image push a
   one-column grid past the screen on phones. Let them shrink. */
.game-card > *, .two-col > *, .about-grid > *, .site-footer .wrap > *, .shots > li { min-width: 0; }
