/* ─── Grimroll marketing site — shared system ────────────────────────────────
   Tokens + nav + buttons + shared bands, used by every page. Page-specific
   styles stay inline in each page's <style>. Design language mirrors the game
   (DESIGN.md): warm near-black, ember gold as the one action color, Cinzel
   display over Inter, art-first with quiet chrome. No gradient text, no
   side-stripe accents, borders only where they mean something. */

:root {
  --void:       #0c0906;   /* warm near-black, the dark that's winning */
  --pitch:      #14100a;   /* a lifted stratum */
  --pitch-2:    #1c1610;
  --flame:      #fbbf24;   /* the First Flame — the one accent */
  --flame-deep: #d97706;
  --gold-hi:    #fcd34d;
  --gold-ink:   #f2c460;   /* solid display gold (replaces the old gradient text) */
  --parchment:  #ece0cb;   /* warm body text */
  --ash:        #a2917a;   /* muted warm neutral */
  --ash-dim:    #6f6353;
  --ember-line: #3a2a15;   /* deep ember dividers */
  --blight:     #b154c0;   /* corruption — only where the Blight touches */

  /* the genre-sacred rarity ladder — loot contexts only */
  --r-common:    #d6d3d1;
  --r-magic:     #38bdf8;
  --r-rare:      #facc15;
  --r-legendary: #fb923c;
  --r-unique:    #fcd34d;

  --measure: 66ch;
  --edge: clamp(1.25rem, 5vw, 4rem);
  --nav-h: 4.25rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--void);
  color: var(--parchment);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, .display {
  font-family: 'Cinzel', serif;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0.01em;
  margin: 0;
}

/* ─── layout ─────────────────────────────────────────────────────────────── */
.wrap { width: min(72rem, 100%); margin-inline: auto; padding-inline: var(--edge); }

.band { position: relative; padding-block: clamp(4rem, 9vw, 7.5rem); }
.band + .band { border-top: 1px solid rgba(255,255,255,0.05); }

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--flame);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.25rem;
}
.eyebrow::before {
  content: "";
  width: 1.75rem; height: 1px;
  background: linear-gradient(90deg, var(--flame), transparent);
}

.lede { max-width: var(--measure); color: var(--ash); font-size: 1.1em; }
.lede b, .lede strong { color: var(--parchment); font-weight: 600; }
h2 { font-size: clamp(1.9rem, 1.2rem + 3vw, 3.1rem); }
h2 .quiet { color: var(--ash-dim); }

/* ─── the forged-gold button ─────────────────────────────────────────────── */
.btn {
  --btn-bg: linear-gradient(180deg, #fcd34d 0%, #f59e0b 52%, #b45309 100%);
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 1rem 2.2rem;
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: #1a1206; text-decoration: none;
  background: var(--btn-bg);
  border: 1px solid rgba(252, 211, 77, 0.5);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(255,240,200,0.5) inset, 0 10px 30px -12px rgba(245,158,11,0.55);
  transition: transform 0.12s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 1px 0 rgba(255,240,200,0.6) inset, 0 16px 40px -12px rgba(245,158,11,0.7); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 4px; }
.btn .roll { font-size: 1.15rem; line-height: 1; }

.btn--iron {
  --btn-bg: linear-gradient(180deg, #2b241b 0%, #1c1610 100%);
  color: var(--parchment);
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset;
}
.btn--iron:hover { filter: brightness(1.15); box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset; }

.fineprint { margin-top: 0.9rem; font-size: 0.82rem; letter-spacing: 0.04em; color: var(--ash-dim); }
.fineprint b { color: var(--ash); font-weight: 600; }

/* ─── navigation ─────────────────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(12, 9, 6, 0.88);
  border-bottom-color: rgba(255,255,255,0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav__row {
  height: var(--nav-h);
  display: flex; align-items: center; gap: clamp(0.9rem, 3vw, 2rem);
}
.nav__mark {
  font-family: 'Cinzel', serif; font-weight: 800; font-size: 1.1rem;
  letter-spacing: 0.14em; color: var(--gold-ink); text-decoration: none;
  text-shadow: 0 2px 14px rgba(0,0,0,0.8);
  margin-right: auto;
}
.nav__link {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ash); text-decoration: none; padding: 0.55rem 0.15rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  text-shadow: 0 1px 10px rgba(0,0,0,0.8);
}
.nav__link:hover { color: var(--parchment); }
.nav__link[aria-current="page"] { color: var(--flame); border-bottom-color: var(--flame); }
.nav__play {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.6rem 1.25rem;
  font-family: 'Cinzel', serif; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em;
  color: #1a1206; text-decoration: none;
  background: linear-gradient(180deg, #fcd34d 0%, #f59e0b 55%, #b45309 100%);
  border: 1px solid rgba(252,211,77,0.5); border-radius: 2px;
  box-shadow: 0 1px 0 rgba(255,240,200,0.5) inset;
  transition: transform 0.12s ease, filter 0.2s ease;
}
.nav__play:hover { transform: translateY(-1px); filter: brightness(1.06); }
@media (max-width: 40rem) {
  .nav__link { letter-spacing: 0.08em; font-size: 0.72rem; }
  .nav__row { gap: 0.8rem; }
  .nav__mark { font-size: 1rem; letter-spacing: 0.1em; }
  .nav__play { padding: 0.55rem 0.9rem; font-size: 0.78rem; }
}

/* offset for pages whose first section is NOT a full-bleed hero */
.page-top { padding-top: calc(var(--nav-h) + clamp(2.5rem, 6vw, 4.5rem)); }

/* ─── page hero (subpages): full-bleed art banner ───────────────────────── */
.banner {
  position: relative; overflow: hidden;
  min-height: clamp(20rem, 52vh, 30rem);
  display: grid; align-items: end;
  padding-top: var(--nav-h);
}
.banner__art { position: absolute; inset: 0; z-index: 0; }
.banner__art img { width: 100%; height: 100%; object-fit: cover; }
.banner__art::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 10%, rgba(12,9,6,0.1), rgba(12,9,6,0.5) 60%, rgba(12,9,6,0.9) 100%),
    linear-gradient(180deg, rgba(12,9,6,0.55) 0%, transparent 30%, transparent 50%, var(--void) 100%);
}
.banner__body { position: relative; z-index: 2; padding-block: clamp(2rem, 5vw, 3.5rem); }
.banner h1 {
  font-size: clamp(2.4rem, 1.4rem + 5vw, 4.6rem);
  color: var(--gold-ink);
  text-shadow: 0 4px 34px rgba(0,0,0,0.85);
}
.banner .lede { margin-top: 1rem; text-shadow: 0 1px 12px rgba(0,0,0,0.9); }

/* ─── shared cadence pieces ─────────────────────────────────────────────── */
.glance { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 2rem; padding: 0; }
.glance li {
  list-style: none;
  font-size: 0.85rem; font-weight: 500; letter-spacing: 0.02em;
  padding: 0.5rem 1rem; border: 1px solid var(--ember-line); border-radius: 100px;
  color: var(--parchment); background: rgba(255,255,255,0.02);
}
.glance b { color: var(--flame); font-weight: 700; }

.finale { text-align: center; background: radial-gradient(120% 100% at 50% 0%, rgba(245,158,11,0.1), transparent 60%); }
.finale h2 { font-size: clamp(2.4rem, 1.4rem + 4vw, 4.2rem); color: var(--gold-ink); text-shadow: 0 3px 30px rgba(217,151,52,0.25); }
.finale .lede { margin-inline: auto; margin-top: 1rem; }
.finale .btn { margin-top: 2rem; }

/* cross-page "keep exploring" links */
.crosslinks { display: grid; gap: 1rem; margin-top: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 44rem) { .crosslinks { grid-template-columns: 1fr 1fr; } }
.crosslink {
  position: relative; overflow: hidden; border-radius: 14px;
  min-height: 11rem; display: grid; align-items: end;
  text-decoration: none; border: 1px solid var(--ember-line);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.crosslink:hover { border-color: rgba(252,211,77,0.45); transform: translateY(-3px); }
.crosslink img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transition: transform 0.5s ease; }
.crosslink:hover img { transform: scale(1.04); }
.crosslink::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(12,9,6,0.15), rgba(12,9,6,0.88) 90%); }
.crosslink__body { position: relative; z-index: 2; padding: 1.25rem 1.4rem; }
.crosslink__kicker { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--flame); }
.crosslink__title { font-family: 'Cinzel', serif; font-weight: 800; font-size: 1.4rem; color: var(--parchment); margin-top: 0.25rem; }
.crosslink__cue { color: var(--ash); font-size: 0.85rem; margin-top: 0.2rem; }

/* ─── footer ─────────────────────────────────────────────────────────────── */
footer { border-top: 1px solid rgba(255,255,255,0.06); padding-block: 2.5rem; color: var(--ash-dim); font-size: 0.85rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 0.8rem 1.5rem; align-items: center; }
footer .mark { font-family: 'Cinzel', serif; font-weight: 700; letter-spacing: 0.1em; color: var(--ash); margin-right: auto; }
footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
footer a { color: var(--ash); text-decoration: none; }
footer a:hover { color: var(--flame); }
footer .foot-play { color: var(--flame); }

/* ─── scroll reveals + embers ───────────────────────────────────────────── */
/* Hidden state applies only once JS marks <html class="js"> — a no-JS visitor
   (or a crawler) sees the whole page; the reveal is progressive enhancement. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.7,.3,1); }
.js .reveal.in { opacity: 1; transform: none; }

.embers { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.ember {
  position: absolute; bottom: -8px; width: 3px; height: 3px; border-radius: 50%;
  background: var(--gold-hi); opacity: 0;
  box-shadow: 0 0 6px 1px rgba(252,211,77,0.7);
  animation: rise linear infinite;
}
@keyframes rise {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  12%  { opacity: 0.9; }
  80%  { opacity: 0.6; }
  100% { transform: translateY(-92vh) translateX(var(--drift, 12px)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ember { animation: none; }
  .crosslink, .crosslink img, .btn, .nav__play { transition: none; }
}
