/* ==========================================================================
   Valhalla Within — ritual night stylesheet
   Spacing scale: 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 96 / 128
   Type scale (1.25 modular, base 17): 11 · 14 · 17 · 21 · 27 · 34 · 42 · 52 · 92
   Keyline language: 2px god-color rules, 1px gold hairlines
   Radius token: 8px (--radius) for carved panel corners
   ========================================================================== */

:root {
  /* palette */
  --night: #0a0e17;
  --night-2: #0e1422;
  --night-3: #141b2c;
  --parchment: #e9e2d0;
  --parchment-dim: #beb7a5;
  --gold: #d0ad63;
  --gold-deep: #a8894e;
  --mist: #97a1b5;
  --line: rgba(208, 173, 99, 0.22);
  --line-soft: rgba(233, 226, 208, 0.1);
  --odin: #d0ad63;
  --thor: #d85c3f;
  --freya: #be7a8e;
  --loki: #6f9e88;
  --tyr: #688fa3;

  /* type */
  --serif: Georgia, 'Times New Roman', Times, serif;
  --sans: Arial, 'Helvetica Neue', Helvetica, sans-serif;
  --fs-caps-s: 9px;
  --fs-caps: 10px;
  --fs-caps-l: 11px;
  --fs-s: 14px;
  --fs-body: 17px;
  --fs-m: 21px;
  --fs-d3: clamp(27px, 3.4vw, 34px);
  --fs-d2: clamp(34px, 5vw, 52px);
  --fs-d1: clamp(40px, min(7.2vw, 8.6vh), 92px);

  /* spacing */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;
  --sect: clamp(96px, 12vw, 128px);

  --measure: 42rem;
  --radius: 8px;
  --par-far-x: 0px; --par-far-y: 0px;
  --par-mid-x: 0px; --par-mid-y: 0px;
  --par-near-x: 0px; --par-near-y: 0px;

  /* sponsor banner geometry (1600 x 252 source, 6.349:1) */
  --banner-w: min(1064px, 92vw);
  --banner-h: calc(var(--banner-w) * 0.1575);
  --banner-gap: 10px;
  --banner-space: calc(var(--banner-h) + var(--banner-gap) + 12px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
html.intro-lock { overflow: hidden; }

body {
  background-color: var(--night);
  background-image:
    radial-gradient(ellipse 90% 44% at 50% -6%, rgba(104, 143, 163, 0.14), transparent 68%),
    radial-gradient(ellipse 46% 30% at 82% 22%, rgba(208, 173, 99, 0.05), transparent 70%),
    repeating-radial-gradient(circle at 28% 18%, rgba(233, 226, 208, 0.014) 0 1px, transparent 1px 5px);
  color: var(--parchment);
  font-family: var(--serif);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* keep the tail of the page clear of the pinned sponsor banner */
  padding-bottom: var(--banner-space);
}

button { color: inherit; font: inherit; background: none; border: 0; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }

::selection { background: var(--gold); color: var(--night); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* small caps utility voice — one recipe, reused everywhere */
.eyebrow, .nav-note, .sound-toggle, .q-count, .q-back,
.q-eyebrow, .q-hint, .q-note, .scroll-cue, .sponsor-tag,
.constellation-title, .result-role, .result-kicker,
.chapter-meta, .chapter-body h3, .rune-button, .chapter-cta,
.h1-tail, .land-band figcaption, .site-foot, .opening-counter, .opening-skip {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: var(--s4);
  z-index: 2000;
  background: var(--gold);
  color: var(--night);
  font: 700 var(--fs-caps)/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: var(--s3) var(--s4);
  transition: top 0.2s;
}
.skip-link:focus { top: var(--s4); }

/* ---------------------------------------------------- curved-text rings */

.curved-text { position: absolute; }
.curved-text span {
  position: absolute;
  top: 50%;
  left: 50%;
  line-height: 1;
  white-space: pre;
  letter-spacing: 0;
  transform-origin: 50% 50%;
  transform: translate(-50%, -50%)
    rotate(calc(360deg / var(--count) * var(--i)))
    translateY(calc(var(--text-radius) * -1));
}

/* ------------------------------------------------------ opening sequence */

.opening {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  background: #070b12;
  color: var(--parchment);
  animation: openingExit 4.3s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}
.opening.is-skipped {
  animation: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0s 0.4s;
}

.opening-sky {
  position: absolute;
  inset: -7%;
  background-image: linear-gradient(rgba(7, 11, 18, 0.35), rgba(7, 11, 18, 0.82)),
    url('img/norse-journey-landscape.jpg');
  background-size: cover;
  background-position: 50% 40%;
  filter: saturate(0.6) contrast(1.06);
  clip-path: circle(0);
  animation: openingWorld 3.75s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

.opening::before,
.opening::after {
  content: '';
  position: absolute;
  z-index: 4;
  background: var(--parchment);
  mix-blend-mode: difference;
  pointer-events: none;
}
.opening::before { inset: 0 auto 0 50%; width: 1px; transform: scaleY(0); animation: openingLineY 1.15s ease-out 0.15s forwards; }
.opening::after { inset: 50% 0 auto; height: 1px; transform: scaleX(0); animation: openingLineX 1.15s ease-out 0.15s forwards; }

.opening-orbit {
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: min(62vh, 62vw);
  aspect-ratio: 1;
  --text-radius: min(30vh, 30vw);
  border: 1px solid rgba(233, 226, 208, 0.32);
  border-radius: 50%;
  font-size: var(--fs-caps-l);
  color: var(--gold);
  opacity: 0;
  animation: openingOrbitIn 0.8s ease-out 0.38s forwards, drift 15s linear 1.1s infinite;
}

.opening-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  z-index: 3;
  color: var(--gold);
  font: 400 clamp(42px, 7vw, 96px)/1 var(--serif);
  opacity: 0;
  filter: blur(10px);
  animation: openingMark 1.2s cubic-bezier(0.22, 0.8, 0.22, 1) 0.48s forwards;
}

.opening-copy {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font: 400 clamp(58px, 12vw, 180px)/0.72 var(--serif);
  letter-spacing: -0.06em;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 8px 40px rgba(4, 8, 14, 0.6);
  pointer-events: none;
}
.opening-copy span {
  display: block;
  opacity: 0;
  clip-path: inset(0 0 100% 0);
  transform: translateY(100%) rotate(2deg);
  animation: openingWord 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.opening-copy span:first-child { font-size: 0.4em; letter-spacing: 0.32em; margin-left: 0.32em; color: var(--gold); animation-delay: 1.12s; }
.opening-copy span:nth-child(2) { animation-delay: 1.42s; }
.opening-copy span:nth-child(3) { font-style: italic; animation-delay: 1.72s; }

.opening-counter,
.opening-skip {
  position: absolute;
  bottom: 4vh;
  z-index: 8;
  font-size: var(--fs-caps-s);
  font-weight: 400;
  line-height: 1;
  opacity: 0;
  animation: openingMeta 0.6s ease-out 2.35s forwards;
}
.opening-counter { left: 4vw; }
.opening-skip {
  right: 4vw;
  cursor: pointer;
  border-bottom: 1px solid currentColor;
  padding: var(--s2) 0;
}
.opening-skip:hover { color: var(--gold); }

@keyframes openingWorld {
  0% { clip-path: circle(0); transform: scale(1.22); }
  55% { clip-path: circle(31%); }
  100% { clip-path: circle(86%); transform: scale(1); }
}
@keyframes openingExit {
  0%, 82% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}
@keyframes openingLineY { to { transform: scaleY(1); } }
@keyframes openingLineX { to { transform: scaleX(1); } }
@keyframes openingOrbitIn { from { opacity: 0; scale: 0.55; } to { opacity: 1; scale: 1; } }
@keyframes openingMark { to { opacity: 1; filter: blur(0); scale: 1.08; } }
@keyframes openingWord { to { opacity: 1; clip-path: inset(0); transform: translateY(0) rotate(0); } }
@keyframes openingMeta { to { opacity: 0.75; } }
@keyframes drift { to { transform: rotate(360deg); } }

/* -------------------------------------------------- game shell (screen 1) */

.game {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding-bottom: calc(var(--banner-space) + 34px);
}

.game.is-playing .scene-hero { display: none; }

.scene-quiz { display: none; }
.game.is-playing .scene-quiz {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  overflow-y: auto;
  padding: 88px 4vw var(--s3);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: calc(var(--banner-space) + var(--s2));
  translate: -50% 0;
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) var(--s3);
  font-size: var(--fs-caps-s);
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s;
}
.scroll-cue span { display: inline-flex; align-items: center; gap: var(--s2); }
.scroll-cue b { font-weight: 400; animation: cueDip 2.6s ease-in-out infinite; }
.scroll-cue:hover { color: var(--parchment); }

@keyframes cueDip { 50% { transform: translateY(3px); } }

/* codex lock — the class is added by JS only, so crawlers and no-JS
   visitors always see the full codex; players earn it via the ritual */
.cue-sealed { display: none; }
body.content-locked .cue-open { display: none; }
body.content-locked .cue-sealed { display: inline-flex; }

.codex-teaser { display: none; }
body.content-locked .codex-intro .section-head,
body.content-locked .land-band,
body.content-locked .archetypes,
body.content-locked .essay,
body.content-locked .faq { display: none; }
body.content-locked .codex-teaser {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s4);
  max-width: var(--measure);
  margin: var(--s6) auto 0;
  padding: var(--s4) var(--s5);
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  background: linear-gradient(175deg, var(--night-2), var(--night));
  text-align: left;
}
.codex-teaser .teaser-rune { font: 400 27px/1 var(--serif); color: var(--gold); }
.codex-teaser p { flex: 1; font-style: italic; font-size: var(--fs-s); color: var(--parchment-dim); }
.codex-teaser p b { color: var(--parchment); font-style: normal; }
.codex-teaser a {
  color: var(--gold);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid var(--gold-deep);
  padding-bottom: 2px;
  font-size: 15px;
}
.codex-teaser a:hover { border-color: var(--gold); color: var(--parchment); }

/* ------------------------------------------------------------------- nav */

.site-nav {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4vw;
}

.wordmark {
  text-decoration: none;
  line-height: 0.82;
  letter-spacing: -0.04em;
}
.wordmark span { display: block; font: 900 20px var(--sans); letter-spacing: -0.02em; }
.wordmark i { display: block; font: italic 400 18px var(--serif); color: var(--gold); }
.wordmark:hover i { color: var(--parchment); }

.nav-note {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-size: var(--fs-caps);
  letter-spacing: 0.16em;
  color: var(--mist);
}
.nav-note b { color: var(--gold); font-size: var(--fs-caps-l); }

.sound-toggle {
  display: flex;
  align-items: center;
  gap: var(--s2);
  cursor: pointer;
  padding: var(--s2) 0;
  font-size: var(--fs-caps-s);
  letter-spacing: 0.16em;
  color: var(--parchment);
}
.sound-toggle i {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  transition: transform 0.25s, background 0.25s;
}
.sound-toggle i::before,
.sound-toggle i::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  background: var(--gold);
  transform: translate(-50%, -50%);
  animation: soundWave 0.9s ease-in-out infinite;
}
.sound-toggle i::before { height: 9px; margin-left: -3px; }
.sound-toggle i::after { height: 14px; margin-left: 3px; animation-delay: -0.32s; }
.sound-toggle:not(.is-on) i::before,
.sound-toggle:not(.is-on) i::after { height: 1px; animation: none; }
.sound-toggle:hover i { transform: scale(1.12); background: rgba(208, 173, 99, 0.14); }
.sound-toggle:active i { transform: scale(0.95); }

@keyframes soundWave { 50% { height: 4px; } }

/* --------------------------------------------------- section furniture */

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s3);
  font-size: var(--fs-caps);
  font-weight: 700;
  color: var(--gold);
}
.eyebrow span {
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  letter-spacing: 0;
}

.section-head {
  max-width: var(--measure);
  margin: 0 auto;
  text-align: center;
}

.section-title {
  margin: var(--s5) 0 var(--s4);
  font: 400 var(--fs-d2)/1.02 var(--serif);
  letter-spacing: -0.04em;
}
.section-title em { color: var(--gold); }

.section-lede {
  color: var(--parchment-dim);
  max-width: 34rem;
  margin: 0 auto;
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 76px 4vw var(--s3);
  overflow-y: auto;
  overflow-x: hidden;
}
/* paired auto margins center the scene, yet degrade to scroll when short */
.hero > .eyebrow { margin-top: auto; }

.portal-wrap {
  position: relative;
  display: grid;
  justify-items: center;
  margin-top: var(--s4);
}

.story-portal {
  position: relative;
  width: clamp(200px, 32vh, 400px);
  aspect-ratio: 1;
  padding: var(--s2);
  border-radius: 50%;
  background: linear-gradient(160deg, #223048, #101724);
  box-shadow: 0 45px 90px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--line-soft);
  translate: var(--par-mid-x) var(--par-mid-y);
  transition: translate 0.18s ease-out;
  animation: portalIn 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.story-portal::before {
  content: '';
  position: absolute;
  inset: -7%;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.portal-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-image: linear-gradient(rgba(10, 14, 23, 0.05), rgba(10, 14, 23, 0.5)),
    url('img/gods-character-sheet-stylized.jpg');
  background-size: cover;
  background-position: 50% 24%;
  filter: saturate(0.85);
}
.portal-ring {
  inset: -5%;
  --text-radius: clamp(110px, 17.6vh, 220px);
  border-radius: 50%;
  color: var(--gold);
  font-size: 12px;
  translate: var(--par-near-x) var(--par-near-y);
  transition: translate 0.2s ease-out;
  animation: drift 20s linear infinite;
}

.hero h1 {
  position: relative;
  z-index: 5;
  margin: clamp(-140px, -15vh, -64px) 0 0;
  max-width: 15ch;
  font: 400 var(--fs-d1)/0.86 var(--serif);
  letter-spacing: -0.05em;
  text-shadow: 0 4px 34px rgba(4, 8, 14, 0.85), 0 1px 8px rgba(4, 8, 14, 0.9);
}
.hero h1 em { display: block; color: var(--gold); }
.h1-tail {
  display: block;
  margin-top: var(--s3);
  font-size: var(--fs-caps-l);
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.3em;
  color: var(--mist);
}

.whisper { margin-top: var(--s3); font-size: var(--fs-m); color: var(--gold); }
.whisper em { font-style: italic; }

.intro {
  width: min(520px, 86vw);
  margin: var(--s3) auto 0;
  color: var(--parchment-dim);
}

/* begin button */

.hero-start-wrap { margin-top: clamp(16px, 3vh, 40px); }

.hero-start {
  position: relative;
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  text-decoration: none;
  animation: startDrift 4.8s ease-in-out infinite;
}
.hero-start::before {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 44% 56% 51% 49% / 57% 43% 56% 44%;
  background: var(--gold);
  box-shadow: 7px 9px rgba(208, 173, 99, 0.16), 0 16px 42px rgba(0, 0, 0, 0.5);
  transition: transform 0.45s cubic-bezier(0.22, 0.8, 0.22, 1), border-radius 0.45s;
}
.hero-start::after {
  content: 'ᛟ';
  position: absolute;
  bottom: var(--s1);
  left: -16px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: var(--night);
  color: var(--gold);
  font: 19px/1 var(--serif);
  transition: transform 0.35s;
}
.start-orbit {
  inset: -4px;
  --text-radius: 62px;
  border: 1px dashed rgba(208, 173, 99, 0.55);
  border-radius: 50%;
  color: var(--gold);
  font: 700 8px var(--sans);
  animation: drift 12s linear infinite;
}
.start-core {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s1);
  color: var(--night);
}
.start-core b { font: italic 400 var(--fs-m) var(--serif); }
.start-core i { font-style: normal; font-size: var(--fs-body); transition: transform 0.35s cubic-bezier(0.22, 0.8, 0.22, 1); }
.hero-start:hover::before,
.hero-start:focus-visible::before {
  border-radius: 56% 44% 42% 58% / 46% 58% 42% 54%;
  transform: rotate(8deg) scale(1.05);
}
.hero-start:hover::after { transform: rotate(-18deg) scale(1.12); }
.hero-start:hover .start-orbit { animation-duration: 5s; }
.hero-start:hover .start-core i { transform: translate(5px, -4px) rotate(12deg); }
.hero-start:active::before { transform: scale(0.96); }

@keyframes startDrift { 50% { translate: 0 -7px; } }
@keyframes portalIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }

/* god strip */

.god-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: clamp(20px, 4vh, 52px) 0 auto;
  width: min(840px, 100%);
  border-top: 1px solid var(--line);
  text-align: left;
}
.god-card {
  position: relative;
  display: grid;
  grid-template-columns: 24px 32px 1fr;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  height: 64px;
  padding: var(--s2) var(--s3);
  border-right: 1px solid var(--line-soft);
  text-decoration: none;
  transition: background 0.25s;
}
.god-card::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: var(--god, var(--gold));
  opacity: 0.45;
  transition: opacity 0.25s;
}
.god-card:first-child { border-left: 1px solid var(--line-soft); }
.god-card:hover, .god-card:focus-visible { background: rgba(208, 173, 99, 0.07); }
.god-card:hover::after, .god-card:focus-visible::after { opacity: 1; }
.god-card > b { grid-row: 1 / 3; font: 400 var(--fs-caps-s) var(--sans); color: var(--mist); }
.god-card > span { grid-row: 1 / 3; font-size: 24px; color: var(--god, var(--gold)); transition: transform 0.25s; }
.god-card:hover > span { transform: translateY(-2px); }
.god-card > strong { align-self: end; font: 700 var(--fs-caps) var(--sans); letter-spacing: 0.12em; text-transform: uppercase; }
.god-card > small { align-self: start; font: italic var(--fs-caps-l) var(--serif); color: var(--parchment-dim); }

/* ------------------------------------------- quiz (ritual scene, screen 1) */

.quiz-stage {
  position: relative;
  width: min(1000px, 100%);
  margin: auto;
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  background: linear-gradient(175deg, var(--night-2), var(--night));
  padding: clamp(20px, 2.6vw, 36px) clamp(20px, 3.4vw, 44px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}
.quiz-stage::before {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid var(--line-soft);
  pointer-events: none;
}
.quiz-stage:focus { outline: none; }

.stage-note {
  text-align: center;
  color: var(--parchment-dim);
  font-style: italic;
}
noscript .stage-note {
  max-width: var(--measure);
  margin: var(--s5) auto 0;
  color: var(--gold);
}

.rune-button {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s5);
  padding: var(--s4) var(--s5);
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--night);
  cursor: pointer;
  font-size: var(--fs-caps-l);
  font-weight: 700;
  letter-spacing: 0.2em;
  transition: background 0.25s, color 0.25s, transform 0.25s, box-shadow 0.25s;
  box-shadow: 0 10px 26px rgba(208, 173, 99, 0.18);
}
.rune-button span { font: 400 var(--fs-body)/1 var(--serif); letter-spacing: 0; }
.rune-button:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(208, 173, 99, 0.26); }
.rune-button.is-ghost { background: none; color: var(--gold); box-shadow: none; }
.rune-button.is-ghost:hover { background: rgba(208, 173, 99, 0.12); }
.rune-button:active { transform: scale(0.97); }

.q-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding-bottom: var(--s4);
  border-bottom: 1px solid var(--line-soft);
}
.q-count {
  font-size: var(--fs-caps);
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--gold);
}
.q-note { font-size: var(--fs-caps-s); color: var(--mist); }

/* progress: past markers rewind, the current one burns gold, future are inert */
.q-dots { display: flex; gap: var(--s2); }
.q-dot {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font: 700 11px var(--sans);
  letter-spacing: 0.02em;
  color: var(--mist);
}
.q-dot.is-now { background: var(--gold); border-color: var(--gold); color: var(--night); }
.q-dot.is-past {
  color: var(--gold);
  border-color: var(--gold-deep);
  cursor: pointer;
  transition: background 0.22s, transform 0.22s;
}
.q-dot.is-past:hover { background: rgba(208, 173, 99, 0.15); transform: translateY(-2px); }
.q-dot.is-past:active { transform: translateY(0) scale(0.95); }
.q-dot:disabled { cursor: default; }

/* the ritual scene: guide on the left, carved choices on the right */
.quiz-grid {
  display: grid;
  grid-template-columns: minmax(168px, 208px) 1fr;
  gap: clamp(20px, 3.5vw, 48px);
  align-items: center;
  margin-top: var(--s5);
}

.guide-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: opacity 0.42s ease, transform 0.42s cubic-bezier(0.22, 0.8, 0.22, 1), filter 0.42s ease;
  animation: guideIn 0.42s cubic-bezier(0.22, 0.8, 0.22, 1) both;
}
.question-scene {
  min-width: 0;
  transition: opacity 0.42s ease, transform 0.42s cubic-bezier(0.22, 0.8, 0.22, 1), filter 0.42s ease;
  animation: sceneIn 0.42s cubic-bezier(0.22, 0.8, 0.22, 1) both;
}
.guide-card.is-leaving,
.question-scene.is-leaving {
  opacity: 0;
  filter: blur(3px);
  transform: translateX(-22px) scale(0.985);
}

@keyframes sceneIn { from { opacity: 0; transform: translateX(22px); } }
@keyframes guideIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes gpFade { from { opacity: 0; } }

.guide-portrait {
  position: relative;
  width: clamp(150px, 15vw, 186px);
  aspect-ratio: 150 / 205;
  border: 5px solid var(--night-3);
  border-radius: 50% 50% var(--radius) var(--radius);
  background: var(--night-2);
  box-shadow: 0 0 0 1px var(--gold-deep), 0 24px 44px rgba(4, 8, 14, 0.55);
  overflow: hidden;
}
.gp-layer {
  position: absolute;
  inset: 0;
  background-image: url('img/gods-character-sheet-stylized.jpg');
  background-size: 500% auto;
  background-position: calc(var(--slot, 0) * 25%) 50%;
  background-repeat: no-repeat;
  filter: saturate(0.9);
}
.gp-layer.is-top { animation: gpFade 0.42s ease both; }
.guide-portrait::after {
  /* inner vignette + god-color keyline */
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  border-bottom: 2px solid var(--god, var(--gold));
  box-shadow: inset 0 -34px 44px rgba(6, 9, 16, 0.62), inset 0 0 30px rgba(6, 9, 16, 0.3);
  pointer-events: none;
}
.guide-rune {
  position: relative;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border: 1px solid var(--god, var(--gold));
  border-radius: 50%;
  background: var(--night);
  color: var(--god, var(--gold));
  font: 400 21px/1 var(--serif);
}
.guide-line {
  max-width: 22ch;
  margin-top: var(--s3);
  padding: var(--s2) var(--s2) 0;
  border-top: 2px solid var(--god, var(--gold));
  font-style: italic;
  font-size: var(--fs-s);
  line-height: 1.5;
  color: var(--parchment-dim);
}

.q-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--fs-caps);
  font-weight: 700;
  color: var(--gold);
}
.q-eyebrow span {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  letter-spacing: 0;
}

.q-text {
  margin: var(--s4) 0 var(--s2);
  font: 400 clamp(26px, 2.6vw, 36px)/1.14 var(--serif);
  letter-spacing: -0.02em;
  text-align: left;
}

.q-sub {
  margin-bottom: var(--s4);
  font-style: italic;
  font-size: 15px;
  color: var(--parchment-dim);
}

.answers { display: grid; gap: var(--s3); }
.answer {
  display: grid;
  grid-template-columns: 32px 1fr 22px;
  align-items: center;
  gap: var(--s4);
  width: 100%;
  min-height: 56px;
  padding: var(--s3) var(--s4) var(--s3) var(--s3);
  border: 1px solid var(--line);
  background: linear-gradient(175deg, rgba(233, 226, 208, 0.05), rgba(233, 226, 208, 0.015));
  box-shadow: inset 0 1px 0 rgba(233, 226, 208, 0.05), 0 3px 0 rgba(4, 8, 14, 0.35);
  cursor: pointer;
  text-align: left;
  font: 400 17px/1.35 var(--serif);
  color: var(--parchment);
  transition: border-color 0.22s, background 0.22s, transform 0.22s, box-shadow 0.22s;
}
.answer > b {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font: 700 11px var(--sans);
  color: var(--gold);
  transition: background 0.22s, color 0.22s, border-color 0.22s;
}
.answer > i {
  font-style: normal;
  color: var(--gold);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.22s, transform 0.22s;
}
.answer:hover,
.answer:focus-visible {
  border-color: var(--gold);
  background: linear-gradient(175deg, rgba(208, 173, 99, 0.12), rgba(208, 173, 99, 0.04));
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(4, 8, 14, 0.45);
  box-shadow: 0 10px 24px rgba(4, 8, 14, 0.45),
    0 0 20px color-mix(in srgb, var(--god, var(--gold)) 24%, transparent);
}
.answer:hover > b,
.answer:focus-visible > b { background: var(--gold); border-color: var(--gold); color: var(--night); }
.answer:hover > i,
.answer:focus-visible > i { opacity: 1; transform: translateX(0); }
.answer.is-picked { border-color: var(--god, var(--gold)); background: rgba(208, 173, 99, 0.16); }
.answer:active { transform: translateY(0) scale(0.985); }
.answer:disabled { pointer-events: none; }
.answer:disabled:not(.is-picked) { opacity: 0.45; }

.q-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--s5);
}
.q-back {
  cursor: pointer;
  font-size: var(--fs-caps-s);
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--mist);
  padding: var(--s2) 0;
  transition: color 0.25s, letter-spacing 0.25s;
}
.q-back:hover:not(:disabled) { color: var(--gold); letter-spacing: 0.24em; }
.q-back:active:not(:disabled) { transform: translateX(-2px); }
.q-back:disabled { opacity: 0.35; cursor: default; }
.q-hint { font-size: var(--fs-caps-s); color: var(--mist); }
.q-rune-float { font-size: 24px; color: var(--god, var(--gold)); animation: runeFloat 3s ease-in-out infinite; }

@keyframes runeFloat { 50% { transform: translateY(-4px) rotate(4deg); } }

/* result */

.result-kicker {
  text-align: center;
  font-size: var(--fs-caps);
  font-weight: 700;
  color: var(--gold);
}

.result-god {
  display: grid;
  grid-template-columns: minmax(132px, 176px) 1fr;
  grid-template-rows: auto auto;
  gap: var(--s5) clamp(20px, 3.5vw, 36px);
  align-items: start;
  margin-top: var(--s5);
  padding-left: var(--s5);
  border-left: 2px solid var(--god, var(--gold));
}
.result-god .guide-card { grid-row: 1 / 3; align-self: center; }
.result-god .constellation { grid-column: 2; margin-top: 0; }
.guide-card.is-result .guide-portrait { width: 100%; }
.result-copy h2 {
  font: 400 var(--fs-d2)/1 var(--serif);
  letter-spacing: -0.03em;
}
.result-copy h2 em { color: var(--god, var(--gold)); font-style: italic; }
.result-role {
  margin-top: var(--s2);
  font-size: var(--fs-caps);
  font-weight: 700;
  color: var(--gold);
}
.result-role span { letter-spacing: 0; }
.result-note { margin-top: var(--s3); color: var(--parchment-dim); }
.result-more {
  display: inline-block;
  margin-top: var(--s4);
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-deep);
  padding-bottom: 2px;
  font-size: 15px;
}
.result-more:hover { border-color: var(--gold); color: var(--parchment); }

.constellation { margin-top: var(--s6); }
.constellation-title {
  font-size: var(--fs-caps);
  font-weight: 700;
  color: var(--mist);
  margin-bottom: var(--s3);
}
.constellation-bar {
  display: flex;
  gap: 2px;
  height: 12px;
}
.constellation-bar i { display: block; height: 100%; min-width: 2px; }

.result-rows { margin-top: var(--s4); display: grid; gap: var(--s2); }
.result-row {
  display: grid;
  grid-template-columns: 28px minmax(64px, 96px) 1fr 44px;
  align-items: center;
  gap: var(--s3);
}
.result-row .rune { font-size: 20px; text-align: center; }
.result-row .r-name b { display: block; font: 700 var(--fs-caps) var(--sans); letter-spacing: 0.12em; text-transform: uppercase; }
.result-row .r-name small { font: italic var(--fs-caps-l) var(--serif); color: var(--parchment-dim); }
.result-row .track { height: 6px; background: rgba(233, 226, 208, 0.08); }
.result-row .track i { display: block; height: 100%; transition: width 0.8s ease; }
.result-row .r-pct { font: 700 13px var(--sans); text-align: right; }

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  justify-content: center;
  margin-top: var(--s5);
}
.result-actions .rune-button { margin-top: 0; }

.share-line {
  margin-top: var(--s5);
  padding: var(--s3) var(--s4);
  border: 1px dashed var(--line);
  color: var(--parchment-dim);
  font-size: var(--fs-s);
  text-align: center;
  overflow-wrap: break-word;
}

/* ----------------------------------------------- codex intro (below fold) */

.codex-intro { padding: var(--sect) 4vw 0; }

/* -------------------------------------------------------- landscape band */

.land-band {
  position: relative;
  margin: var(--sect) 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.land-band img { width: 100%; filter: saturate(0.82) contrast(1.02); }
.land-band::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(10, 14, 23, 0.42), rgba(10, 14, 23, 0.05) 30% 62%, rgba(10, 14, 23, 0.66));
  pointer-events: none;
}
.land-band figcaption {
  position: absolute;
  bottom: var(--s4);
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  font-size: var(--fs-caps);
  color: var(--parchment);
  text-shadow: 0 1px 10px rgba(4, 8, 14, 0.9);
}

/* -------------------------------------------- archetype chapters (codex) */

.archetypes { padding: var(--sect) 4vw 0; }

.chapter {
  max-width: var(--measure);
  margin: var(--s9) auto 0;
  padding-left: clamp(20px, 3vw, 32px);
  border-left: 2px solid var(--god, var(--gold));
}
.section-head + .chapter { margin-top: var(--s8); }

.chapter-head {
  display: grid;
  grid-template-columns: minmax(80px, 104px) 1fr;
  gap: clamp(16px, 3vw, 24px);
  align-items: end;
}
.chapter-portrait {
  aspect-ratio: 2 / 5;
  border: 1px solid var(--god, var(--gold));
  border-radius: 999px 999px 8px 8px;
  background-image: url('img/gods-character-sheet-stylized.jpg');
  background-size: 500% 100%;
  background-position: calc(var(--slot, 0) * 25%) 50%;
  filter: saturate(0.9);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.chapter-meta {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-size: var(--fs-caps);
  font-weight: 700;
  color: var(--mist);
}
.chapter-rune { font: 400 21px/1 var(--serif); color: var(--god, var(--gold)); letter-spacing: 0; }
.chapter-role { color: var(--gold); }
.chapter-title h2 {
  margin-top: var(--s3);
  font: 400 var(--fs-d3)/1.08 var(--serif);
  letter-spacing: -0.03em;
}

.chapter-body { margin-top: var(--s5); }
.chapter-body p { margin: 0 0 var(--s4); color: var(--parchment-dim); }
.chapter-body p:first-of-type { color: var(--parchment); }
.chapter-body h3 {
  margin: var(--s6) 0 var(--s3);
  font-size: var(--fs-caps-l);
  font-weight: 700;
  color: var(--gold);
}
.chapter-body ul { margin: 0 0 var(--s4); list-style: none; }
.chapter-body li {
  position: relative;
  padding: var(--s1) 0 var(--s1) var(--s5);
  color: var(--parchment-dim);
}
.chapter-body li::before {
  content: '᛫';
  position: absolute;
  left: var(--s1);
  color: var(--god, var(--gold));
  font-size: 20px;
  line-height: 1.2;
}
.chapter-pull {
  border-left: 2px solid var(--god, var(--gold));
  margin-left: -2px;
  padding: var(--s1) 0 var(--s1) var(--s4);
  font-style: italic;
  font-size: var(--fs-m);
  color: var(--parchment) !important;
}

.chapter-cta {
  display: inline-flex;
  align-items: center;
  margin-top: var(--s2);
  padding: var(--s3) var(--s5);
  border: 1px solid var(--god, var(--gold));
  color: var(--parchment);
  text-decoration: none;
  font-size: var(--fs-caps);
  font-weight: 700;
  letter-spacing: 0.18em;
  transition: background 0.25s, color 0.25s, transform 0.25s;
}
.chapter-cta:hover,
.chapter-cta:focus-visible {
  background: var(--god, var(--gold));
  color: var(--night);
  transform: translateY(-2px);
}
.chapter-cta:active { transform: scale(0.97); }

/* ----------------------------------------------------------------- essay */

.essay { padding: var(--sect) 4vw 0; }
.essay-body { max-width: var(--measure); margin: var(--s6) auto 0; }
.essay-body > p { margin: 0 0 var(--s4); color: var(--parchment-dim); }
.essay-body > p:first-child { color: var(--parchment); font-size: 19px; }
.essay-list { margin: var(--s5) 0; list-style: none; border-top: 1px solid var(--line-soft); }
.essay-list li {
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--parchment-dim);
}
.essay-list strong {
  display: block;
  margin-bottom: var(--s1);
  font: 700 var(--fs-caps-l) var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--parchment);
}
.essay-list strong::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  margin-right: var(--s3);
  vertical-align: 3px;
  background: var(--god, var(--gold));
}
.essay .chapter-cta { --god: var(--gold); margin-top: var(--s2); }

/* ------------------------------------------------------------------- faq */

.faq { padding: var(--sect) 4vw var(--sect); }
.faq-list { max-width: var(--measure); margin: var(--s6) auto 0; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line-soft); }
.faq-item summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: var(--s5) var(--s7) var(--s5) 0;
  font: 400 var(--fs-m) var(--serif);
  letter-spacing: -0.01em;
  transition: color 0.25s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: 'ᛏ';
  position: absolute;
  right: var(--s2);
  top: 50%;
  translate: 0 -50%;
  color: var(--gold);
  font-size: var(--fs-body);
  transition: rotate 0.3s;
}
.faq-item[open] summary::after { rotate: 180deg; }
.faq-item summary:hover { color: var(--gold); }
.faq-item p { padding: 0 0 var(--s5); max-width: 36rem; color: var(--parchment-dim); }

/* ---------------------------------------------------------------- footer */

.site-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  border-top: 1px solid var(--line);
  padding: var(--s4) 3vw;
  font-size: var(--fs-caps-s);
  color: var(--mist);
}
.site-foot b { color: var(--gold); font-size: 13px; font-weight: 400; letter-spacing: 0.4em; }

/* -------------------------------------------- sponsor banner (persistent) */

.sponsor-banner {
  position: fixed;
  left: 50%;
  bottom: var(--banner-gap);
  translate: -50% 0;
  z-index: 1200; /* above the opening overlay (1000) */
  display: block;
  width: var(--banner-w);
  aspect-ratio: 1600 / 252;
  overflow: hidden;
  background: #06132f;
  border: 1px solid #16294f;
  border-top: 1px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(4, 8, 14, 0.55);
  transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.22, 1), box-shadow 0.3s;
}
.sponsor-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sponsor-banner:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px rgba(4, 8, 14, 0.65);
}
.sponsor-tag {
  position: absolute;
  top: 0;
  right: var(--s3);
  z-index: 2;
  padding: 3px 7px 4px;
  background: #06132f;
  border: 1px solid #1b2d55;
  border-top: 0;
  border-radius: 0 0 4px 4px;
  font-size: var(--fs-caps-s);
  font-weight: 700;
  color: var(--parchment-dim);
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 800px) {
  .site-nav { height: 60px; }
  .nav-note { display: none; }
  .hero { padding-top: 64px; }
  .hero h1 { margin-top: clamp(-100px, -12vh, -48px); }
  .story-portal { width: clamp(170px, 28vh, 74vw); }
  .portal-ring { --text-radius: clamp(93px, 15.4vh, 40.7vw); font-size: 10px; }
  .god-strip { grid-template-columns: repeat(5, 1fr); width: 100%; }
  .god-card { display: flex; flex-direction: column; justify-content: center; text-align: center; height: 56px; padding: var(--s1); gap: 2px; }
  .god-card > b, .god-card > small { display: none; }
  .god-card > span { font-size: 19px; }
  .god-card > strong { align-self: center; font-size: 10px; letter-spacing: 0.08em; }
  .result-god { grid-template-columns: 1fr; justify-items: center; text-align: center; padding-left: 0; border-left: 0; border-top: 2px solid var(--god, var(--gold)); padding-top: var(--s5); }
  .result-god .guide-card { grid-row: auto; }
  .result-god .constellation { grid-column: 1; width: 100%; }
  .guide-card.is-result { width: min(176px, 48vw); }
  .result-row { grid-template-columns: 24px minmax(56px, 80px) 1fr 40px; gap: var(--s2); }
  .chapter-head { grid-template-columns: minmax(64px, 80px) 1fr; align-items: center; }
  .chapter-meta { flex-wrap: wrap; gap: var(--s2) var(--s3); }
}

@media (max-width: 680px) {
  :root { --banner-w: 100vw; --banner-gap: 0px; }
  .sponsor-banner {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }
  .sponsor-banner:hover { transform: none; }
  /* ritual scene stacks: guide becomes a compact banner above the question */
  .quiz-grid { grid-template-columns: 1fr; gap: var(--s4); align-items: stretch; margin-top: var(--s4); }
  .guide-card { flex-direction: row; align-items: center; text-align: left; gap: var(--s3); }
  .guide-portrait { flex: 0 0 auto; width: 74px; border-width: 3px; }
  .guide-rune { flex: 0 0 auto; width: 32px; height: 32px; margin: 0 0 0 -18px; font-size: 16px; }
  .guide-line {
    flex: 1;
    max-width: none;
    margin: 0;
    padding: 0 0 0 var(--s3);
    border-top: 0;
    border-left: 2px solid var(--god, var(--gold));
    font-size: 13px;
  }
  .guide-card.is-result { flex-direction: column; text-align: center; }
  .guide-card.is-result .guide-rune { margin: -16px 0 0; }
  .q-note, .q-hint { display: none; }
  .answer { min-height: 50px; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .opening-copy { font-size: 19vw; }
  .whisper { font-size: var(--fs-body); }
  .quiz-stage { padding: var(--s4) var(--s3); }
  .q-dots { gap: var(--s1); }
  .q-dot { width: 24px; height: 24px; font-size: 10px; }
  .answer { grid-template-columns: 26px 1fr 14px; gap: var(--s2); padding: var(--s2) var(--s3); font-size: 15px; }
  .answer > b { width: 26px; height: 26px; font-size: 10px; }
  .site-foot { flex-direction: column; gap: var(--s2); text-align: center; }
}

/* short viewports: keep the first screen composed as one full-screen game
   (second range: wide screens where the floating banner bites ~190px of height) */
@media (max-height: 700px), (max-height: 880px) and (min-width: 1157px) {
  .whisper { display: none; }
  .intro { margin-top: var(--s2); font-size: 15px; }
  .hero-start { width: 108px; height: 108px; }
  .start-orbit { --text-radius: 52px; }
  .god-strip { margin-top: var(--s4); }
  .q-text { font-size: 24px; }
  .answer { min-height: 46px; padding: var(--s2) var(--s3); }
}

@media (max-height: 700px) and (min-width: 681px), (max-height: 880px) and (min-width: 1157px) {
  .guide-portrait { width: 140px; }
}

/* -------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .opening { display: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .story-portal, .portal-ring, .hero-start, .start-orbit { animation: none !important; translate: 0 !important; }
  .opening-orbit, .q-rune-float { animation: none !important; }
  .guide-card, .question-scene, .gp-layer.is-top, .scroll-cue b { animation: none !important; }
  .sponsor-banner:hover { transform: none; }
  .answer:hover, .answer:focus-visible { transform: none; }
}
