/* Universal Smooth Scroll Animation System - Trailers Hobby */

/* 1. Override legacy mobile-only restrictions on ALL screens (Mobile, Tablet, Laptop, Desktop) */
html .scroll-reveal,
html .scroll-reveal-up,
html .scroll-reveal-left,
html .scroll-reveal-right,
html .scroll-reveal-scale,
html .site-scroll-reveal,
html [data-site-motion-target],
html.site-motion-ready .site-scroll-reveal,
html.site-motion-ready.site-motion-mobile .site-scroll-reveal {
  opacity: 0 !important;
  filter: blur(4px) !important;
  transform: translateY(42px) !important;
  will-change: opacity, transform, filter;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.8s ease !important;
}

html .scroll-reveal-left,
html .is-reveal-left {
  transform: translateX(-42px) translateY(0) !important;
}

html .scroll-reveal-right,
html .is-reveal-right {
  transform: translateX(42px) translateY(0) !important;
}

html .scroll-reveal-scale {
  transform: scale(0.90) translateY(0) !important;
}

/* 2. VISIBLE STATE - Active when scrolled into view (scrolling UP and DOWN) */
html .scroll-reveal.is-anim-visible,
html .scroll-reveal-up.is-anim-visible,
html .scroll-reveal-left.is-anim-visible,
html .scroll-reveal-right.is-anim-visible,
html .scroll-reveal-scale.is-anim-visible,
html .site-scroll-reveal.is-anim-visible,
html [data-site-motion-target].is-anim-visible,
html.site-motion-ready .site-scroll-reveal.is-anim-visible,
html.site-motion-ready.site-motion-mobile .site-scroll-reveal.is-anim-visible {
  opacity: 1 !important;
  filter: blur(0) !important;
  transform: translateY(0) translateX(0) scale(1) !important;
}

/* 3. Stagger animation delays for grid items and children */
html .scroll-stagger > *:nth-child(1) { transition-delay: 0.06s !important; }
html .scroll-stagger > *:nth-child(2) { transition-delay: 0.14s !important; }
html .scroll-stagger > *:nth-child(3) { transition-delay: 0.22s !important; }
html .scroll-stagger > *:nth-child(4) { transition-delay: 0.30s !important; }
html .scroll-stagger > *:nth-child(5) { transition-delay: 0.38s !important; }
html .scroll-stagger > *:nth-child(6) { transition-delay: 0.46s !important; }

/* 4. Accessibility Fallback */
@media (prefers-reduced-motion: reduce) {
  html .scroll-reveal,
  html .scroll-reveal-up,
  html .scroll-reveal-left,
  html .scroll-reveal-right,
  html .scroll-reveal-scale,
  html .site-scroll-reveal,
  html [data-site-motion-target] {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    transition: none !important;
  }
}
