/* ==========================================================================
   SRA SOLUTIONS — ADVANCED ANIMATIONS & BACKGROUND EFFECTS
   Theme: Logo Color Energy (Coral Rocket & Circuit Blue Pulse)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Background Animated Canvas & Ambient Light Fields
   -------------------------------------------------------------------------- */
.bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
}

/* Ambient Moving Gradient Blobs */
.ambient-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  transition: opacity 1s ease;
  max-width: 90vw;
  max-height: 90vw;
  overflow: hidden;
}

.ambient-glow-orb.coral {
  background: radial-gradient(circle, rgba(230, 57, 86, 0.22) 0%, rgba(255, 122, 106, 0.08) 50%, transparent 70%);
  animation: ambientFloatCoral 18s ease-in-out infinite alternate;
}

.ambient-glow-orb.blue {
  background: radial-gradient(circle, rgba(2, 132, 199, 0.22) 0%, rgba(56, 189, 248, 0.08) 50%, transparent 70%);
  animation: ambientFloatBlue 22s ease-in-out infinite alternate;
}

@keyframes ambientFloatCoral {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(40px, -30px) scale(1.12);
  }
  100% {
    transform: translate(-30px, 20px) scale(0.95);
  }
}

@keyframes ambientFloatBlue {
  0% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-50px, 40px) scale(1.15);
  }
  100% {
    transform: translate(30px, -35px) scale(0.92);
  }
}

/* --------------------------------------------------------------------------
   Keyframes
   -------------------------------------------------------------------------- */

/* Subtle ambient pulse for circuit nodes */
@keyframes circuitPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
    box-shadow: 0 0 18px rgba(2, 132, 199, 0.4);
  }
}

/* Floating animation with slight tilt */
@keyframes floatGentle {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(0.5deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

/* Rocket Launch Hover Shimmer */
@keyframes rocketShimmer {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Radar pulse for live status beacon */
@keyframes statusBeacon {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Spinner for Form Submissions */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Success Checkmark Pop */
@keyframes checkmarkPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   Scroll Reveal Transition Base Classes
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 650ms cubic-bezier(0.16, 1, 0.3, 1), transform 650ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

.reveal-delay-1 {
  transition-delay: 100ms;
}

.reveal-delay-2 {
  transition-delay: 200ms;
}

.reveal-delay-3 {
  transition-delay: 300ms;
}

.reveal-delay-4 {
  transition-delay: 400ms;
}

/* Fade in only without transform */
.fade-in {
  opacity: 0;
  transition: opacity 500ms ease;
}

.fade-in.active {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Interactive Hover & Polish
   -------------------------------------------------------------------------- */
.btn-primary {
  background-size: 200% 200%;
}

.btn-primary:hover {
  animation: rocketShimmer 3s ease infinite;
}

.btn-primary svg.rocket-icon {
  transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-primary:hover svg.rocket-icon {
  transform: translateY(-2px) translateX(3px) rotate(10deg);
}

/* Circuit trace dash animation for SVGs */
.circuit-trace {
  stroke-dasharray: 6, 6;
  animation: circuitFlow 20s linear infinite;
}

@keyframes circuitFlow {
  to {
    stroke-dashoffset: -100;
  }
}

/* Submit Button Loading Spinner */
.btn .btn-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin-right: 0.5rem;
}

/* Success Checkmark */
.success-checkmark-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: #ECFDF5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
  animation: checkmarkPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* --------------------------------------------------------------------------
   Accessibility: Reduced Motion Override
   -------------------------------------------------------------------------- */
@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;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-floating-card,
  .ambient-glow-orb {
    animation: none !important;
  }

  .bg-canvas {
    display: none !important;
  }
}
