/**
 * GS MultiTools - Animations & Micro-interactions
 * Subtle, high-performance CSS keyframe animations.
 * Completely respects prefers-reduced-motion.
 */

/* ==========================================================================
   1. Entrance & Keyframe Animations
   ========================================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseRedGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.25);
  }
  50% {
    box-shadow: 0 0 35px rgba(229, 9, 20, 0.55);
  }
}

/* Backward compatibility keyframe */
@keyframes pulseGoldGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.25);
  }
  50% {
    box-shadow: 0 0 35px rgba(229, 9, 20, 0.55);
  }
}

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

@keyframes floatElementReverse {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

/* ==========================================================================
   2. Utility Animation Classes
   ========================================================================== */
.animate-fade-in {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

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

.animate-glow {
  animation: pulseGoldGlow 4s ease-in-out infinite;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(229, 9, 20, 0.25);
  border-top-color: var(--red-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

/* Hero background dynamic ambient lighting */
.hero-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.22;
  z-index: 0;
}

.hero-glow-orb-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(229, 9, 20, 0.45) 0%, transparent 70%);
  top: -120px;
  right: -60px;
}

.hero-glow-orb-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(178, 7, 16, 0.35) 0%, transparent 70%);
  bottom: -40px;
  left: -80px;
}

/* ==========================================================================
   3. Prefers-Reduced-Motion Accessibility
   ========================================================================== */
@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;
  }

  .animate-float,
  .animate-float-reverse,
  .animate-glow,
  .animate-fade-in {
    animation: none !important;
  }
}
