/* =============================================================
   HZL Microsite — Hero section (Option B: Dual Layer Narrative)
   Canvas image-sequence scroll scrub. 300 frames, 1280×720.
   Text layers driven by GSAP ScrollTrigger progress.
   ============================================================= */

/* ---- Scroll container: gives height for scrubbing ---------- */
.hero {
  position: relative;
  height: 250vh;
  /* transparent — hero__sticky has its own navy base.
     Making the section transparent means the KPI gradient
     (overlapping via margin-top:-100vh) shows through the
     moment the sticky fades to opacity:0. Eliminates the
     "black patch" dead zone between sections. */
  background: transparent;
  z-index: 1;
}

/* ---- Sticky viewport: stays pinned while user scrolls ------ */
.hero__sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--navy-900);   /* dark base — canvas draws on top; zoom fades to navy */
}

/* ---- Canvas: frame-by-frame rendering (drawImage) ---------- */
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  /* Compensate for 720p source upscaling: micro-contrast boost improves perceived sharpness */
  filter: contrast(1.08) saturate(1.03);
}

/* ---- Gradient overlay: removed (black tone eliminated) ------ */
.hero__overlay {
  display: none;
}

/* ---- Radial vignette: very subtle edge darkening only -------- */
.hero__vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 40%,
    rgba(6, 21, 37, 0.35) 100%
  );
  opacity: 0;   /* JS drives this, stays near 0 */
}

/* ---- Report badge (top-right) ------------------------------ */
.hero__report-badge {
  position: absolute;
  top: calc(var(--utility-h) + var(--bar-h) + 1.25rem);
  right: var(--gutter);
  z-index: 5;
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-dark-dim);
  text-align: right;
  line-height: 1.6;
  opacity: 0;         /* revealed by entry GSAP animation */
}

/* =============================================================
   TEXT LAYER A — Phase 1: condensed tagline (auto-reveals then
   scroll-driven fade-out)
   ============================================================= */
.hero__text--a {
  position: absolute;
  z-index: 4;
  bottom: 14%;
  left: 0; right: 0;
  margin: 0 auto;
  width: min(980px, 92vw);
  text-align: center;
}

/* Each line is an overflow:hidden mask — GSAP slides title up into it */
.hero__line {
  display: block;
  overflow: hidden;
  line-height: 1.05;
}

.hero__title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 7.2vw, 6.8rem);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--paper);
  transform-origin: center bottom;
}

.hero__title--accent { color: var(--teal-300); }

/* =============================================================
   HORIZONTAL DIVIDER — phase transition marker (scaleX by JS)
   ============================================================= */
.hero__divider-line {
  display: none;
}

/* =============================================================
   TEXT LAYER B — Phase 2: italic pull-quote (scroll-revealed,
   opacity + Y driven entirely by JS)
   ============================================================= */
.hero__text--b {
  position: absolute;
  z-index: 4;
  bottom: 18%;
  left: 0; right: 0;
  margin: 0 auto;
  width: min(800px, 88vw);
  text-align: center;
  opacity: 0;          /* hidden until JS reveals */
  pointer-events: none;
}

.hero__quote {
  font-family: var(--font-quote);
  font-style: normal;
  font-size: 18px;
  line-height: 1.5;
  color: var(--paper);
  letter-spacing: 0.01em;
}

.hero__year-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.85ch;
  margin-top: 1.2rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal-300);
}
.hero__year-tag::before,
.hero__year-tag::after {
  content: '';
  display: inline-block;
  width: 30px; height: 1px;
  background: currentColor;
  opacity: 0.5;
}

/* =============================================================
   SEQUENCE PROGRESS BAR — bottom of viewport (scaleX by JS)
   ============================================================= */
.hero__progress {
  display: none; /* green seam line removed */
}
.hero__progress-fill {
  display: none;
  background: linear-gradient(to right, var(--navy-600), var(--teal-400));
  transform: scaleX(0);
  transform-origin: left center;
}

/* =============================================================
   SCROLL CUE — fades in after entry animation, hides on scroll
   ============================================================= */
.hero__scroll-cue {
  position: absolute;
  bottom: 2.25rem;
  left: 50%; transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;           /* revealed by JS after lines animate in */
}
.hero__scroll-label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--on-dark-dim);
}
.hero__chevron {
  width: 16px; height: 16px;
  border-right: 1.5px solid rgba(255, 255, 255, 0.4);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.4);
  transform: rotate(45deg);
  animation: chevronBounce 1.5s ease-in-out infinite;
}
@keyframes chevronBounce {
  0%, 100% { transform: rotate(45deg) translateY(0);  }
  50%       { transform: rotate(45deg) translateY(5px); }
}

/* =============================================================
   LOADING OVERLAY — covers until first batch loaded
   ============================================================= */
.hero__loader {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-content: center;
  gap: 1.5rem;
  background: #ffffff;
  transition: opacity 0.7s var(--ease-out);
}
.hero__loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.hero__loader-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(6, 21, 37, 0.45);
  text-align: center;
}
.hero__loader-bar {
  width: 180px; height: 2px;
  background: rgba(6, 21, 37, 0.10);
  border-radius: 999px;
  overflow: hidden;
  margin: 0 auto;
}
.hero__loader-fill {
  height: 100%;
  width: 0%;
  background: var(--teal-400);
  transition: width 0.18s linear;
  border-radius: inherit;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 768px) {
  .hero          { height: 320vh; }   /* slower scrub on touch */
  .hero__title   { font-size: clamp(2.5rem, 12vw, 4rem); }
  .hero__text--a { bottom: 10%; }
  .hero__text--b { bottom: 14%; }
  .hero__report-badge { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__chevron { animation: none; }
}
