/**
 * animations.css
 * ─────────────────────────────────────────────────────
 * All @keyframes and animation utility classes.
 * JS adds .visible to .reveal elements on scroll.
 */

/* ── Keyframes ────────────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideLeft {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes spinReverse {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-360deg);
  }
}

@keyframes pulseRing {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

@keyframes shimmer {
  0% {
    background-position: -600px 0;
  }
  100% {
    background-position: 600px 0;
  }
}

@keyframes barGrow {
  from {
    width: 0;
  }
  to {
    width: var(--w, 100%);
  }
}

@keyframes progressFill {
  from {
    width: 0%;
  }
  to {
    width: var(--pct, 0%);
  }
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Scroll Reveal ────────────────────────────────────── */
/* Elements start hidden. JS adds .visible when in viewport. */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--t-slow) var(--ease),
    transform var(--t-slow) var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for card groups */
.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}
.reveal-delay-4 {
  transition-delay: 0.4s;
}
.reveal-delay-5 {
  transition-delay: 0.5s;
}

/* ── Animation Utility Classes ────────────────────────── */
.animate-float {
  animation: float 3.5s ease-in-out infinite;
}

.animate-float-slow {
  animation: float 5s ease-in-out infinite;
}

.animate-pulse-ring {
  animation: pulseRing 2.4s ease-out infinite;
}

.animate-spin-slow {
  animation: spinSlow 40s linear infinite;
}

.animate-blink {
  animation: blink 1.4s ease-in-out infinite;
}

.animate-shimmer {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.4) 50%,
    transparent 100%
  );
  background-size: 600px 100%;
  animation: shimmer 2s linear infinite;
}

/* ── Page Load Animations ─────────────────────────────── */
/* Apply directly on hero elements with animation-fill-mode: both */
.anim-fade-up {
  animation: fadeUp 0.8s var(--ease) both;
}
.anim-fade-in {
  animation: fadeIn 0.6s var(--ease) both;
}
.anim-slide-right {
  animation: slideRight 0.6s var(--ease) both;
}
.anim-scale-in {
  animation: scaleIn 1s var(--ease) both;
}

.anim-delay-1 {
  animation-delay: 0.1s;
}
.anim-delay-2 {
  animation-delay: 0.25s;
}
.anim-delay-3 {
  animation-delay: 0.4s;
}
.anim-delay-4 {
  animation-delay: 0.55s;
}
.anim-delay-5 {
  animation-delay: 0.7s;
}

/* ── Reduced Motion ───────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
