/* ==========================================================================
   Story — hero + scroll-driven narrative panels
   ========================================================================== */

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding-block: var(--space-24) var(--space-16);
}

.hero__eyebrow { margin-bottom: var(--space-6); }

.hero {
  isolation: isolate; /* keep the glow under the content */
}
.hero__glow {
  position: absolute;
  left: 50%; top: 44%;
  width: min(86vw, 920px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(0.6);
  border-radius: 50%;
  background: radial-gradient(circle, oklch(100% 0 0 / 0.12), transparent 62%);
  filter: blur(26px);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
}
.hero__inner { position: relative; z-index: 1; }

.hero__title {
  font-size: var(--text-hero);
  max-width: 16ch;
  line-height: 1.0;
}
/* Line mask for the rise reveal — padded so descenders (g, y, p) aren't clipped */
.hero__title .l {
  display: block;
  overflow: hidden;
  padding-bottom: 0.16em;
  margin-bottom: -0.14em;
}
.hero__title .l > span {
  display: block;
  will-change: transform;
}

.hero__sub {
  margin-top: var(--space-8);
  max-width: 46ch;
  font-size: var(--text-lg);
  color: var(--color-text-soft);
}

.hero__meta {
  margin-top: var(--space-12);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6) var(--space-12);
  align-items: center;
  font-size: var(--text-sm);
  color: var(--color-text-mute);
}
.hero__meta strong { color: var(--color-text); font-weight: 560; }
.hero__meta .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--color-red); }

/* ---- Narrative panels ---- */
.panel {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding-block: var(--space-section);
}

.panel--right { justify-items: end; text-align: right; }
.panel--center { justify-items: center; text-align: center; }

/* Oversized editorial numeral that breaks the grid and parallaxes */
.panel__ghost {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: -0.06em;
  transform: translateY(-50%);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: clamp(14rem, 8rem + 34vw, 40rem);
  line-height: 0.7;
  letter-spacing: -0.04em;
  color: oklch(100% 0 0 / 0.035);
  -webkit-text-stroke: 1.5px oklch(100% 0 0 / 0.30);
  text-stroke: 1.5px oklch(100% 0 0 / 0.30);
  pointer-events: none;
  user-select: none;
}
.panel--right .panel__ghost { left: auto; right: -0.06em; }

.panel > :not(.panel__ghost) { position: relative; z-index: 1; }

.panel__index {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-6);
}
.panel__index::before {
  content: "";
  width: 2.2em;
  height: 1px;
  background: linear-gradient(90deg, var(--color-red), transparent);
}
.panel--right .panel__index { flex-direction: row-reverse; }
.panel--right .panel__index::before {
  background: linear-gradient(270deg, var(--color-red), transparent);
}

.panel__title {
  font-size: var(--text-2xl);
  max-width: 18ch;
}
/* Per-word masked rise for scroll reveals (JS wraps words) */
.word {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
  vertical-align: top;
}
.word__i { display: inline-block; will-change: transform; }

.panel__body {
  margin-top: var(--space-6);
  max-width: 52ch;
  font-size: var(--text-lg);
}
.panel--right .panel__body,
.panel--right .panel__title { margin-left: auto; }

/* ---- Split beat: editorial image beside the text ---- */
.panel--split {
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 4vw, 6rem);
}
.panel__text { position: relative; }
.panel--split .panel__ghost { font-size: clamp(9rem, 5rem + 20vw, 24rem); }

.panel__figure {
  position: relative;
  margin: 0;
  will-change: transform;
}
.panel__figure__media {
  position: relative;
  overflow: hidden;                 /* clip the reflection to the rounded box */
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-lift);
}
.panel__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1) contrast(1.03);
  transition: filter 650ms var(--ease-out);
}
/* Cinematic light reflection sweeping across — same effect as the pull-quote */
.panel__figure__shine {
  position: absolute;
  top: -20%; bottom: -20%;
  left: 0;
  width: 36%;
  transform: translateX(-180%) skewX(-16deg);
  background: linear-gradient(105deg, transparent, oklch(100% 0 0 / 0.30), transparent);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 2;
}
/* On hover the footage blooms to full color (GSAP owns transform, so only
   filter/shadow change here — no conflict with the clip-path reveal). */
@media (hover: hover) and (pointer: fine) {
  .panel__figure::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-lg);
    box-shadow: 0 0 0 0 oklch(100% 0 0 / 0);
    transition: box-shadow 650ms var(--ease-out);
    pointer-events: none;
  }
  .panel__figure:hover img { filter: grayscale(0) contrast(1.05) saturate(1.05); }
  .panel__figure:hover::after { box-shadow: 0 0 60px -6px oklch(100% 0 0 / 0.22); }
}
.panel__figure figcaption {
  position: absolute;
  z-index: 3;
  left: var(--space-4);
  bottom: var(--space-4);
  padding: 0.5em 0.9em;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text);
  background: oklch(8% 0 0 / 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid var(--color-line);
  border-radius: 100px;
}

@media (max-width: 820px) {
  .panel--split { grid-template-columns: 1fr; gap: var(--space-6); }
  .panel--split-reverse .panel__text { order: -1; }
  /* Smaller, shorter, centered boxes — capped at 300px tall — so the
     scrolling footage behind reads better */
  .panel__figure { max-width: 340px; margin-inline: auto; }
  .panel__figure__media { aspect-ratio: 16 / 9; max-height: 300px; }
  .panel__figure figcaption { font-size: 0.6875rem; padding: 0.4em 0.8em; }
}

/* Foreground scroll-animation hook — GSAP owns transform/opacity.
   Visible by default so reduced-motion / no-JS keep full content. */
[data-anim], [data-pq] { will-change: transform, opacity; }

/* Big pull-quote moment, set over the footage */
.pullquote {
  position: relative;
  min-height: 120svh;
  display: grid;
  place-content: center;
  text-align: center;
  padding-block: var(--space-section);
  overflow: hidden;
  isolation: isolate;
}
/* Bloom behind the words */
.pullquote__glow {
  position: absolute;
  left: 50%; top: 50%;
  width: min(95vw, 1100px);
  aspect-ratio: 1.3;
  transform: translate(-50%, -50%) scale(0.7);
  border-radius: 50%;
  background: radial-gradient(circle, oklch(100% 0 0 / 0.14), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
}
/* Cinematic light streak that sweeps across on scroll */
.pullquote__shine {
  position: absolute;
  top: -10%; bottom: -10%;
  left: 0;
  width: 32%;
  transform: translateX(-160%) skewX(-14deg);
  background: linear-gradient(105deg, transparent, oklch(100% 0 0 / 0.16), transparent);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 2;
}
.pullquote blockquote {
  position: relative;
  z-index: 1;
  font-family: var(--font-sans);
  font-size: var(--text-mega);
  line-height: 1.0;
  letter-spacing: -0.03em;
  max-width: 16ch;
  font-weight: 640;
  text-shadow: 0 0 50px oklch(100% 0 0 / 0.14);
}
.pq-line {
  display: block;
  padding-bottom: 0.06em;
  will-change: transform, opacity;
}
.pullquote cite {
  display: block;
  margin-top: var(--space-8);
  font-family: var(--font-sans);
  font-style: normal;
  font-size: var(--text-sm);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent);
}
