/* ========================================
   Scroll Animations with Intersection Observer
   ======================================== */

/* Base animation state (before scroll into view) */
.scroll-animate {
  opacity: 0;
  transform: translateY(75px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Active animation state (after scroll into view) */
.scroll-animate.animate-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Animation Variants ========== */

/* Fade Only */
.scroll-animate-fade {
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

.scroll-animate-fade.animate-visible {
  opacity: 1;
}

/* Scale */
.scroll-animate-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate-scale.animate-visible {
  opacity: 1;
  transform: scale(1);
}

/* Slide from Left */
.scroll-animate-left {
  opacity: 0;
  transform: translateX(-75px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate-left.animate-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Slide from Right */
.scroll-animate-right {
  opacity: 0;
  transform: translateX(75px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate-right.animate-visible {
  opacity: 1;
  transform: translateX(0);
}

/* ========== Stagger Delays ========== */
.scroll-animate[data-delay="100"] {
  transition-delay: 0.1s;
}

.scroll-animate[data-delay="200"] {
  transition-delay: 0.2s;
}

.scroll-animate[data-delay="300"] {
  transition-delay: 0.3s;
}

.scroll-animate[data-delay="400"] {
  transition-delay: 0.4s;
}

.scroll-animate[data-delay="500"] {
  transition-delay: 0.5s;
}

/* ========== Page Load Animations ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* ========== Hover Animations ========== */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px var(--color-shadow-light);
}

/* ========== Loading Spinner ========== */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  animation: spin 1s linear infinite;
}

/* ========== Pulse Animation ========== */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

.bounce {
  animation: bounce 1s ease-in-out infinite;
}
