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

/* Fade in up */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade in right */
.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Fade in left */
.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* Keyframe: Pulse Glow */
@keyframes pulseGlow {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.6;
  }
}

/* Keyframe: Float */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Keyframe: Bubble rise */
@keyframes bubbleRise {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.3;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-60px) scale(0.5);
    opacity: 0;
  }
}

/* Drone body floating */
.drone-body {
  animation: float 6s ease-in-out infinite;
}

.drone-ambient {
  animation: pulseGlow 4s ease-in-out infinite;
}

/* Bubbles */
.bubble.b1 { animation: bubbleRise 5s ease-in-out infinite; }
.bubble.b2 { animation: bubbleRise 7s ease-in-out infinite 1s; }
.bubble.b3 { animation: bubbleRise 6s ease-in-out infinite 2s; }
.bubble.b4 { animation: bubbleRise 8s ease-in-out infinite 0.5s; }
.bubble.b5 { animation: bubbleRise 5.5s ease-in-out infinite 3s; }
.bubble.b6 { animation: bubbleRise 9s ease-in-out infinite 1.5s; }

/* Sonar waves */
@keyframes sonarPulse {
  0%, 100% { opacity: 0.1; transform: scaleX(1); }
  50% { opacity: 0.4; transform: scaleX(1.1); }
}

.sonar-wave.sw1 { animation: sonarPulse 2s ease-in-out infinite; }
.sonar-wave.sw2 { animation: sonarPulse 2s ease-in-out infinite 0.3s; }
.sonar-wave.sw3 { animation: sonarPulse 2s ease-in-out infinite 0.6s; }

/* Sensor blink */
@keyframes sensorBlink {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.sensor-blink { animation: sensorBlink 2s ease-in-out infinite; }
.sensor-blink.s2 { animation-delay: 1s; }

/* Propeller rotation illusion */
@keyframes propSpin {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.2; }
}

.prop.p1 { animation: propSpin 0.3s linear infinite; }
.prop.p2 { animation: propSpin 0.3s linear infinite 0.1s; }
.prop.p3 { animation: propSpin 0.3s linear infinite 0.2s; }

/* Particle animation */
@keyframes particleFloat {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translate(var(--tx, 50px), var(--ty, -100px)) scale(0.3);
    opacity: 0;
  }
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-accent-primary);
  opacity: 0;
  animation: particleFloat var(--duration, 8s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

/* Counter animation handled by JS */

/* Smooth scroll indicator */
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}