/* =========================================================
   WINGHALLA · winghalla.party
   ========================================================= */

@font-face {
  font-family: "Norse";
  src: url("../assets/fonts/Norse.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Norse";
  src: url("../assets/fonts/Norsebold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #0b0806;
  --bg-2: #14100c;
  --bg-3: #1d1712;
  --ink: #f1e6cf;
  --muted: #b5a487;
  --ember: #ff6a1a;
  --ember-2: #ff9a3c;
  --gold: #e0a84a;
  --gold-2: #f6d27a;
  --blood: #9e1b12;
  --iron: #3a322a;
  --line: rgba(224, 168, 74, 0.22);

  --f-display: "Norse", "Alegreya", Georgia, serif;
  --f-body: "Alegreya", Georgia, "Times New Roman", serif;
  --f-runes: "Noto Sans Runic", "Segoe UI Historic", sans-serif;

  --heat: 0;            /* 0 → 1, set by scroll in main.js */
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: clamp(17px, 1.05vw + 12px, 19px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* subtle grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ember-2); }
strong { color: var(--gold-2); font-weight: 700; }
em { color: var(--ink); }
.muted { color: var(--muted); }

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

/* ---------- ambient layers ---------- */
#embers {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}
.heat-glow {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(120% 60% at 50% 115%, rgba(255, 90, 20, calc(.08 + var(--heat) * .38)), transparent 70%),
    radial-gradient(80% 40% at 50% 120%, rgba(158, 27, 18, calc(var(--heat) * .45)), transparent 70%);
  transition: background .3s linear;
}
main, .footer, .nav { position: relative; z-index: 2; }

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--f-body);
  text-transform: uppercase;
  letter-spacing: .32em;
  font-size: .78rem;
  color: var(--ember-2);
  margin: 0 0 .6rem;
}
.h2 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: .95;
  letter-spacing: .02em;
  margin: 0 0 1.2rem;
  color: var(--ink);
  text-shadow: 0 2px 0 #000, 0 0 30px rgba(255, 106, 26, .25);
}
.lede { font-size: 1.15em; max-width: 46rem; color: #e4d6bb; }
.lede--center { margin-left: auto; margin-right: auto; text-align: center; }
.runes {
  font-family: var(--f-runes);
  letter-spacing: .5em;
  color: var(--gold);
  opacity: .75;
  margin: 0;
}

/* ---------- buttons ---------- */
.btn {
  --b: var(--gold);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: .06em;
  padding: .7em 1.4em .6em;
  border-radius: 999px;
  border: 1.5px solid var(--b);
  color: var(--ink);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s;
}
.btn:hover { transform: translateY(-2px); color: var(--ink); }
.btn:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }
.btn--fire {
  border-color: transparent;
  background: linear-gradient(180deg, #ff8a2a, #e2470f 60%, #a8270b);
  box-shadow: 0 0 0 1px rgba(255, 210, 120, .35) inset, 0 8px 30px rgba(255, 90, 20, .35);
  color: #fff8ec;
}
.btn--fire:hover { box-shadow: 0 0 0 1px rgba(255, 210, 120, .5) inset, 0 10px 44px rgba(255, 90, 20, .6); }
.btn--ghost { background: rgba(10, 8, 6, .35); backdrop-filter: blur(4px); }
.btn--ghost:hover { background: rgba(224, 168, 74, .12); }
.btn--small { font-size: 1.1rem; padding: .55em 1.1em .45em; }
.btn--block { width: 100%; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--gutter);
  z-index: 20;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(11, 8, 6, .82); backdrop-filter: blur(10px); border-color: var(--line); }
.nav__brand {
  display: flex; align-items: center; gap: .55rem;
  font-family: var(--f-display); font-weight: 700; font-size: 1.6rem;
  color: var(--ink); text-decoration: none; letter-spacing: .04em;
}
.nav__mark { width: 34px; height: 34px; }
.nav__links { display: flex; align-items: center; gap: clamp(.8rem, 2vw, 1.8rem); }
.nav__links a {
  color: var(--ink); text-decoration: none;
  font-size: .82rem; text-transform: uppercase; letter-spacing: .2em;
}
.nav__links a:hover { color: var(--ember-2); }
.nav__cta {
  border: 1px solid var(--gold); border-radius: 999px; padding: .45em 1em;
}
@media (max-width: 760px) {
  .nav__links a:not(.nav__cta) { display: none; }
  .nav__brand span { font-size: 1.4rem; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: 120px var(--gutter) 110px;
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute; inset: -4% 0 0 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 6, 4, .92) 0%, rgba(8, 6, 4, .6) 38%, rgba(8, 6, 4, .1) 70%),
    linear-gradient(0deg, var(--bg) 0%, rgba(11, 8, 6, 0) 35%),
    url("../assets/img/gen/hero.jpg") center 35% / cover no-repeat,
    radial-gradient(70% 70% at 70% 30%, #5a2a0c, #1a0f08 60%, #0b0806);
  transform: translate3d(0, calc(var(--hero-shift, 0) * 1px), 0) scale(1.04);
  will-change: transform;
}
.hero__inner { max-width: var(--wrap); width: 100%; margin: 0 auto; }
.hero__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(4.4rem, 16vw, 12rem);
  line-height: .82;
  margin: .2em 0 .15em;
  letter-spacing: .01em;
  background: linear-gradient(180deg, #fff1cf 10%, var(--gold-2) 45%, var(--ember) 80%, #b32c0b);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 rgba(0,0,0,.8)) drop-shadow(0 0 28px rgba(255, 106, 26, .45));
  animation: flicker 5s infinite;
}
@keyframes flicker {
  0%, 100% { filter: drop-shadow(0 4px 0 rgba(0,0,0,.8)) drop-shadow(0 0 28px rgba(255,106,26,.45)); }
  45% { filter: drop-shadow(0 4px 0 rgba(0,0,0,.8)) drop-shadow(0 0 40px rgba(255,120,30,.6)); }
  50% { filter: drop-shadow(0 4px 0 rgba(0,0,0,.8)) drop-shadow(0 0 22px rgba(255,90,20,.35)); }
  70% { filter: drop-shadow(0 4px 0 rgba(0,0,0,.8)) drop-shadow(0 0 34px rgba(255,140,40,.55)); }
}
.hero__tag {
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 3.6vw, 2.6rem);
  margin: 0 0 .6rem;
  color: var(--ink);
  text-shadow: 0 2px 10px #000;
}
.hero__when {
  display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center;
  text-transform: uppercase; letter-spacing: .18em; font-size: .85rem;
  color: var(--gold-2); margin: 0 0 1.8rem;
}
.hero__when .dot { color: var(--ember); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

.countdown { display: flex; gap: clamp(.5rem, 2vw, 1rem); }
.countdown > div {
  min-width: clamp(64px, 17vw, 92px);
  padding: .55rem .4rem .45rem;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(40, 28, 18, .75), rgba(14, 10, 7, .75));
  box-shadow: 0 0 0 1px rgba(0,0,0,.5) inset;
}
.countdown b {
  display: block;
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(2rem, 6vw, 3rem); line-height: 1;
  color: var(--gold-2);
  font-variant-numeric: tabular-nums;
}
.countdown span { font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.countdown__label { margin: .6rem 0 0; color: var(--muted); font-style: italic; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--muted); text-decoration: none;
  font-size: .7rem; letter-spacing: .3em; text-transform: uppercase;
}
.hero__scroll svg { width: 22px; height: 22px; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(5px); } }

/* ---------- saga ---------- */
.saga { padding: clamp(80px, 12vw, 140px) 0 clamp(60px, 8vw, 100px); }
.pillars {
  list-style: none; padding: 0; margin: 3rem 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.pillars li { background: var(--bg-2); padding: 1.6rem 1.4rem; }
.pillars svg { width: 40px; height: 40px; color: var(--ember); margin-bottom: .6rem; }
.pillars h3 { font-family: var(--f-display); font-size: 2rem; margin: 0 0 .2rem; color: var(--gold-2); font-weight: 700; }
.pillars p { margin: 0; color: var(--muted); font-size: .95em; }
@media (max-width: 860px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .pillars { grid-template-columns: 1fr; } }

/* ---------- the path ---------- */
.path { padding: clamp(60px, 8vw, 100px) 0; text-align: center; }
.path .h2 { text-align: center; }
.path .eyebrow { text-align: center; }

.path__track {
  position: relative;
  max-width: var(--wrap);
  margin: 3rem auto 0;
  padding: 0 var(--gutter);
}
.path__line {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 4px; transform: translateX(-50%);
  background: repeating-linear-gradient(180deg, rgba(224,168,74,.35) 0 10px, transparent 10px 20px);
  border-radius: 4px;
}
.path__fire {
  position: absolute; top: 0; left: -2px; right: -2px;
  height: 0;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--gold-2), var(--ember) 40%, var(--blood));
  box-shadow: 0 0 18px var(--ember), 0 0 40px rgba(255, 90, 20, .5);
}

.levels { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(2.5rem, 6vw, 5rem); }

.level {
  --lvl: 0;  /* 0..1, set inline */
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  text-align: left;
}
.level__node {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 64px; height: 64px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3b2b1c, #120c08);
  border: 2px solid var(--gold);
  font-family: var(--f-display); font-weight: 700; font-size: 1.6rem;
  color: var(--gold-2);
  z-index: 2;
  box-shadow: 0 0 0 6px var(--bg), 0 0 calc(10px + var(--lvl) * 40px) rgba(255, 106, 26, calc(.2 + var(--lvl) * .6));
  transition: background .3s, color .3s, border-color .3s;
}
.level.is-done .level__node {
  background: radial-gradient(circle at 35% 30%, #ffb35a, var(--ember) 55%, #8a1f0a);
  color: #1a0d05; border-color: var(--gold-2);
}

.level__art {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(224, 168, 74, .55);
  box-shadow:
    0 0 0 8px rgba(20, 14, 10, .9),
    0 0 0 10px rgba(224, 168, 74, .25),
    0 20px 60px rgba(0, 0, 0, .7),
    0 0 calc(var(--lvl) * 90px) rgba(255, 90, 20, calc(var(--lvl) * .55));
  background: var(--fallback) center / cover;
  max-width: 440px;
  width: 100%;
  justify-self: end;
  transform: scale(.92) rotate(-4deg);
  opacity: 0;
  transition: transform .9s cubic-bezier(.2,.8,.2,1), opacity .9s;
}
.level__art img { width: 100%; height: 100%; object-fit: cover; }
.level__art::after {   /* shield rivets ring */
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: inset 0 0 0 14px rgba(0,0,0,.25), inset 0 0 60px rgba(0,0,0,.6);
  pointer-events: none;
}
.level.is-visible .level__art { transform: none; opacity: 1; }

.level__body {
  padding: 1.6rem 1.6rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(29, 23, 18, .92), rgba(16, 12, 9, .92));
  max-width: 460px;
  transform: translateY(24px);
  opacity: 0;
  transition: transform .9s cubic-bezier(.2,.8,.2,1) .1s, opacity .9s .1s;
}
.level.is-visible .level__body { transform: none; opacity: 1; }

.level:nth-child(even) .level__art { order: 2; justify-self: start; transform: scale(.92) rotate(4deg); }
.level:nth-child(even) .level__body { order: 1; justify-self: end; }
.level.is-visible:nth-child(even) .level__art { transform: none; }

.level__kicker {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-size: .75rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted);
  margin-bottom: .3rem;
}
.level__tier { color: var(--ember-2); font-weight: 700; }
.level__name {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(2.2rem, 4.2vw, 3.1rem); line-height: 1;
  margin: 0 0 .6rem; color: var(--ink);
}
.level__lore { margin: 0 0 1rem; color: #e1d2b5; }
.level__sauce {
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  font-size: .9rem; color: var(--muted);
  border-top: 1px dashed var(--line); padding-top: .7rem; margin-bottom: 1rem;
}
.level__sauce b { color: var(--gold-2); font-weight: 500; font-style: italic; }

.heat { display: flex; gap: 3px; margin: 0 0 1rem; }
.heat i {
  flex: 1; height: 8px; border-radius: 2px;
  background: rgba(255, 255, 255, .08);
}
.heat i.on { background: linear-gradient(90deg, var(--gold-2), var(--ember)); box-shadow: 0 0 8px rgba(255, 106, 26, .6); }
.heat i.on:nth-child(n+7) { background: linear-gradient(90deg, var(--ember), var(--blood)); }

.survive {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--f-display); font-weight: 700; font-size: 1.3rem; letter-spacing: .05em;
  padding: .55em 1em .45em;
  border-radius: 10px;
  border: 1.5px dashed rgba(224, 168, 74, .5);
  background: transparent; color: var(--gold-2);
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .1s;
}
.survive:hover { background: rgba(224, 168, 74, .08); border-style: solid; }
.survive:active { transform: scale(.98); }
.survive:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }
.level.is-done .survive {
  border-style: solid; border-color: transparent;
  background: linear-gradient(180deg, #ff8a2a, #c4380c);
  color: #fff8ec;
}

/* last level is the golden one */
.level--final .level__art { border-color: var(--gold-2); }
.level--final .level__node { width: 76px; height: 76px; font-size: 2rem; border-color: var(--gold-2); }
.level--final .level__name { background: linear-gradient(180deg, #fff1cf, var(--gold-2) 50%, var(--ember)); -webkit-background-clip: text; background-clip: text; color: transparent; }

@media (max-width: 820px) {
  .path__line { left: calc(var(--gutter) + 22px); }
  .level { grid-template-columns: 1fr; gap: 1rem; padding-left: 60px; }
  .level__node { left: 22px; top: 0; transform: translate(-50%, 0); width: 48px; height: 48px; font-size: 1.25rem; }
  .level--final .level__node { width: 56px; height: 56px; font-size: 1.5rem; }
  .level__art, .level:nth-child(even) .level__art { order: 0; justify-self: start; max-width: 300px; }
  .level__body, .level:nth-child(even) .level__body { order: 1; justify-self: stretch; max-width: none; }
}

.gates {
  margin: clamp(3rem, 8vw, 6rem) auto 0;
  max-width: 720px;
  padding: 2.4rem 1.6rem;
  border-radius: 24px 24px var(--radius) var(--radius);
  border: 1px solid rgba(246, 210, 122, .45);
  background:
    radial-gradient(80% 100% at 50% 0%, rgba(246, 210, 122, .18), transparent 70%),
    var(--bg-2);
  box-shadow: 0 0 80px rgba(255, 140, 40, .15);
}
.gates__title {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.6rem); margin: .4rem 0 .6rem; color: var(--gold-2);
}
.gates p:last-child { margin: 0; color: #e1d2b5; }

/* ---------- laws ---------- */
.laws { padding: clamp(70px, 10vw, 120px) 0; }
.laws__list {
  list-style: none; padding: 0; margin: 2rem 0 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem 2.4rem;
}
.laws__list li {
  display: grid; grid-template-columns: 64px 1fr; gap: 1rem; align-items: start;
  padding: 1.2rem 0; border-top: 1px solid var(--line);
}
.laws__num {
  width: 56px; height: 56px; display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 700; font-size: 1.6rem; color: var(--ember-2);
  border: 1.5px solid var(--iron); border-radius: 8px;
  background: linear-gradient(160deg, #2a221b, #15100c);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.04);
}
.laws__list h3 { font-family: var(--f-display); font-weight: 700; font-size: 1.7rem; margin: 0 0 .15rem; color: var(--ink); }
.laws__list p { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .laws__list { grid-template-columns: 1fr; } }

/* ---------- feast ---------- */
.feast {
  position: relative;
  padding: clamp(90px, 14vw, 180px) 0;
  overflow: hidden;
  isolation: isolate;
}
.feast__media {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(11,8,6,.15) 0%, rgba(11,8,6,.55) 45%, rgba(11,8,6,.95) 75%),
    linear-gradient(180deg, var(--bg) 0%, transparent 18%, transparent 82%, var(--bg) 100%),
    url("../assets/img/gen/feast.jpg") center / cover no-repeat,
    radial-gradient(60% 60% at 30% 60%, #6a2e0e, #170e08 70%);
}
.feast__inner { display: flex; justify-content: flex-end; }
.feast__copy { max-width: 520px; }
.feast__list { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 1rem; }
.feast__list li { display: grid; gap: .1rem; padding-left: 1.2rem; border-left: 2px solid var(--ember); }
.feast__list b { font-family: var(--f-display); font-weight: 700; font-size: 1.5rem; color: var(--gold-2); }
.feast__list span { color: #ddcdb0; }
@media (max-width: 760px) {
  .feast__media { background:
    linear-gradient(180deg, var(--bg) 0%, rgba(11,8,6,.55) 30%, rgba(11,8,6,.9) 60%, var(--bg) 100%),
    url("../assets/img/gen/feast.jpg") 30% center / cover no-repeat,
    radial-gradient(60% 60% at 30% 60%, #6a2e0e, #170e08 70%); }
}

/* ---------- forge ---------- */
.forge { padding: clamp(70px, 10vw, 120px) 0; text-align: center; }
.forge .lede { margin-bottom: 2.4rem; }
.forge__steps {
  display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 1.2rem; align-items: start;
}
.forge__step { margin: 0; }
.forge__step img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  filter: sepia(.25) contrast(1.05) brightness(.9);
  transition: filter .4s;
}
.forge__step:hover img { filter: none; }
.forge__shield {
  aspect-ratio: 1 / 1;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.8)) drop-shadow(0 0 40px rgba(255, 106, 26, .3));
}
.forge__shield img {
  aspect-ratio: auto; height: 100%; object-fit: cover;
  border: 0; border-radius: 0;
  clip-path: ellipse(49% 49% at 50% 50%);
  filter: none;
}
.forge__step figcaption {
  margin-top: .8rem;
  font-family: var(--f-display); font-weight: 700; font-size: 1.5rem; color: var(--ink);
}
.forge__step figcaption span { color: var(--ember-2); margin-right: .35rem; }
@media (max-width: 760px) {
  .forge__steps { grid-template-columns: 1fr 1fr; }
  .forge__step--hero { grid-column: 1 / -1; max-width: 420px; margin: 1rem auto 0; }
}

.skalds {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem;
  margin-top: 3.2rem; text-align: left;
}
.skalds blockquote {
  margin: 0; padding: 1.4rem 1.4rem 1.2rem;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--line);
  position: relative;
}
.skalds blockquote::before {
  content: "“"; position: absolute; top: -.25em; left: .6rem;
  font-family: var(--f-display); font-size: 4rem; color: var(--ember); line-height: 1;
}
.skalds p { margin: 0 0 .8rem; font-style: italic; font-size: 1.05em; }
.skalds cite { font-style: normal; font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
@media (max-width: 860px) { .skalds { grid-template-columns: 1fr; } }

/* ---------- heroes ---------- */
.heroes { padding: clamp(50px, 8vw, 90px) 0; text-align: center; }
.heroes__board {
  margin: 1.6rem auto 0; max-width: 760px;
  padding: 3rem 1.6rem;
  border-radius: var(--radius);
  border: 2px solid var(--iron);
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.25) 0 2px, transparent 2px 120px),
    linear-gradient(180deg, #2a1f16, #17110c);
  box-shadow: inset 0 0 60px rgba(0,0,0,.7);
}
.heroes__empty { font-size: 1.15em; color: #dccbaa; margin: 0 0 1.2rem; }

/* ---------- call / rsvp ---------- */
.call { padding: clamp(70px, 10vw, 120px) 0 clamp(90px, 12vw, 140px); }
.call__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .call__grid { grid-template-columns: 1fr; } }

.details { margin: 1.4rem 0 1.6rem; display: grid; gap: 1rem; }
.details > div { display: grid; grid-template-columns: 90px 1fr; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.details dt { font-family: var(--f-display); font-weight: 700; font-size: 1.5rem; color: var(--ember-2); }
.details dd { margin: 0; }

.namegen {
  margin-top: 2.2rem; padding: 1.4rem;
  border: 1px dashed rgba(224, 168, 74, .4); border-radius: var(--radius);
}
.namegen h3 { font-family: var(--f-display); font-weight: 700; font-size: 1.7rem; margin: 0; }
.namegen p { margin: 0 0 .8rem; }
.namegen__row { display: flex; gap: .6rem; }
.namegen__row input { flex: 1; min-width: 0; }
.namegen__out {
  margin: 1rem 0 0 !important;
  font-family: var(--f-display); font-weight: 700; font-size: 1.9rem; line-height: 1.1;
  color: var(--gold-2); min-height: 1.1em;
}

.rsvp {
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border-radius: 20px;
  border: 1px solid rgba(224, 168, 74, .35);
  background:
    radial-gradient(100% 60% at 50% 0%, rgba(255, 106, 26, .12), transparent 70%),
    linear-gradient(180deg, #1f1812, #120d09);
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  display: grid; gap: 1.1rem;
}
.rsvp__title { font-family: var(--f-display); font-weight: 700; font-size: 2.4rem; margin: 0; color: var(--gold-2); text-align: center; }
.rsvp label { display: grid; gap: .35rem; font-size: .95rem; }
.rsvp fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .5rem; }
.rsvp legend { font-size: .95rem; margin-bottom: .4rem; }

input, textarea {
  font: inherit; font-size: 1rem;
  color: var(--ink);
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(224, 168, 74, .3);
  border-radius: 10px;
  padding: .7rem .85rem;
  width: 100%;
}
input::placeholder, textarea::placeholder { color: #7f7362; }
input:focus, textarea:focus { outline: none; border-color: var(--ember-2); box-shadow: 0 0 0 3px rgba(255, 106, 26, .2); }
textarea { resize: vertical; }

.choice {
  display: flex !important; align-items: center; gap: .7rem;
  padding: .65rem .85rem; border-radius: 10px;
  border: 1px solid rgba(224, 168, 74, .2);
  cursor: pointer; transition: border-color .2s, background .2s;
}
.choice input { width: auto; accent-color: var(--ember); }
.choice:has(input:checked) { border-color: var(--ember); background: rgba(255, 106, 26, .08); }
.choice b { color: var(--gold-2); font-weight: 700; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.rsvp__status { margin: 0; text-align: center; min-height: 1.4em; color: var(--gold-2); }
.rsvp__status.is-error { color: #ff8f7a; }
.rsvp.is-sent { text-align: center; }
.rsvp__sent h3 { font-family: var(--f-display); font-weight: 700; font-size: 2.6rem; margin: 0 0 .4rem; color: var(--gold-2); }
.rsvp__sent .saga-name { font-family: var(--f-display); font-size: 2rem; color: var(--ember-2); margin: .4rem 0 1rem; }

/* ---------- footer ---------- */
.footer {
  text-align: center; padding: 60px var(--gutter) 120px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.5));
}
.footer__mark { width: 64px; height: 64px; margin: 0 auto 1rem; display: block; }
.footer__motto { font-family: var(--f-display); font-weight: 700; font-size: 2rem; margin: 0; letter-spacing: .1em; color: var(--gold-2); }
.footer__skal { font-family: var(--f-display); font-size: 1.5rem; margin: .2rem 0 1rem; color: var(--ember-2); }
.footer__fine { font-size: .8rem; color: #7f7362; margin: 0; }

/* ---------- tracker ---------- */
.tracker {
  position: fixed; z-index: 30;
  right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: .8rem;
  padding: .55rem .6rem .5rem 1rem;
  border-radius: 999px;
  background: rgba(20, 14, 10, .92);
  border: 1px solid rgba(255, 106, 26, .55);
  box-shadow: 0 10px 30px rgba(0,0,0,.6), 0 0 24px rgba(255, 106, 26, .25);
  backdrop-filter: blur(8px);
  transform: translateY(0); transition: transform .3s, opacity .3s;
}
.tracker[hidden] { display: flex; transform: translateY(140%); opacity: 0; pointer-events: none; }
.tracker__count { font-family: var(--f-display); font-weight: 700; font-size: 1.4rem; color: var(--muted); }
.tracker__count b { color: var(--gold-2); font-size: 1.7rem; }
.tracker__rank { font-family: var(--f-display); font-weight: 700; font-size: 1.35rem; color: var(--ember-2); }
.tracker__btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  cursor: pointer; font-size: 1.1rem;
}
.tracker__btn:hover { color: var(--ink); border-color: var(--gold); }
.tracker.is-bump { animation: bump .5s; }
@keyframes bump { 30% { transform: scale(1.12); } }

/* toast for rank-ups */
.toast {
  position: fixed; left: 50%; top: 84px; z-index: 40;
  transform: translate(-50%, -20px); opacity: 0;
  padding: .9rem 1.4rem .8rem; border-radius: 14px;
  background: linear-gradient(180deg, #2b1d12, #150e09);
  border: 1px solid var(--gold);
  box-shadow: 0 20px 50px rgba(0,0,0,.7), 0 0 40px rgba(255, 106, 26, .35);
  text-align: center; pointer-events: none;
  transition: transform .4s cubic-bezier(.2,.8,.2,1), opacity .4s;
  width: max-content; max-width: calc(100vw - 32px);
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.toast small { display: block; font-size: .7rem; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }
.toast b { font-family: var(--f-display); font-size: 1.9rem; color: var(--gold-2); }

@media (prefers-reduced-motion: reduce) {
  .hero__title, .hero__scroll svg { animation: none; }
  .level__art, .level__body { transition: none; transform: none !important; opacity: 1; }
}

/* =========================================================
   Fallbacks while assets/img/gen/ art is missing
   ========================================================= */

/* hero: the real workshop shield, hung over the fire */
.hero__shield {
  position: absolute; z-index: -1;
  right: clamp(-120px, -4vw, 0px); top: 50%;
  width: min(48vw, 640px); aspect-ratio: 1000 / 973;
  transform: translateY(-50%) rotate(-6deg);
  filter: drop-shadow(0 30px 60px rgba(0,0,0,.85)) drop-shadow(0 0 70px rgba(255, 106, 26, .35));
  animation: hang 9s ease-in-out infinite;
}
.hero__shield img { width: 100%; height: 100%; object-fit: cover; clip-path: ellipse(49% 49% at 50% 50%); }
.hero__shield::after {   /* firelight from below */
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(90% 70% at 50% 110%, rgba(255, 110, 30, .45), transparent 60%);
  mix-blend-mode: screen; clip-path: ellipse(49% 49% at 50% 50%);
}
@keyframes hang { 50% { transform: translateY(-51.5%) rotate(-4deg); } }
.has-hero-art .hero__shield { display: none; }
@media (max-width: 860px) {
  .hero__shield { width: 78vw; right: -26vw; top: 22%; opacity: .45; }
}
@media (prefers-reduced-motion: reduce) { .hero__shield { animation: none; } }

/* levels: a glowing rune per trial, behind any generated art */
.level__rune {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--f-runes);
  font-size: clamp(7rem, 16vw, 11rem); line-height: 1;
  color: hsl(calc(44 - var(--lvl) * 40) 100% calc(78% - var(--lvl) * 18%));
  text-shadow:
    0 0 18px rgba(255, 140, 40, .9),
    0 0 calc(30px + var(--lvl) * 60px) rgba(255, 90, 20, calc(.5 + var(--lvl) * .4));
}
.level__art img { position: relative; }
.level--final .level__rune { color: #fff3cf; text-shadow: 0 0 20px #ffd27a, 0 0 70px #ff8a2a, 0 0 120px rgba(255, 90, 20, .8); }

/* feast: center the copy when there's no scene on the left */
body:not(.has-feast-art) .feast__inner { justify-content: center; }
body:not(.has-feast-art) .feast__copy { max-width: 760px; }
body:not(.has-feast-art) .feast__list { grid-template-columns: 1fr 1fr; gap: 1.2rem 2rem; }
@media (max-width: 640px) { body:not(.has-feast-art) .feast__list { grid-template-columns: 1fr; } }

/* =========================================================
   Live board, dialogs, finale
   ========================================================= */
.tracker__btn { display: grid; place-items: center; padding: 0; }
.tracker__btn svg { width: 18px; height: 18px; }
#tracker-sound .mute { display: none; }
#tracker-sound.is-off .wave { display: none; }
#tracker-sound.is-off .mute { display: inline; }

.practice-note {
  margin: 1.4rem auto 0; max-width: 40rem; text-align: center;
  font-size: .9rem; color: var(--muted); font-style: italic;
  padding: .6rem 1rem; border: 1px dashed var(--line); border-radius: 999px;
}
.practice-note[hidden] { display: none; }

.linkish {
  font: inherit; color: var(--gold-2); background: none; border: 0; padding: 0;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.linkish:hover { color: var(--ember-2); }

.board-me { margin: 0 0 1rem; color: var(--muted); }
.heroes__tv { margin: 1.2rem 0 0; font-size: .95rem; }

.heroes__board { text-align: left; }
.heroes__board .heroes__empty, .heroes__board .runes { text-align: center; }
.board__h {
  display: flex; align-items: baseline; justify-content: space-between;
  font-family: var(--f-display); font-weight: 700; font-size: 1.7rem; color: var(--gold-2);
  margin: 0 0 .6rem; padding-bottom: .4rem; border-bottom: 1px solid var(--line);
}
.board__h span { font-family: var(--f-body); font-size: .85rem; color: var(--muted); letter-spacing: .2em; }
.board__gold, .board__fight { list-style: none; margin: 0 0 1.8rem; padding: 0; display: grid; gap: .5rem; }
.board__gold li {
  display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: .8rem;
  padding: .7rem .9rem; border-radius: 10px;
  background: linear-gradient(90deg, rgba(246, 210, 122, .16), rgba(255, 106, 26, .06));
  border: 1px solid rgba(246, 210, 122, .4);
  animation: carve .8s cubic-bezier(.2,.8,.2,1) both;
}
.board__gold b {
  font-family: var(--f-display); font-weight: 700; font-size: 1.6rem; line-height: 1;
  background: linear-gradient(180deg, #fff1cf, var(--gold-2) 50%, var(--ember)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.board__gold small { color: var(--muted); font-size: .8rem; }
.board__pos {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%;
  font-family: var(--f-display); font-weight: 700; color: #1a0d05;
  background: radial-gradient(circle at 35% 30%, #ffe3a0, var(--gold) 60%, #8a5a12);
}
.board__fight li {
  display: grid; grid-template-columns: 1fr auto minmax(90px, 160px) 48px; align-items: center; gap: .8rem;
  padding: .55rem .2rem; border-bottom: 1px dashed rgba(224, 168, 74, .15);
}
.board__fight b { font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board__rank { font-family: var(--f-display); font-size: 1.2rem; color: var(--ember-2); }
.board__lvl { text-align: right; font-variant-numeric: tabular-nums; color: var(--gold-2); }
.heat--mini { margin: 0; }
.heat--mini i { height: 6px; }
@media (max-width: 560px) {
  .board__fight li { grid-template-columns: 1fr auto 44px; }
  .board__fight .heat--mini { grid-column: 1 / -1; order: 4; }
  .board__gold li { grid-template-columns: 40px 1fr; }
  .board__gold small { grid-column: 2; }
}
@keyframes carve { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* dialogs */
.modal {
  width: min(460px, calc(100vw - 32px));
  padding: 2rem 1.6rem 1.6rem;
  border-radius: 20px;
  border: 1px solid rgba(224, 168, 74, .45);
  background:
    radial-gradient(100% 60% at 50% 0%, rgba(255, 106, 26, .16), transparent 70%),
    linear-gradient(180deg, #1f1812, #110c08);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(0,0,0,.8), 0 0 60px rgba(255, 106, 26, .2);
  text-align: center;
}
.modal::backdrop { background: rgba(5, 3, 2, .75); backdrop-filter: blur(4px); }
.modal form { display: grid; gap: .9rem; }
.modal .eyebrow { margin: 0; }
.modal__title { font-family: var(--f-display); font-weight: 700; font-size: 2.6rem; line-height: 1; margin: 0; color: var(--gold-2); }
.modal p { margin: 0; }

.modal--finale {
  width: min(620px, calc(100vw - 32px));
  padding: 2.4rem 1.6rem 2rem;
  border-color: var(--gold-2);
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(246, 210, 122, .28), transparent 70%),
    radial-gradient(80% 60% at 50% 110%, rgba(255, 90, 20, .35), transparent 70%),
    #120c08;
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 0 120px rgba(255, 140, 40, .45);
}
.modal--finale[open] { animation: gates .9s cubic-bezier(.2,.8,.2,1); }
@keyframes gates { from { opacity: 0; transform: scale(.85); filter: brightness(2.5); } }
.finale__mark { width: 96px; height: 96px; margin: 0 auto .6rem; display: block; filter: drop-shadow(0 0 24px rgba(255, 140, 40, .8)); animation: hang 5s ease-in-out infinite; }
.finale__title {
  font-family: var(--f-display); font-weight: 700; font-size: clamp(3rem, 11vw, 4.6rem); line-height: .9; margin: .4rem 0 .5rem;
  background: linear-gradient(180deg, #fff1cf 10%, var(--gold-2) 45%, var(--ember) 85%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.finale__sub { color: #e1d2b5; margin: 0 0 1.2rem !important; }
.finale__name { font-family: var(--f-display); font-weight: 700; font-size: clamp(1.7rem, 5vw, 2.2rem); color: var(--ember-2); line-height: 1.1; }
.finale__rank { margin: .4rem 0 1.6rem !important; letter-spacing: .3em; text-transform: uppercase; font-size: .78rem; color: var(--gold); }
.finale__ctas { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; }

/* on party day the hero CTA points at the path */
.is-live .hero__ctas .btn--fire { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 1px rgba(255,210,120,.5) inset, 0 0 50px rgba(255, 106, 26, .8); } }
@media (prefers-reduced-motion: reduce) {
  .board__gold li, .modal--finale[open], .finale__mark, .is-live .hero__ctas .btn--fire { animation: none; }
}

/* ---------- plain-language "what is it" ---------- */
.hero__what {
  max-width: 34rem;
  margin: 0 0 1.1rem;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.5;
  color: #eadcc0;
  text-shadow: 0 2px 12px #000;
}
.steps {
  list-style: none; padding: 0; margin: 2.4rem 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem;
  counter-reset: none;
}
.steps li {
  position: relative;
  padding: 1.6rem 1.4rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(40, 28, 18, .7), rgba(16, 12, 9, .9));
}
.steps__num {
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  font-family: var(--f-display); font-weight: 700; font-size: 1.6rem;
  color: #1a0d05;
  background: radial-gradient(circle at 35% 30%, #ffb35a, var(--ember) 55%, #8a1f0a);
  box-shadow: 0 0 20px rgba(255, 106, 26, .45);
  margin-bottom: .8rem;
}
.steps h3 { font-family: var(--f-display); font-weight: 700; font-size: 1.9rem; margin: 0 0 .3rem; color: var(--gold-2); }
.steps p { margin: 0; color: #d9c9ab; }
.saga__flavor { margin: 2.4rem 0 0; color: var(--muted); text-align: center; font-size: 1.05em; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .nav__long { display: none; } }
