/* ==========================================================================
   WORDPRESSORA — ANIMATIONS & INTERACTION STYLESHEET
   Smooth micro-interactions, scroll reveals, keyframes & accessibility
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Keyframe Animations
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(99, 91, 255, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(99, 91, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(99, 91, 255, 0);
  }
}

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

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

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

/* --------------------------------------------------------------------------
   2. Scroll Reveal Utility Classes
   -------------------------------------------------------------------------- */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Delays for Grids */
.delay-1 { transition-delay: 100ms; }
.delay-2 { transition-delay: 200ms; }
.delay-3 { transition-delay: 300ms; }
.delay-4 { transition-delay: 400ms; }
.delay-5 { transition-delay: 500ms; }
.delay-6 { transition-delay: 600ms; }

/* --------------------------------------------------------------------------
   3. Interactive Micro-Interactions
   -------------------------------------------------------------------------- */
.pulse-badge {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-accent);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulseGlow 2s infinite;
}

.pulse-badge-warning {
  background-color: var(--color-warning);
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

.spinner-primary {
  border-color: rgba(99, 91, 255, 0.2);
  border-top-color: var(--color-primary);
}

/* Floating Mockup Accents */
.float-effect {
  animation: floatSlow 5s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   4. Reduced Motion Preferences (Accessibility WCAG 2.2)
   -------------------------------------------------------------------------- */
@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;
  }

  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .pulse-badge {
    animation: none !important;
  }

  .float-effect {
    animation: none !important;
  }
}

