/* ==========================================================================
   ANIMATIONS.CSS — Keyframes, Utilities & Accessibility
   LlionTec.com Design System
   ========================================================================== */

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */

/* ── Continuous / Looping ────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(0, 212, 255, 0);
  }
}

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

/* ── Background ──────────────────────────────────────────────────────── */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ── UI Feedback ─────────────────────────────────────────────────────── */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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


/* ==========================================================================
   SCROLL-TRIGGERED ANIMATION UTILITIES
   Elements start hidden and animate into view when JavaScript adds .visible.
   ========================================================================== */

/* Base state — hidden, ready to animate */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

/* Visible state — fully shown */
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   STAGGER DELAYS
   Apply to children inside a scroll-animated container for cascading effect.
   -------------------------------------------------------------------------- */
.stagger-1 { transition-delay: 100ms; }
.stagger-2 { transition-delay: 200ms; }
.stagger-3 { transition-delay: 300ms; }
.stagger-4 { transition-delay: 400ms; }
.stagger-5 { transition-delay: 500ms; }
.stagger-6 { transition-delay: 600ms; }
.stagger-7 { transition-delay: 700ms; }
.stagger-8 { transition-delay: 800ms; }


/* ==========================================================================
   LOADING SPINNER
   ========================================================================== */
.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid var(--glass-border);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}


/* ==========================================================================
   ACCESSIBILITY — Reduced Motion
   Respects user preferences for reduced motion by disabling all animations
   and transitions, and immediately showing scroll-animated elements.
   ========================================================================== */
@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-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

