:root {
  --bg: #080706;
  --bg-2: #12100d;
  --panel: rgba(25, 20, 15, 0.86);
  --panel-2: rgba(42, 33, 24, 0.82);
  --gold: #d6a94b;
  --gold-2: #f0d18a;
  --crimson: #8c1f25;
  --crimson-2: #c13b3c;
  --steel: #6f7f8e;
  --text: #f2e7d1;
  --muted: #b9a889;
  --line: rgba(214, 169, 75, 0.22);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(140, 31, 37, 0.22), transparent 36rem),
    radial-gradient(circle at 80% 16%, rgba(214, 169, 75, 0.13), transparent 28rem),
    linear-gradient(180deg, #090706 0%, #14100d 45%, #070605 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 8px 8px;
  mix-blend-mode: overlay;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: min(calc(100% - 32px), var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(8, 7, 6, 0.74);
  border-bottom: 1px solid var(--line);
}

.nav {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), 0 0 26px rgba(214,169,75,0.16);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active { color: var(--gold-2); }

.nav-toggle { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.03em;
  border: 1px solid rgba(240, 209, 138, 0.38);
  background: linear-gradient(180deg, #a7292d, #6e151b);
  color: #fff7df;
  box-shadow: inset 0 1px rgba(255,255,255,0.18), 0 10px 30px rgba(140,31,37,0.3);
  cursor: pointer;
}

.btn:hover { transform: translateY(-1px); }
.btn.secondary {
  background: rgba(255,255,255,0.04);
  color: var(--gold-2);
  border-color: var(--line);
  box-shadow: none;
}

.hero {
  position: relative;
  min-height: calc(100vh - 74px);
  display: grid;
  align-items: center;
  padding: 84px 0 70px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8,7,6,0.97) 0%, rgba(8,7,6,0.82) 48%, rgba(8,7,6,0.5) 100%),
    linear-gradient(0deg, rgba(8,7,6,0.95) 0%, transparent 38%),
    url('../img/game/faction-human.webp') center 22%/cover no-repeat;
  opacity: 0.9;
}

.hero > .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-2);
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.28);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1, h2, h3 {
  font-family: Cinzel, Georgia, serif;
  line-height: 1.05;
  margin: 0 0 18px;
}

h1 {
  font-size: clamp(3.1rem, 8vw, 7.4rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 0 6px 0 rgba(0,0,0,0.22), 0 0 44px rgba(214,169,75,0.14);
}

h2 { font-size: clamp(2.15rem, 4.8vw, 4.2rem); }
h3 { font-size: 1.45rem; }

.hero-logo {
  margin: 6px 0 18px;
  line-height: 0;
}
.hero-logo img {
  width: min(580px, 100%);
  height: auto;
  filter: drop-shadow(0 14px 44px rgba(0,0,0,0.65));
}

.lead {
  color: #e7d7b8;
  max-width: 680px;
  font-size: clamp(1.05rem, 2.2vw, 1.32rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(42,33,24,0.76), rgba(12,10,8,0.78));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.board-preview {
  aspect-ratio: 1;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 0%, rgba(214,169,75,0.17), transparent 50%),
    linear-gradient(180deg, rgba(0,0,0,0.1), rgba(0,0,0,0.38));
}

.board {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  border: 5px solid #4a321d;
  box-shadow: inset 0 0 0 2px rgba(240,209,138,0.25), 0 20px 45px rgba(0,0,0,0.38);
  transform: rotate(-1.2deg);
}

/* Proper 8-wide checkerboard: light squares repeat on a 16-cell period. */
.square { background: #2c2319; }
.square:nth-child(16n+1), .square:nth-child(16n+3), .square:nth-child(16n+5), .square:nth-child(16n+7),
.square:nth-child(16n+10), .square:nth-child(16n+12), .square:nth-child(16n+14), .square:nth-child(16n+16) { background: #77502c; }
.square.has-piece::after {
  content: "";
  width: 52%;
  height: 52%;
  border-radius: 50%;
  display: block;
  margin: 24%;
  background: radial-gradient(circle at 35% 20%, #fff1b9, var(--gold) 38%, #5d3515 70%);
  box-shadow: 0 8px 0 rgba(0,0,0,0.3);
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.stat {
  padding: 18px;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: 0; }
.stat strong { display:block; font-size: 1.35rem; color: var(--gold-2); }
.stat span { color: var(--muted); font-size: 0.86rem; }

.section { padding: 90px 0; position: relative; }
.section.alt { background: rgba(0,0,0,0.2); border-block: 1px solid rgba(214,169,75,0.12); }
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin-bottom: 34px;
}
.section-head p { max-width: 620px; color: var(--muted); margin: 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  background: linear-gradient(180deg, var(--panel), rgba(12,10,8,0.82));
  box-shadow: 0 14px 38px rgba(0,0,0,0.2);
}
.card p { color: var(--muted); margin-bottom: 0; }
.card .icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  background: rgba(214,169,75,0.12);
  border: 1px solid var(--line);
  color: var(--gold-2);
  font-weight: 950;
}

.faction-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.faction-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #1a1510;
  box-shadow: var(--shadow);
}
.faction-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--art) center top/cover no-repeat;
  opacity: 0.9;
  transition: transform 0.3s ease;
}
.faction-card:hover::before { transform: scale(1.05); }

.faction-portrait {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  z-index: 2;
  background: rgba(8,7,6,0.6);
  border: 2px solid rgba(240,209,138,0.7);
  box-shadow: 0 6px 20px rgba(0,0,0,0.55);
}
.faction-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 10%, rgba(0,0,0,0.28) 45%, rgba(0,0,0,0.88) 100%);
}
.faction-content {
  position: relative;
  z-index: 1;
  padding: 24px;
}
.faction-content p { color: #d8c7a9; margin-bottom: 0; }

.timeline {
  display: grid;
  gap: 14px;
  counter-reset: step;
}
.step {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 18px;
  align-items: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  width: 58px;
  height: 58px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 950;
  color: var(--gold-2);
  border: 1px solid var(--line);
  background: rgba(214,169,75,0.09);
}
.step p { color: var(--muted); margin: 0; }

.gallery {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 18px;
}
.shot {
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, transparent 55%, rgba(8,7,6,0.5) 100%),
    var(--shot, linear-gradient(135deg, rgba(140,31,37,0.35), rgba(214,169,75,0.08))) center top/cover no-repeat;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}
.shot:hover { transform: translateY(-3px); }
.shot.large { grid-row: span 2; min-height: 500px; }

.cta-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: clamp(28px, 5vw, 54px);
  border: 1px solid rgba(240,209,138,0.34);
  border-radius: 28px;
  background:
    radial-gradient(circle at 84% 10%, rgba(214,169,75,0.18), transparent 26rem),
    linear-gradient(135deg, rgba(140,31,37,0.46), rgba(17,13,10,0.92));
  box-shadow: var(--shadow);
}
.cta-panel p { color: #eadcc0; max-width: 720px; }

.waitlist-form {
  display: flex;
  gap: 10px;
  min-width: min(100%, 470px);
}
.input {
  flex: 1;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,0.35);
  color: var(--text);
  padding: 0 18px;
  outline: none;
}
.input::placeholder { color: #8f8068; }

/* Waitlist polish: status text drops to its own full-width line under the field. */
.waitlist-form { flex-wrap: wrap; }
.waitlist-form [data-form-status] { flex-basis: 100%; margin-top: 2px; min-height: 1.1em; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }

/* Store badges (Steam / Google Play / App Store) */
.stores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.store {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel), rgba(12,10,8,0.82));
  box-shadow: 0 14px 38px rgba(0,0,0,0.2);
}
.store[aria-disabled="true"] { cursor: default; }
.store-icon {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--gold-2);
  background: rgba(214,169,75,0.12);
  border: 1px solid var(--line);
}
.store-text { display: flex; flex-direction: column; line-height: 1.18; min-width: 0; }
.store-kicker { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.07em; text-transform: uppercase; }
.store-text strong { font-family: Cinzel, Georgia, serif; font-size: 1.3rem; }
.store-badge {
  margin-left: auto;
  white-space: nowrap;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(0,0,0,0.3);
}

.page-hero {
  padding: 90px 0 50px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(8,7,6,0.95), rgba(8,7,6,0.6)),
    linear-gradient(0deg, rgba(8,7,6,0.85) 0%, transparent 50%),
    url('../img/game/faction-elf.webp') center 18%/cover no-repeat;
}
.page-hero p { max-width: 760px; color: #e0cfad; font-size: 1.18rem; }

.content {
  padding: 70px 0;
}
.prose {
  max-width: 820px;
  color: #dfd0b5;
}
.prose h2 { margin-top: 44px; font-size: 2rem; }
.prose p, .prose li { color: var(--muted); }
.prose a { color: var(--gold-2); text-decoration: underline; text-underline-offset: 4px; }

.press-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.kit-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--panel);
}
.kit-box p { color: var(--muted); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 38px 0;
  color: var(--muted);
  background: rgba(0,0,0,0.22);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-links { display: flex; gap: 18px; }
.footer-links a:hover { color: var(--gold-2); }

@media (max-width: 920px) {
  .hero-grid, .cta-panel, .press-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .faction-grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .shot.large { min-height: 320px; }
  .stores { grid-template-columns: 1fr; }
  .cta-panel .waitlist-form { min-width: 0; }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
  }
  .nav-links {
    position: absolute;
    top: 74px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    background: rgba(13, 10, 8, 0.97);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links .btn { width: 100%; }
  .hero { padding-top: 58px; }
  .cards, .faction-grid { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .waitlist-form { flex-direction: column; }
  .waitlist-form .btn { width: 100%; }
  .stat-strip { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .section { padding: 62px 0; }
  .store { padding: 18px 18px; gap: 14px; }
  .store-icon { width: 48px; height: 48px; }
  .footer-grid { flex-direction: column; gap: 14px; }
}
