/* ============================================================
   ANIMATIONS.CSS — Keyframes & Animation Classes
   ============================================================ */

/* ============================================================
   FADE ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

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

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

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

/* ============================================================
   SCALE ANIMATIONS
   ============================================================ */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scaleInBounce {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  70% {
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ============================================================
   FLOATING ANIMATIONS — for decorative shapes
   ============================================================ */
@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  33% {
    transform: translateY(-12px) rotate(2deg);
  }
  66% {
    transform: translateY(8px) rotate(-1deg);
  }
}

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

@keyframes floatReverse {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(15px) rotate(-3deg);
  }
}

@keyframes floatCircle {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
  }
  25% {
    transform: translateY(-10px) translateX(10px) rotate(90deg);
  }
  50% {
    transform: translateY(0) translateX(15px) rotate(180deg);
  }
  75% {
    transform: translateY(10px) translateX(5px) rotate(270deg);
  }
  100% {
    transform: translateY(0) translateX(0) rotate(360deg);
  }
}

/* ============================================================
   ROTATE ANIMATIONS
   ============================================================ */
@keyframes rotate360 {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ============================================================
   PULSE ANIMATIONS
   ============================================================ */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.3);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(37, 99, 235, 0);
  }
}

@keyframes pulseDot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.8);
  }
}

/* ============================================================
   SLIDE ANIMATIONS
   ============================================================ */
@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInFromRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================================
   GRADIENT SHIFT — for backgrounds
   ============================================================ */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ============================================================
   SHIMMER — loading placeholder effect
   ============================================================ */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ============================================================
   UNDERLINE GROW — for nav links
   ============================================================ */
@keyframes underlineGrow {
  from { width: 0; }
  to   { width: 100%; }
}

/* ============================================================
   BOUNCE
   ============================================================ */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

@keyframes bounceSoft {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* ============================================================
   SCROLL INDICATOR
   ============================================================ */
@keyframes scrollIndicator {
  0% {
    opacity: 0;
    transform: translateY(-8px);
  }
  40% {
    opacity: 1;
  }
  80%, 100% {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ============================================================
   ANIMATION UTILITY CLASSES
   ============================================================ */
.anim-float          { animation: float 6s ease-in-out infinite; }
.anim-float-slow     { animation: floatSlow 8s ease-in-out infinite; }
.anim-float-reverse  { animation: floatReverse 7s ease-in-out infinite; }
.anim-float-circle   { animation: floatCircle 12s linear infinite; }
.anim-rotate         { animation: rotate360 20s linear infinite; }
.anim-rotate-slow    { animation: rotateSlow 40s linear infinite; }
.anim-pulse          { animation: pulseGlow 2.5s ease-in-out infinite; }
.anim-pulse-dot      { animation: pulseDot 2s ease-in-out infinite; }
.anim-bounce         { animation: bounce 2s ease-in-out infinite; }
.anim-bounce-soft    { animation: bounceSoft 3s ease-in-out infinite; }

/* Delay utilities */
.anim-delay-1 { animation-delay: 0.2s; }
.anim-delay-2 { animation-delay: 0.4s; }
.anim-delay-3 { animation-delay: 0.6s; }
.anim-delay-4 { animation-delay: 0.8s; }
.anim-delay-5 { animation-delay: 1s; }

/* Duration utilities */
.anim-slow    { animation-duration: 8s; }
.anim-slower  { animation-duration: 12s; }
.anim-fastest { animation-duration: 3s; }

/* 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;
  }

  .floating,
  .anim-float,
  .anim-float-slow,
  .anim-float-reverse,
  .anim-rotate,
  .anim-pulse {
    animation: none !important;
  }
}
