/* ========================================
   Mountain States Mechanical - Site Effects
   Ambient animations, weather banner, alerts
   ======================================== */

/* --- Ambient Color Shift on Navy Sections --- */
@keyframes ambientShift {
  0%, 100% { background-color: #0C2340; }
  25% { background-color: #0D2644; }
  50% { background-color: #122040; }
  75% { background-color: #0E2438; }
}

.bg-primary {
  animation: ambientShift 90s ease-in-out infinite;
}

/* --- Particle Canvas (overlays hero sections) --- */
.particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

/* Ensure hero content sits above particles */
.particle-canvas + *, .particle-canvas ~ * {
  position: relative;
  z-index: 2;
}

/* --- Weather Banner --- */
.weather-banner {
  background: linear-gradient(90deg, #0a1e38 0%, #0C2340 50%, #0a1e38 100%);
  overflow: hidden;
  position: relative;
}

.weather-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(41, 171, 226, 0.05), transparent);
  animation: weatherShimmer 8s ease-in-out infinite;
}

@keyframes weatherShimmer {
  0%, 100% { transform: translateX(-25%); }
  50% { transform: translateX(25%); }
}

.weather-icon {
  display: inline-flex;
  align-items: center;
  animation: weatherPulse 3s ease-in-out infinite;
}

@keyframes weatherPulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* Temperature display */
.temp-display {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Weather banner loading state */
.weather-loading {
  opacity: 0;
  max-height: 0;
  transition: opacity 0.5s ease, max-height 0.5s ease;
}

.weather-loaded {
  opacity: 1;
  max-height: 60px;
}

/* --- Seasonal Alert Banners --- */
.alert-banner {
  position: relative;
  overflow: hidden;
}

.alert-banner-freeze {
  background: linear-gradient(90deg, #1e3a5f, #0C2340);
}

.alert-banner-heat {
  background: linear-gradient(90deg, #3d1f00, #F47920);
}

.alert-banner-mild {
  background: linear-gradient(90deg, #0C2340, #1a5276);
}

/* --- Get Notified Signup --- */
.notify-section {
  position: relative;
  overflow: hidden;
}

.notify-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(41, 171, 226, 0.08) 0%, transparent 50%);
  animation: notifyGlow 12s ease-in-out infinite;
}

@keyframes notifyGlow {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(5%, -5%); }
}

/* --- CTA Button Enhancements --- */

/* Orange CTA buttons: glow + scale + shimmer */
.bg-cta,
[class*="bg-cta"] {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.bg-cta:hover,
[class*="bg-cta"]:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px -5px rgba(244, 121, 32, 0.4), 0 0 15px rgba(244, 121, 32, 0.2);
}

.bg-cta:active,
[class*="bg-cta"]:active {
  transform: translateY(0px) scale(0.98);
  box-shadow: 0 2px 8px rgba(244, 121, 32, 0.3);
}

/* Shimmer sweep across CTA buttons */
.bg-cta::after,
a[class*="bg-cta"]::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: none;
  animation: ctaShimmer 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ctaShimmer {
  0%, 70%, 100% { left: -100%; }
  85% { left: 150%; }
}

/* Ghost/outline buttons: subtle glow on hover */
[class*="border-white"]:hover {
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

/* Accent-colored links/buttons */
.bg-accent:hover {
  box-shadow: 0 8px 25px -5px rgba(41, 171, 226, 0.35);
}

/* --- Reduce motion for accessibility --- */
@media (prefers-reduced-motion: reduce) {
  .bg-primary {
    animation: none;
  }
  .particle-canvas {
    display: none;
  }
  .weather-banner::before {
    animation: none;
  }
  .weather-icon {
    animation: none;
  }
  .notify-section::before {
    animation: none;
  }
  .bg-cta::after,
  a[class*="bg-cta"]::after {
    animation: none;
    display: none;
  }
  .bg-cta:hover,
  [class*="bg-cta"]:hover {
    transform: none;
  }
}
