/* ============================================
   Learning Station — Animation Keyframes
   ============================================ */

/* ----------------------------------------
   1. GRADIENT ANIMATIONS
   ---------------------------------------- */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  25% { background-position: 50% 100%; }
  50% { background-position: 100% 50%; }
  75% { background-position: 50% 0%; }
  100% { background-position: 0% 50%; }
}

/* ----------------------------------------
   2. FLOATING ELEMENT ANIMATIONS
   ---------------------------------------- */
@keyframes float1 {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-20px) rotate(5deg);
  }
  50% {
    transform: translateY(-35px) rotate(-3deg);
  }
  75% {
    transform: translateY(-15px) rotate(4deg);
  }
}

@keyframes float2 {
  0%, 100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  33% {
    transform: translateY(-25px) rotate(-6deg) scale(1.05);
  }
  66% {
    transform: translateY(10px) rotate(4deg) scale(0.95);
  }
}

@keyframes float3 {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(10px, -20px) rotate(3deg);
  }
  50% {
    transform: translate(-5px, -30px) rotate(-4deg);
  }
  75% {
    transform: translate(8px, -10px) rotate(2deg);
  }
}

/* ----------------------------------------
   3. TEXT REVEAL ANIMATIONS
   ---------------------------------------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ----------------------------------------
   4. BUTTON & INTERACTIVE ANIMATIONS
   ---------------------------------------- */
@keyframes ripple-effect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.4);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(67, 97, 238, 0);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-8px);
  }
  60% {
    transform: translateY(-4px);
  }
}

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

/* ----------------------------------------
   5. SPINNER / LOADING
   ---------------------------------------- */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ----------------------------------------
   6. HERO-SPECIFIC ANIMATIONS
   ---------------------------------------- */
.hero__content .hero__badge {
  animation: fadeInDown 0.8s var(--ease-out) 0.2s both;
}

.hero__content .hero__title {
  animation: fadeInUp 0.9s var(--ease-out) 0.4s both;
}

.hero__content .hero__subtitle {
  animation: fadeInUp 0.9s var(--ease-out) 0.6s both;
}

.hero__content .hero__buttons {
  animation: fadeInUp 0.9s var(--ease-out) 0.8s both;
}

/* ----------------------------------------
   7. COUNTER ANIMATION HELPER
   ---------------------------------------- */
.stat-card__number {
  transition: all 0.3s ease;
}

.stat-card[data-animated="true"] .stat-card__number {
  animation: scaleIn 0.5s var(--ease-spring) both;
}

/* ----------------------------------------
   8. NAV LINK UNDERLINE ANIMATION
   ---------------------------------------- */
.navbar__link::after {
  transition: width 0.35s var(--ease-spring);
}

/* ----------------------------------------
   9. SCROLL-TRIGGERED UTILITY CLASSES
   ---------------------------------------- */
.anim-fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.7s var(--ease-out);
}

.anim-fade-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

.anim-fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.7s var(--ease-out);
}

.anim-fade-left.in-view {
  opacity: 1;
  transform: translateX(0);
}

.anim-fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.7s var(--ease-out);
}

.anim-fade-right.in-view {
  opacity: 1;
  transform: translateX(0);
}

.anim-scale {
  opacity: 0;
  transform: scale(0.85);
  transition: all 0.6s var(--ease-out);
}

.anim-scale.in-view {
  opacity: 1;
  transform: scale(1);
}

/* Stagger children */
.anim-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.5s var(--ease-out);
}

.anim-stagger.in-view > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.anim-stagger.in-view > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.anim-stagger.in-view > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.anim-stagger.in-view > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.anim-stagger.in-view > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }
.anim-stagger.in-view > *:nth-child(6) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }

/* ----------------------------------------
   10. ACCESSIBILITY: REDUCED MOTION
   ---------------------------------------- */
@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;
  }

  .hero__floating {
    display: none;
  }

  .anim-fade-up,
  .anim-fade-left,
  .anim-fade-right,
  .anim-scale {
    opacity: 1;
    transform: none;
  }

  .anim-stagger > * {
    opacity: 1;
    transform: none;
  }

  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
