/* ═══════════════════════════════════════
   ROCHE ROCK N' ROLL — Storymap Styles
   Aesthetic: Dark editorial, stone & ochre
═══════════════════════════════════════ */

@property --mask-stop {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 55%;
}

:root {
  --stone:    #1a1814;
  --stone-mid:#2e2b26;
  --stone-lt: #908f8e;
  --parchment:#f0ead8;
  --cream:    #faf7f0;
  --ochre:    #c8962a;
  --ochre-lt: #e8b84b;
  --rust:     #8b3a2a;
  --mist:     rgba(240,234,216,0.08);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'IBM Plex Sans', system-ui, sans-serif;

  --panel-w: 380px;
  --transition: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--stone);
  color: var(--parchment);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.75;
  overflow-x: hidden;
}

/* ── Typography ── */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
}

strong { font-weight: 500; color: var(--ochre-lt); }
em { font-style: italic; color: var(--parchment); }

/* ══════════════════════════════════════
   LEVEL 1: HERO
══════════════════════════════════════ */
#hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.75) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.hero-bg video,
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.hero-final-frame {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s ease;
  pointer-events: none;
}

/* Dark curtain — GSAP slides this up from bottom as hero exits */
.hero-veil {
  position: absolute;
  inset: 0;
  background: var(--stone);
  transform: translateY(105%);
  pointer-events: none;
  z-index: 1;
}

.hero-placeholder-bg {
  width: 100%; height: 100%;
  background: linear-gradient(160deg, #1a1510 0%, #2d2318 40%, #0e1a20 100%);
  /* Simulated terrain texture */
  background-image:
    radial-gradient(ellipse at 30% 60%, rgba(139,88,42,0.3) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 30%, rgba(30,50,60,0.4) 0%, transparent 50%),
    linear-gradient(160deg, #1a1510 0%, #2d2318 40%, #0e1a20 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 6vh 2rem 0;
  text-align: center;
  will-change: opacity, transform;
  --mask-stop: 35%;
  mask-image: linear-gradient(to top, transparent var(--mask-stop), black calc(var(--mask-stop) + 20%));
  transition: --mask-stop 4s ease-out;
  pointer-events: none;
}

.hero-content.mask-done {
  --mask-stop: -25%;
}

.hero-text-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--parchment);
  margin-bottom: 1.5rem;
  opacity: 0; /* animated by Anime.js */
  text-shadow: 0 2px 12px rgba(0,0,0,1), 0 4px 40px rgba(0,0,0,1), 0 8px 80px rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  gap: 0.5em;
}


.hero-title {
  font-size: clamp(3rem, 7.5vw, 6rem);
  color: var(--cream);
  text-shadow: 0 2px 12px rgba(0,0,0,1), 0 4px 40px rgba(0,0,0,1), 0 8px 100px rgba(0,0,0,0.95);
  display: flex;
  flex-direction: row;
  gap: 0.25em;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.anim-char {
  display: inline-block;
  will-change: transform, opacity;
}

.title-line {
  display: inline;
  opacity: 0; /* animated by Anime.js */
}

.title-italic {
  font-style: italic;
  color: var(--ochre-lt);
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  text-shadow: 0 2px 12px rgba(0,0,0,1), 0 4px 40px rgba(0,0,0,1), 0 8px 80px rgba(0,0,0,0.95);
  font-style: italic;
  color: var(--parchment);
  opacity: 0.9;
  margin-top: 1rem;
  opacity: 0; /* animated */
}

.hero-scroll-cue {
  margin-top: 2.5rem;
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--ochre);
  color: var(--ochre-lt);
  background: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0; /* animated */
  transition: background 0.3s, color 0.3s;
}

.hero-scroll-cue:hover {
  background: var(--ochre);
  color: var(--stone);
}

.hero-scroll-line {
  width: 1px;
  height: 64px;
  margin-top: 1.25rem;
  background: rgba(200, 150, 42, 0.18);
  position: relative;
  overflow: hidden;
  opacity: 0; /* animated */
}

.hero-scroll-line-pulse {
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to bottom, transparent, var(--ochre), transparent);
  animation: scroll-pulse 1.8s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%   { top: -50%; }
  100% { top: 100%; }
}

.scroll-arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--ochre), transparent);
  animation: arrow-pulse 2s ease-in-out infinite;
}

@keyframes arrow-pulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* ══════════════════════════════════════
   LEVEL 1.5: INTRODUCTION
══════════════════════════════════════ */
#introduction {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6vh 2rem;
}

.intro-inner {
  width: min(1200px, 90vw);
}

.intro-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: clamp(0.65rem, 0.85vw, 0.85rem);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ochre-lt);
  margin-bottom: 2rem;
}

.intro-heading {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.5rem, 3.8vw, 5rem);
  line-height: 1.1;
  color: var(--cream);
  letter-spacing: -0.01em;
  margin-bottom: 3rem;
  white-space: nowrap;
}

.intro-heading em {
  font-style: italic;
  color: var(--parchment);
}

.intro-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border-left: 1px solid rgba(200, 150, 42, 0.3);
  padding-left: 2rem;
}

.intro-body p {
  font-size: clamp(1.35rem, 1.1vw, 1.1rem);
  line-height: 1.85;
  color: var(--parchment);
  opacity: 0.8;
}

/* ══════════════════════════════════════
   LEVEL 2: CONTEXT
══════════════════════════════════════ */
#context {
  position: relative;
}

.context-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}


.context-media {
  position: absolute;
  inset: 0;
}

/* Single layer that pans & zooms — image and anchors move together */
.context-transform-layer {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
  transform: scale(1) translate(0%, 0%);
  transition: transform 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.context-transform-layer img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Base image — desaturates + dims when a highlight step is active */
.ctx-base {
  position: relative;
  z-index: 0;
  transition: filter 0.7s ease;
}

.ctx-base.is-dimmed {
  filter: saturate(0.2) brightness(0.5);
}

/* Dark veil — between base and cutouts, deepens the dimming effect */
.ctx-dim-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 6, 0.38);
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
  z-index: 1;
}

.ctx-dim-overlay.is-active {
  opacity: 1;
}

/* Highlight cutouts — above the veil, show the feature in full colour */
.ctx-highlight {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 0.55s ease;
}

/* Cards must sit above highlights */
.pin-anchor {
  position: absolute;
  left: var(--px, 50%);
  top:  var(--py, 50%);
  transform: translate(-50%, -50%) scale(var(--inv-scale, 1));
  transform-origin: center;
  transition: transform 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 10;
}

/* Step progress indicator — anchored to the sticky container, not the image */
.ctx-progress {
  position: absolute;
  right: 1.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 10;
  pointer-events: none;
}

.ctx-progress-dots {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ctx-pdot {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(243, 236, 221, 0.25);
  border: 1px solid rgba(243, 236, 221, 0.35);
  transition: background 0.4s ease, transform 0.4s ease, border-color 0.4s ease;
}

.ctx-pdot.is-active {
  background: #a87820;
  border-color: #a87820;
  transform: scale(1.5);
}

.ctx-scroll-hint {
  font-family: var(--font-body);
  font-size: 0.5rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(243, 236, 221, 0.35);
  writing-mode: vertical-rl;
  margin-top: 4px;
  animation: hint-breathe 2.4s ease-in-out infinite;
}

@keyframes hint-breathe {
  0%, 100% { opacity: 0.35; }
  50%       { opacity: 0.85; }
}

/* Note card */
.reveal-block {
  white-space: normal;
  opacity: 0;
  padding: 0.9rem 1.15rem 1rem;
  background: #f3ecdd;
  border-left: 2px solid #a87820;
  box-shadow:
    2px 4px 10px rgba(0, 0, 0, 0.3),
    5px 10px 28px rgba(0, 0, 0, 0.18);
  width: 240px;
}

.reveal-block.is-visible { opacity: 1; }

.rb-ref {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #a87820;
  margin-bottom: 0.5rem;
  opacity: 0;
}

.rb-rule {
  height: 1px;
  background: #c8a84a;
  transform-origin: left center;
  transform: scaleX(0);
  margin-bottom: 0.65rem;
  width: 100%;
  opacity: 0.55;
}

.reveal-block p {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-style: normal;
  font-weight: 300;
  color: #1c1810;
  line-height: 1.65;
  margin: 0;
  opacity: 0;
}

.reveal-block p strong {
  font-weight: 500;
  color: #1c1810;
}

.ctx-step {
  height: 120vh;
}

.ctx-pause {
  height: 140vh;
}

/* ══════════════════════════════════════
   LEVEL 2.5: TIMELINE
══════════════════════════════════════ */
#timeline {
  position: relative;
  height: 500vh;
}

#timeline-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--stone);
}

/* Section title */
#timeline-title {
  position: absolute;
  top: clamp(2rem, 5vh, 4rem);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 5;
  pointer-events: none;
  white-space: nowrap;
}

.tl-title-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: clamp(0.65rem, 0.85vw, 0.85rem);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ochre-lt);
  margin-bottom: 2.2em;
}

.tl-title-heading {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2.8rem, 5vw, 5.5rem);
  line-height: 1;
  color: var(--cream);
  letter-spacing: -0.01em;
}

/* Era background wash */
#era-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.era-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0s;
}

/* Ghost watermark */
#watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(7rem, 20vw, 18rem);
  line-height: 1;
  text-align: center;
  color: rgba(240, 234, 216, 0.028);
  opacity: 0;
  user-select: none;
  pointer-events: none;
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
  letter-spacing: -0.02em;
}

/* Watermark PNG override */
#watermark img {
  width: auto;
  height: auto;
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  opacity: 0.06;
  filter: brightness(10);
  pointer-events: none;
  user-select: none;
}

/* Track */
#track-wrap {
  position: absolute;
  inset: 0;
  z-index: 10;
}

#track-bg {
  position: absolute;
  top: 50%;
  left: var(--tl-track-l);
  width: var(--tl-track-w);
  height: var(--tl-track-h);
  transform: translateY(-50%);
  background: rgba(74, 70, 64, 0.5);
  border-radius: 999px;
}

#track-fill {
  position: absolute;
  top: 50%;
  left: var(--tl-track-l);
  width: 0%;
  height: var(--tl-track-h);
  transform: translateY(-50%);
  background: linear-gradient(90deg, #8b6010, var(--ochre) 40%, var(--ochre-lt));
  border-radius: 999px;
  box-shadow: 0 0 8px 1px rgba(200, 150, 42, 0.35);
}

#track-fill::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ochre-lt);
  box-shadow:
    0 0 0   3px rgba(232, 184, 75, 0.25),
    0 0 14px 4px rgba(232, 184, 75, 0.6),
    0 0 30px 8px rgba(232, 184, 75, 0.2);
  opacity: 0;
  animation: tl-headPulse 1.4s ease-in-out infinite;
}
#track-fill.going::after { opacity: 1; }

@keyframes tl-headPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(232,184,75,0.2), 0 0 14px 4px rgba(232,184,75,0.6), 0 0 30px 8px rgba(232,184,75,0.2); }
  50%       { box-shadow: 0 0 0 5px rgba(232,184,75,0.1), 0 0 22px 7px rgba(232,184,75,0.8), 0 0 50px 14px rgba(232,184,75,0.3); }
}

/* Timeline points */
.tl-point {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 240px;
  height: 70vh;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  pointer-events: none;
  z-index: 3;
}

.tl-point .above {
  grid-row: 1;
  align-self: end;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-bottom: 32px;
  text-align: center;
}

.tl-point .era {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.4rem, 1.8vw, 2.4rem);
  color: var(--cream);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  padding-bottom: 0.2em;
  margin-bottom: -0.2em;
}

.tl-point .era .char {
  display: inline-block;
  will-change: transform, opacity;
}

.tl-point .date {
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ochre-lt);
}

/* Dot + rings */
.tl-point .dot-wrap {
  grid-row: 2;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  cursor: pointer;
  pointer-events: all;
}

.tl-point .dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(74, 70, 64, 0.8);
  background: var(--stone);
  position: relative;
  z-index: 3;
  transition: border-color 0.5s ease, background 0.5s ease,
              transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.5s ease;
}

.tl-point.past .dot {
  border-color: var(--ochre);
  background: var(--ochre);
  box-shadow: 0 0 6px 1px rgba(200, 150, 42, 0.4);
}

.tl-point.active .dot {
  border-color: var(--ochre-lt);
  background: var(--ochre-lt);
  transform: scale(2.2);
  box-shadow:
    0 0 0   4px rgba(232, 184, 75, 0.2),
    0 0 18px 5px rgba(232, 184, 75, 0.6),
    0 0 40px 12px rgba(232, 184, 75, 0.2);
}

.tl-point .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--ochre);
  opacity: 0;
  transform: scale(1);
}

.tl-point.active .ring:nth-child(1) { animation: tl-ripple 0.8s ease-out 0.1s 1 forwards; }
.tl-point.active .ring:nth-child(2) { animation: tl-ripple 0.8s ease-out 0.3s 1 forwards; }

@keyframes tl-ripple {
  0%   { transform: scale(1);   opacity: 0.4; }
  100% { transform: scale(4.5); opacity: 0;   }
}

.tl-point .tick {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1.5px;
  height: 0;
  background: linear-gradient(to bottom, transparent 0%, var(--ochre) 50%, transparent 100%);
  transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s;
  z-index: 1;
  opacity: 0;
}
.tl-point.past   .tick { height: 24px;  opacity: 0.5; }
.tl-point.active .tick { height: 100px; opacity: 1;   }

.tl-point .below {
  grid-row: 3;
  align-self: start;
  padding-top: 32px;
  text-align: center;
}

.tl-point .desc {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.2vw, 1.25rem);
  font-weight: 200;
  line-height: 1.7;
  color: var(--parchment);
  max-width: clamp(200px, 18vw, 280px);
  will-change: transform, opacity;
}

/* Spotlight glow */
#spotlight {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
}

/* Timeline track CSS variables */
:root {
  --tl-track-h: 4px;
  --tl-track-l: 14%;
  --tl-track-w: 72%;
}

/* ══════════════════════════════════════
   LEVEL 3: SPLAT LAUNCH GATE
══════════════════════════════════════ */
#hotspots {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5vh 2rem 0;
}

.splat-launch {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.splat-launch-text {
  width: 60vw;
  text-align: center;
  position: relative;
  z-index: 1;
}

.splat-launch-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: clamp(0.65rem, 0.85vw, 0.85rem);
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ochre-lt);
  margin-bottom: 2.2em;
}

.splat-launch-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2.8rem, 5vw, 5.5rem);
  line-height: 1;
  color: var(--cream);
  letter-spacing: -0.01em;
  margin-bottom: 2.5rem;
}

.splat-launch-desc {
  font-size: clamp(1.4rem, 1.2vw, 1.1rem);
  line-height: 1.8;
  color: var(--parchment);
  opacity: 0.8;
  margin-bottom: 0.75rem;
}

.splat-launch-desc--note {
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--stone-lt);
  opacity: 1;
  margin-bottom: 2rem;
}

.splat-launch-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Video — pinned to section bottom, centred, behind text */
.splat-launch-video {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60vw;
  z-index: 0;
}

.splat-preview-video {
  width: 100%;
  height: auto;
  display: block;
}

.splat-launch-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 2.5rem;
  border: 1px solid var(--ochre);
  background: transparent;
  color: var(--ochre-lt);
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.splat-launch-cta:hover {
  background: rgba(200, 150, 42, 0.15);
  color: var(--ochre);
}

.splat-launch-cta--primary {
  background: var(--ochre);
  color: var(--stone);
  padding: 1.25rem 3.5rem;
  font-size: 1rem;
  letter-spacing: 0.15em;
}

.splat-launch-cta--primary:hover {
  background: var(--ochre-lt);
  border-color: var(--ochre-lt);
  color: var(--stone);
}

.splat-launch-arrow {
  display: inline-block;
  transition: transform 0.3s;
}

.splat-launch-cta:hover .splat-launch-arrow {
  transform: translateX(5px);
}

.splat-launch-cta--primary:hover .splat-launch-arrow {
  transform: translateX(5px);
}

/* ── Section navigation arrows ── */
#section-nav {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-nav-btn {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(200, 150, 42, 0.28);
  color: var(--ochre-lt);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.section-nav-btn:hover {
  background: rgba(200, 150, 42, 0.18);
  border-color: var(--ochre);
  color: var(--ochre);
}

.section-nav-btn:disabled {
  opacity: 0.25;
  pointer-events: none;
}

/* ── Splat modal overlay ── */
#splat-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #0e0c0a;
  display: flex;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#splat-modal[aria-hidden="false"] {
  opacity: 1;
  pointer-events: all;
}

#splat-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  z-index: 10;
  background: rgba(20,17,14,0.85);
  border: 1px solid rgba(200,150,42,0.35);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 18px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

#splat-modal-close:hover {
  border-color: var(--ochre);
  color: var(--ochre-lt);
}

#splat-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ══════════════════════════════════════
   LEVELS 4–5: NARRATIVE + STICKY MAP
══════════════════════════════════════ */
#narrative-map {
  position: relative;
  height: 220vh; /* scroll driver: 6×20vh steps + 100vh tail */
}

/* Sticky map — full width, behind text overlay */
#map-container {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
}

#map {
  width: 100%;
  height: 100%;
  background: var(--stone);
}

/* Leaflet container reset */
#map .leaflet-container {
  width: 100%;
  height: 100%;
  background: var(--stone);
}

#map-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

.map-annotation {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20,18,14,0.88);
  border: 1px solid rgba(200,150,42,0.3);
  padding: 0.6rem 1.2rem;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--ochre-lt);
  border-radius: 2px;
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.4s;
  white-space: nowrap;
  pointer-events: none;
}

.map-annotation.visible { opacity: 1; }

/* ── Narrative orb counter — fixed so z-index beats Leaflet panes ── */
#narrative-orbs {
  position: fixed;
  top: calc(15vh + 1.5rem);
  left: 2.5rem;
  z-index: 850;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
}

/* Slots and orbs opt back in so clicks reach them */
#narrative-orbs .n-orb-slot,
#narrative-orbs .n-orb {
  pointer-events: auto;
}

#narrative-orbs.visible { opacity: 1; }

#narrative-orbs::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(12px / 2);
  bottom: calc(12px / 2);
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(200, 150, 42, 0.38) 8%,
    rgba(200, 150, 42, 0.38) 92%,
    transparent
  );
  z-index: -1;
}

.n-orb-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.n-orb-slot + .n-orb-slot::before {
  content: '';
  display: block;
  width: 1px;
  height: 42px;
  background: transparent;
}

.n-orb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  background: transparent;
  flex-shrink: 0;
}

.n-orb.empty   { border-color: transparent; background: transparent; opacity: 0; }
.n-orb.past    { border-color: var(--ochre); background: var(--ochre); opacity: 0.75; }
.n-orb.past:hover, .n-orb.current:hover {
  transform: scale(1.35);
  transition: transform 0.15s ease;
}
.n-orb.current {
  border-color: var(--ochre);
  background: var(--ochre);
  opacity: 1;
  box-shadow: 0 0 10px rgba(200,150,42,0.65), 0 0 3px var(--ochre);
}

/* ── Narrative flash frame — fixed over the text column, above Leaflet ── */

#narrative-flash {
  position: fixed;
  top: calc(15vh - 1rem);
  left: 7rem;
  width: 520px;
  height: 260px;
  background: rgba(200, 150, 42, 0.08);
  z-index: 850;
  pointer-events: none;
  opacity: 0;
  will-change: opacity;
}

/* Scroll steps — fixed like the prototype stage; text never moves with scroll */
#scroll-steps {
  position: fixed;
  top: 15vh;
  left: 7rem;
  width: calc(55% - 7rem);
  padding: 0 2rem 0 0;
  z-index: 800;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

#scroll-steps.visible { opacity: 1; }

/* All steps overlap at the same position; only the active one is visible */
.step {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
}

.step.is-active {
  pointer-events: auto;
}

/* ── Step inner — layout container only ── */
.step-inner {
  max-width: 520px;
  padding: 1.5rem 1.75rem;
}

/* ── Eyebrow label — animates separately above the gate ── */
.step-label {
  display: block;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 18px;
  line-height: 1;
  opacity: 0;
  will-change: transform, opacity;
  text-align: left;
}

/* ── Gate — clips text entering from below; negative top inset allows
      easeOutBack upward overshoot without clipping the text ── */
.step-gate {
  overflow: hidden;
  clip-path: inset(-80px 0 0 0);
  position: relative;
}

/* ── Sliding text block — JS positions this below the gate on init ── */
.step-text {
  text-shadow:
    0 1px 10px rgba(0,0,0,0.95),
    0 0 40px rgba(0,0,0,0.8);
}

/* ── Body paragraphs ── */
.step-text p {
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--parchment);
  margin-bottom: 0.75rem;
}

/* ── Teaser ── */
.step-teaser {
  font-style: italic;
  color: var(--ochre-lt) !important;
  font-size: 1.35rem !important;
}

/* ── Blockquote ── */
.step-quote {
  margin-top: 1.25rem;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ochre);
  line-height: 1.55;
}

.site-count-label {
  font-size: 0.8rem !important;
  color: var(--stone-lt) !important;
}

.cta-button {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--ochre);
  color: var(--ochre-lt);
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.3s, color 0.3s;
}

.cta-button:hover {
  background: var(--ochre);
  color: var(--stone);
}

/* ══════════════════════════════════════
   LEVEL 6: EXPLORE MAP
══════════════════════════════════════ */
#explore {
  padding: 4rem 2rem 0;
  background: var(--stone-mid);
}

.explore-header {
  max-width: 900px;
  margin: 0 auto 2rem;
}

.explore-header h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.explore-header > p {
  color: var(--parchment);
  opacity: 0.7;
  margin-bottom: 1.5rem;
}

/* Layer toggles */
.layer-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toggle-btn {
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--stone-lt);
  background: transparent;
  color: var(--stone-lt);
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
}

.toggle-btn.active {
  border-color: var(--ochre);
  color: var(--ochre-lt);
  background: rgba(200,150,42,0.1);
}

#explore-map-wrap {
  position: relative;
  height: 80vh;
  min-height: 500px;
}

#explore-map {
  width: 100%;
  height: 100%;
}

/* Site detail panel */
.site-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: var(--panel-w);
  height: 100%;
  background: rgba(20, 18, 14, 0.96);
  border-left: 1px solid rgba(200,150,42,0.25);
  transform: translateX(100%);
  transition: transform var(--transition);
  z-index: 10;
  overflow-y: auto;
  backdrop-filter: blur(10px);
}

.site-panel[aria-hidden="false"] {
  transform: translateX(0);
}

.site-panel-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--stone-lt);
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 1;
}
.site-panel-close:hover { color: var(--parchment); }

#site-panel-content {
  padding: 2rem 1.5rem;
}

/* Site panel inner layout */
.sp-type {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: 0.5rem;
}

.sp-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--cream);
  margin-bottom: 1rem;
  line-height: 1.1;
}

.sp-media-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--stone-mid);
  border: 1px solid var(--stone-lt);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--stone-lt);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.sp-text {
  font-size: 0.9rem;
  line-height: 1.75;
  color: var(--parchment);
  margin-bottom: 1rem;
}

.sp-meta {
  font-size: 0.75rem;
  color: var(--stone-lt);
  border-top: 1px solid var(--stone-lt);
  padding-top: 0.75rem;
  margin-top: 1rem;
  display: grid;
  gap: 4px;
}

.sp-media-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 1rem 0;
}

.sp-media-btn {
  padding: 5px 12px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--stone-lt);
  background: none;
  color: var(--parchment);
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
}
.sp-media-btn:hover {
  border-color: var(--ochre);
  color: var(--ochre-lt);
}

/* Roche Rock marker */
.roche-marker {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, #f5d060 0%, #c8962a 65%, #8a6010 100%);
  mix-blend-mode: screen;
  border: none;
  box-shadow: 0 0 14px 4px rgba(245,208,96,0.55);
  cursor: pointer;
  position: relative;
  overflow: visible;
  transition: box-shadow 0.2s;
}
.roche-marker:hover {
  box-shadow: 0 0 22px 8px rgba(245,208,96,0.7);
}

/* Expanding rings */
.roche-ring {
  position: absolute;
  top: 50%; left: 50%;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(245, 208, 96, 0.7);
  transform: translate(-50%, -50%) scale(1);
  opacity: 0;
  pointer-events: none;
}

@keyframes roche-ring-expand {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(6); opacity: 0; }
}

.roche-ring.is-animating                  { animation: roche-ring-expand 4s ease-out infinite; }
.roche-ring.is-animating:nth-child(2)     { animation-delay: 1.35s; }
.roche-ring.is-animating:nth-child(3)     { animation-delay: 2.7s; }

/* Looping pulse glow */
@keyframes roche-pulse {
  0%, 100% { box-shadow: 0 0 14px 4px rgba(245,208,96,0.55); }
  50%       { box-shadow: 0 0 28px 10px rgba(245,208,96,0.2); }
}
.roche-marker--narrative.is-pulsing {
  animation: roche-pulse 2.8s ease-in-out infinite;
}

/* Viewshed hover glow — applied via JS mouseover/mouseout on the overlayPane */
#map .leaflet-overlay-pane {
  transition: filter 0.35s ease;
}
#map .leaflet-overlay-pane.viewshed-hovered {
  filter: drop-shadow(0 0 5px rgba(126, 207, 234, 0.65));
}

.site-marker {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--rust);
  border: 2px solid var(--parchment);
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
}
.site-marker.neolithic { background: #4a7a8a; }
.site-marker.bronze-age { background: var(--rust); }
.site-marker:hover { transform: scale(1.4); }

/* ══════════════════════════════════════
   CLOSING / FOOTER
══════════════════════════════════════ */
#closing {
  padding: 8rem 2rem;
  background: var(--stone);
}

.closing-inner {
  max-width: 680px;
  margin: 0 auto;
}

.closing-inner h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--cream);
  margin-bottom: 1.5rem;
}

.closing-inner p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--parchment);
  opacity: 0.85;
  margin-bottom: 1rem;
}

.closing-rule {
  border: none;
  border-top: 1px solid var(--stone-lt);
  margin: 3rem 0 1.5rem;
}

.credits {
  font-size: 0.8rem !important;
  color: var(--stone-lt) !important;
  opacity: 1 !important;
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 768px) {
  #map-container {
    height: 100vh;
  }

  #scroll-steps {
    left: 3.5rem;
    width: calc(100% - 3.5rem);
    padding: 0 1.5rem 0 0;
  }

  #narrative-orbs { left: 1.25rem; }

  .step-inner { max-width: 100%; }

  .context-floats {
    grid-template-columns: 1fr;
  }

  .float-tr, .float-bl { justify-self: start; margin-top: 0; margin-left: 0; }

  .site-panel { width: 100%; height: 50vh; top: auto; bottom: 0; transform: translateY(100%); border-left: none; border-top: 1px solid rgba(200,150,42,0.25); }
  .site-panel[aria-hidden="false"] { transform: translateY(0); }
}
