/* ==========================================================================
   Animations - keyframes and scroll-reveal utility classes
   ========================================================================== */

@keyframes loader-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

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

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(var(--brand-teal-500-rgb), 0.4);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(var(--brand-teal-500-rgb), 0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -400px 0;
  }
  100% {
    background-position: 400px 0;
  }
}

/* ---------------------------------------------------------------------
   Scroll-reveal utility (toggled by main.js via IntersectionObserver)
   --------------------------------------------------------------------- */
[data-animate] {
  opacity: 0;
}

[data-animate].in-view {
  animation-duration: var(--duration-slow);
  animation-timing-function: var(--ease-out);
  animation-fill-mode: both;
}

[data-animate="fade-up"].in-view {
  animation-name: fade-in-up;
}
[data-animate="fade"].in-view {
  animation-name: fade-in;
}
[data-animate="scale"].in-view {
  animation-name: scale-in;
}

[data-animate-delay="1"] {
  animation-delay: 90ms !important;
}
[data-animate-delay="2"] {
  animation-delay: 180ms !important;
}
[data-animate-delay="3"] {
  animation-delay: 270ms !important;
}
[data-animate-delay="4"] {
  animation-delay: 360ms !important;
}

.animate-float {
  animation: float 6s var(--ease-in-out) infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 2.4s ease-out infinite;
}

.skeleton {
  background: linear-gradient(90deg, var(--color-surface-2) 0%, var(--color-surface-3) 50%, var(--color-surface-2) 100%);
  background-size: 800px 100%;
  animation: shimmer 1.6s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    opacity: 1;
    animation: none !important;
  }
  .animate-float,
  .animate-pulse-glow,
  .logo-marquee__track {
    animation: none !important;
  }
}
