/* Deferred site-wide non-critical CSS
   Loads asynchronously to reduce initial CSS weight and speed up first paint.
*/

/* --- HeroSection: sun glow animations (enabled after first paint) --- */
body.loaded .sun-image {
  animation: sunGlow 84s ease-in-out infinite, sunPulse 48s ease-in-out infinite;
}

@keyframes sunGlow {
  0%, 100% {
    filter: brightness(1) contrast(1) drop-shadow(0 0 40px rgba(255, 200, 0, 0.5));
  }
  50% {
    filter: brightness(1.2) contrast(1.1) drop-shadow(0 0 60px rgba(255, 150, 0, 0.8));
  }
}

@keyframes sunPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

/* --- HeroSection: CTA shimmer border + stardust (non-critical visuals) --- */
.cta-button {
  position: relative;
  display: inline-block;
  text-decoration: none;
  padding: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    transparent 20%,
    rgba(255, 255, 255, 0.1) 25%,
    rgba(255, 255, 255, 0.3) 35%,
    rgba(255, 255, 255, 0.8) 40%,
    rgba(255, 255, 255, 1) 50%,
    rgba(255, 255, 255, 0.8) 60%,
    rgba(255, 255, 255, 0.3) 65%,
    rgba(255, 255, 255, 0.1) 75%,
    transparent 80%,
    transparent
  );
  background-size: 200% 100%;
  border: none;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  overflow: visible;
  animation: shimmer-border 3s linear infinite;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.3));
}

/* Stardust particles */
.cta-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  transform: translateY(-50%);
  opacity: 0;
  animation: stardust-1 3s linear infinite;
}

.cta-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 3px;
  height: 3px;
  background: white;
  border-radius: 50%;
  transform: translateY(-50%);
  opacity: 0;
  animation: stardust-2 3s linear infinite;
  animation-delay: 0.2s;
}

@keyframes shimmer-border {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes stardust-1 {
  0% {
    left: 0; opacity: 0; transform: translateY(-50%) scale(0);
  }
  40% { opacity: 0; }
  50% {
    opacity: 1; transform: translateY(-50%) scale(1);
  }
  60% {
    opacity: 0.5; transform: translateY(-50%) translateX(-10px) scale(0.8);
  }
  100% {
    left: 100%; opacity: 0; transform: translateY(-50%) translateX(-20px) scale(0);
  }
}

@keyframes stardust-2 {
  0% {
    left: 0; opacity: 0; transform: translateY(-50%) translateY(-3px) scale(0);
  }
  40% { opacity: 0; }
  50% {
    opacity: 0.8; transform: translateY(-50%) translateY(-3px) scale(1.2);
  }
  60% {
    opacity: 0.4; transform: translateY(-50%) translateY(3px) translateX(-8px) scale(0.6);
  }
  100% {
    left: 100%; opacity: 0; transform: translateY(-50%) translateY(5px) translateX(-15px) scale(0);
  }
}

/* Additional stardust */
.stardust {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.stardust-3 { top: 30%; animation: stardust-3 3s linear infinite; animation-delay: 0.4s; }
.stardust-4 { top: 70%; animation: stardust-4 3s linear infinite; animation-delay: 0.6s; }

@keyframes stardust-3 {
  0% { left: 0; opacity: 0; transform: scale(0); }
  45% { opacity: 0; }
  50% { opacity: 1; transform: scale(1.5) rotate(180deg); }
  55% { opacity: 0.6; transform: translateX(-5px) translateY(-2px) scale(1) rotate(360deg); }
  100% { left: 100%; opacity: 0; transform: translateX(-10px) translateY(-4px) scale(0) rotate(720deg); }
}

@keyframes stardust-4 {
  0% { left: 0; opacity: 0; transform: scale(0); }
  45% { opacity: 0; }
  50% { opacity: 0.9; transform: scale(1.2) rotate(-180deg); }
  55% { opacity: 0.5; transform: translateX(-3px) translateY(2px) scale(0.8) rotate(-360deg); }
  100% { left: 100%; opacity: 0; transform: translateX(-8px) translateY(3px) scale(0) rotate(-720deg); }
}

.cta-button:hover {
  animation-duration: 1.5s;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.6));
}

.cta-button:hover::before,
.cta-button:hover::after {
  animation-duration: 1.5s;
}

.cta-button:hover .button-text {
  background: #60A4FA; /* Blue background on hover */
  color: white; /* White text on hover */
}

.dark .cta-button {
  background: linear-gradient(
    90deg,
    transparent,
    transparent 20%,
    rgba(0, 0, 0, 0.1) 25%,
    rgba(0, 0, 0, 0.3) 35%,
    rgba(0, 0, 0, 0.6) 40%,
    rgba(0, 0, 0, 0.9) 50%,
    rgba(0, 0, 0, 0.6) 60%,
    rgba(0, 0, 0, 0.3) 65%,
    rgba(0, 0, 0, 0.1) 75%,
    transparent 80%,
    transparent
  );
  background-size: 200% 100%;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.4));
}

.dark .cta-button::before,
.dark .cta-button::after {
  background: black;
}

.dark .button-text { color: black; background: white; }
.dark .stardust { background: black; }

.dark .cta-button:hover {
  animation-duration: 1.5s;
  filter: drop-shadow(0 0 12px rgba(0, 0, 0, 0.8));
}

.dark .cta-button:hover .button-text { background: #60A4FA; color: white; }

/* --- MillionSection: color transition animations for metric counters --- */
.metric-circle.counting { animation: borderColorTransition 3s linear; }
.metric-score.counting { animation: textColorTransition 3s linear; }

@keyframes borderColorTransition {
  0% { border-color: #eb0f01; }
  100% { border-color: #1a8b0d; }
}

@keyframes textColorTransition {
  0% { color: #eb0f01; }
  100% { color: #1a8b0d; }
}

/* --- ContactSection: footer background image and overlay (non-critical) --- */
.faq-section {
  background-image: url('/images/footer-bg.webp');
  background-size: cover;
  background-position: bottom center;
  background-repeat: no-repeat;
}
.faq-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.35));
  pointer-events: none;
}

