/* =====================================================================
   ATMOSPHERIC MAP — D3 SVG styling
   ===================================================================== */

.map-stage svg {
  background: transparent;
}

/* State outlines — subtle haze */
.map-stage .state {
  fill: rgba(31, 37, 53, 0.4);
  stroke: rgba(168, 176, 194, 0.10);
  stroke-width: 0.5;
  vector-effect: non-scaling-stroke;
  transition: fill 0.4s ease;
}

.map-stage .state:hover {
  fill: rgba(31, 37, 53, 0.7);
  stroke: rgba(168, 176, 194, 0.20);
}

/* Nation outline */
.map-stage .nation {
  fill: none;
  stroke: rgba(168, 176, 194, 0.20);
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

/* Atmospheric blobs */
.map-stage .atm-region {
  mix-blend-mode: screen;
  pointer-events: none;
  animation: blob-drift 18s ease-in-out infinite;
  transform-origin: center;
}

.map-stage .atm-region.r-clear { animation-duration: 22s; }
.map-stage .atm-region.r-mild { animation-duration: 20s; animation-delay: -3s; }
.map-stage .atm-region.r-watch { animation-duration: 19s; animation-delay: -6s; }
.map-stage .atm-region.r-warning { animation-duration: 17s; animation-delay: -9s; }
.map-stage .atm-region.r-storm { animation-duration: 15s; animation-delay: -12s; }
.map-stage .atm-region.r-severe { animation-duration: 14s; animation-delay: -15s; }

@keyframes blob-drift {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.85; }
  25% { transform: translate(6px, -4px) scale(1.05); opacity: 0.95; }
  50% { transform: translate(-3px, 5px) scale(0.98); opacity: 0.8; }
  75% { transform: translate(-5px, -3px) scale(1.02); opacity: 0.9; }
}

/* Pulse ring on storm centers */
.map-stage .pulse-ring {
  fill: none;
  stroke-width: 1.5;
  pointer-events: none;
  animation: pulse-out 3s ease-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}

@keyframes pulse-out {
  0% { transform: scale(0.4); opacity: 0.9; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Storm marker dots */
.map-stage .storm-dot {
  fill: var(--storm);
  filter: drop-shadow(0 0 8px var(--storm));
}

/* Region labels (rare, used sparingly) */
.map-stage .region-label {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  fill: var(--ink-quiet);
  pointer-events: none;
  text-anchor: middle;
}

/* Compass / scale (small, bottom corner) */
.map-stage .compass {
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  fill: var(--ink-quiet);
  text-transform: uppercase;
}

/* Coordinate stamp (top-left) */
.map-stage .stamp {
  font-family: var(--font-mono);
  font-size: 8px;
  fill: var(--ink-quiet);
  letter-spacing: 0.1em;
}

/* Loading state */
.map-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(31, 37, 53, 0.4), transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
}

.map-stage.loading::before { opacity: 1; }
