/* Performance & scroll-reveal styles (§8.1/§8.2).
   Single source of truth for animation classes — sections never redefine them. */

/* Scroll-reveal: hidden until .is-visible is added by ScrollObserver. */
.animate-on-scroll {
  opacity: 0;
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
  will-change: opacity, transform;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: none;
}

.animate-on-scroll.fade-up {
  transform: translateY(24px);
}
.animate-on-scroll.fade-down {
  transform: translateY(-24px);
}
.animate-on-scroll.fade-left {
  transform: translateX(24px);
}
.animate-on-scroll.fade-right {
  transform: translateX(-24px);
}
.animate-on-scroll.zoom {
  transform: scale(0.94);
}
.animate-on-scroll.flip {
  transform: perspective(800px) rotateX(12deg);
}

.animate-on-scroll.fast {
  transition-duration: 0.35s;
}
.animate-on-scroll.slow {
  transition-duration: 0.9s;
}

/* Respect the user's motion preference: no transforms, instant reveal. */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
