/* ═══════════════════════════════════════════════════════
   SOULNIGHT — Stylesheet
   Dark gothic fantasy · refined, tight, atmospheric
═══════════════════════════════════════════════════════ */

/* ─── RESET & BASE ─────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:        #06060c;
  --bg:           #0a0812;
  --surface:      #110d1c;
  --surface-2:    #170f26;
  --purple-deep:  #1a0a2e;
  --purple:       #6d28d9;
  --purple-mid:   #7c3aed;
  --purple-light: #a855f7;
  --purple-glow:  #c084fc;
  --gold:         #c9a84c;
  --text:         #e8e4f0;
  --text-mid:     #a195bc;
  --text-muted:   #6e6388;
  --text-dim:     #463c5e;
  --border:       rgba(168,85,247,0.14);
  --border-strong: rgba(168,85,247,0.28);
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--text);
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
}

::selection { background: rgba(168,85,247,0.3); color: #fff; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: rgba(109,40,217,0.5); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple); }

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

/* ─── MUSIC CONSENT MODAL ─────────────────── */
.music-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 6, 12, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}

.music-modal.show {
  display: flex;
}

.music-modal-content {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  max-width: 360px;
}

.music-modal-content p {
  font-size: 18px;
  margin-bottom: 30px;
  color: var(--text);
  font-weight: 500;
}

.music-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.music-modal-actions button {
  flex: 1;
  min-width: 100px;
}

/* ─── STARFIELD CANVAS ─────────────────── */
#starfield {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
}

/* All major content layers above the starfield */
nav.site-nav,
.hero,
.page-header,
.home-features,
.lore-section,
.lore-timeline,
.roster,
.loc-section,
.pantheon-section,
footer.site-footer {
  position: relative;
  z-index: 1;
}

/* Body transparent so stars show through */
body { background: var(--black); }

/* ─── LAYOUT WRAPPER ───────────────────── */
.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
}

.wrap-narrow {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ─── NAVIGATION ───────────────────────── */
nav.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
  padding: 0 2.6rem;
  background: linear-gradient(180deg, rgba(6,6,12,0.94) 0%, rgba(6,6,12,0.78) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
/* Faint gold accent strip beneath the nav for a touch of refinement */
nav.site-nav::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(201, 168, 76, 0.18) 30%,
    rgba(201, 168, 76, 0.18) 70%,
    transparent 100%);
  pointer-events: none;
}

.nav-brand {
  display: flex; align-items: center;
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
  line-height: 1;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}
.nav-brand:hover {
  color: var(--purple-glow);
  text-shadow: 0 0 16px rgba(192, 132, 252, 0.35);
}

.nav-links {
  display: flex; align-items: center; gap: 0.3rem;
  list-style: none;
}
.nav-links a {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text-muted);
  padding: 0.55rem 1.15rem;
  line-height: 1;
  transition: color 0.25s ease, text-shadow 0.3s ease;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 0.2rem;
  width: 0; height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--purple-glow), transparent);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 60%; }
.nav-links a.active {
  color: var(--purple-glow);
  text-shadow: 0 0 14px rgba(192, 132, 252, 0.35);
}
.nav-links a.active::after { width: 75%; }

.nav-discord {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'EB Garamond', serif;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(109,40,217,0.18);
  border: 1px solid var(--border-strong);
  padding: 0.45rem 1rem;
  border-radius: 2px;
  transition: background 0.2s, border-color 0.2s;
}
.nav-discord:hover {
  background: rgba(109,40,217,0.35);
  border-color: var(--purple-light);
}

/* Mobile nav toggle */
.nav-toggle { display: none; }

/* ─── PAGE HEADER ──────────────────────── */
.page-header {
  position: relative;
  z-index: 1;
  padding: 9rem 2rem 3.5rem;
  text-align: center;
}
.page-eyebrow {
  font-family: 'Jim Nightshade', cursive;
  font-size: clamp(1.3rem, 1.7vw, 1.7rem);
  letter-spacing: 0;
  text-transform: none;
  color: var(--purple-glow);
  margin-bottom: 0.7rem;
  line-height: 1;
}
.page-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 0.6rem;
}
.page-subtitle {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 1.12rem;
  color: var(--text-mid);
  max-width: 580px;
  margin: 0 auto;
}

/* Wider subtitle specifically for the Pantheon page */
.pantheon-page .page-subtitle {
  max-width: 920px;
  font-size: 1.06rem;
  line-height: 1.8;
  padding: 0 1.6rem;
}

/* Ornament — gold line + diamond divider */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.15rem;
  margin: 0.85rem auto 1.15rem;
}
.ornament-line {
  width: 72px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.ornament-diamond {
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(201, 168, 76, 0.35);
}
.lore-book .ornament-line {
  width: min(160px, 28vw);
}

/* ─── BUTTONS ──────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'EB Garamond', serif;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.95rem 2.2rem;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  /* Chunky 3D depth — dark "edge" sits below the button */
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.45);
  transition: transform 0.12s ease, box-shadow 0.12s ease,
              background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  position: relative;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.5);
}
.btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}
.btn-primary {
  background: var(--purple);
  border-color: var(--purple-mid);
  color: #fff;
}
.btn-primary:hover {
  background: var(--purple-mid);
  border-color: var(--purple-light);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-mid);
}
.btn-ghost:hover {
  border-color: var(--purple-light);
  color: var(--text);
  background: rgba(109,40,217,0.08);
}

/* ═══════════════════════════════════════════════
   HOME PAGE
═══════════════════════════════════════════════ */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 7rem 2rem 4rem;
  position: relative;
  z-index: 1;
  overflow: visible;
}

/* Hero figure — Avoria illustration, desktop only */
.hero-figure { display: none; }

@media (min-width: 1024px) {
  .hero {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    gap: 4rem;
    max-width: 2200px;
    margin-left: auto;
    margin-right: auto;
    padding: 7rem 3.5rem 4rem;
  }
  .hero-content {
    flex: 0 1 520px;
    text-align: left;
    position: relative;
    z-index: 2;
  }
  .hero-content .hero-eyebrow,
  .hero-content .hero-tagline {
    margin-left: 0;
    margin-right: 0;
    text-align: left;
  }
  .hero-content .hero-actions {
    justify-content: flex-start;
  }
  .hero-content .hero-ornament {
    justify-content: flex-start;
    margin: -0.2rem 0 1.8rem;
  }
  .hero-figure {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 1200px;
    position: relative;
    z-index: 1;
    opacity: 0;
    animation: heroFigureIn 1.4s 0.7s ease forwards;
    transform: none;
  }
}

.hero-figure {
  position: relative;
  overflow: visible;
  padding: 16px;
}

/* Particle effects orbiting around the figure */
.hero-figure::before {
  content: '';
  position: absolute;
  top: -120px;
  left: -120px;
  right: -120px;
  bottom: -20px;
  border-radius: 50%;
  background: 
    radial-gradient(circle at 20% 30%, rgba(192, 132, 252, 0.15) 0%, transparent 2%),
    radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.12) 0%, transparent 2%),
    radial-gradient(circle at 90% 70%, rgba(192, 132, 252, 0.1) 0%, transparent 2%),
    radial-gradient(circle at 10% 80%, rgba(168, 85, 247, 0.12) 0%, transparent 2%),
    radial-gradient(circle at 70% 90%, rgba(192, 132, 252, 0.12) 0%, transparent 2%);
  animation: particleOrbit 30s linear infinite;
  pointer-events: none;
  z-index: -1;
}

/* Second particle layer for depth */
.hero-figure::after {
  content: '';
  position: absolute;
  top: -180px;
  left: -180px;
  right: -180px;
  bottom: -40px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 15% 50%, rgba(168, 85, 247, 0.08) 0%, transparent 1.5%),
    radial-gradient(circle at 85% 40%, rgba(192, 132, 252, 0.08) 0%, transparent 1.5%),
    radial-gradient(circle at 50% 10%, rgba(168, 85, 247, 0.06) 0%, transparent 1.5%),
    radial-gradient(circle at 40% 95%, rgba(192, 132, 252, 0.08) 0%, transparent 1.5%);
  animation: particleOrbit 45s linear infinite reverse;
  pointer-events: none;
  z-index: -1;
}

.hero-figure img {
  width: auto;
  max-width: 100%;
  max-height: 88vh;   /* keep the whole illustration visible in the viewport */
  height: auto;
  margin: 0 auto;
  display: block;
  animation: heroFloat 10s ease-in-out infinite, heroShimmer 6s ease-in-out infinite 0.3s;
  user-select: none;
  -webkit-user-drag: none;
  position: relative;
  z-index: 2;
}

@keyframes heroFigureIn {
  to { opacity: 1; }
}

@keyframes heroFloat {
  0%, 100% { 
    transform: translateY(0) rotate(0deg) scale(1);
  }
  25% {
    transform: translateY(-14px) rotate(0.8deg) scale(1.01);
  }
  50% {
    transform: translateY(-18px) rotate(-1deg) scale(1);
  }
  75% {
    transform: translateY(-12px) rotate(1.2deg) scale(1.005);
  }
}

@keyframes heroShimmer {
  0%, 100% {
    filter: drop-shadow(0 0 0px rgba(192, 132, 252, 0));
  }
  50% {
    filter: drop-shadow(-8px 0 12px rgba(192, 132, 252, 0.25)) drop-shadow(8px 0 12px rgba(168, 85, 247, 0.15));
  }
}

@keyframes particleOrbit {
  0% {
    transform: rotate(0deg);
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: rotate(360deg);
    opacity: 0.6;
  }
}

.hero-eyebrow {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: none;
  color: var(--purple-light);
  margin-bottom: 1.2rem;
  line-height: 1;
  opacity: 0;
  animation: fadeUp 0.7s 0.2s ease forwards;
}
.hero-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(3.6rem, 12vw, 11rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 1.8rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.4s ease forwards;
}
.hero-title span { color: var(--purple-mid); }

.hero-tagline {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: clamp(1.4rem, 2.6vw, 2.3rem);
  color: var(--text-mid);
  max-width: 680px;
  margin: 0 auto 2.8rem;
  line-height: 1.4;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s ease forwards;
}

/* ─── Hero ornament (thin gold line + diamond between title & tagline) */
.hero-ornament {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  justify-content: center;
  margin: -0.2rem auto 1.6rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.55s ease forwards;
}
.hero-ornament-line {
  height: 1px;
  width: 70px;
  background: linear-gradient(to right, transparent, var(--gold) 60%, var(--gold));
  opacity: 0.7;
}
.hero-ornament-line--right {
  background: linear-gradient(to right, var(--gold), var(--gold) 40%, transparent);
}
.hero-ornament-diamond {
  width: 7px; height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  opacity: 0.9;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(201, 168, 76, 0.4);
}

/* ─── Hero ambient glow — soft violet aura behind the text column.
   Gives the SOULNIGHT block depth instead of floating on pure black. */
.hero-content {
  position: relative;
}
.hero-content::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 130%; height: 115%;
  background: radial-gradient(ellipse 55% 50% at 50% 50%,
    rgba(124, 58, 237, 0.15) 0%,
    rgba(109, 40, 217, 0.06) 38%,
    transparent 72%);
  filter: blur(70px);
  pointer-events: none;
  z-index: -1;
  opacity: 0;
  animation: heroGlowIn 2s 0.4s ease forwards;
}
@keyframes heroGlowIn {
  to { opacity: 1; }
}

.hero-actions {
  display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center;
  opacity: 0;
  animation: fadeUp 0.8s 0.8s ease forwards;
}

.scroll-hint {
  position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  font-family: 'EB Garamond', serif;
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  animation: pulse 2.5s infinite;
}
.scroll-hint::after {
  content: '';
  width: 1px; height: 28px;
  background: linear-gradient(to bottom, var(--purple), transparent);
}

/* Home features section */
.home-features {
  padding: 5rem 0 6rem;
  position: relative;
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(109,40,217,0.08) 0%, transparent 55%),
    linear-gradient(to bottom, rgba(10,4,24,0.6) 0%, transparent 30%);
}
.home-features::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: min(92%, 1100px);
  height: 4px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(168, 85, 247, 0.18) 18%,
    rgba(168, 85, 247, 0.38) 50%,
    rgba(168, 85, 247, 0.18) 82%,
    transparent 100%);
}

.home-features-title {
  text-align: center;
  margin-bottom: 3rem;
}
.section-eyebrow {
  font-family: 'Jim Nightshade', cursive;
  font-size: clamp(1.25rem, 1.6vw, 1.55rem);
  letter-spacing: 0;
  text-transform: none;
  color: var(--purple-light);
  margin-bottom: 0.5rem;
  line-height: 1;
  opacity: 0.95;
}
.home-features-title h2 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text);
  margin-bottom: 0.4rem;
}

/* Journey list — editorial chapter index */
.journey-list {
  list-style: none;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0;
}
.journey-item {
  position: relative;
}
/* Gradient divider above every item (incl. the first — that's the top section
   line) and below the last item for the closing edge. Fades at the ends so
   the bar reads soft instead of a chunky solid stripe. */
.journey-item::before,
.journey-item:last-child::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(168, 85, 247, 0.18) 18%,
    rgba(168, 85, 247, 0.38) 50%,
    rgba(168, 85, 247, 0.18) 82%,
    transparent 100%);
  pointer-events: none;
  z-index: 1;
}
.journey-item::before { top: 0; }
.journey-item:last-child::after { bottom: 0; }
/* Staggered reveal — each row drifts in slightly later than the last */
.journey-item.reveal { transition-delay: 0s; }
.journey-item.reveal:nth-child(2) { transition-delay: 0.06s; }
.journey-item.reveal:nth-child(3) { transition-delay: 0.12s; }
.journey-item.reveal:nth-child(4) { transition-delay: 0.18s; }
.journey-item.reveal:nth-child(5) { transition-delay: 0.24s; }

.journey-link {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 2.5rem;
  padding: 2.4rem 1.8rem 2.4rem 1.2rem;
  color: inherit;
  text-decoration: none;
  position: relative;
  transition: padding 0.4s ease;
}
.journey-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(109, 40, 217, 0.08) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.journey-link:hover {
  padding-left: 2rem;
}
.journey-link:hover::before {
  opacity: 1;
}

.journey-num {
  font-family: 'EB Garamond', serif;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  transition: color 0.4s ease;
}
.journey-link:hover .journey-num {
  color: var(--purple-glow);
}

.journey-body {
  min-width: 0;
}
.journey-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  margin-bottom: 0.55rem;
  line-height: 1.1;
  transition: color 0.4s ease;
}
.journey-link:hover .journey-title {
  color: var(--purple-glow);
}
.journey-desc {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 580px;
  line-height: 1.55;
  margin: 0;
}

.journey-arrow {
  font-family: 'EB Garamond', serif;
  font-size: 1.6rem;
  color: var(--text-dim);
  display: inline-block;
  transition: color 0.4s ease, transform 0.4s ease;
}
.journey-link:hover .journey-arrow {
  color: var(--purple-glow);
  transform: translate(8px, -8px);
}

/* ═══════════════════════════════════════════════
   LORE PAGE
═══════════════════════════════════════════════ */
.lore-section {
  padding: 1.5rem 0 4rem;
}
/* Wider container on the lore page so images can be bigger on desktop */
.lore-section .wrap-narrow,
.lore-timeline .wrap-narrow {
  max-width: 1200px;
}

/* Book divider — major chapter break between scripture sequences */
.lore-book {
  text-align: center;
  padding: 2.75rem 0 0.5rem;
  position: relative;
}
.lore-book:first-child { padding-top: 1rem; }
.lore-book + .lore-block {
  border-top: none;
  padding-top: 1.75rem;
}
.lore-book-eyebrow {
  font-family: 'Jim Nightshade', cursive;
  font-size: clamp(1.5rem, 2vw, 1.95rem);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--purple-glow);
  margin-bottom: 0.35rem;
  line-height: 1;
}
.lore-book-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  margin-bottom: 0;
}

.lore-block {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 3.2rem;
  align-items: center;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}
.lore-block:last-child { border-bottom: none; }
.lore-block.reverse { grid-template-columns: 1fr 1.15fr; }
.lore-block.reverse .lore-image-box { order: 2; }

.lore-image-box {
  width: 100%;
  height: 440px;
  align-self: center;
  position: relative;
  background: linear-gradient(135deg, #150828 0%, #0a0418 50%, #1c0e3a 100%);
  border: 1px solid var(--border);
  overflow: hidden;
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
}
.lore-image-box .placeholder {
  font-family: 'EB Garamond', serif;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  text-transform: uppercase;
  text-align: center;
  padding: 0 1rem;
  z-index: 1;
}
.lore-image-box img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 2;
  display: block;
}

.lore-chapter {
  font-family: 'EB Garamond', serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--purple-glow);
  margin-bottom: 0.85rem;
}
.lore-heading {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.5rem, 2.4vw, 1.95rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 1.1rem;
}
.lore-text {
  color: #d4cce8;
  font-size: 1.05rem;
  line-height: 1.78;
  margin-bottom: 1rem;
}
.lore-text em { color: var(--purple-glow); font-style: italic; }

/* Narration / stage-direction lines in the Storyteller interlude */
.lore-narration {
  color: #b8aed2;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.72;
  margin-bottom: 1rem;
}

/* Storyteller interlude — single-column reading layout with image breaks */
.lore-story {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 0 1.5rem;
}
.lore-story .lore-text {
  font-size: 1.08rem;
  line-height: 1.8;
}
.lore-story-figure {
  display: block;
  width: 100%;
  height: 380px;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--border);
  border-radius: 3px;
  margin: 2.6rem 0;
  box-shadow: 0 14px 40px rgba(0,0,0,0.4);
}
.lore-story-figure:first-child { margin-top: 0.5rem; }

.lore-quote {
  margin: 1.4rem 0 0;
  padding: 1rem 1.4rem;
  border-left: 2px solid var(--purple-light);
  background: rgba(109,40,217,0.06);
  font-style: italic;
  color: var(--text-mid);
  font-size: 0.98rem;
  line-height: 1.6;
}

/* Timeline */
.lore-timeline {
  padding: 2rem 0 4rem;
}
.timeline-heading {
  text-align: center;
  margin-bottom: 2.5rem;
}
.timeline-heading h2 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.4rem;
  letter-spacing: 0.1em;
  color: var(--text);
}

.timeline {
  position: relative;
  padding-left: 1.8rem;
  max-width: 720px;
  margin: 0 auto;
}
.timeline::before {
  content: '';
  position: absolute; left: 0; top: 0.5rem; bottom: 0.5rem;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--purple), var(--purple), transparent);
}
.timeline-item {
  position: relative;
  padding: 0 0 2rem 1.2rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute; left: -0.25rem; top: 0.5rem;
  width: 7px; height: 7px;
  background: var(--purple-light);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(168,85,247,0.5);
}
.timeline-era {
  font-family: 'EB Garamond', serif;
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--purple-light);
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.timeline-title {
  font-family: 'EB Garamond', serif;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.timeline-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════
   TOP 10 PAGE — character roster carousel
   Background + accent shift per character via --accent / --bg-a / --bg-b
═══════════════════════════════════════════════ */
@property --accent {
  syntax: '<color>';
  inherits: true;
  initial-value: #c084fc;
}
@property --bg-a {
  syntax: '<color>';
  inherits: true;
  initial-value: #2a1052;
}
@property --bg-b {
  syntax: '<color>';
  inherits: true;
  initial-value: #0a0612;
}

.char-page-header { padding-bottom: 1.5rem; }

.roster {
  position: relative;
  z-index: 1;
  --accent: #c084fc;
  --bg-a: #2a1052;
  --bg-b: #0a0612;
  padding: 1rem 0 4rem;
  transition: --accent 0.85s ease, --bg-a 0.85s ease, --bg-b 0.85s ease;
}

/* Full-bleed background wash that crossfades between characters.
   z-index 0 keeps it above the global starfield (also fixed) but below the
   roster content, since .roster establishes its own z-index:1 context. */
.roster::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 85% 80% at 50% 42%, var(--bg-a) 0%, var(--bg-b) 78%);
  transition: background 0.9s ease;
  pointer-events: none;
}

.roster-stage {
  position: relative;
  max-width: 1500px;
  margin: 0 auto;
  min-height: 780px;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  gap: 1rem 2rem;
  padding: 0 2rem;
}

/* ── Figures ──────────────────────────── */
.roster-figure-wrap {
  position: relative;
  height: 780px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.roster-figure {
  max-height: 100%;
  max-width: 110%;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 25px 50px rgba(0, 0, 0, 0.55));
  z-index: 3;
  transform: translateX(var(--swap-x, 0)) translateY(var(--swap-y, 0)) scale(var(--figure-scale, 1));
  transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.roster-figure.is-swapping {
  opacity: 0;
  transform: translateX(var(--swap-x, 0)) translateY(var(--swap-y, 0)) scale(calc(var(--figure-scale, 1) * 0.97));
}

/* Ghosted neighbour figures behind the active one */
.roster-ghost {
  position: absolute;
  height: 88%;
  width: auto;
  max-width: 46%;
  object-fit: contain;
  opacity: 0.48;
  filter: grayscale(0.15) brightness(0.72) blur(5px);
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.65s ease, filter 0.65s ease;
}
.roster-ghost--prev {
  left: -1%;
  top: 54%;
  transform: translateY(-46%) scale(0.92);
}
.roster-ghost--next {
  right: 38%;
  top: 50%;
  transform: translateY(-50%) scale(0.95);
}

/* ── Info panel ───────────────────────── */
.roster-info {
  position: relative;
  z-index: 4;
  max-width: 540px;
}
.roster-rank {
  display: inline-block;
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: #fff;
  margin-bottom: 0.5rem;
}
.roster-name {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.01em;
  color: #fff;
  margin-bottom: 1.4rem;
  white-space: pre-line;
}
.roster-desc {
  font-family: 'EB Garamond', serif;
  font-size: 1.15rem;
  line-height: 1.75;
  color: #e4ddf0;
}
.roster-muse {
  font-family: 'EB Garamond', serif;
  font-style: normal;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #fff;
  margin-top: 1.3rem;
}
.roster-rank, .roster-name, .roster-desc, .roster-muse {
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.6s ease;
  /* Defensive: prevent iOS data-detector underlines / tap-callout on names */
  text-decoration: none;
  -webkit-text-decoration: none;
  -webkit-touch-callout: none;
}
.roster-info.is-swapping .roster-rank,
.roster-info.is-swapping .roster-name,
.roster-info.is-swapping .roster-desc,
.roster-info.is-swapping .roster-muse {
  opacity: 0;
  transform: translateY(-10px);
}

/* ── Controls ─────────────────────────── */
.roster-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  margin-top: 1.75rem;
  position: relative;
  z-index: 4;
}
.roster-arrow {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, rgba(6,6,12,0.55));
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease, color 0.5s ease;
}
.roster-arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0612;
  transform: scale(1.08);
}
.roster-arrow:active { transform: scale(0.96); }

.roster-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  max-width: 280px;
}
.roster-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  padding: 0;
  border: none;
  flex-shrink: 0;
  transition: background 0.3s ease, transform 0.3s ease;
}
.roster-dot:hover { background: rgba(255, 255, 255, 0.5); }
.roster-dot.active {
  background: var(--accent);
  transform: scale(1.4);
}

/* ═══════════════════════════════════════════════
   LOCATIONS PAGE — Marvel-style image grid
═══════════════════════════════════════════════ */
.loc-section {
  padding: 1rem 0 4rem;
}

/* Remove small tag labels (e.g. "Sacred · Infinite Space") on locations */
.loc-section .loc-tag { display: none !important; }

/* Featured area: stacked vertical cards */
.loc-featured,
.loc-row-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.4rem;
  margin-bottom: 1.4rem;
}

.loc-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: default;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.18);
  height: auto;
}

/* Image fills the card and sits above content */
.loc-card img {
  position: static;
  width: 100%;
  height: 380px;
  object-fit: cover;
  z-index: 0;
  transform: none;
  transition: none;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}
.loc-card:hover img {
  transform: none;
  filter: none;
}

/* Text block below the image */
.loc-overlay {
  position: static;
  z-index: 1;
  background: var(--surface);
  display: block;
  padding: 1.4rem 1.6rem 1.8rem;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.loc-card:hover .loc-overlay {
  background: var(--surface);
}

.loc-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: 'EB Garamond', serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
  margin-bottom: 0.7rem;
  width: fit-content;
  /* No pill — clean editorial label */
  background: transparent;
  border: none;
  padding: 0;
  border-radius: 0;
  backdrop-filter: none;
}
/* Small vertical accent tick — gives visual structure without a box */
.loc-tag::before {
  display: none; /* decorative tick removed */
}
.loc-name {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.85rem;
  line-height: 1.15;
  letter-spacing: 0.02em;
}
.loc-name::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 18px;
  background: var(--purple-glow);
  border-radius: 999px;
}
.loc-card.span-row .loc-name {
  font-size: 1.25rem;
}

.loc-desc {
  font-family: 'EB Garamond', serif;
  font-size: 0.92rem;
  color: #d4cce8;
  line-height: 1.55;
  max-height: none; /* always visible */
  overflow: visible;
  opacity: 1;
  transform: none;
  transition: none;
}
.loc-card.span-row .loc-desc {
  font-size: 0.92rem;
}

/* ═══════════════════════════════════════════════
   PANTHEON PAGE — deity codex with side nav
═══════════════════════════════════════════════ */
.pantheon-section {
  padding: 0 0 4rem;
  position: relative;
}
/* Make the pantheon page use a wider container than other pages */
.pantheon-section .wrap {
  max-width: 1640px;
}
/* Ambient cosmic glow behind the whole layout — sells the "this is sacred" feel */
.pantheon-section::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 110%; height: 110%;
  background:
    radial-gradient(ellipse 50% 45% at 35% 50%,
      rgba(168, 85, 247, 0.055) 0%,
      rgba(109, 40, 217, 0.025) 35%,
      transparent 70%),
    radial-gradient(ellipse 40% 35% at 70% 50%,
      rgba(120, 70, 200, 0.035) 0%,
      transparent 60%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.pantheon-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 0;
  min-height: 780px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  position: relative;
  z-index: 1;
}

/* ── Sidebar ──────────────────────────── */
.deity-sidebar {
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(26,15,46,0.55) 0%, rgba(15,10,28,0.85) 100%);
  display: flex;
  flex-direction: column;
}
.deity-sidebar-header {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border);
}
.deity-sidebar-label {
  font-family: 'EB Garamond', serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.deity-tab {
  display: grid;
  grid-template-columns: 28px 64px 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  background: none;
  border-left: 3px solid transparent;
  border-right: none; border-top: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: inherit;
  transition: background 0.25s ease, border-left-color 0.25s ease;
}
.deity-tab:last-of-type { border-bottom: none; }
.deity-tab:hover {
  background: rgba(109,40,217,0.07);
}
.deity-tab.active {
  background: linear-gradient(90deg, rgba(168,85,247,0.14) 0%, rgba(109,40,217,0.03) 100%);
  border-left-color: var(--purple-glow);
}

.deity-tab-num {
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1;
  transition: color 0.25s ease;
}
.deity-tab.active .deity-tab-num,
.deity-tab:hover .deity-tab-num {
  color: var(--purple-glow);
}
.deity-tab.active .deity-tab-name {
  color: var(--text);
}

.deity-thumb {
  width: 64px;
  height: 64px;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--purple-deep);
  flex-shrink: 0;
  display: block;
  position: relative;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.deity-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.78) brightness(0.82);
  transition: filter 0.35s ease, transform 0.5s ease;
}
.deity-tab:hover .deity-thumb img {
  filter: saturate(0.95) brightness(0.95);
  transform: scale(1.04);
}
.deity-tab.active .deity-thumb {
  border-color: var(--purple-light);
}
.deity-tab.active .deity-thumb img {
  filter: saturate(1.05) brightness(1.0);
}

.deity-tab-text {
  min-width: 0;
  overflow: hidden;
}
.deity-tab-name {
  font-family: 'EB Garamond', serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.25s ease;
}
.deity-tab.active .deity-tab-name { color: var(--text); }
.deity-tab-domain {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Main display ─────────────────────── */
.deity-main {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 780px;
  background: var(--bg);
}

.deity-panel {
  display: none;
  grid-column: 1 / -1;
  grid-template-columns: 1fr 1fr;
}
.deity-panel.active {
  display: grid;
  animation: deityFadeIn 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes deityFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.deity-art {
  position: relative;
  min-height: 580px;
  overflow: hidden;
  background: #0a0418;
}
.deity-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Anchor the crop to the top so faces/heads are never cut off
     (portraits are taller than the frame, so legs crop instead). */
  object-position: center top;
  filter: brightness(0.88) saturate(0.92);
}
/* Right-edge fade so the art transitions into the content panel seamlessly */
.deity-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, transparent 55%, var(--bg) 100%),
    radial-gradient(ellipse at 50% 60%, transparent 40%, rgba(6,6,12,0.55) 100%);
  pointer-events: none;
}
/* Cinematic light: top-down beam + bottom darken for theatrical depth */
.deity-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    /* top light beam — like a spotlight from above */
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.06) 0%,
      rgba(168, 85, 247, 0.04) 18%,
      transparent 45%),
    /* bottom darken for grounded weight */
    linear-gradient(to top, rgba(6,6,12,0.55) 0%, transparent 38%),
    /* corner vignette — slight darken at edges */
    radial-gradient(ellipse 100% 100% at 50% 50%, transparent 50%, rgba(6,6,12,0.45) 100%);
  pointer-events: none;
  z-index: 1;
}

.deity-content {
  padding: 3.5rem 3.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.deity-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-family: 'EB Garamond', serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  padding: 0;
  border: none;
  background: none;
  width: auto;
}
.deity-badge::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold));
  opacity: 0.7;
}
.deity-badge::after {
  content: '';
  display: inline-block;
  width: 28px;
  height: 1px;
  background: linear-gradient(to right, var(--gold), transparent);
  opacity: 0.7;
}

.deity-name {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(2.8rem, 4.8vw, 4.4rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.02;
  margin-bottom: 0.6rem;
  letter-spacing: 0.03em;
}
.deity-epithet {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  color: var(--purple-glow);
  font-size: 1.05rem;
  margin-bottom: 1.6rem;
  line-height: 1.4;
}
.deity-desc {
  color: #d4cce8;
  font-size: 1rem;
  line-height: 1.78;
  margin-bottom: 2rem;
}

.deity-attrs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
  position: relative;
}
/* Decorative diamond ornament at the center-top of the divider line */
.deity-attrs::before {
  content: '';
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 7px; height: 7px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
}
.deity-attrs > div {
  position: relative;
  padding: 0 1.4rem;
}
.deity-attrs > div:first-child { padding-left: 0; }
.deity-attrs > div:last-child  { padding-right: 0; }
/* Soft vertical dividers that fade at top and bottom — less heavy than solid lines */
.deity-attrs > div:not(:first-child)::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 1px;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(168,85,247,0.18) 25%,
    rgba(168,85,247,0.18) 75%,
    transparent 100%);
}

.deity-attr-label {
  font-family: 'EB Garamond', serif;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
/* Tiny bullet before each label for refinement */
.deity-attr-label::before {
  content: '';
  width: 4px; height: 4px;
  background: var(--purple-glow);
  opacity: 0.5;
  transform: rotate(45deg);
}
/* Mysterious "redacted" treatment for ??? placeholder values */
.deity-attr-value {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--purple-glow);
  opacity: 0.6;
  line-height: 1;
  text-shadow: 0 0 18px rgba(168, 85, 247, 0.3);
}

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
footer.site-footer {
  position: relative; z-index: 1;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem 2rem;
  text-align: center;
}
.footer-logo {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
}
.footer-discord {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: 'EB Garamond', serif;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: #5865F2;
  color: #fff;
  padding: 0.65rem 1.6rem;
  border-radius: 3px;
  transition: background 0.2s;
  margin-bottom: 1.8rem;
}
.footer-discord:hover { background: #4752c4; }
.footer-copy {
  font-family: 'EB Garamond', serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: #ddd6ec;
}
.footer-madeby {
  font-family: 'EB Garamond', serif;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: #bcb4d4;
  margin-top: 0.35rem;
}

/* ─── FLOATING DISCORD ─────────────────── */
.discord-float {
  position: fixed;
  bottom: 1.4rem; right: 1.4rem;
  z-index: 90;
  width: 46px; height: 46px;
  background: #5865F2;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}
.discord-float:hover {
  transform: scale(1.08);
}

/* ─── ANIMATIONS ───────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.85; }
}

/* ─── REVEAL ON SCROLL ─────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── RESPONSIVE ───────────────────────── */
@media (max-width: 1024px) {
  .roster-stage {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 1.5rem;
    padding: 0 1.5rem;
  }
  .roster-figure-wrap { height: 480px; }
  .roster-figure { max-width: 100%; }
  .roster-ghost { display: none; }
  .roster-info { max-width: none; text-align: center; margin: 0 auto; }
  .loc-card { height: 300px; }
  .pantheon-layout { grid-template-columns: 240px 1fr; }
  .deity-panel { grid-template-columns: 1fr; }
  .deity-art { min-height: 280px; }
  .deity-content { padding: 2.2rem 2rem; }
}

@media (max-width: 720px) {
  /* ── Nav ─────────────────────────────── */
  nav.site-nav { padding: 0 1rem; height: 62px; }
  .nav-brand { font-size: 1.15rem; letter-spacing: 0.08em; position: relative; z-index: 102; }

  /* Full-screen takeover menu */
  .nav-links {
    display: flex;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    flex-direction: column;
    align-items: center; justify-content: center;
    gap: 0.75rem;
    background: #06060c;
    padding: 5rem 1.5rem 4rem;
    z-index: 95;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    overflow-y: auto;
  }
  /* Release the containing block created by nav's backdrop-filter so the
     fixed-positioned menu can size relative to the viewport */
  body.nav-open nav.site-nav {
    background: #06060c;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav-links li {
    width: 100%;
    max-width: 360px;
    list-style: none;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }
  .nav-links.open li { opacity: 1; transform: translateY(0); }
  .nav-links.open li:nth-child(1) { transition-delay: 0.06s; }
  .nav-links.open li:nth-child(2) { transition-delay: 0.11s; }
  .nav-links.open li:nth-child(3) { transition-delay: 0.16s; }
  .nav-links.open li:nth-child(4) { transition-delay: 0.21s; }
  .nav-links.open li:nth-child(5) { transition-delay: 0.26s; }
  .nav-links.open li:nth-child(6) { transition-delay: 0.31s; }

  /* Framed button-style links */
  .nav-links a {
    display: block;
    width: 100%;
    font-family: 'EB Garamond', serif;
    font-size: 0.95rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    text-align: center;
    padding: 1.1rem 1.4rem;
    color: var(--text);
    background: rgba(109,40,217,0.06);
    border: 1px solid var(--border-strong);
    border-radius: 3px;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  }
  .nav-links a::after { display: none; }
  .nav-links a:hover, .nav-links a:active {
    background: rgba(109,40,217,0.18);
    border-color: var(--purple-light);
    color: var(--purple-glow);
  }
  .nav-links a.active {
    background: var(--purple);
    border-color: var(--purple-light);
    color: #fff;
    box-shadow: 0 0 24px rgba(109,40,217,0.35);
  }

  /* Hamburger → X */
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center;
    gap: 5px; background: none; border: none; cursor: pointer;
    padding: 0.5rem; position: relative; z-index: 102;
    width: 36px; height: 36px;
  }
  .nav-toggle span {
    display: block; width: 22px; height: 1.5px; background: var(--text);
    transition: transform 0.3s ease, opacity 0.2s ease;
    transform-origin: center;
  }
  .nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  /* Hide the redundant "Join" pill on mobile — floating Discord button covers it */
  .nav-discord { display: none; }

  /* Lock body scroll when menu open */
  body.nav-open { overflow: hidden; }

  .wrap, .wrap-narrow { padding: 0 1.2rem; }

  /* ── Hero ────────────────────────────── */
  .hero { padding: 5.5rem 1.3rem 4.5rem; min-height: 88vh; min-height: 88svh; }
  .hero-eyebrow { letter-spacing: 0.1em; margin-bottom: 1.1rem; }
  .hero-title { letter-spacing: 0.02em; margin-bottom: 1.2rem; }
  .hero-tagline { font-size: 1rem; line-height: 1.55; margin-bottom: 2rem; padding: 0 0.5rem; }
  .hero-actions { width: 100%; max-width: 320px; flex-direction: column; align-items: stretch; margin: 0 auto; gap: 0.7rem; }
  .hero-actions .btn { width: 100%; padding: 0.85rem 1.4rem; font-size: 0.72rem; }
  .scroll-hint { bottom: 1rem; font-size: 0.5rem; }
  .scroll-hint::after { height: 20px; }

  /* ── Page header (interior pages) ───── */
  .page-header { padding: 6.5rem 1.2rem 2rem; }
  .page-title { letter-spacing: 0.04em; }
  .page-subtitle { font-size: 1.12rem; padding: 0 0.3rem; color: var(--text-mid); }

  /* ── Home features ──────────────────── */
  /* Calm zone — soft dark gradient blocks ~85% of the starfield behind the
     journey list so it doesn't compete with the text, but fades at top/bottom
     so the section still blends with the cosmic backdrop */
  .home-features {
    padding: 3rem 0 4rem;
    background: linear-gradient(
      180deg,
      transparent 0%,
      rgba(6, 6, 12, 0.85) 12%,
      rgba(6, 6, 12, 0.85) 88%,
      transparent 100%
    );
  }
  .home-features-title { margin-bottom: 2rem; }
  .home-features-title h2 { font-size: 1.85rem; }
  .section-eyebrow { font-size: 1.4rem; letter-spacing: 0; }
  .journey-link {
    grid-template-columns: 60px 1fr;
    gap: 1.4rem;
    padding: 2rem 0.6rem;
  }
  .journey-link:hover { padding-left: 1.1rem; }
  .journey-arrow { display: none; }
  .journey-num { font-size: 1.35rem; }
  .journey-title { font-size: 1.75rem; margin-bottom: 0.55rem; }
  .journey-desc { font-size: 1.02rem; line-height: 1.55; }

  /* ── Lore ───────────────────────────── */
  .lore-block { grid-template-columns: 1fr; gap: 1.4rem; padding: 2rem 0; }
  .lore-block.reverse { grid-template-columns: 1fr; }
  .lore-block.reverse .lore-image-box { order: 0; }
  .lore-image-box { height: 240px; position: relative; }
  .lore-heading { font-size: 1.35rem; }
  .lore-text, .lore-quote { font-size: 0.95rem; }
  .timeline { padding-left: 1.4rem; }

  /* ── Hall of Legends roster ─────────── */
  /* Compact header on this page so the character isn't pushed down by the
     big title + 6.5rem top padding the standard page-header uses. */
  .char-page-header { padding: 4.8rem 1.2rem 0.4rem; }
  .char-page-header .page-eyebrow { font-size: 1.1rem; margin-bottom: 0.1rem; }
  .char-page-header .page-title { font-size: 1.5rem; }

  .roster { padding-top: 0; padding-bottom: 2.5rem; }
  .roster-stage { padding: 0 1rem; gap: 0.4rem; }
  /* Wrap hugs the image (no fixed height) so there's no centering dead space.
     The image itself is capped by max-height, staying large but tight. */
  .roster-figure-wrap { height: auto; min-height: 0; }
  .roster-figure {
    max-height: 66vh;
    max-width: 100%;
    width: auto;
    height: auto;
  }
  .roster-ghost { display: none; }
  .roster-rank { font-size: 0.9rem; }
  .roster-name { font-size: clamp(2.1rem, 8.5vw, 2.8rem); margin-bottom: 1rem; }
  .roster-desc { font-size: 1rem; line-height: 1.65; }
  .roster-muse { font-size: 0.9rem; margin-top: 1rem; }
  .roster-controls { margin-top: 1.2rem; gap: 1.1rem; }
  .roster-arrow { width: 46px; height: 46px; }

  /* ── Locations ─ image stacked on top, full prose below ── */
  .loc-featured,
  .loc-row-3 {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    height: auto;
    grid-template-columns: none;
    grid-template-rows: none;
    margin-bottom: 1rem;
  }
  .loc-card {
    display: flex;
    flex-direction: column;
    overflow: visible;
    height: auto !important;
    cursor: default;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 0.6rem;
    box-shadow: 0 6px 18px rgba(6,6,12,0.25);
  }
  .loc-card.span-row { grid-row: auto; }
  /* Reset image from absolute-fill to normal flow with fixed height */
  .loc-card img {
    position: static !important;
    width: 100% !important;
    height: 220px !important;
    object-fit: cover !important;
    transform: none !important;
    z-index: 0 !important;
    border-top-left-radius: 6px !important;
    border-top-right-radius: 6px !important;
  }
  .loc-card:hover img { transform: none; filter: none; }
  /* Overlay becomes a normal text block under the image */
  .loc-overlay {
    position: static !important;
    background: var(--surface) !important;
    padding: 1.4rem 1.6rem 1.8rem !important;
    color: var(--text) !important;
    border-top: 1px solid rgba(255,255,255,0.03);
    margin: 0;
    display: block;
  }
  .loc-card:hover .loc-overlay { background: transparent; }
  .loc-tag {
    font-size: 0.68rem;
    margin-bottom: 0.75rem;
  }
  .loc-name { font-size: 1.25rem; margin-bottom: 0.6rem; }
  .loc-card.span-row .loc-name { font-size: 1.3rem; }
  /* Full description always visible — no hover-reveal on mobile */
  .loc-desc {
    max-height: none;
    opacity: 1;
    font-size: 0.96rem;
    line-height: 1.65;
    color: var(--text-mid);
    margin-bottom: 0.6rem;
  }
  .loc-card.span-row .loc-desc { font-size: 0.96rem; }

  /* ── Pantheon ───────────────────────── */
  .pantheon-section { padding: 0 0 3rem; }
  .pantheon-layout {
    grid-template-columns: 1fr;
    min-height: auto;
    border-left: none;
    border-right: none;
    border-radius: 0;
    box-shadow: none;
  }
  .deity-sidebar-header { display: none; }

  /* Sidebar becomes a fixed 5-tile grid — all deities visible at once */
  .deity-sidebar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    padding: 8px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    flex-direction: row;
    overflow: visible;
  }

  .deity-tab {
    min-width: 0;
    aspect-ratio: 1 / 1.08;
    display: block;
    padding: 0;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    background: var(--purple-deep);
    transition: border-color 0.25s ease, transform 0.25s ease;
  }
  .deity-tab.active {
    border-color: var(--purple-glow);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(168,85,247,0.25);
    background: var(--purple-deep);
  }

  /* Roman numeral overlay in the top-left corner */
  .deity-tab-num {
    position: absolute;
    top: 4px;
    left: 5px;
    z-index: 2;
    font-family: 'Cinzel Decorative', serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text);
    padding: 2px 6px;
    background: rgba(6, 6, 12, 0.78);
    border-radius: 2px;
    line-height: 1;
    letter-spacing: 0.04em;
  }
  .deity-tab.active .deity-tab-num {
    color: var(--purple-glow);
    background: rgba(6, 6, 12, 0.9);
  }

  /* Thumbnail fills the entire tile */
  .deity-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
  .deity-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.65) brightness(0.7);
    transition: filter 0.3s ease;
  }
  .deity-tab:hover .deity-thumb img,
  .deity-tab.active .deity-thumb img {
    filter: saturate(1.05) brightness(1.0);
    transform: none;
  }

  /* Hide the name + domain text on mobile — thumbnails do the talking */
  .deity-tab-text { display: none; }

  /* Main display */
  .deity-main { min-height: auto; }
  .deity-panel { grid-template-columns: 1fr; }
  /* Portrait container on mobile so the face isn't cropped */
  .deity-art {
    min-height: auto;
    aspect-ratio: 4 / 5;
    max-height: 70vh;
  }
  .deity-art img {
    object-position: center top;  /* faces stay at the top, crop legs */
  }
  /* No gradient overlays on mobile — they cast a shadow over the stacked art */
  .deity-art::after,
  .deity-art::before {
    display: none;
  }
  .deity-content { padding: 1.8rem 1.4rem 2rem; }
  .deity-name { font-size: clamp(1.9rem, 9vw, 2.6rem); margin-bottom: 0.4rem; }
  .deity-epithet { font-size: 1rem; margin-bottom: 1.2rem; }
  .deity-desc { font-size: 0.95rem; margin-bottom: 1.5rem; }
  .deity-badge { font-size: 0.7rem; letter-spacing: 0.32em; }
  .deity-badge::before, .deity-badge::after { width: 18px; }
  .deity-attrs {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-top: 1.1rem;
  }
  /* Hide center diamond + vertical dividers when stacked */
  .deity-attrs::before { display: none; }
  .deity-attrs > div { padding: 0; }
  .deity-attrs > div:not(:first-child)::before { display: none; }
  .deity-attrs > div:not(:first-child) {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
  }
  .deity-attr-value { font-size: 1.25rem; }

  /* ── Footer ─────────────────────────── */
  footer.site-footer { padding: 2rem 1.2rem 1.6rem; }
  .footer-logo { font-size: 1rem; }
  .footer-discord { padding: 0.55rem 1.3rem; font-size: 0.62rem; margin-bottom: 1.3rem; }
  .footer-copy { font-size: 0.75rem; padding: 0 0.5rem; line-height: 1.6; }

  /* ── Discord float ──────────────────── */
  .discord-float { width: 42px; height: 42px; bottom: 1rem; right: 1rem; }
}

@media (max-width: 480px) {
  .wrap, .wrap-narrow { padding: 0 1rem; }
  .hero { padding: 5rem 1rem 4rem; }
  .hero-tagline { font-size: 0.95rem; }
  .home-features { padding: 2.5rem 0 3.5rem; }
  .journey-link { padding: 1.7rem 0.4rem; gap: 1.1rem; grid-template-columns: 52px 1fr; }
  .journey-num { font-size: 1.2rem; }
  .journey-title { font-size: 1.5rem; }
  .journey-desc { font-size: 0.95rem; }
  .roster-figure { max-height: 58vh; }
  .roster-name { font-size: clamp(1.9rem, 9vw, 2.5rem); }
  .roster-desc { font-size: 0.95rem; }
  .loc-card img { height: 190px; }
  .loc-overlay { padding: 1rem 1.1rem 1.2rem; }
  .loc-name { font-size: 1.15rem; }
  .loc-desc { font-size: 0.92rem; line-height: 1.6; }
  .page-title { font-size: 1.6rem; }
  .home-features-title h2 { font-size: 1.2rem; }
}