/* ============================================================
   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: 100svh;
  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/NewHeroVideo-poster.webp');
  background-size: cover;
  background-position: center;
}

.c-hero__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  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: 2;
  display: grid;
  grid-template-rows: auto 1fr 1fr 1fr auto;
  align-items: center;
  justify-items: start;
  gap: clamp(1rem, 2vh, 2rem);
  padding:
    max(2rem, calc(var(--safe-top, 0px) + 1rem))
    clamp(1.5rem, 5vw, 4rem)
    max(2rem, calc(var(--safe-bottom, 0px) + 1rem));
  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%;
  min-width: 0;
}

.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;
  color: var(--navy-deep, #0F2440);
  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.2rem, 1.7vw, 1.55rem);
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink-soft, #3D4454);
  max-width: 600px;
  margin: 0;
}
.c-hero__lead-line {
  display: block;
  white-space: normal;
}
@media (max-width: 600px) {
  .c-hero__lead--v2 { font-size: clamp(0.95rem, 4.2vw, 1.2rem); }
}

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

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}

.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;
  font-variant-numeric: lining-nums tabular-nums;
  overflow-wrap: anywhere;
  text-align: center;
}

.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: var(--ink-muted, #6B7280);
  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 {
    grid-template-rows: auto 1fr auto auto auto;
    padding:
      max(1.5rem, calc(var(--safe-top, 0px) + 0.75rem))
      var(--container-padding)
      max(1.5rem, calc(var(--safe-bottom, 0px) + 0.75rem));
    gap: 1.25rem;
  }
  .c-hero__title--v2 { font-size: 2.5rem; }
  .c-hero__lead--v2 { font-size: 1rem; line-height: 1.5; }
  .hero-stats { gap: 20px; }
  .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 (max-width: 420px) {
  .c-hero__title--v2 {
    font-size: 2.125rem;
  }
  .hero-stats {
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
  }
  .hero-stat {
    flex: 1 1 30%;
  }
  .hero-stat__value {
    font-size: 1.6rem;
  }
  .hero-stat__label {
    font-size: 10px;
    letter-spacing: 0.08em;
  }
}

@media (max-width: 340px) {
  .c-hero__title--v2 {
    font-size: 1.875rem;
  }
  .hero-stats {
    flex-direction: column;
  }
  .hero-stat {
    align-items: flex-start;
  }
  .hero-stat__value,
  .hero-stat__label {
    text-align: left;
  }
}

@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;
}
