/* ============================================================
   PCA COMMAND CENTER — world map ambient layer
   v1.0 | pca-tech.com

   Layer order (z-index):
     body bg       — default
     .pca-world-map — 1
     scanbeam      — 9997
     vignette      — 9998  (body::after)
     scanlines     — 9999  (body::before)
   ============================================================ */

.pca-world-map {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;

  /* currentColor on the SVG circles is driven by `color` here */
  color: var(--pca-phosphor, #00ff66);

  /* External SVG referenced so CSS size stays well under 20KB */
  background-image: url('../svg/pca-world-map.svg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;

  /* Base opacity: faint enough that text always wins */
  opacity: 0.06;

  /* Pulse animation breathes in sync with the 8s scanbeam cycle */
  animation: pca-world-pulse 8s ease-in-out infinite;

  /* Prevent world map from bleeding into the vignette darkened edges */
  -webkit-mask-image: radial-gradient(
    ellipse 85% 75% at center,
    black 30%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 85% 75% at center,
    black 30%,
    transparent 100%
  );
}

/* Breathes from barely-there to faintly visible on each scan cycle */
@keyframes pca-world-pulse {
  0%   { opacity: 0.04; }
  30%  { opacity: 0.08; }
  60%  { opacity: 0.05; }
  80%  { opacity: 0.07; }
  100% { opacity: 0.04; }
}

/* Honour user motion preference — freeze at mid-opacity */
@media (prefers-reduced-motion: reduce) {
  .pca-world-map {
    animation: none;
    opacity: 0.05;
  }
}

/* Mobile: scale down the mask to prevent hard edges on narrow viewports */
@media (max-width: 768px) {
  .pca-world-map {
    background-size: 180% auto;
    background-position: 60% center;
    -webkit-mask-image: radial-gradient(
      ellipse 90% 70% at center,
      black 20%,
      transparent 100%
    );
    mask-image: radial-gradient(
      ellipse 90% 70% at center,
      black 20%,
      transparent 100%
    );
  }
}
