/* ============================================
   animations.css
   Keyframes & animation utility classes
   for the premium dark-theme landing page.
   GSAP handles scroll animations; this file
   provides infinite/looping CSS keyframes
   and fallback reveal animations.
   ============================================ */

/* -----------------------------------------
   1. @keyframes Definitions
   ----------------------------------------- */

/* CTA button glow — pulsing box-shadow */
@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4),
                0 0 60px rgba(99, 102, 241, 0.15);
  }
  50% {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.7),
                0 0 80px rgba(99, 102, 241, 0.3);
  }
}

/* Subtle floating motion for decorative elements */
@keyframes float {
  0%, 100% {
    transform: translateY(-10px);
  }
  50% {
    transform: translateY(10px);
  }
}

/* Gradient background-position shift */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Slow 360° rotation for decorative elements */
@keyframes rotate-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Left-to-right shimmer / shine effect */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Fade in + slide up (GSAP fallback) */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scale in with fade */
@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Hero background grid subtle drift */
@keyframes grid-move {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-20px, -20px);
  }
  100% {
    transform: translate(0, 0);
  }
}

/* Badge status-dot pulse */
@keyframes dot-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.75);
  }
}

/* -----------------------------------------
   2. Animation Utility Classes
   ----------------------------------------- */

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

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

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 4s ease infinite;
}

.animate-shimmer {
  animation: shimmer 3s linear infinite;
}

/* -----------------------------------------
   3. Hero-Specific Animations
   ----------------------------------------- */

.hero-glow--1 {
  animation: float 8s ease-in-out infinite,
             gradient-shift 6s ease infinite;
  background-size: 200% 200%;
}

.hero-glow--2 {
  animation: float 6s ease-in-out infinite reverse,
             gradient-shift 8s ease infinite reverse;
  background-size: 200% 200%;
}

.hero-grid {
  animation: grid-move 20s linear infinite;
}

.badge-dot {
  display: inline-block;
  animation: dot-pulse 2s ease-in-out infinite;
}

/* -----------------------------------------
   4. Pricing Card Glow Border
   ----------------------------------------- */

.pricing-card {
  position: relative;
}

.pricing-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(99, 102, 241, 0.5) 45%,
    rgba(168, 85, 247, 0.5) 55%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

/* -----------------------------------------
   5. FAQ Chevron Rotation
   ----------------------------------------- */

.faq-chevron {
  transition: transform 0.3s ease;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
}

/* -----------------------------------------
   6. Scroll-Reveal Fallback (GSAP backup)
   ----------------------------------------- */

/* Scroll-reveal: elements start visible.
   GSAP handles animation inline. Fallback class
   only used when GSAP fails to load. */
[data-animate].no-gsap > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
