/* --- Threat map targets: idle pulse + under-attack pulse --- */
.threat-target-ring::before {
  animation: ring-pulse 2.6s ease-out infinite;
}

@keyframes ring-pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}

.threat-target.under-attack .threat-target-ring::before {
  animation: ring-pulse-alert 0.9s ease-out infinite;
  border-color: var(--accent-red);
}

@keyframes ring-pulse-alert {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* --- CV: kill-chain scroll reveal (progressive enhancement) --- */
.js .kc-node {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.js .kc-node.revealed {
  opacity: 1;
  transform: none;
}

.js .kc-node.revealed .kc-node-index {
  animation: kc-reveal-flash-index 1.4s ease-out;
}

.js .kc-node.revealed .kc-node-body {
  animation: kc-reveal-flash-body 1.4s ease-out;
}

@keyframes kc-reveal-flash-index {
  0% {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 0 22px rgba(0, 229, 255, 0.65);
  }
  100% {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    box-shadow: 0 0 16px rgba(47, 111, 238, 0.35);
  }
}

@keyframes kc-reveal-flash-body {
  0% {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.35);
  }
  100% {
    border-color: var(--border-glow);
    box-shadow: 0 0 0 rgba(47, 111, 238, 0);
  }
}

/* --- Visitor info: ATT&CK matrix reveal (progressive enhancement) --- */
.js .attck-cell {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.js .attck-cell.revealed {
  opacity: 1;
}

.attck-column.scanning .attck-tactic-header {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
}

/* --- Reduced motion: force everything static and visible --- */
@media (prefers-reduced-motion: reduce) {
  #threat-map-canvas {
    display: none !important;
  }

  .threat-target-ring::before,
  .threat-target.under-attack .threat-target-ring::before {
    animation: none !important;
    opacity: 0.4;
  }

  .js .kc-node,
  .js .attck-cell {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .js .kc-node-index,
  .js .kc-node-body {
    animation: none !important;
  }
}
