/**
 * GRADPORT AVIATION ANIMATIONS & MOTIONS
 * Lightweight, GPU-accelerated CSS animations
 */

/* Hero Aircraft Cruising Motion */
@keyframes aircraftFlight {
  0% {
    transform: translate3d(-18vw, 6vh, 0) rotate(-1.5deg) scale(0.92);
  }
  30% {
    transform: translate3d(15vw, -2vh, 0) rotate(1.2deg) scale(1);
  }
  60% {
    transform: translate3d(55vw, 4vh, 0) rotate(-0.8deg) scale(1.04);
  }
  100% {
    transform: translate3d(115vw, -6vh, 0) rotate(2deg) scale(1.08);
  }
}

/* Floating Atmospheric Cloud Layers */
@keyframes cloudDriftSlow {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-80px, -12px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes cloudDriftFast {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(100px, 15px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

/* Dotted Flight Route Flow */
@keyframes flightPathDash {
  to {
    stroke-dashoffset: -120;
  }
}

/* Strobe & Beacon Light Pulses */
@keyframes strobePulse {
  0%, 100% {
    opacity: 0.2;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.3);
    filter: drop-shadow(0 0 8px currentColor);
  }
}

@keyframes radarSweep {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes beaconPing {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  70% {
    transform: scale(2.6);
    opacity: 0;
  }
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}

/* Status Pill Glow Pulse */
@keyframes statusGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(51, 130, 246, 0.35), inset 0 0 10px rgba(51, 130, 246, 0.15);
    border-color: rgba(51, 130, 246, 0.5);
  }
  50% {
    box-shadow: 0 0 25px rgba(51, 130, 246, 0.65), inset 0 0 15px rgba(51, 130, 246, 0.3);
    border-color: rgba(96, 165, 250, 0.9);
  }
}

/* Fade in & Slide Up Stagger */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Gentle Globe Continuous Rotation */
@keyframes globeRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Flight Path Jetstream Particle Fade */
@keyframes jetTrail {
  0% {
    opacity: 0.8;
    stroke-dashoffset: 0;
  }
  100% {
    opacity: 0.1;
    stroke-dashoffset: -200;
  }
}

/* Floating Elevation for Telemetry Cards */
@keyframes floatGentle {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Animation Utility Classes */
.animate-fade-up {
  animation: fadeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.25s; }
.delay-3 { animation-delay: 0.4s; }
.delay-4 { animation-delay: 0.55s; }

.status-badge-glow {
  animation: statusGlow 3s ease-in-out infinite;
}

.beacon-pulse {
  animation: beaconPing 2.4s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.flight-path-animated {
  stroke-dasharray: 6 8;
  animation: flightPathDash 2.5s linear infinite;
}

.float-card {
  animation: floatGentle 5s ease-in-out infinite;
}

/* Respect Accessibility Preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .aircraft-flyer,
  .cloud-layer,
  .flight-path-animated,
  .beacon-pulse {
    animation: none !important;
  }
}
