:root {
  --bg: #12100f;
  --bg-raised: #1c1917;
  --bg-sunken: #0c0b0a;
  --line: #3a3330;
  --text: #e9dccb;
  --muted: #a89a88;
  --gold: #f5b460;
  --gold-soft: #f5c98f;
  --crimson: #790928;
  --crimson-hi: #9a1238;
  --frost: #7fb4d6;
  --moss: #8fbf6a;
  --radius: 10px;
  --max: 1120px;
  --font-display: "Cinzel", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-soft); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--gold);
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 .6em;
  letter-spacing: .01em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; margin-top: 1.4em; }
p { margin: 0 0 1em; }
b, strong { color: var(--gold-soft); font-weight: 600; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(18, 16, 15, .88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px; flex-wrap: wrap;
}
.brand {
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  color: var(--gold); text-decoration: none; letter-spacing: .04em;
  display: flex; align-items: center; gap: 10px;
}
.brand-mark { width: 26px; height: 26px; }
.site-nav { display: flex; gap: 4px 20px; flex-wrap: wrap; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-size: .95rem; padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--crimson-hi); }
@media (max-width: 560px) {
  .site-header .wrap { padding-top: 10px; padding-bottom: 10px; }
}

/* Hero */
.hero {
  padding: 88px 0 64px;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(121, 9, 40, .55), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.hero p.lede { font-size: 1.2rem; color: var(--muted); max-width: 640px; margin: 0 auto; }
.eyebrow {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .18em;
  color: var(--muted); margin-bottom: 14px; display: block;
}

/* Game cards (landing) */
.games { padding: 64px 0 24px; display: grid; gap: 24px; }
@media (min-width: 900px) { .games { grid-template-columns: repeat(3, 1fr); } }
.game-card {
  --accent: var(--gold);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  display: flex; flex-direction: column;
}
.game-card h2 { font-size: 1.6rem; color: var(--accent); margin-bottom: .3em; }
.game-card .tagline { color: var(--muted); font-style: italic; margin-bottom: 1em; }
.game-card .actions { margin-top: auto; padding-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.game-card.edge { --accent: var(--gold); }
.game-card.dungeons { --accent: var(--frost); }
.game-card.survival { --accent: var(--moss); }

.status {
  display: inline-block; font-size: .75rem; text-transform: uppercase; letter-spacing: .12em;
  padding: 3px 10px; border-radius: 999px; border: 1px solid currentColor;
  color: var(--accent, var(--gold)); margin-bottom: 14px; align-self: flex-start;
}

/* Game detail sections (landing) */
.game-section { padding: 56px 0; border-top: 1px solid var(--line); }
.game-section .grid { display: grid; gap: 32px; }
@media (min-width: 860px) { .game-section .grid { grid-template-columns: 3fr 2fr; } }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.facts li {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px;
}
.facts li strong { display: block; font-family: var(--font-display); color: var(--accent, var(--gold)); }
.game-section.dungeons { --accent: var(--frost); }
.game-section.survival { --accent: var(--moss); }
.game-section.edge { --accent: var(--gold); }
.game-section h2 { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 8px;
  font-weight: 600; text-decoration: none; font-size: 1rem;
  background: var(--crimson); color: var(--gold);
  border: 1px solid var(--crimson-hi);
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--crimson-hi); color: var(--gold-soft); transform: translateY(-1px); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn.big { padding: 14px 26px; font-size: 1.1rem; }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

.downloads { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 28px 0 0; }
.note { color: var(--muted); font-size: .9rem; margin-top: 12px; }

/* Article (Realm's Edge page) */
.intro {
  background: var(--bg-raised); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: var(--radius); padding: 24px 28px; margin: 40px 0;
}
.video {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-sunken); margin: 0 0 24px;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.toc {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none;
}
.toc a {
  display: block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  text-decoration: none; color: var(--muted); font-size: .9rem;
}
.toc a:hover { color: var(--gold); border-color: var(--gold); }

.feature { padding: 48px 0; border-top: 1px solid var(--line); }
.feature .grid { display: grid; gap: 32px; align-items: start; }
@media (min-width: 860px) { .feature .grid { grid-template-columns: 1fr 340px; } }
.feature figure { margin: 0; display: grid; gap: 16px; }
.shot {
  display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--bg-sunken); transition: border-color .15s;
}
.shot:hover { border-color: var(--gold); }
.feature figcaption { color: var(--muted); font-size: .9rem; }

.missing { display: grid; gap: 16px; }
@media (min-width: 720px) { .missing { grid-template-columns: 1fr 1fr; } }
.missing div {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
}
.missing h3 { font-size: 1.1rem; margin-bottom: .4em; }
.missing p { margin: 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 48px; padding: 28px 0;
  color: var(--muted); font-size: .9rem;
}
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }
.downloads.start { justify-content: flex-start; }
