/* ============================================================
   Hero effects — Ken Burns motion, pollen particles, intro reveal
   ============================================================ */

/* ---------- Ken Burns slow zoom/pan on the active slide image ----------
   Driven by a plain CSS transition (not @keyframes) so that ending the
   zoom never "cancels" an animation and snaps the transform back to its
   base value. The outgoing slide keeps transitioning smoothly under its
   own fade-out, and is only silently reset (transition disabled for one
   frame) by hero-slider.js once it is fully invisible. */
.hero-slide img {
  will-change: transform;
  transform-origin: center center;
  transform: scale(1) translate3d(0, 0, 0);
  transition: transform var(--kenburns-duration) linear;
}

.hero-slide:nth-child(4n+1) img { --kb-tx: -1.5%; --kb-ty: -1%; }
.hero-slide:nth-child(4n+2) img { --kb-tx: 1.5%;  --kb-ty: 1%; }
.hero-slide:nth-child(4n+3) img { --kb-tx: 1.5%;  --kb-ty: -1.5%; }
.hero-slide:nth-child(4n+4) img { --kb-tx: -1.5%; --kb-ty: 1.5%; }

.hero-slide.is-zooming img {
  transform: scale(1.08) translate3d(var(--kb-tx), var(--kb-ty), 0);
}

/* Momentarily disables the transition so the zoom can be reset to its
   base state without a visible jump (only ever toggled while hidden). */
.hero-slide.is-resetting img {
  transition: none !important;
}

/* ---------- Intro reveal overlay ---------- */
.hero-intro {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  pointer-events: none;
}

.hero-intro__band {
  flex: 1 0 0;
  background: var(--color-bg);
  transform: translateY(0);
  transition: transform 0.7s ease-in-out;
}

.hero-intro.is-revealing .hero-intro__band {
  transform: translateY(-100%);
}

.hero-intro__band:nth-child(1) { transition-delay: 0s; }
.hero-intro__band:nth-child(2) { transition-delay: 0.06s; }
.hero-intro__band:nth-child(3) { transition-delay: 0.12s; }
.hero-intro__band:nth-child(4) { transition-delay: 0.18s; }
.hero-intro__band:nth-child(5) { transition-delay: 0.24s; }
.hero-intro__band:nth-child(6) { transition-delay: 0.30s; }

.hero-intro__title {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  z-index: 6;
}

.hero-intro__title.is-visible {
  opacity: 1;
}

.hero-intro__title-main {
  font-family: var(--font-display);
  font-weight: var(--fw-semi);
  font-size: clamp(1.5rem, 4vw, var(--fs-h1));
  letter-spacing: 0.02em;
}

.hero-intro__title-sub {
  font-family: var(--font-body);
  font-weight: var(--fw-medium);
  font-size: var(--fs-body);
  margin-top: var(--space-sm);
  opacity: 0.9;
}

@media (max-width: 767px) {
  .hero-intro__title-main { font-size: clamp(1.2rem, 6vw, 1.75rem); }
}

/* ---------- Reduced motion: disable all new effects ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-slide img {
    transition: none !important;
    transform: none !important;
  }

  .hero-intro {
    display: none !important;
  }
}
