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

/* ===== KEYFRAME ANIMATIONS ===== */

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

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

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

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

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

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

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

@keyframes slideDown {
  from {
    max-height: 0;
    overflow: hidden;
  }
  to {
    max-height: 500px;
  }
}

/* ===== REVEAL ANIMATION CLASS ===== */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 600ms var(--transition-slow) forwards;
}

.reveal.fadeInDown {
  animation: fadeInDown 600ms var(--transition-slow) forwards;
}

.reveal.fadeInLeft {
  animation: fadeInLeft 600ms var(--transition-slow) forwards;
}

.reveal.fadeInRight {
  animation: fadeInRight 600ms var(--transition-slow) forwards;
}

/* ===== REVEAL SCALE CLASS ===== */

.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  animation: scaleIn 600ms var(--transition-slow) forwards;
}

/* ===== INTERSECTION OBSERVER CLASSES ===== */

.in-view {
  opacity: 1;
  transform: translateY(0) !important;
}

.in-view.reveal-scale {
  transform: scale(1) !important;
}

/* ===== STAGGER ANIMATION ===== */

.stagger-children > * {
  opacity: 0;
  animation: fadeInUp 600ms var(--transition-slow) forwards;
}

.stagger-children > :nth-child(1) {
  animation-delay: 0ms;
}

.stagger-children > :nth-child(2) {
  animation-delay: 100ms;
}

.stagger-children > :nth-child(3) {
  animation-delay: 200ms;
}

.stagger-children > :nth-child(4) {
  animation-delay: 300ms;
}

.stagger-children > :nth-child(5) {
  animation-delay: 400ms;
}

/* ===== FADE IN / FADE OUT ===== */

.fade-in {
  animation: fadeInUp 600ms var(--transition-slow) forwards;
}

.fade-out {
  animation: fadeInUp 300ms var(--transition-fast) reverse forwards;
}

/* ===== RESPONSIVE ANIMATION ADJUSTMENTS ===== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
