@keyframes radar-spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

@keyframes radar-spin-center {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes grid-scan {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 48px;
  }
}

@keyframes stream-fall {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  10% {
    opacity: 0.45;
  }
  90% {
    opacity: 0.45;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}

@keyframes map-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 77, 90, 0.7);
    transform: scale(1);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(255, 77, 90, 0);
    transform: scale(1.15);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 77, 90, 0);
    transform: scale(1);
  }
}

@keyframes widget-scan {
  0% {
    background-position: 0 -100%;
  }
  100% {
    background-position: 0 200%;
  }
}

@keyframes line-flow {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 0 100%;
  }
}

@keyframes orbit-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes code-scroll {
  to {
    transform: translateX(-100%);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .certs__track,
  .industries__hex,
  .industry-node,
  .hero__radar,
  .final-cta__radar,
  .footer__code-strip span {
    animation: none !important;
  }
}

/* ========== Responsive ========== */
@media (max-width: 1100px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero__radar {
    opacity: 0.1;
    right: -10%;
  }

  .hero-dash {
    max-width: 520px;
  }

  .widgets__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modules__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .knowledge__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__brand-col {
    grid-column: 1 / -1;
  }

  .dash-panel {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 100%;
    margin-bottom: 0.75rem;
  }

  .dash-preview__stage {
    min-height: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    perspective: none;
  }
}

@media (max-width: 900px) {
  .nav__toggle {
    display: grid;
  }

  .nav__links {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    background: rgba(5, 7, 11, 0.97);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s, visibility 0.35s;
  }

  .nav__links.is-open {
    opacity: 1;
    visibility: visible;
  }

  .nav__links a {
    font-size: 1.15rem;
  }

  .compare__grid {
    grid-template-columns: 1fr;
  }

  .compare__vs {
    padding: 0.5rem 0;
  }

  .reports__grid {
    grid-template-columns: 1fr;
  }

  .industries__orbit {
    width: min(420px, 92vw);
    height: min(420px, 92vw);
  }

  .industry-node {
    width: 100px;
    height: 60px;
    font-size: 0.68rem;
    margin: -30px 0 0 -50px;
  }
}

@media (max-width: 640px) {
  :root {
    --container: min(100% - 2rem, 1180px);
  }

  .widgets__grid,
  .modules__grid,
  .knowledge__grid,
  .dash-preview__stage {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: calc(var(--nav-h) + 1.5rem);
    align-items: flex-start;
  }

  .hero__brand {
    font-size: clamp(2.2rem, 12vw, 3rem);
  }

  .btn-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .threat-map__canvas {
    height: 320px;
  }

  .threat-map__stage {
    min-height: 320px;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer__newsletter {
    grid-column: 1 / -1;
  }

  .hero-dash__grid {
    grid-template-columns: 1fr;
  }
}
