:root {
  --bg: #0c0907;
  --bg-alt: #100c09;
  --bg-deep: #090706;
  --panel: #15100c;
  --panel-hi: #1a1410;
  --panel-lo: #120d0a;
  --ink: #ece2d2;
  --heading: #f1e4cc;
  --title: #ecd3a4;
  --body: #c9bca8;
  --body-dim: #bfb29e;
  --muted: #a8977f;
  --nav: #cbbba3;
  --mono: #8a7458;
  --mono-dim: #7d6a52;
  --gold: #e0a84e;
  --gold-hi: #f6c46e;
  --gold-soft: #d9b77c;
  --ember: #f07a2a;
  --line: rgba(217, 162, 74, .28);
  --line-strong: rgba(217, 162, 74, .5);
  --wrap: 1180px;
  --gutter: 28px;
  --f-display: Cinzel, Georgia, serif;
  --f-body: Spectral, Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hi); }
a:focus-visible, .btn:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }

h1, h2, h3, p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

[id] { scroll-margin-top: 90px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(12, 9, 7, .92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.site-header .bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  gap: 12px 24px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-name { font: 700 20px var(--f-display); letter-spacing: .08em; color: #e8c07a; }

.emblem {
  width: 44px;
  height: 44px;
  display: block;
  filter: drop-shadow(0 0 6px rgba(240, 122, 42, .35));
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  column-gap: 16px;
  row-gap: 8px;
  font: 600 12px var(--f-display);
  letter-spacing: .1em;
  flex: 1 1 auto;
  white-space: nowrap;
}
.site-nav a { color: var(--nav); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--gold-hi); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  font: 700 13px var(--f-display);
  letter-spacing: .18em;
}

.btn-fire {
  background: linear-gradient(#f08a3a, #c4561a);
  color: #1a0d05;
  box-shadow: 0 0 0 1px #f6b46a inset;
}
a.btn-fire:hover { filter: brightness(1.1); color: #1a0d05; }

.btn-ghost { border: 1px solid var(--line-strong); color: #e0c28d; }
.btn-ghost:hover { background: rgba(217, 162, 74, .1); color: var(--gold-hi); }

.btn[aria-disabled="true"] { cursor: not-allowed; }

.btn-header { gap: 10px; padding: 11px 20px; font-size: 12px; letter-spacing: .16em; opacity: .6; }

.btn-download {
  flex-direction: column;
  gap: 4px;
  padding: 14px 44px;
  box-shadow: 0 0 0 1px #f6b46a inset, 0 10px 30px rgba(240, 122, 42, .3);
}
.btn-download .label { font: 700 16px var(--f-display); letter-spacing: .2em; }
.btn-download .sub { font: 11px var(--f-mono); letter-spacing: 0; color: #3a1c08; }

.btn-md { padding: 14px 28px; }
.btn-lg { padding: 16px 30px; }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ---------- Shared bits ---------- */

.eyebrow { font: 600 12px var(--f-display); letter-spacing: .3em; color: var(--ember); }
.eyebrow-sm { font: 600 11px var(--f-display); letter-spacing: .28em; color: var(--ember); }

.lead { font-size: 19px; line-height: 1.6; color: var(--body); text-wrap: pretty; }

.mono { font: 11px var(--f-mono); color: var(--mono); }

.h-xl { font: 700 48px var(--f-display); color: var(--heading); }
.h-lg { font: 700 40px/1.1 var(--f-display); color: var(--heading); text-wrap: balance; }

.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  padding: 8px 14px;
  border: 1px solid rgba(217, 162, 74, .35);
  font: 600 11px var(--f-display);
  letter-spacing: .18em;
  color: var(--gold-soft);
}

/* Striped placeholder panels for art that hasn't been made yet */
.ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 12px;
  background: repeating-linear-gradient(135deg, #17110d 0 10px, #1d1611 10px 20px);
  font: 12px var(--f-mono);
  color: #9a8466;
}
.ph-framed { border: 1px solid rgba(217, 162, 74, .35); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.ph-16x9 { aspect-ratio: 16 / 9; }
.ph-4x3 { aspect-ratio: 4 / 3; }
.ph-3x4 { aspect-ratio: 3 / 4; }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 56px;
  align-items: center;
}

.stack { display: flex; flex-direction: column; gap: 20px; }

/* ---------- Landing ---------- */

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(217, 162, 74, .2);
}
.hero::before, .hero::after { content: ""; position: absolute; inset: 0; }
.hero::before { background: repeating-linear-gradient(135deg, #140f0c 0 14px, #18120e 14px 28px); }
.hero::after {
  background:
    radial-gradient(ellipse 50% 60% at 50% 45%, rgba(240, 110, 30, .28), transparent 70%),
    linear-gradient(transparent 55%, var(--bg));
}
.hero-note { position: absolute; z-index: 1; top: 20px; left: var(--gutter); }
.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 80px 24px;
  text-align: center;
  max-width: 900px;
}
.hero-media {
  width: min(760px, 86vw);
  border: 1px dashed rgba(217, 162, 74, .55);
  background: rgba(12, 9, 7, .55);
  color: #c9a56c;
}
.hero-media .ph-sub { color: var(--mono-dim); }
.motto { font: 600 15px var(--f-display); letter-spacing: .42em; color: var(--gold-soft); }
.pitch { font-weight: 400; font-size: 21px; line-height: 1.5; color: #d8ccb9; max-width: 620px; text-wrap: pretty; }
.platforms { font: 12px var(--f-mono); color: var(--mono); }

.about { padding-top: 110px; padding-bottom: 60px; }
.about h2 { font: 700 44px/1.1 var(--f-display); color: var(--heading); text-wrap: balance; }

.features {
  padding-top: 40px;
  padding-bottom: 110px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 20px;
}
.feature {
  padding: 32px 28px;
  background: linear-gradient(var(--panel-hi), var(--panel-lo));
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feature .num { font: 11px var(--f-mono); color: var(--ember); }
.feature h3 { font: 700 22px var(--f-display); letter-spacing: .06em; color: var(--title); }
.feature p { font-size: 17px; line-height: 1.55; color: var(--body-dim); }

.heroes-band {
  background: var(--bg-alt);
  border-top: 1px solid rgba(217, 162, 74, .18);
  border-bottom: 1px solid rgba(217, 162, 74, .18);
}
.heroes-band .wrap { padding-top: 100px; padding-bottom: 100px; display: flex; flex-direction: column; gap: 44px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.section-head .stack { gap: 14px; }
.section-link { font: 600 12px var(--f-display); letter-spacing: .2em; }

.hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 20px; }
.hero-card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(217, 162, 74, .3);
  background: #16110d;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color .15s;
}
.hero-card:hover { border-color: rgba(240, 122, 42, .8); }
.hero-card .ph { font-size: 11px; color: var(--mono); background: repeating-linear-gradient(135deg, #1b1410 0 10px, #211913 10px 20px); }
.hero-card .info { padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; border-top: 1px solid rgba(217, 162, 74, .25); }
.hero-card .name { font: 700 19px var(--f-display); color: var(--title); letter-spacing: .06em; }
.hero-card .role { font-size: 15px; color: var(--muted); }

.forge { padding-top: 110px; padding-bottom: 110px; }

.media { padding-bottom: 110px; display: flex; flex-direction: column; gap: 32px; }
.media h2 { font: 700 32px var(--f-display); color: var(--heading); }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.shots .ph { border: 1px solid rgba(217, 162, 74, .25); font-size: 11px; color: var(--mono); }

.cta {
  border-top: 1px solid rgba(217, 162, 74, .22);
  background: radial-gradient(ellipse 60% 100% at 50% 100%, rgba(240, 110, 30, .18), transparent 70%), #0e0a08;
}
.cta .wrap {
  max-width: 860px;
  padding-top: 100px;
  padding-bottom: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.cta h2 { font: 700 40px var(--f-display); color: var(--heading); }
.cta .lead { max-width: 560px; }

/* ---------- Page headers (News, Wiki) ---------- */

.page-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(217, 162, 74, .25);
}
.page-head .lead { max-width: 640px; }

/* ---------- News ---------- */

.news { padding-top: 56px; padding-bottom: 110px; display: flex; flex-direction: column; gap: 48px; }
.featured-post { color: inherit; }
.featured-post:hover { color: inherit; }
.featured-post .stack { gap: 14px; }
.featured-post h2 { font: 700 34px/1.15 var(--f-display); color: var(--heading); text-wrap: balance; }
.featured-post p { font-size: 18px; line-height: 1.6; color: var(--body-dim); }
.featured-post .read { font: 600 12px var(--f-display); letter-spacing: .2em; color: var(--gold); }
.featured-post:hover .read { color: var(--gold-hi); }
.post-meta { display: flex; gap: 12px; align-items: center; }
.tag-solid { padding: 4px 10px; background: var(--ember); color: #1a0d05; font: 700 10px var(--f-display); letter-spacing: .2em; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 22px; }
.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 4px;
  overflow: hidden;
  color: inherit;
  transition: border-color .15s;
}
.post-card:hover { border-color: rgba(240, 122, 42, .8); color: inherit; }
.post-card .ph { font-size: 11px; color: var(--mono); background: repeating-linear-gradient(135deg, #1b1410 0 10px, #211913 10px 20px); }
.post-card .body { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.post-card .meta { display: flex; justify-content: space-between; gap: 10px; }
.post-card .tag { font: 700 10px var(--f-display); letter-spacing: .2em; color: var(--ember); }
.post-card .date { font: 11px var(--f-mono); color: var(--mono-dim); }
.post-card .title { font: 700 19px/1.25 var(--f-display); color: var(--title); }

/* ---------- Wiki ---------- */

.wiki {
  max-width: 1280px;
  padding-top: 40px;
  padding-bottom: 100px;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: flex-start;
}
.wiki-side { display: flex; flex-direction: column; gap: 22px; flex: 1 1 200px; max-width: 260px; }
.wiki-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(217, 162, 74, .35);
  background: var(--panel);
  border-radius: 3px;
  font-size: 16px;
  color: #8f7d66;
}
.wiki-search::before { content: ""; width: 10px; height: 10px; border: 1.5px solid #8f7d66; border-radius: 50%; }
.wiki-group { display: flex; flex-direction: column; gap: 8px; }
.wiki-group a { font-size: 16px; color: var(--nav); padding: 3px 0; }
.wiki-group a:hover { color: var(--gold-hi); }
.wiki-main { flex: 999 1 480px; display: flex; flex-direction: column; gap: 40px; min-width: 0; }

.wiki-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.wiki-cat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(var(--panel-hi), var(--panel-lo));
  border-radius: 4px;
  color: inherit;
  transition: border-color .15s;
}
.wiki-cat:hover { border-color: rgba(240, 122, 42, .8); color: inherit; }
.wiki-cat .name { font: 700 18px var(--f-display); letter-spacing: .08em; color: var(--title); }
.wiki-cat .desc { font-size: 15px; line-height: 1.5; color: var(--muted); }
.wiki-cat .count { font: 11px var(--f-mono); color: var(--mono-dim); }

.wiki-lower { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 28px; }
.wiki-lower > div { display: flex; flex-direction: column; gap: 14px; }
.featured-article { display: flex; gap: 18px; padding: 18px; border: 1px solid var(--line); background: var(--panel); border-radius: 4px; }
.portrait {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1px dashed var(--line-strong);
  background: repeating-linear-gradient(135deg, #1b1410 0 6px, #221a14 6px 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  font: 9px var(--f-mono);
  color: var(--mono);
}
.featured-article .text { display: flex; flex-direction: column; gap: 6px; }
.featured-article .name { font: 700 20px var(--f-display); color: var(--title); }
.featured-article .role { font-size: 14px; color: #d9a24a; }
.featured-article .desc { font-size: 16px; line-height: 1.5; color: var(--body-dim); }

.changes { display: flex; flex-direction: column; border-top: 1px solid rgba(217, 162, 74, .2); }
.change { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(217, 162, 74, .14); font-size: 16px; }
.change a { color: #d8ccb9; }
.change a:hover { color: var(--gold-hi); }
.change .when { font: 11px var(--f-mono); color: var(--mono-dim); white-space: nowrap; }

/* ---------- 404 ---------- */

.lost { padding-top: 120px; padding-bottom: 120px; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid rgba(217, 162, 74, .25); background: var(--bg-deep); }
.site-footer .bar {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px var(--gutter);
  display: flex;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  align-items: center;
}
.footer-brand { font: 700 16px var(--f-display); letter-spacing: .1em; color: #b99a66; }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; font-size: 15px; }
.footer-nav a { color: #9d8d76; }
.footer-nav a:hover { color: var(--gold-hi); }
.copyright { font: 11px var(--f-mono); color: #6f604e; }

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .about h2 { font-size: 34px; }
  .h-lg, .cta h2 { font-size: 32px; }
  .h-xl { font-size: 38px; }
  .featured-post h2 { font-size: 28px; }
  .motto { letter-spacing: .28em; }
  .pitch { font-size: 19px; }
  .btn-header { padding: 10px 14px; }
  .wiki-side { max-width: none; }
}

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