/* ========================================================================
   Animations & Motion System
   ========================================================================*/

/* Reveal on scroll
   NOTE: hidden state only when JS has hydrated (.js on html).
   This prevents content from being stuck invisible if JS fails or is slow. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  will-change: opacity, transform;
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
.js [data-reveal="left"] { transform: translateX(-28px); }
.js [data-reveal="left"].is-visible { transform: translateX(0); }
.js [data-reveal="right"] { transform: translateX(28px); }
.js [data-reveal="right"].is-visible { transform: translateX(0); }
.js [data-reveal="zoom"] { transform: scale(0.96); }
.js [data-reveal="zoom"].is-visible { transform: scale(1); }

/* Stagger children */
.js [data-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 60ms);
}
.js [data-stagger].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Keyframes */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

@keyframes bounce-down {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 91, 1, 0); }
  50% { box-shadow: 0 0 40px 8px rgba(255, 91, 1, 0.35); }
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-glow { animation: glow-pulse 3s infinite var(--ease-out); }

/* View transitions (browsers supporting) */
@supports (view-transition-name: root) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 420ms;
    animation-timing-function: var(--ease-out);
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal],
  [data-stagger] > * {
    opacity: 1;
    transform: none !important;
  }
  .hero-bg { transform: none !important; }
}
