:root {
  /* Color tokens (--bg, --gold, …) come from /theme.css, which is generated from
     src/_data/theme.json. Edit colors there, not here. Layout tokens live below. */
  --max: 1080px;
  --wide: 1280px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand { font-family: "Cinzel", serif; letter-spacing: 0.03em; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-bright); }

/* Links inline within body copy must be distinguishable without relying on color
   alone (WCAG 1.4.1) — underline them. Nav, brand and buttons opt out below. */
p a { text-decoration: underline; text-underline-offset: 2px; }

/* Centered, width-capped inner wrapper for full-bleed sections. */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 2rem; }
.wrap-wide { max-width: var(--wide); margin: 0 auto; padding: 0 2rem; }

img { max-width: 100%; display: block; }

/* ── Nav ──────────────────────────────────────────────────────────────── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 2rem; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(14,15,18,0.9);
  backdrop-filter: blur(8px); z-index: 10;
}
.brand {
  font-weight: 700; color: var(--gold); font-size: 1.05rem;
  display: inline-flex; align-items: center; gap: 0.6rem;
}
.brand:hover { color: var(--gold-bright); }
.brand img { width: 32px; height: 32px; }
.nav nav { display: flex; gap: 1.4rem; align-items: center; flex-wrap: wrap; }
.nav nav a { color: var(--muted); font-size: 0.95rem; }
.nav nav a:hover { color: var(--ink); }
.nav nav a.cta {
  color: var(--bg); background: var(--gold); padding: 0.45rem 0.9rem;
  border-radius: 6px; font-weight: 600;
}
.nav nav a.cta:hover { background: var(--gold-bright); }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-block; padding: 0.7rem 1.4rem; border-radius: 7px;
  font-weight: 600; transition: transform 0.1s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--gold); color: var(--bg); }
.btn-primary:hover { background: var(--gold-bright); color: var(--bg); }
.btn-ghost { border: 1px solid var(--gold-dim); color: var(--gold); }
.btn-ghost:hover { border-color: var(--gold); }
.btn-lg { font-size: 1.1rem; padding: 0.9rem 2rem; }

.kicker {
  text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.8rem;
  font-weight: 600; color: var(--gold); margin-bottom: 1rem;
}

/* ── Hero (full-bleed banner) ─────────────────────────────────────────── */
.hero {
  text-align: center; padding: 7rem 0 5.5rem;
  /* Dark elevation map (from the game's own map data) under a scrim so the
     light hero text keeps strong contrast. */
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--bg) 70%, transparent) 0%,
      color-mix(in srgb, var(--bg) 94%, transparent) 100%),
    url("/assets/hero-bg.jpg") center / cover no-repeat,
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero-logo { width: 150px; height: auto; margin: 0 auto 1.4rem; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.12; }
.tagline {
  color: var(--muted); max-width: 660px; margin: 1.4rem auto 2.2rem;
  font-size: 1.15rem;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-note { color: var(--muted); font-size: 0.9rem; margin-top: 1.4rem; }

/* ── Generic content block ────────────────────────────────────────────── */
.block { padding: 4rem 0; border-top: 1px solid var(--line); }
.block h2 { font-size: 1.8rem; color: var(--gold); margin-bottom: 1.2rem; }
.block > .wrap > p, .block > .wrap > .lead { color: var(--ink); max-width: 720px; }
.section-intro { color: var(--muted); max-width: 720px; margin-bottom: 0.5rem; }

/* ── Featured band (image + copy) ─────────────────────────────────────── */
.featured { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: center; }
.featured .media {
  aspect-ratio: 16 / 10; border-radius: 12px; border: 1px solid var(--line);
  overflow: hidden; background: var(--bg-elev);
}
.featured .media img { width: 100%; height: 100%; object-fit: cover; }
.featured h2 { margin-bottom: 0.8rem; }
.featured .btn { margin-top: 1.3rem; }

/* ── Cards grid (pillars) ─────────────────────────────────────────────── */
.grid {
  display: grid; gap: 1.2rem; margin-top: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.card {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 10px; padding: 1.4rem;
}
.card .icon {
  width: 40px; height: 40px; border-radius: 8px; margin-bottom: 0.9rem;
  background: linear-gradient(135deg, var(--gold-dim), #3a3118);
  border: 1px solid var(--gold-dim);
}
.card h3 { color: var(--gold); font-size: 1.1rem; margin-bottom: 0.5rem; }
.card p { color: var(--muted); font-size: 0.95rem; }

/* ── Screenshot gallery ───────────────────────────────────────────────── */
.gallery {
  display: grid; gap: 0.8rem; margin-top: 1.5rem;
  grid-template-columns: repeat(3, 1fr);
}
.gallery .shot {
  position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-elev); margin: 0;
}
.gallery .shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery .shot figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0.5rem 0.7rem; font-size: 0.8rem; color: var(--ink);
  background: linear-gradient(0deg, color-mix(in srgb, var(--bg) 88%, transparent), transparent);
}

/* ── Dev-diary teaser + blog list ─────────────────────────────────────── */
.diaries { display: grid; gap: 1.2rem; margin: 1.5rem 0;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.diary-card {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 10px; padding: 1.3rem; display: flex; flex-direction: column;
}
.diary-card time { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.diary-card h3 { font-size: 1.15rem; margin: 0.4rem 0 0.6rem; }
.diary-card h3 a { color: var(--ink); }
.diary-card h3 a:hover { color: var(--gold); }
.diary-card p { color: var(--muted); font-size: 0.95rem; flex: 1; }
.diary-card .more { margin-top: 0.9rem; font-size: 0.9rem; font-weight: 600; }

.post-list { list-style: none; }
.post-list li { padding: 1.4rem 0; border-top: 1px solid var(--line); }
.post-list li:first-child { border-top: 0; }
.post-list time { color: var(--muted); font-size: 0.85rem; }
.post-list h2 { font-size: 1.3rem; margin: 0.3rem 0; }
.post-list h2 a { color: var(--ink); }
.post-list h2 a:hover { color: var(--gold); }
.post-list p { color: var(--muted); }

/* ── Single post ──────────────────────────────────────────────────────── */
.post { max-width: 760px; }
.post .post-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.4rem; }
.post h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.15; margin-bottom: 1.4rem; }
.post-body > * + * { margin-top: 1.1rem; }
.post-body h2 { font-size: 1.4rem; color: var(--gold); margin-top: 2rem; }
.post-body h3 { font-size: 1.15rem; color: var(--gold); margin-top: 1.5rem; }
.post-body ul, .post-body ol { padding-left: 1.4rem; color: var(--ink); }
.post-body blockquote {
  border-left: 3px solid var(--gold-dim); padding-left: 1rem; color: var(--muted);
}
.post-nav { margin-top: 2.5rem; }

/* ── Buy / support ────────────────────────────────────────────────────── */
.buy { text-align: center; }
.buy h2 { display: inline-block; }
.buy .btn { margin: 1.5rem 0 1rem; }
.fineprint { color: var(--muted); font-size: 0.9rem; }

/* ── Newsletter stub ──────────────────────────────────────────────────── */
.newsletter { text-align: center; background: var(--bg-elev); }
.newsletter form {
  display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap;
  margin: 1.4rem auto 0.6rem; max-width: 520px;
}
.newsletter label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.newsletter input[type="email"] {
  flex: 1; min-width: 220px; padding: 0.7rem 1rem; border-radius: 7px;
  background: var(--bg); border: 1px solid var(--line); color: var(--ink);
  font-size: 1rem;
}
.newsletter input[type="email"]:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.newsletter .form-note { color: var(--muted); font-size: 0.85rem; min-height: 1.2em; }

/* ── Footer ───────────────────────────────────────────────────────────── */
footer {
  color: var(--muted); font-size: 0.9rem;
  padding: 3rem 0 2.5rem; border-top: 1px solid var(--line); margin-top: 2rem;
}
.footer-grid { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.footer-brand { font-family: "Cinzel", serif; color: var(--gold); font-weight: 700; }
.footer-links { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-links h4 { color: var(--ink); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.6rem; }
.footer-links ul { list-style: none; }
.footer-links li { margin: 0.3rem 0; }
.footer-copy { margin-top: 2rem; font-size: 0.82rem; color: var(--muted); }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .featured { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 4.5rem 0 3.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
}
