/* ═══════════════════════════════════════════════════
   FALSURA — Design System
   
   Color palette derived from the logo:
   - #0a0c10  abyss black (void behind logo)
   - #111720  deep blue-gray (combat bg base)
   - #1a1f2e  surface (teal-gray panels)
   - #c41e3a  crimson (D20 core glow)
   - #ff2244  crimson glow (hover/bright)
   - #8b1a1a  ember (deep blood red)
   - #c8b8a0  bone (stone letterforms)
   - #e8dcc8  parchment (body text)
   - #1a2a2e  teal undertone (env bg)
   
   Typography:
   - Cinzel Decorative → display/logo
   - Cinzel → headings
   - Crimson Text → body (old-book warmth)
   - Inter → UI/buttons/nav
   ═══════════════════════════════════════════════════ */

/* ─── PRELOADER ─── */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg-abyss, #0a0c10);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .6s ease, visibility .6s ease;
}

.preloader__icon {
  width: 48px;
  height: 48px;
  animation: preloader-pulse 1.5s ease-in-out infinite;
}

@keyframes preloader-pulse {

  0%,
  100% {
    opacity: .3;
    transform: scale(.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}


/* ─── RESET & TOKENS ─── */

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

:root {
  /* Palette */
  --bg-abyss: #0a0c10;
  --bg-deep: #111720;
  --surface: #1a1f2e;
  --surface-hover: #232a3d;
  --crimson: #c41e3a;
  --crimson-glow: #ff2244;
  --crimson-dim: rgba(196, 30, 58, 0.15);
  --ember: #8b1a1a;
  --bone: #c8b8a0;
  --parchment: #e8dcc8;
  --teal: #1a2a2e;
  --arcane-line: rgba(196, 30, 58, 0.25);
  --arcane-line-bright: rgba(196, 30, 58, 0.5);
  --white-dim: rgba(232, 220, 200, 0.5);
  --black-50: rgba(10, 12, 16, 0.5);
  --black-80: rgba(10, 12, 16, 0.8);

  /* Typography */
  --font-display: 'Cinzel Decorative', serif;
  --font-heading: 'Cinzel', serif;
  --font-body: 'Crimson Text', serif;
  --font-ui: 'Inter', sans-serif;

  /* Spacing */
  --section-pad: clamp(3rem, 7vh, 5.5rem);
  --content-max: 1200px;
  --content-pad: clamp(1rem, 4vw, 3rem);

  /* Animation */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --glow-duration: 2.5s;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-abyss);
  color: var(--parchment);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient noise texture — kills the flat LCD-black feel */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* Subtle body-level vignette — sections don't read as perfectly uniform */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.35) 100%);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--crimson-glow);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--parchment);
}

::selection {
  background: var(--crimson);
  color: var(--parchment);
}


/* ─── ASSET PLACEHOLDERS ─── */
/* These show clearly where real images go */

.asset-placeholder,
.asset-placeholder--sm,
.asset-placeholder--lg,
.asset-placeholder--char,
.asset-placeholder--gallery {
  position: relative;
  background: var(--surface);
  border: 2px dashed var(--arcane-line-bright);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.asset-placeholder::after,
.asset-placeholder--sm::after,
.asset-placeholder--lg::after,
.asset-placeholder--char::after,
.asset-placeholder--gallery::after {
  content: '🖼 ' attr(data-asset);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--bone);
  text-align: center;
  padding: 1rem;
  opacity: 0.7;
  line-height: 1.4;
}

/* Full-bleed background placeholders */
.asset-placeholder {
  position: absolute;
  inset: 0;
  border-radius: 0;
  border: none;
  background: linear-gradient(135deg, var(--bg-deep) 0%, var(--teal) 50%, var(--bg-deep) 100%);
}

.asset-placeholder--sm {
  width: 100%;
  aspect-ratio: 16/9;
}

.asset-placeholder--lg {
  width: 100%;
  aspect-ratio: 3/4;
  max-width: 400px;
}

.asset-placeholder--char {
  width: 80px;
  height: 80px;
  border-radius: 4px;
  flex-shrink: 0;
  image-rendering: pixelated;
}

.asset-placeholder--char::after {
  font-size: 0.55rem;
  padding: 0.25rem;
}

.asset-placeholder--gallery {
  min-width: 360px;
  aspect-ratio: 16/9;
  flex-shrink: 0;
}


/* ─── BUTTONS ─── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 2rem;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.btn--primary {
  background: linear-gradient(180deg, #d4243f 0%, var(--crimson) 40%, var(--ember) 100%);
  color: var(--parchment);
  border-color: var(--crimson);
  box-shadow:
    0 0 20px rgba(196, 30, 58, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 10px rgba(255, 34, 68, 0.3);
  position: relative;
  overflow: hidden;
}

/* Corner accent marks — break the rectangular monotony */
.btn--primary::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  right: 3px;
  bottom: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  pointer-events: none;
}

.btn--primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: translateX(-200%);
  will-change: transform;
}

.btn--primary:hover::before {
  animation: btnShimmer 0.6s ease forwards;
}

@keyframes btnShimmer {
  0% {
    transform: translateX(-200%);
  }

  100% {
    transform: translateX(200%);
  }
}

.btn--primary:hover {
  background: linear-gradient(180deg, #ff3355 0%, var(--crimson-glow) 40%, var(--crimson) 100%);
  border-color: var(--crimson-glow);
  color: #fff;
  box-shadow:
    0 0 40px rgba(255, 34, 68, 0.5),
    0 4px 20px rgba(196, 30, 58, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.3);
  text-shadow: 0 0 20px rgba(255, 34, 68, 0.6);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--bone);
  border-color: var(--arcane-line-bright);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 12px rgba(196, 30, 58, 0.08);
}

.btn--ghost:hover {
  border-color: var(--crimson);
  color: var(--parchment);
  background: var(--crimson-dim);
  box-shadow: 0 0 20px rgba(196, 30, 58, 0.2), inset 0 0 15px rgba(196, 30, 58, 0.05);
}

.btn--sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.8rem;
}

.nav__cta {
  background: var(--crimson);
  color: var(--parchment);
  border-color: var(--crimson);
  box-shadow: 0 0 12px rgba(196, 30, 58, 0.25);
}

.nav__cta:hover {
  background: var(--crimson-glow);
  border-color: var(--crimson-glow);
  box-shadow: 0 0 24px rgba(255, 34, 68, 0.4);
  color: #fff;
}

.btn--lg {
  padding: 1.1rem 3rem;
  font-size: 1.1rem;
}


/* ─── NAV ─── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0.75rem var(--content-pad);
  background: rgba(10, 12, 16, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--arcane-line);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.nav--scrolled {
  background: rgba(10, 12, 16, 0.92);
  box-shadow: 0 2px 30px rgba(0, 0, 0, 0.5);
}

.nav__logo-mark {
  margin-right: auto;
}

.nav__logo-img {
  height: 36px;
  width: auto;
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin-right: 2rem;
}

.nav__links a {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--bone);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  padding: 0.25rem 0;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--crimson);
  transition: width 0.3s var(--ease-out-expo);
}

.nav__links a:hover {
  color: var(--parchment);
}

.nav__links a:hover::after {
  width: 100%;
}

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--bone);
  transition: all 0.3s ease;
}


/* ─── HERO ─── */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at center, var(--teal) 0%, var(--bg-abyss) 70%);
}

/* Parallax biome layers */
.hero__parallax {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero__parallax-layer {
  position: absolute;
  inset: -20% 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.hero__parallax-layer:nth-child(1) {
  opacity: 0.14;
  mix-blend-mode: screen;
}

.hero__parallax-layer:nth-child(2) {
  opacity: 0.09;
  mix-blend-mode: lighten;
}

.hero__parallax-layer:nth-child(3) {
  opacity: 0.11;
  mix-blend-mode: screen;
}

.hero__bg-grain {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: repeating-conic-gradient(rgba(200, 184, 160, 0.012) 0% 25%, transparent 0% 50%) 0 0 / 4px 4px;
  pointer-events: none;
}

.hero__vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at center, rgba(10, 12, 16, 0.3) 20%, var(--bg-abyss) 75%);
  pointer-events: none;
}

.hero__particles {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 2rem;
}

.hero__logo {
  max-width: min(550px, 85vw);
  margin: 0 auto 2rem;
  filter: drop-shadow(0 0 60px rgba(196, 30, 58, 0.4));
  animation: heroGlow var(--glow-duration) ease-in-out infinite alternate;
  transition: transform 0.15s ease-out;
  will-change: transform;
}

.hero__particles {
  transition: transform 0.2s ease-out;
}

@keyframes heroGlow {
  0% {
    filter: drop-shadow(0 0 40px rgba(196, 30, 58, 0.3));
  }

  100% {
    filter: drop-shadow(0 0 80px rgba(196, 30, 58, 0.6));
  }
}

.hero__tagline {
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--bone);
  margin-bottom: 2.5rem;
  font-style: italic;
  line-height: 1.6;
}

.hero__ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 2rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--white-dim);
  font-family: var(--font-ui);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  animation: scrollBounce 2s ease-in-out infinite;
}

.hero__scroll-dice {
  font-size: 1.2rem;
  color: var(--crimson);
}

@keyframes scrollBounce {

  0%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }

  50% {
    transform: translateY(8px);
    opacity: 1;
  }
}


/* ─── SECTION UTILITIES ─── */

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--parchment);
  letter-spacing: 0.01em;
}

.section-title--left {
  text-align: left;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--bone);
  margin-top: 0.5rem;
  font-style: italic;
}

.arcane-divider {
  width: 200px;
  height: 20px;
  margin: 1.5rem auto 0;
  position: relative;
  overflow: visible;
}

.arcane-divider svg {
  width: 100%;
  height: 100%;
}

.arcane-divider__line {
  stroke: var(--crimson);
  stroke-width: 1;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  transition: stroke-dashoffset 1.2s var(--ease-out-expo);
}

.reveal.visible .arcane-divider__line,
.arcane-divider__line--active {
  stroke-dashoffset: 0;
}

.arcane-divider__gem {
  fill: var(--crimson);
  animation: gemPulse var(--glow-duration) ease-in-out infinite alternate;
}

@keyframes gemPulse {
  0% {
    opacity: 0.6;
    filter: drop-shadow(0 0 2px rgba(196, 30, 58, 0.3));
  }

  100% {
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(196, 30, 58, 0.8));
  }
}

.arcane-divider--left {
  margin-left: 0;
  margin-right: auto;
}


/* ─── GM INTERRUPTIONS ─── */

.gm-interrupt {
  padding: 3rem var(--content-pad);
  background: var(--bg-deep);
  border-top: 1px solid var(--arcane-line);
  border-bottom: 1px solid var(--arcane-line);
}

/* Cinematic: full-viewport GM takeover */
.gm-interrupt--cinematic {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: none;
  overflow: hidden;
}

.gm-interrupt--cinematic .gm-interrupt__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(140, 20, 40, 0.2) 0%, var(--bg-abyss) 55%);
  z-index: 0;
}

.gm-interrupt--cinematic .gm-interrupt__bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 10%, var(--crimson) 50%, transparent 90%);
}

.gm-interrupt--cinematic .gm-interrupt__bg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 10%, var(--crimson) 50%, transparent 90%);
}

.gm-interrupt--cinematic .gm-interrupt__inner {
  z-index: 1;
  max-width: 900px;
}

.gm-interrupt--cinematic .gm-interrupt__icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.gm-interrupt__svg-icon {
  width: 64px;
  height: 64px;
  display: block;
  filter: drop-shadow(0 0 20px rgba(255, 51, 102, 0.4));
}

.gm-interrupt__svg-icon--orb {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 0 30px rgba(0, 136, 255, 0.5));
}

.gm-interrupt--cinematic .gm-interrupt__quote {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-style: normal;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--parchment);
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(196, 30, 58, 0.15),
    0 0 80px rgba(196, 30, 58, 0.08);
}

.gm-interrupt--cinematic .gm-interrupt__quote em {
  color: var(--crimson-glow);
  font-style: normal;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.9),
    0 0 30px rgba(255, 34, 68, 0.5),
    0 0 60px rgba(255, 34, 68, 0.25),
    0 0 120px rgba(255, 34, 68, 0.1);
  display: inline-block;
  transform: scale(1.02);
}

/* Power-on glow when the interrupt scrolls into view */
.gm-interrupt.visible .gm-interrupt__quote {
  animation: textPowerOn 1.2s ease-out forwards;
}

@keyframes textPowerOn {
  0% {
    text-shadow: 0 0 0 transparent;
    opacity: 0.3;
  }

  10% {
    text-shadow: 0 0 30px rgba(255, 34, 68, 0.8), 0 0 60px rgba(255, 34, 68, 0.4);
    opacity: 1;
  }

  20% {
    text-shadow: 0 0 0 transparent;
    opacity: 0.5;
  }

  35% {
    text-shadow: 0 0 20px rgba(255, 34, 68, 0.6), 0 0 40px rgba(196, 30, 58, 0.3);
    opacity: 1;
  }

  50% {
    text-shadow: 0 0 2px rgba(255, 34, 68, 0.2);
    opacity: 0.8;
  }

  100% {
    text-shadow: 0 0 8px rgba(196, 30, 58, 0.3), 0 0 20px rgba(196, 30, 58, 0.1);
    opacity: 1;
  }
}

.gm-interrupt--cinematic .gm-interrupt__quote em {
  color: var(--crimson-glow);
  font-style: italic;
}

.gm-interrupt--cinematic .gm-interrupt__cite {
  margin-top: 1.5rem;
  font-size: 0.85rem;
}

.gm-interrupt__inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.gm-interrupt__icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.75rem;
}

.gm-interrupt__quote {
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-style: italic;
  color: var(--parchment);
  line-height: 1.6;
  border: none;
}

.gm-interrupt__cite {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--crimson);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-style: normal;
}

.gm-interrupt--alt {
  background: var(--surface);
}


/* ─── PITCH BAND (AFTER HERO) ─── */

.pitch-band {
  padding: clamp(4rem, 8vh, 7rem) var(--content-pad);
  text-align: center;
  background: var(--bg-abyss);
  position: relative;
}

.pitch-band__inner {
  max-width: 900px;
  margin: 0 auto;
}

.pitch-band__headline {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw + 0.5rem, 3.5rem);
  font-weight: 400;
  color: var(--parchment);
  line-height: 1.3;
  letter-spacing: 0;
}

.pitch-band__headline em {
  font-style: normal;
  color: var(--crimson-glow);
}

.pitch-band__sub {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--bone);
  font-style: italic;
  margin-top: 1.5rem;
  opacity: 0.8;
}

.pitch-band__threat {
  color: var(--crimson-glow);
  font-style: italic;
  text-shadow: 0 0 30px rgba(255, 34, 68, 0.5), 0 0 60px rgba(255, 34, 68, 0.2);
  position: relative;
}


/* ─── PILLARS MAGAZINE LAYOUT ─── */

.pillars-magazine {
  padding: var(--section-pad) 0;
  position: relative;
}

/* Cinematic gradient fade into the pillar section */
.pillars-magazine::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg, var(--bg-abyss) 0%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}

.pillars-magazine::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(0deg, var(--bg-abyss) 0%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}

.pillar-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 380px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

/* Gradient divider between rows — replaces hard-cut 1px borders */
.pillar-row+.pillar-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--crimson) 30%, var(--crimson-glow) 50%, var(--crimson) 70%, transparent);
  z-index: 3;
  opacity: 0.6;
}

/* Alternating: reversed rows swap column order */
.pillar-row--reversed .pillar-row__media {
  order: 2;
}

.pillar-row--reversed .pillar-row__text {
  order: 1;
}

.pillar-row__media {
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(196, 30, 58, 0.15);
}

.pillar-row__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pillar-row:hover .pillar-row__img {
  transform: scale(1.05);
}

/* Inner vignette overlay on media — makes screenshots feel framed */
.pillar-row__media::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 1;
}

.pillar-row__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 4vw, 4rem);
  background: var(--bg-deep);
  /* Subtle noise texture on the text panel */
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 128 128' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E"),
    linear-gradient(180deg, var(--bg-deep), var(--bg-deep));
  background-size: 128px 128px, 100% 100%;
}

.pillar-row__numeral {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: var(--crimson);
  line-height: 1;
  margin-bottom: 0.5rem;
  opacity: 0.55;
}

.pillar-row__title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--parchment);
  margin-bottom: 1rem;
  letter-spacing: 0;
}

.pillar-row__body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  color: var(--bone);
  line-height: 1.8;
  max-width: 50ch;
}

/* Staggered reveal per row */
.pillar-row.reveal {
  opacity: 0;
  transition: none;
}

.pillar-row.reveal.visible {
  opacity: 1;
  transition: opacity 0.6s ease-out;
}

.pillar-row.reveal .pillar-row__media {
  transform: translateX(-60px);
  opacity: 0;
  transition: none;
}

.pillar-row.reveal.visible .pillar-row__media {
  transform: translateX(0);
  opacity: 1;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s,
    opacity 0.5s ease-out 0.1s;
}

.pillar-row--reversed.reveal .pillar-row__media {
  transform: translateX(60px);
}

.pillar-row--reversed.reveal.visible .pillar-row__media {
  transform: translateX(0);
}

.pillar-row.reveal .pillar-row__text {
  transform: translateX(40px);
  opacity: 0;
  transition: none;
}

.pillar-row.reveal.visible .pillar-row__text {
  transform: translateX(0);
  opacity: 1;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s,
    opacity 0.5s ease-out 0.2s;
}

.pillar-row--reversed.reveal .pillar-row__text {
  transform: translateX(-40px);
}

.pillar-row--reversed.reveal.visible .pillar-row__text {
  transform: translateX(0);
}

@media (max-width: 768px) {
  .pillar-row {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .pillar-row__media {
    height: 220px;
  }

  .pillar-row--reversed .pillar-row__media {
    order: 0;
  }

  .pillar-row--reversed .pillar-row__text {
    order: 0;
  }
}


/* ─── GM SECTION ─── */

.gm-section {
  position: relative;
  padding: var(--section-pad) var(--content-pad);
  min-height: 600px;
  overflow: hidden;
}

.gm-section__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, var(--bg-abyss) 0%, rgba(10, 12, 16, 0.85) 40%, rgba(10, 12, 16, 0.6) 100%);
}

.gm-section__content {
  position: relative;
  z-index: 2;
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: center;
}

.gm-section__portrait-col {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* The DM Orb */
.gm-orb-wrap {
  width: clamp(200px, 30vw, 360px);
  height: clamp(200px, 30vw, 360px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.gm-orb-wrap::before {
  content: '';
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 255, 0.08) 0%, transparent 70%);
  animation: orbAmbient 4s ease-in-out infinite;
}

.gm-orb {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 40px rgba(0, 136, 255, 0.4)) drop-shadow(0 0 80px rgba(0, 255, 255, 0.15));
  animation: orbFloat 5s ease-in-out infinite;
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-12px) scale(1.03);
  }
}

@keyframes orbAmbient {

  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* GM Quote Carousel Dots */
.gm-quote__dots {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.gm-quote__dot {
  width: 6px;
  height: 6px;
  border-radius: 0;
  background: var(--white-dim);
  transform: rotate(45deg);
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.gm-quote__dot.active {
  background: var(--crimson);
  transform: rotate(45deg) scale(1.3);
  box-shadow: 0 0 8px rgba(196, 30, 58, 0.6);
}

.gm-section__intro {
  font-size: 1.2rem;
  color: var(--parchment);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.gm-section__abilities {
  margin-bottom: 2rem;
}

.gm-section__abilities-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--crimson);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.gm-section__ability-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.gm-section__ability-list li {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--bone);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gm-ability-icon {
  font-size: 1rem;
  width: 1.5rem;
  text-align: center;
  flex-shrink: 0;
}

.gm-section__ability-list strong {
  color: var(--parchment);
}

/* GM quote carousel */
.gm-section__quote-carousel {
  position: relative;
  min-height: 3rem;
  border-left: 2px solid var(--crimson);
  padding-left: 1.25rem;
}

.gm-quote {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--bone);
  line-height: 1.6;
  position: absolute;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.gm-quote.active {
  position: relative;
  opacity: 1;
}

.gm-quote.active::after {
  content: '▎';
  animation: cursorBlink 0.8s step-end infinite;
  color: var(--crimson);
  margin-left: 2px;
}

@keyframes cursorBlink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}


/* ─── JRPG WINDOW SYSTEM (REUSABLE) ─── */

.jrpg-window {
  position: relative;
  background: rgba(8, 10, 18, 0.92);
  border: 2px solid #6a6e78;
  border-radius: 4px;
  box-shadow:
    inset 0 0 20px rgba(0, 0, 0, 0.9),
    0 8px 40px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

.jrpg-window__inner-border {
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  pointer-events: none;
  z-index: 1;
}


/* ─── CHARACTER ROSTER — "PARTY SETUP" ─── */

.roster {
  padding: var(--section-pad) var(--content-pad);
  background: var(--bg-deep);
  border-top: 1px solid var(--arcane-line);
  border-bottom: 1px solid var(--arcane-line);
}

.roster__layout {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

/* ── STATUS WINDOW (Left Panel) ── */

.status-window {
  min-height: 480px;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.status-window__header {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 2;
}

.status-window__label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--bone);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

/* Empty state */
.status-window__empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--white-dim);
}

.status-window__cursor {
  color: var(--crimson);
  animation: cursorBlink 0.8s step-end infinite;
  font-size: 1.5rem;
}

@keyframes cursorBlink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

/* Filled state */
.status-window__content {
  display: none;
  /* JS toggles this */
  flex: 1;
  padding: 1.5rem;
  gap: 1.5rem;
}

.status-window__content.active {
  display: grid;
  grid-template-columns: auto 1fr;
  animation: statusSlideIn 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes statusSlideIn {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.status-window__portrait-area {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.status-window__sprite {
  width: 160px;
  height: 160px;
  object-fit: cover;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  border: 2px solid #6a6e78;
  border-radius: 4px;
  background: var(--bg-abyss);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.status-window__info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.status-window__name {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--parchment);
  text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.9);
  line-height: 1.2;
}

.status-window__title-text {
  font-family: var(--font-body);
  font-size: 1rem;
  font-style: italic;
  color: var(--crimson);
}

.status-window__class {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--white-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

/* Stat bars */
.status-window__stats {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.stat-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-bar__label {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--bone);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  width: 2.2rem;
  flex-shrink: 0;
  text-align: right;
}

.stat-bar__track {
  flex: 1;
  height: 10px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1px;
  overflow: hidden;
}

.stat-bar__fill {
  height: 100%;
  width: 0%;
  border-radius: 0;
  transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.stat-bar__fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: statShimmer 2.5s ease-in-out infinite;
}

@keyframes statShimmer {
  0% {
    left: -50%;
  }

  100% {
    left: 150%;
  }
}

.stat-bar__fill--hp {
  background: linear-gradient(90deg, #2a5a3a, #3d8b5a);
}

.stat-bar__fill--str {
  background: linear-gradient(90deg, #8b3030, #b84545);
}

.stat-bar__fill--dex {
  background: linear-gradient(90deg, #7a6535, #a8915a);
}

.stat-bar__fill--int {
  background: linear-gradient(90deg, #3a4a6a, #5a7090);
}

.stat-bar__fill--wis {
  background: linear-gradient(90deg, #5a3d6a, #7a5a8a);
}

.stat-bar__fill--cha {
  background: linear-gradient(90deg, #3a5a5a, #5a8080);
}

.status-window__lore {
  margin-top: 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--bone);
  line-height: 1.6;
  font-style: italic;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.75rem;
}


/* ── ROSTER GRID (Right Panel) ── */

.roster-grid-window {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.roster-grid-window__header {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 2;
}

.roster-grid-window__label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--bone);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.roster__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 0.75rem;
}

/* Individual portrait button */
.char-portrait {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.08s, background 0.08s, box-shadow 0.08s;
  outline: none;
  font-family: inherit;
}

.char-portrait__img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-abyss);
  transition: border-color 0.08s;
}

.char-portrait__name {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  color: var(--white-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.08s;
}

/* Hover — instant, not slow */
.char-portrait:hover {
  background: rgba(196, 30, 58, 0.08);
  border-color: rgba(196, 30, 58, 0.4);
}

.char-portrait:hover .char-portrait__img {
  border-color: rgba(196, 30, 58, 0.5);
}

.char-portrait:hover .char-portrait__name {
  color: var(--parchment);
}

/* SELECTED state — the active party member */
.char-portrait.selected {
  background: rgba(196, 30, 58, 0.15);
  border-color: var(--crimson);
  box-shadow: 0 0 16px rgba(196, 30, 58, 0.4), inset 0 0 8px rgba(196, 30, 58, 0.15);
}

.char-portrait.selected .char-portrait__img {
  border-color: var(--crimson-glow);
  box-shadow: 0 0 10px rgba(196, 30, 58, 0.5);
}

.char-portrait.selected .char-portrait__name {
  color: var(--crimson-glow);
  font-weight: 600;
}


/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .roster__layout {
    grid-template-columns: 1fr;
  }

  .status-window {
    min-height: 320px;
  }

  .status-window__content.active {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .status-window__sprite {
    width: 120px;
    height: 120px;
  }

  .roster__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .char-portrait__img {
    width: 56px;
    height: 56px;
  }
}


/* ─── MONSTER MARQUEE ─── */

.monster-marquee {
  padding: var(--section-pad) 0 3rem;
  overflow: hidden;
  background: var(--bg-abyss);
  border-top: 1px solid var(--arcane-line);
  border-bottom: 1px solid var(--arcane-line);
}

.monster-marquee .section-header {
  padding: 0 var(--content-pad);
}

.marquee {
  position: relative;
  width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
  padding: 30px 0;
  mask-image: linear-gradient(to right,
      transparent 0%,
      black 8%,
      black 92%,
      transparent 100%);
  -webkit-mask-image: linear-gradient(to right,
      transparent 0%,
      black 8%,
      black 92%,
      transparent 100%);
}

.marquee__track {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  width: max-content;
  animation: marqueeScroll 90s linear infinite;
}

.marquee:hover .marquee__track {
  animation-play-state: paused;
}

.marquee__sprite {
  height: 200px;
  width: auto;
  flex-shrink: 0;
  image-rendering: auto;
  filter: drop-shadow(0 0 8px rgba(196, 30, 58, 0.15));
  transition: transform 0.3s var(--ease-out-expo), filter 0.3s ease;
}

.marquee__sprite:hover {
  transform: scale(1.15);
  filter: drop-shadow(0 0 16px rgba(196, 30, 58, 0.5));
  z-index: 2;
}

/* Monster name tooltip */
.marquee__sprite {
  position: relative;
}

.marquee__sprite[alt]:not([alt=''])::after {
  content: attr(alt);
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--crimson-glow);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  text-shadow: 0 0 8px rgba(196, 30, 58, 0.5);
}

.marquee__sprite[alt]:not([alt='']):hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}


/* ─── WORLD / BIOMES ─── */

.world {
  padding: var(--section-pad) var(--content-pad);
  max-width: var(--content-max);
  margin: 0 auto;
  position: relative;
}

/* Atmospheric background for the world section — grounds elements in space */
.world::before {
  content: '';
  position: absolute;
  inset: -10% -20%;
  background: radial-gradient(ellipse at center, rgba(196, 30, 58, 0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

.world__acts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 4rem;
}

.act-row {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--arcane-line);
  border-left: 3px solid var(--arcane-line);
  border-radius: 6px;
  transition: all 0.3s ease;
}

/* Biome-palette-coded left borders per act */
.act-row:nth-child(1) {
  border-left-color: #7a8b6e;
}

/* Act I — earthy dungeon greens */
.act-row:nth-child(2) {
  border-left-color: #4a90b8;
}

/* Act II — watery channel blues */
.act-row:nth-child(3) {
  border-left-color: #d4783a;
}

/* Act III — lava/jungle embers */
.act-row:nth-child(4) {
  border-left-color: #8b3a8b;
}

/* Act IV — haunted/demon purples */
.act-row:nth-child(5) {
  border-left-color: #00cccc;
}

/* Act V — void/astral cyan */

.act-row:nth-child(1):hover {
  background: rgba(122, 139, 110, 0.08);
  border-left-color: #8fa880;
}

.act-row:nth-child(2):hover {
  background: rgba(74, 144, 184, 0.08);
  border-left-color: #5aa8d4;
}

.act-row:nth-child(3):hover {
  background: rgba(212, 120, 58, 0.08);
  border-left-color: #e89050;
}

.act-row:nth-child(4):hover {
  background: rgba(139, 58, 139, 0.08);
  border-left-color: #a84aa8;
}

.act-row:nth-child(5):hover {
  background: rgba(0, 204, 204, 0.08);
  border-left-color: #00eedd;
}

/* Numeral colors per act */
.act-row:nth-child(1) .act-row__numeral {
  color: #8fa880;
}

.act-row:nth-child(2) .act-row__numeral {
  color: #5aa8d4;
}

.act-row:nth-child(3) .act-row__numeral {
  color: #e89050;
}

.act-row:nth-child(4) .act-row__numeral {
  color: #a84aa8;
}

.act-row:nth-child(5) .act-row__numeral {
  color: #00eedd;
}

.act-row:hover {
  border-color: var(--arcane-line-bright);
}

.act-row__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  min-width: 280px;
}

.act-row__numeral {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--crimson);
  line-height: 1;
  min-width: 2rem;
  text-align: center;
}

.act-row__name {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--parchment);
  white-space: nowrap;
}

.act-row__floors {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--white-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.act-row__biomes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.biome-tag {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--bone);
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--arcane-line);
  border-radius: 3px;
  background: var(--bg-deep);
  transition: all 0.2s ease;
}

.biome-tag:hover {
  border-color: var(--crimson);
  color: var(--parchment);
  background: var(--crimson-dim);
}


/* ─── STATS BAR ─── */

.stats-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 2rem;
  padding: 2.5rem 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  background:
    radial-gradient(ellipse at center, rgba(196, 30, 58, 0.06) 0%, transparent 70%),
    var(--surface);
  border: 1px solid var(--arcane-line);
  border-radius: 8px;
  box-shadow:
    0 0 60px rgba(196, 30, 58, 0.05),
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
  position: relative;
}

/* Top edge highlight */
.stats-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 30, 58, 0.4), transparent);
}

.stat {
  text-align: center;
}

.stat__number {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--crimson);
  line-height: 1.1;
  text-shadow: 0 0 20px rgba(196, 30, 58, 0.3), 0 0 40px rgba(196, 30, 58, 0.1);
}

.stat__label {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--white-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ─── BIOME CAROUSEL ─── */

.biome-carousel-section {
  padding: var(--section-pad) 0 3rem;
  background: var(--bg-deep);
  border-top: 1px solid var(--arcane-line);
}

.biome-carousel-section .section-header {
  padding: 0 var(--content-pad);
}

.biome-carousel {
  position: relative;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-pad);
}

.biome-carousel__viewport {
  overflow: hidden;
}

.biome-carousel__track {
  display: flex;
  gap: 1rem;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.biome-slide {
  position: relative;
  min-width: calc(25% - 0.75rem);
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--arcane-line);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.biome-slide:hover {
  border-color: var(--crimson);
  transform: translateY(-4px);
}

.biome-slide img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.biome-slide__label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 0.6rem 0.5rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--parchment);
  letter-spacing: 0.02em;
  text-align: center;
}

.biome-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border: 1px solid var(--arcane-line);
  border-radius: 50%;
  background: rgba(10, 8, 14, 0.85);
  color: var(--parchment);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.biome-carousel__btn:hover {
  background: var(--crimson);
  border-color: var(--crimson);
  transform: translateY(-50%) scale(1.1);
}

.biome-carousel__btn--prev {
  left: 4px;
}

.biome-carousel__btn--next {
  right: 4px;
}

.biome-carousel__counter {
  text-align: center;
  margin-top: 1rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--white-dim);
  letter-spacing: 0.1em;
}

.biome-carousel__counter span {
  color: var(--parchment);
}

@media (max-width: 768px) {
  .biome-slide {
    min-width: calc(50% - 0.5rem);
  }

  .biome-slide img {
    height: 120px;
  }
}


/* ─── GALLERY ─── */

.gallery {
  padding: var(--section-pad) var(--content-pad);
  background: var(--bg-deep);
  border-top: 1px solid var(--arcane-line);
}

.gallery__scroll {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 1rem 0 2rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--crimson) var(--surface);
}

.gallery__scroll::-webkit-scrollbar {
  height: 6px;
}

.gallery__scroll::-webkit-scrollbar-track {
  background: var(--surface);
  border-radius: 3px;
}

.gallery__scroll::-webkit-scrollbar-thumb {
  background: var(--crimson);
  border-radius: 3px;
}

.gallery__item {
  scroll-snap-align: start;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.gallery__item:hover {
  transform: scale(1.02);
}


/* ─── PITCH SECTION ─── */

/* ─── THE DROP (PITCH & CTA) ─── */

.drop-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(6rem, 15vh, 12rem) var(--content-pad);
  text-align: center;
  background: var(--bg-abyss);
  overflow: hidden;
}

.drop-section--final {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 70vh;
}

@media (min-width: 1024px) {
  .drop-section--final {
    flex-direction: column;
    text-align: center;
    max-width: none;
  }
}

.drop-section__vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(ellipse at center, rgba(196, 30, 58, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse at center bottom, rgba(232, 220, 200, 0.02) 0%, transparent 70%);
  pointer-events: none;
}

.drop-section__pitch {
  z-index: 2;
  flex: 1;
  max-width: 900px;
  margin: 0 auto clamp(4rem, 10vh, 8rem);
}

@media (min-width: 1024px) {
  .drop-section__pitch {
    margin: 0;
  }
}

.drop-section__headline {
  font-family: var(--font-heading);
  /* Typographic scale: Massive on desktop, reasonable on mobile. 
     This acts as a cinematic typographic blocker. */
  font-size: clamp(2rem, 5vw + 1rem, 4.5rem);
  color: var(--parchment);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.drop-section__headline em {
  color: var(--crimson);
  font-style: normal;
}

.text-crimson {
  color: var(--crimson-glow);
}

.drop-section__sub {
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  color: var(--bone);
  font-style: italic;
  max-width: 65ch;
  margin: 0 auto;
  line-height: 1.5;
}

@media (min-width: 1024px) {
  .drop-section__sub {
    margin: 0;
  }
}

.drop-section__cta {
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.drop-section__logo {
  width: clamp(280px, 45vw, 550px);
  height: auto;
  filter: drop-shadow(0 0 50px rgba(196, 30, 58, 0.3));
  transition: filter 0.6s ease, transform 0.6s ease;
  margin-bottom: 1rem;
}

.drop-section__logo:hover {
  filter: drop-shadow(0 0 80px rgba(196, 30, 58, 0.6));
  transform: scale(1.02);
}

.drop-section__text {
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-style: italic;
  color: var(--parchment);
}

.drop-section__platforms {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--white-dim);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.platform {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.platform-icon {
  width: 12px;
  height: 12px;
  opacity: 0.7;
}

.platform-sep {
  opacity: 0.4;
}

/* ─── FOOTER ─── */

.footer {
  padding: 3rem var(--content-pad) 2rem;
  background: var(--bg-abyss);
}

.footer .arcane-divider {
  margin-bottom: 2rem;
}

.footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer__logo-img {
  height: 28px;
  opacity: 0.7;
}

.footer__wordmark {
  font-family: var(--font-heading);
  font-size: 1rem;
  color: var(--bone);
  letter-spacing: 0.15em;
  opacity: 0.7;
}

.footer__columns {
  display: flex;
  gap: 3rem;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__col-title {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--crimson);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.25rem;
}

.footer__col a,
.footer__col button {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--bone);
  text-decoration: none;
  transition: color 0.2s ease;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.footer__col a:hover,
.footer__col button:hover {
  color: var(--crimson-glow);
}

.footer__social {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.footer__social-link {
  width: 20px;
  height: 20px;
  color: var(--bone);
  opacity: 0.6;
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.footer__social-link:hover {
  color: var(--crimson-glow);
  opacity: 1;
  transform: translateY(-2px);
}

.footer__social-link svg {
  width: 100%;
  height: 100%;
}

.footer__copy {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--white-dim);
  width: 100%;
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--arcane-line);
}

.footer__copy a {
  color: var(--white-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer__copy a:hover {
  color: var(--crimson-glow);
}

/* ─── COOKIE CONSENT ─── */

.cookie-consent {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: var(--surface);
  border: 1px solid var(--arcane-line);
  border-radius: 6px;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 600px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateX(-50%) translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

.cookie-consent p {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--bone);
  margin: 0;
  line-height: 1.4;
}

.cookie-consent a {
  color: var(--crimson-glow);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-consent__btn {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--parchment);
  background: var(--crimson);
  border: none;
  border-radius: 3px;
  padding: 0.4rem 1rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.cookie-consent__btn:hover {
  background: var(--crimson-glow);
}


/* ─── SCROLL REVEAL ─── */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--crimson), var(--ember), var(--crimson-glow));
  transform-origin: left;
  transform: scaleX(0);
  z-index: 10000;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(196, 30, 58, 0.6);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.reveal.visible>* {
  opacity: 0;
  animation: staggerIn 0.6s var(--ease-out-expo) forwards;
  animation-delay: calc(var(--reveal-i, 0) * 80ms);
}

@keyframes staggerIn {
  0% {
    opacity: 0;
    transform: translateY(12px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ─── PARTICLES (ember overlay) ─── */

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--crimson);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }

  10% {
    opacity: 0.6;
  }

  90% {
    opacity: 0.2;
  }

  100% {
    transform: translateY(-100vh) translateX(40px);
    opacity: 0;
  }
}


/* ─── MOBILE NAV ─── */

.nav__mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 12, 16, 0.97);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.nav__mobile-menu.open {
  display: flex;
}

.nav__mobile-menu a {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--bone);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav__mobile-menu a:hover {
  color: var(--crimson-glow);
}


/* ─── RESPONSIVE ─── */

@media (max-width: 900px) {
  .nav__links {
    display: none;
  }

  .nav__cta {
    display: none;
  }

  .nav__burger {
    display: flex;
  }

  .gm-section__content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .gm-section__portrait-col {
    order: -1;
  }

  .gm-section__ability-list {
    grid-template-columns: 1fr;
  }

  .act-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .act-row__header {
    min-width: unset;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__links {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .pillars__grid {
    grid-template-columns: 1fr;
  }

  .roster__grid {
    grid-template-columns: 1fr;
  }

  .stats-bar {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery__scroll {
    padding-left: 1rem;
  }

  .asset-placeholder--gallery {
    min-width: 280px;
  }
}

/* ─── MODAL ─── */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.open {
  opacity: 1;
  pointer-events: all;
}

.modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(8px);
}

.modal__content {
  position: relative;
  background: var(--bg-abyss);
  border: 1px solid var(--crimson);
  padding: 3rem 2.5rem;
  max-width: 500px;
  width: 90%;
  border-radius: 4px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), inset 0 0 20px rgba(196, 30, 58, 0.1);
  text-align: center;
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.open .modal__content {
  transform: translateY(0);
}

.modal__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--ash);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.2s;
}

.modal__close:hover {
  color: var(--crimson);
}

.modal__title {
  font-family: var(--font-heading);
  color: var(--parchment);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.modal__desc {
  color: var(--bone);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.modal__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal__input {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-light);
  color: var(--parchment);
  padding: 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border-radius: 4px;
}

.modal__input:focus {
  outline: none;
  border-color: var(--crimson);
  box-shadow: 0 0 10px rgba(196, 30, 58, 0.2);
}

.modal__msg {
  margin-top: 1rem;
  font-weight: 500;
  color: var(--parchment);
}

.modal__msg.success {
  color: #8fd4b0;
}

.modal__msg.error {
  color: var(--crimson-glow);
}


/* ─── ANIMATED SVG ICONS ─── */

/* GM Ability Icons */
.gm-svg {
  width: 20px;
  height: 20px;
  color: var(--crimson-glow);
  vertical-align: middle;
  filter: drop-shadow(0 0 4px rgba(255, 34, 68, 0.4));
}

.gm-svg--veto {
  animation: svgPulse 2s ease-in-out infinite alternate;
}

.gm-svg--reroll {
  animation: svgSpin 4s linear infinite;
}

.gm-svg--spawn {
  animation: svgFlicker 3s ease-in-out infinite;
}

.gm-svg--buff {
  animation: svgRise 2.5s ease-in-out infinite alternate;
}

.gm-svg--nerf {
  animation: svgDrift 2.5s ease-in-out infinite alternate;
}

.gm-svg--hazard {
  animation: svgFlame 1.5s ease-in-out infinite alternate;
}

@keyframes svgPulse {
  0% {
    filter: drop-shadow(0 0 2px rgba(255, 34, 68, 0.3));
    transform: scale(1);
  }

  100% {
    filter: drop-shadow(0 0 10px rgba(255, 34, 68, 0.8));
    transform: scale(1.1);
  }
}

@keyframes svgSpin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes svgFlicker {

  0%,
  100% {
    opacity: 1;
  }

  30% {
    opacity: 0.3;
  }

  60% {
    opacity: 0.9;
  }

  80% {
    opacity: 0.4;
  }
}

@keyframes svgRise {
  0% {
    transform: translateY(2px);
    filter: drop-shadow(0 0 3px rgba(255, 34, 68, 0.3));
  }

  100% {
    transform: translateY(-3px);
    filter: drop-shadow(0 0 8px rgba(255, 34, 68, 0.7));
  }
}

@keyframes svgDrift {
  0% {
    transform: translateY(-2px);
    opacity: 1;
  }

  100% {
    transform: translateY(3px);
    opacity: 0.6;
  }
}

@keyframes svgFlame {
  0% {
    transform: scaleY(0.9) scaleX(1.02);
    filter: drop-shadow(0 0 4px rgba(255, 100, 30, 0.5));
  }

  100% {
    transform: scaleY(1.1) scaleX(0.98);
    filter: drop-shadow(0 0 10px rgba(255, 60, 20, 0.8));
  }
}


/* D20 Scroll Indicator */
.scroll-d20 {
  width: 24px;
  height: 24px;
  color: var(--crimson);
  filter: drop-shadow(0 0 6px rgba(196, 30, 58, 0.5));
  animation: d20Float 2s ease-in-out infinite;
}

@keyframes d20Float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.6;
  }

  50% {
    transform: translateY(6px) rotate(8deg);
    opacity: 1;
  }
}


/* CTA Crossed Swords */
.btn-swords {
  width: 18px;
  height: 18px;
  position: relative;
  animation: swordShimmer 3s ease-in-out infinite;
}

@keyframes swordShimmer {

  0%,
  100% {
    filter: drop-shadow(0 0 0 transparent);
  }

  50% {
    filter: drop-shadow(0 0 6px rgba(232, 220, 200, 0.6));
  }
}


/* ─── DM QUOTE GENERATOR ─── */

.dm-quotes {
  padding: var(--section-pad) var(--content-pad);
  text-align: center;
}

/* FF6-style blue dialog panel */
.dm-quotes__panel {
  max-width: 640px;
  margin: 2rem auto 0;
  padding: 2rem 2.5rem 1.5rem;
  background: linear-gradient(to bottom, #001a7a, #000624);
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  box-shadow:
    inset 0 0 0 3px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(0, 100, 255, 0.15),
    0 8px 32px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  position: relative;
}

.dm-quotes__panel:hover {
  box-shadow:
    inset 0 0 0 3px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(0, 100, 255, 0.25),
    0 8px 32px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

.dm-quotes__text {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-style: italic;
  color: #ffffff;
  line-height: 1.6;
  margin: 0;
  min-height: 3.2rem;
  transition: opacity 0.3s ease;
}

.dm-quotes__attribution {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.8rem;
  letter-spacing: 0.05em;
}

/* DM Orb */
.dm-quotes__orb-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1.5rem auto 0;
}

.dm-quotes__orb {
  width: 100px;
  height: 100px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  animation: orbFloat 3s ease-in-out infinite;
  transition: transform 0.2s ease;
}

.dm-quotes__orb svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 12px rgba(0, 255, 255, 0.4));
}

.dm-quotes__orb:hover {
  transform: scale(1.1);
}

.dm-quotes__orb:hover svg {
  filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.6));
}

/* Pulse animation on click */
.dm-orb--pulse {
  animation: orbClick 0.6s ease-out !important;
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes orbClick {
  0% {
    transform: scale(1);
  }

  30% {
    transform: scale(1.3);
  }

  60% {
    transform: scale(0.95);
  }

  100% {
    transform: scale(1);
  }
}

.dm-quotes__orb-hint {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: rgba(0, 255, 255, 0.5);
  margin-top: 0.3rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Category label */
.dm-quotes__category {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(0, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 1rem;
  min-height: 1rem;
  transition: opacity 0.3s ease;
}

/* Action buttons */
.dm-quotes__actions {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1rem;
}

.dm-quotes__action-btn {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--bone);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 0.4rem 1rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.dm-quotes__action-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 520px) {
  .dm-quotes__panel {
    padding: 1.5rem 1.2rem 1rem;
  }

  .dm-quotes__text {
    font-size: 1rem;
  }

  .dm-quotes__orb {
    width: 80px;
    height: 80px;
  }
}


/* ─── ENCHANTED DICE SHOWCASE ─── */

.dice-showcase {
  padding: var(--section-pad) var(--content-pad);
  text-align: center;
}

.dice-showcase__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: var(--content-max);
  margin: 2rem auto 0;
}

.dice-card {
  background: rgba(20, 22, 30, 0.8);
  border: 1px solid var(--arcane-line);
  border-radius: 10px;
  padding: 1.2rem;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.dice-card:hover {
  transform: translateY(-4px);
}

/* Rarity glow */
.dice-card--legendary {
  border-color: rgba(218, 185, 120, 0.35);
}

.dice-card--legendary:hover {
  border-color: rgba(218, 185, 120, 0.75);
  box-shadow: 0 0 30px rgba(218, 185, 120, 0.2), 0 8px 32px rgba(0, 0, 0, 0.4);
}

.dice-card--rare {
  border-color: rgba(106, 158, 192, 0.3);
}

.dice-card--rare:hover {
  border-color: rgba(106, 158, 192, 0.7);
  box-shadow: 0 0 30px rgba(106, 158, 192, 0.15), 0 8px 32px rgba(0, 0, 0, 0.4);
}

.dice-card--epic {
  border-color: rgba(138, 128, 184, 0.3);
}

.dice-card--epic:hover {
  border-color: rgba(138, 128, 184, 0.7);
  box-shadow: 0 0 30px rgba(138, 128, 184, 0.15), 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* 3D canvas viewport */
.dice-card__canvas {
  width: 160px;
  height: 160px;
  margin: 0 auto 0.8rem;
  border-radius: 8px;
  overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(30, 32, 44, 1) 0%, rgba(10, 12, 16, 1) 100%);
  box-shadow: inset 0 0 30px rgba(196, 30, 58, 0.08);
}

.dice-card__info {
  text-align: center;
}

.dice-card__rarity {
  font-family: var(--font-ui);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 0.15rem 0.6rem;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 0.4rem;
}

.dice-card--legendary .dice-card__rarity {
  color: #d4b06a;
  background: rgba(218, 185, 120, 0.1);
  border: 1px solid rgba(218, 185, 120, 0.3);
}

.dice-card--rare .dice-card__rarity {
  color: #6a9ec0;
  background: rgba(106, 158, 192, 0.1);
  border: 1px solid rgba(106, 158, 192, 0.3);
}

.dice-card--epic .dice-card__rarity {
  color: #8a80b8;
  background: rgba(138, 128, 184, 0.1);
  border: 1px solid rgba(138, 128, 184, 0.3);
}

.dice-card__name {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--parchment);
  margin: 0 0 0.4rem;
}

.dice-card__effect {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--bone);
  line-height: 1.4;
  margin: 0;
}

.dice-showcase__cta {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--bone);
  margin-top: 2rem;
}

.dice-showcase__cta a {
  color: var(--crimson-glow);
  font-weight: 600;
}

/* Responsive: 2 cols on tablet, 1 on mobile */
@media (max-width: 900px) {
  .dice-showcase__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 520px) {
  .dice-showcase__grid {
    grid-template-columns: 1fr;
  }
}


/* ─── NAV SHRINK ON SCROLL ─── */


.nav {
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.35s ease;
}

.nav--scrolled {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.nav--scrolled .nav__logo-img {
  height: 28px;
  transition: height 0.35s ease;
}

.nav__logo-img {
  transition: height 0.35s ease;
}


/* ─── NAV ACTIVE LINK ─── */

.nav__links a.active {
  color: var(--crimson-glow);
}

.nav__links a.active::after {
  width: 100%;
  background: var(--crimson-glow);
}


/* ─── ACCESSIBLE FOCUS STATES ─── */

*:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 2px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--crimson-glow);
  outline-offset: 3px;
}


/* ─── CHARACTER ROSTER HOVER GLOW ─── */

.roster__portrait {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.roster__portrait:hover {
  transform: scale(1.08);
  box-shadow: 0 0 25px rgba(196, 30, 58, 0.5), 0 0 50px rgba(196, 30, 58, 0.2);
  border-color: var(--crimson);
  z-index: 2;
}

.roster__portrait:hover .roster__name {
  color: var(--crimson-glow);
}


/* ─── BIOME ACT CARD HOVER ─── */

.act-row {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.act-row:hover {
  transform: translateX(6px);
  border-color: var(--arcane-line-bright);
  box-shadow: 0 0 20px rgba(196, 30, 58, 0.15);
}

.act-row:hover .biome-chip {
  border-color: var(--crimson);
  color: var(--parchment);
}


/* ─── GALLERY LIGHTBOX ─── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(10, 12, 16, 0.95);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  cursor: zoom-out;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 6px;
  box-shadow: 0 0 60px rgba(196, 30, 58, 0.3);
  transform: scale(0.9);
  transition: transform 0.4s var(--ease-out-expo);
}

.lightbox.open img {
  transform: scale(1);
}

.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: 1px solid var(--arcane-line);
  color: var(--parchment);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 4px;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.lightbox__close:hover {
  border-color: var(--crimson);
  color: var(--crimson-glow);
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid var(--arcane-line);
  color: var(--parchment);
  font-size: 1.5rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-radius: 4px;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.lightbox__nav:hover {
  border-color: var(--crimson);
  background: rgba(196, 30, 58, 0.1);
}

.lightbox__nav--prev {
  left: 1.5rem;
}

.lightbox__nav--next {
  right: 1.5rem;
}


/* ─── SOCIAL PROOF BAND ─── */

.social-proof {
  padding: 3rem var(--content-pad);
  text-align: center;
  border-top: 1px solid var(--arcane-line);
  border-bottom: 1px solid var(--arcane-line);
  background: linear-gradient(180deg, rgba(196, 30, 58, 0.03) 0%, transparent 100%);
}

.social-proof__title {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--crimson);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 2rem;
}

.social-proof__quotes {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  max-width: var(--content-max);
  margin: 0 auto;
}

.social-proof__quote {
  max-width: 320px;
}

.social-proof__text {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--parchment);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.social-proof__cite {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--bone);
  letter-spacing: 0.05em;
}


/* ─── AMBIENT PARTICLES ─── */

.ambient-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ambient-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--crimson);
  opacity: 0;
  animation: ambientFloat linear infinite;
}

@keyframes ambientFloat {
  0% {
    opacity: 0;
    transform: translateY(100vh) translateX(0);
  }

  10% {
    opacity: 0.15;
  }

  90% {
    opacity: 0.15;
  }

  100% {
    opacity: 0;
    transform: translateY(-20vh) translateX(30px);
  }
}