/*
 * GarageDash Motion Kit — reusable scroll/entrance animation utility.
 * Framework-free (plain CSS + one small JS file), so it can be dropped into
 * any static site: link this file + motion-kit.js and add the classes below.
 * Respects prefers-reduced-motion throughout.
 *
 * Classes:
 *   .reveal            — fades + rises in once scrolled into view
 *   .reveal-stagger     — same, but staggers its direct children one after another
 *   .hero-in            — animates in immediately on page load (for above-the-fold content)
 *   .hero-in-delay-1/2/3 — same, with an extra 0.1s / 0.2s / 0.3s delay (stack a sequence)
 */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-stagger.in-view > * {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.10s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.15s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.20s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.25s; }
.reveal-stagger > *:nth-child(6) { transition-delay: 0.30s; }
.reveal-stagger > *:nth-child(n+7) { transition-delay: 0.35s; }

@keyframes motionKitFadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-in          { animation: motionKitFadeInUp 0.7s ease both; }
.hero-in-delay-1  { animation: motionKitFadeInUp 0.7s ease 0.1s both; }
.hero-in-delay-2  { animation: motionKitFadeInUp 0.7s ease 0.2s both; }
.hero-in-delay-3  { animation: motionKitFadeInUp 0.7s ease 0.3s both; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > *,
  .hero-in, .hero-in-delay-1, .hero-in-delay-2, .hero-in-delay-3 {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}
