/* =============================================
   NEER AI Academy — Animations
   ============================================= */

/* --- Scroll Reveal Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* --- Particle Animation --- */
.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(59, 130, 246, 0.3);
  border-radius: 50%;
  animation: float linear infinite;
}

@keyframes float {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(50px);
    opacity: 0;
  }
}

/* --- Glow Pulse --- */
@keyframes glow-pulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
  }
  50% {
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.2);
  }
}

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

.hero-title-accent {
  background-size: 200% 200%;
  animation: gradient-shift 6s ease infinite;
}

/* --- Card Hover Glow --- */
.program-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.program-card[data-program="drinking-water"]::after {
  background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(6, 182, 212, 0.04), transparent 40%);
}

.program-card[data-program="wastewater"]::after {
  background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(139, 92, 246, 0.04), transparent 40%);
}

.program-card[data-program="stormwater"]::after {
  background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(16, 185, 129, 0.04), transparent 40%);
}

.program-card:hover::after {
  opacity: 1;
}

/* --- Pipeline Step Pulse --- */
.pipeline-step::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.1);
  transition: box-shadow 0.4s ease;
}

.pipeline-step:hover::after {
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.05);
}

/* --- Smooth Page Transition --- */
body {
  animation: pageIn 0.5s ease;
}

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

/* --- Number Counter Animation --- */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-stat-number {
  animation: countUp 0.8s ease forwards;
}

/* --- Link underline sweep --- */
.program-card-link svg {
  transition: transform 0.3s ease;
}

.program-card-link:hover svg {
  transform: translateX(4px);
}

/* --- Module card left border accent on hover --- */
.module-card {
  position: relative;
}

.module-card::before {
  content: '';
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.drinking-water-theme .module-card::before {
  background: var(--color-drinking-water);
}

.wastewater-theme .module-card::before {
  background: var(--color-wastewater);
}

.stormwater-theme .module-card::before {
  background: var(--color-stormwater);
}

.module-card:hover::before {
  opacity: 1;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-title-accent {
    animation: none;
  }

  .particle {
    animation: none;
    display: none;
  }

  .scroll-indicator {
    animation: none;
  }

  body {
    animation: none;
  }
}
