/* -------------------------------------------------------------
   Keyframe Definitions
------------------------------------------------------------- */

/* Subtle vertical float for illustrations and highlights */
@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Concentric ring pulse for the browser shield lock icon */
@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(0.85);
    opacity: 0.9;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 0.35;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 0;
  }
}

/* Subtle spin for loading or audio wave indicators */
@keyframes spin-slow {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Soft glow pulse for CTA buttons */
@keyframes button-glow {
  0% {
    box-shadow: 0 8px 24px rgba(123, 104, 238, 0.25);
  }
  50% {
    box-shadow: 0 8px 32px rgba(123, 104, 238, 0.45);
  }
  100% {
    box-shadow: 0 8px 24px rgba(123, 104, 238, 0.25);
  }
}

/* Floating animation helper class */
.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-pulse-ring {
  animation: pulse 3s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

/* -------------------------------------------------------------
   Scroll Reveal System (Intersection Observer triggers)
------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity;
}

.reveal.active {
  opacity: 1;
}

/* Slide Up & Fade */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), 
              transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform;
}

.reveal-up.active {
  opacity: 1;
  transform: translateY(0);
}

/* Slide Left & Fade */
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), 
              transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

/* Slide Right & Fade */
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), 
              transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* Scale & Fade */
.reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), 
              transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: opacity, transform;
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* -------------------------------------------------------------
   Staggered delays for child lists or grids
------------------------------------------------------------- */
.delay-100 { transition-delay: 100ms !important; }
.delay-200 { transition-delay: 200ms !important; }
.delay-300 { transition-delay: 300ms !important; }
.delay-400 { transition-delay: 400ms !important; }
.delay-500 { transition-delay: 500ms !important; }
.delay-600 { transition-delay: 600ms !important; }
.delay-700 { transition-delay: 700ms !important; }

/* -------------------------------------------------------------
   Micro-interactions
------------------------------------------------------------- */
.hover-lift {
  transition: var(--transition-smooth);
}
.hover-lift:hover {
  transform: translateY(-4px);
}

/* Ripple wave preview lines in caption cards */
.wave-bar {
  display: inline-block;
  width: 4px;
  height: 18px;
  background-color: var(--primary-color);
  border-radius: var(--radius-pill);
  animation: wave 1.2s ease-in-out infinite alternate;
}

.wave-bar:nth-child(2) {
  animation-delay: 0.15s;
}
.wave-bar:nth-child(3) {
  animation-delay: 0.3s;
}
.wave-bar:nth-child(4) {
  animation-delay: 0.45s;
}

@keyframes wave {
  0% {
    height: 6px;
  }
  100% {
    height: 24px;
  }
}
