/* ============================================================
   HERO SCROLL-VIDEO v2 — production-grade
   Stack: Vanilla JS + Lenis 1.1 + GSAP 3.12 + ScrollTrigger
   Palette: ivory #FAF7EE / navy #1B3A5C / gold #B8860B
   ============================================================ */

.c-hero--video {
  position: relative;
  height: 400vh;
  background: var(--paper, #FAF7EE);
  padding: 0;
  margin: 0;
}

.c-hero__sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--paper, #FAF7EE);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.c-hero__video,
.c-hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  pointer-events: none;
  user-select: none;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.c-hero__video { display: none; }
.c-hero__canvas {
  display: block;
  background-image: url('../assets/videos/temple-justice-poster.webp');
  background-size: cover;
  background-position: center;
}

.c-hero__dark-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: rgba(11, 28, 48, 0.42);
}

.c-hero__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: linear-gradient(
    to top,
    rgba(250, 247, 238, 0.85) 0%,
    rgba(250, 247, 238, 0.55) 25%,
    rgba(250, 247, 238, 0.20) 55%,
    rgba(250, 247, 238, 0.00) 100%
  );
}

.c-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  grid-template-rows: auto 1fr 1fr 1fr auto;
  align-items: center;
  justify-items: start;
  gap: clamp(1rem, 2vh, 2rem);
  padding: clamp(2rem, 6vh, 5rem) clamp(1.5rem, 5vw, 4rem);
  pointer-events: none;
}

.c-hero__eyebrow--v2 {
  font-family: var(--font-sans, 'Inter', system-ui, sans-serif);
  font-size: clamp(0.7rem, 0.85vw, 0.9rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold, #B8860B);
  font-weight: 500;
  opacity: 0;
  transform: translateY(20px);
  grid-row: 1;
  margin: 0;
}

.c-hero__stage {
  opacity: 0;
  transform: translateY(30px);
  pointer-events: auto;
  max-width: 920px;
  width: 100%;
}

.c-hero__stage[data-reveal="2"] { grid-row: 2; align-self: end; }
.c-hero__stage[data-reveal="3"] { grid-row: 3; align-self: center; }
.c-hero__stage[data-reveal="4"] { grid-row: 4; align-self: start; }

.c-hero__title--v2 {
  font-family: var(--font-display, 'Fraunces', 'Iowan Old Style', Georgia, serif);
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: rgba(250, 247, 238, 0.95);
  margin: 0;
  font-feature-settings: "kern", "liga", "calt", "onum";
  text-wrap: balance;
}

.c-hero__title--v2 em {
  font-style: italic;
  color: var(--gold, #B8860B);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "wght" 400, "slnt" -10;
  display: inline-block;
}

.c-hero__lead--v2 {
  font-family: var(--font-serif, 'Literata', Georgia, serif);
  font-size: clamp(1.05rem, 1.5vw, 1.4rem);
  line-height: 1.55;
  color: rgba(250, 247, 238, 0.78);
  max-width: 600px;
  margin: 0;
}

.hero-stats {
  display: flex;
  gap: clamp(32px, 5vw, 64px);
  justify-content: flex-start;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hero-stat__value {
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--gold, #B8860B);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums tabular-nums;
}

.hero-stat__label {
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250, 247, 238, 0.5);
}

.c-hero__scroll-hint {
  grid-row: 5;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250, 247, 238, 0.55);
  opacity: 0;
  animation: heroScrollHintBounce 2s ease-in-out infinite;
}

.c-hero__scroll-hint svg { opacity: 0.6; }

@keyframes heroScrollHintBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.c-mission-layout__scales {
  width: 100%;
  height: auto;
  display: block;
  background: transparent;
}

@media (max-width: 768px) {
  .c-hero--video { height: 300vh; }
  .c-hero__overlay { padding: 4vh 1.25rem; gap: 1.5rem; }
  .c-hero__title--v2 { font-size: clamp(2rem, 9vw, 3.5rem); }
  .c-hero__lead--v2 { font-size: 1rem; line-height: 1.5; }
  .hero-stats { gap: 24px; }
  .hero-stat__value { font-size: 2rem; }
  .c-hero__scrim {
    background: linear-gradient(
      to top,
      rgba(250, 247, 238, 0.92) 0%,
      rgba(250, 247, 238, 0.65) 35%,
      rgba(250, 247, 238, 0.25) 65%,
      rgba(250, 247, 238, 0.00) 100%
    );
  }
}

@media (prefers-reduced-motion: reduce) {
  .c-hero--video { height: 100vh; height: 100dvh; }
  .c-hero__sticky { position: relative; }
  .c-hero__eyebrow--v2,
  .c-hero__stage,
  .c-hero__scroll-hint {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

[data-hero-mode="static"] .c-hero--video { height: 100vh; height: 100dvh; }
[data-hero-mode="static"] .c-hero__sticky { position: relative; }
[data-hero-mode="static"] .c-hero__eyebrow--v2,
[data-hero-mode="static"] .c-hero__stage,
[data-hero-mode="static"] .c-hero__scroll-hint {
  opacity: 1 !important;
  transform: none !important;
}
