/*
 * flash-hero.css
 * Owns: cycling full-bleed background image hero with "Stop chasing. Start moving." overlay
 * Does NOT own: nav, typography scale, body colors, construction mosaic bg
 *
 * Usage: add class="flash-hero-outer" to the hero wrapper div
 */

/* ── FLASH HERO WRAPPER ── */
.flash-hero-outer {
  position: relative;
  overflow: hidden;
  width: 100%;
  /* min-height is intentionally NOT set here — each page's existing hero CSS owns that */
}

/* Image slides layer — stacked absolutely, crossfade via opacity */
.flash-hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.flash-hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  will-change: opacity;
}

.flash-hero-slide.fh-active {
  opacity: 1;
}

/* Dark overlay so text is always legible */
.flash-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(8, 9, 9, 0.55) 0%,
    rgba(8, 9, 9, 0.45) 40%,
    rgba(8, 9, 9, 0.72) 80%,
    rgba(8, 9, 9, 0.96) 100%
  );
}

/* All direct children above slides and overlay (except injected .flash-hero-slides/.flash-hero-overlay/.fh-dots) */
.flash-hero-outer > *:not(.flash-hero-slides):not(.flash-hero-overlay):not(.fh-dots) {
  position: relative;
  z-index: 2;
}

/* ── HEADLINE ANIMATIONS ── */
@keyframes fh-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* "Stop chasing." — fades in first */
.fh-line-1 {
  display: block;
  opacity: 0;
}
.fh-line-1.fh-animate {
  animation: fh-fade-up 0.55s ease forwards;
  animation-delay: 0.4s;
}

/* "Start moving." — fades in 0.5s after "Stop chasing." */
.fh-line-2 {
  display: block;
  opacity: 0;
}
.fh-line-2.fh-animate {
  animation: fh-fade-up 0.55s ease forwards;
  animation-delay: 0.9s;
}

/* ── PROGRESS DOTS ── */
.fh-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
  align-items: center;
}

.fh-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: background 0.3s ease, transform 0.3s ease;
  cursor: pointer;
}

.fh-dot.fh-dot-active {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.3);
}

/* ── MOBILE ADJUSTMENTS ── */
@media (max-width: 640px) {
  /* Fade faster on mobile so the shorter 2.5s cycle feels snappy */
  .flash-hero-slide {
    transition: opacity 0.7s ease-in-out;
  }
}

/* Reduce motion: freeze first frame, no crossfade */
@media (prefers-reduced-motion: reduce) {
  .flash-hero-slide {
    transition: none;
  }
  .fh-line-1,
  .fh-line-2 {
    opacity: 1;
    animation: none;
  }
}
