/* ==========================================================================
   Cinematic Animations & Micro-interactions
   ========================================================================== */

/* Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes zoomOut {
  from {
    transform: scale(1.1);
  }
  to {
    transform: scale(1);
  }
}

/* Base Animation Classes used with Intersection Observer */
.animate-on-scroll {
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1), transform 1s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform, visibility;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  visibility: visible;
}

/* Specific Animations */
.fade-up {
  transform: translateY(60px);
}
.fade-up.is-visible {
  transform: translateY(0);
}

.fade-left {
  transform: translateX(-60px);
}
.fade-left.is-visible {
  transform: translateX(0);
}

.fade-right {
  transform: translateX(60px);
}
.fade-right.is-visible {
  transform: translateX(0);
}

.scale-up {
  transform: scale(0.92);
}
.scale-up.is-visible {
  transform: scale(1);
}

/* Staggered Delays for lists/grids */
.delay-100 { transition-delay: 150ms; }
.delay-200 { transition-delay: 300ms; }
.delay-300 { transition-delay: 450ms; }
.delay-400 { transition-delay: 600ms; }
.delay-500 { transition-delay: 750ms; }

/* Micro-interactions */

/* Image Hover Zoom */
.img-zoom-container {
  overflow: hidden;
  border-radius: 12px;
  position: relative;
}

.img-zoom-container::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.5);
  pointer-events: none;
}

.img-zoom-container img {
  transition: transform 1.2s cubic-bezier(0.25, 1, 0.5, 1);
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-zoom-container:hover img {
  transform: scale(1.1);
}

/* Button Ripple (JS + CSS) */
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  background-color: rgba(255, 255, 255, 0.4);
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}
