/* =============================================================================
   Site-wide motion — hero entrances + scroll reveal (matches home hero)
   ============================================================================= */

@media (prefers-reduced-motion: no-preference) {
  @keyframes motion-fade-rise {
    from {
      opacity: 0;
      transform: translate3d(0, 22px, 0);
    }
    to {
      opacity: 1;
      transform: translate3d(0, 0, 0);
    }
  }

  @keyframes motion-fade-rise-sm {
    from {
      opacity: 0;
      transform: translate3d(0, 14px, 0);
    }
    to {
      opacity: 1;
      transform: translate3d(0, 0, 0);
    }
  }

  @keyframes motion-scale-in {
    from {
      opacity: 0;
      transform: translate3d(0, 20px, 0) scale(0.96);
    }
    to {
      opacity: 1;
      transform: translate3d(0, 0, 0) scale(1);
    }
  }

  /* Home hero — title lines on load */
  .motion-hero.hero .hero__title-line--lead {
    opacity: 0;
    animation: motion-fade-rise-sm 0.72s var(--ease-out) 0.08s forwards;
  }

  .motion-hero.hero .hero__title-line--calligraphy {
    opacity: 0;
    animation: hero-title-tagline-reveal 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.28s forwards;
  }

  /* Inner page heroes — stagger on load */
  .motion-hero.page-hero .page-eyebrow,
  .motion-hero.page-hero .page-hero__title,
  .motion-hero.page-hero .page-hero__lead,
  .motion-hero.page-hero .page-hero__actions {
    opacity: 0;
    animation: motion-fade-rise 0.78s var(--ease-out) forwards;
  }

  .motion-hero.page-hero .page-eyebrow {
    animation-delay: 0.06s;
  }

  .motion-hero.page-hero .page-hero__title {
    animation-delay: 0.16s;
  }

  .motion-hero.page-hero .page-hero__lead {
    animation-delay: 0.28s;
  }

  .motion-hero.page-hero .page-hero__actions {
    animation-delay: 0.4s;
  }

  /* About / contact hero */
  .motion-hero.about-hero .about-hero__eyebrow,
  .motion-hero.about-hero .about-hero__title,
  .motion-hero.about-hero .about-hero__lead,
  .motion-hero.about-hero .about-hero__actions {
    opacity: 0;
    animation: motion-fade-rise 0.78s var(--ease-out) forwards;
  }

  .motion-hero.about-hero .about-hero__eyebrow {
    animation-delay: 0.06s;
  }

  .motion-hero.about-hero .about-hero__title {
    animation-delay: 0.16s;
  }

  .motion-hero.about-hero .about-hero__lead {
    animation-delay: 0.28s;
  }

  .motion-hero.about-hero .about-hero__actions {
    animation-delay: 0.4s;
  }

  .motion-hero.about-hero .about-hero__stat {
    opacity: 0;
    animation: motion-scale-in 0.88s var(--ease-out) 0.22s forwards;
  }
}

@media (prefers-reduced-motion: reduce) {
  .motion-hero.hero .hero__title-line--lead,
  .motion-hero.hero .hero__title-line--calligraphy,
  .motion-hero.page-hero .page-eyebrow,
  .motion-hero.page-hero .page-hero__title,
  .motion-hero.page-hero .page-hero__lead,
  .motion-hero.page-hero .page-hero__actions,
  .motion-hero.about-hero .about-hero__eyebrow,
  .motion-hero.about-hero .about-hero__title,
  .motion-hero.about-hero .about-hero__lead,
  .motion-hero.about-hero .about-hero__actions,
  .motion-hero.about-hero .about-hero__stat {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* Scroll reveal — aligned with hero easing */
.reveal {
  transform: translate3d(0, 28px, 0) scale(0.985);
  transition:
    opacity 0.72s var(--ease-out),
    transform 0.72s var(--ease-out);
}

.reveal.is-visible {
  transform: translate3d(0, 0, 0) scale(1);
}

[data-reveal-stagger] > .reveal[data-reveal] {
  transition-delay: 0s;
}
