/* ============================================================================
   animations.css — @keyframes, scroll reveal classes, animation utilities
   ============================================================================ */

/* ─── SCROLL REVEAL ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ─── @KEYFRAMES ─────────────────────────────────────────── */

/* Slide in from right */
@keyframes slideInFromRight {
  from { opacity: 0; transform: translateX(80px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Fade in up */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Fade in */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Slide in from left */
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Slide in from right */
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Scale in */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* Gentle float (decorative elements) */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

/* Pulse glow */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.3); }
  50%       { box-shadow: 0 0 0 12px rgba(59, 130, 246, 0); }
}

/* Counter number roll-up (triggered via JS) */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Shimmer (skeleton loading placeholder) */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Spin (loading indicators) */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Gradient shift (animated backgrounds) */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ─── ANIMATION UTILITY CLASSES ──────────────────────────── */
.animate-fade-in      { animation: fadeIn 0.6s ease both; }
.animate-fade-in-up   { animation: fadeInUp 0.6s ease both; }
.animate-slide-left   { animation: slideInLeft 0.6s ease both; }
.animate-slide-right  { animation: slideInRight 0.6s ease both; }
.animate-scale-in     { animation: scaleIn 0.5s ease both; }
.animate-float        { animation: float 4s ease-in-out infinite; }
.animate-pulse-glow   { animation: pulseGlow 2.5s ease-in-out infinite; }
.animate-spin         { animation: spin 1s linear infinite; }

/* Delay helpers */
.delay-100  { animation-delay: 0.1s; }
.delay-200  { animation-delay: 0.2s; }
.delay-300  { animation-delay: 0.3s; }
.delay-400  { animation-delay: 0.4s; }
.delay-500  { animation-delay: 0.5s; }

/* ─── HOVER EFFECTS ──────────────────────────────────────── */
.hover-lift {
  transition: transform var(--duration-200) var(--ease-default), box-shadow var(--duration-200) var(--ease-default);
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hover-zoom img {
  transition: transform var(--duration-300) var(--ease-default);
  overflow: hidden;
}
.hover-zoom:hover img { transform: scale(1.05); }

/* ─── 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;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .reveal.revealed {
    opacity: 1;
    transform: none;
  }
}
