/* =========================================================
   BOOMER AUTOMATION — SYSTEMS CSS
   File: systems.v1.css
   Purpose: premium systems page loader, hero, interactive
   blueprint, system blocks, command visuals, counters, and CTA.
========================================================= */

/* =========================================================
   PAGE LOADER
========================================================= */

/* Full-screen loader unique to the systems page. */
.systems-loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(54, 243, 255, 0.12), transparent 30%),
    radial-gradient(circle at 62% 58%, rgba(124, 92, 255, 0.16), transparent 34%),
    #030712;
  opacity: 1;
  visibility: visible;
  overflow: hidden;
  transition:
    opacity 560ms ease,
    visibility 560ms ease;
}

/* Hide loader after JavaScript marks it complete. */
.systems-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Loader node grid. */
.systems-loader-grid {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.15rem, 4vw, 2rem);
  width: clamp(12rem, 46vw, 24rem);
  height: clamp(12rem, 46vw, 24rem);
}

/* Individual loader nodes. */
.systems-loader-grid span {
  position: relative;
  display: block;
  border: 1px solid rgba(54, 243, 255, 0.28);
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 35%, rgba(54, 243, 255, 0.26), transparent 42%),
    rgba(255, 255, 255, 0.045);
  box-shadow: 0 0 28px rgba(54, 243, 255, 0.12);
  animation: loaderNodePulse 1.9s ease-in-out infinite;
}

/* Stagger loader node timing. */
.systems-loader-grid span:nth-child(2),
.systems-loader-grid span:nth-child(4),
.systems-loader-grid span:nth-child(6),
.systems-loader-grid span:nth-child(8) {
  animation-delay: 180ms;
}

/* Stagger loader node timing again for depth. */
.systems-loader-grid span:nth-child(5) {
  animation-delay: 320ms;
}

/* Scanning beam that moves across the loader. */
.systems-loader-beam {
  position: absolute;
  width: 34vw;
  max-width: 18rem;
  height: 150vh;
  background: linear-gradient(90deg, transparent, rgba(54, 243, 255, 0.16), transparent);
  transform: rotate(18deg) translateX(-120vw);
  animation: loaderBeam 2.2s ease-in-out infinite;
}

/* Loader content above the animated grid. */
.systems-loader-content {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 0.85rem;
}

/* Loader brand mark. */
.systems-loader-mark {
  display: grid;
  place-items: center;
  width: 4.35rem;
  height: 4.35rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #020617;
  font-weight: 950;
  letter-spacing: -0.08em;
  box-shadow:
    0 0 70px rgba(54, 243, 255, 0.38),
    0 0 120px rgba(124, 92, 255, 0.2);
}

/* Loader label. */
.systems-loader-content p {
  margin: 0;
  color: var(--soft);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Loader node pulse animation. */
@keyframes loaderNodePulse {
  0%,
  100% {
    opacity: 0.42;
    transform: scale(0.88);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Loader beam animation. */
@keyframes loaderBeam {
  0% {
    transform: rotate(18deg) translateX(-120vw);
  }

  60%,
  100% {
    transform: rotate(18deg) translateX(120vw);
  }
}

/* =========================================================
   HERO
========================================================= */

/* Main systems hero section. */
.systems-hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 100svh;
  padding: 7.5rem 0 5.5rem;
  overflow: hidden;
}

/* Dark overlay over the hero image. */
.systems-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(
      90deg,
      rgba(3, 7, 18, 0.97) 0%,
      rgba(3, 7, 18, 0.84) 48%,
      rgba(3, 7, 18, 0.42) 100%
    ),
    radial-gradient(circle at 24% 46%, rgba(54, 243, 255, 0.18), transparent 38%),
    radial-gradient(circle at 74% 42%, rgba(124, 92, 255, 0.2), transparent 34%);
}

/* Full-bleed hero image wrapper. */
.systems-hero-image-wrap {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}

/* Hero image targeted by JS for parallax. */
.systems-hero-image {
  width: 100%;
  height: 118%;
  object-fit: cover;
  object-position: center;
  opacity: 0.46;
  transform: translate3d(0, 0, 0) scale(1.04);
  will-change: transform;
}

/* Bottom image fade and glow. */
.systems-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, rgba(3, 7, 18, 0.94) 100%),
    radial-gradient(circle at 65% 48%, rgba(54, 243, 255, 0.13), transparent 32%);
}

/* Hero grid. */
.systems-hero-grid {
  display: grid;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

/* Hero content. */
.systems-hero-content {
  max-width: 980px;
}

/* Hero headline. */
.systems-hero h1 {
  max-width: 1050px;
  margin-bottom: 1.2rem;
  font-size: clamp(2.75rem, 7.2vw, 6.45rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
}

/* Hero copy. */
.systems-hero-copy {
  max-width: 760px;
  margin-bottom: 1.7rem;
  color: var(--soft);
  font-size: clamp(1.06rem, 2vw, 1.35rem);
}

/* Hero CTA row. */
.systems-hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

/* Hero command panel. */
.hero-command {
  position: relative;
  display: grid;
  gap: 1.25rem;
  min-height: 29rem;
  padding: clamp(1.2rem, 4vw, 1.8rem);
  border: 1px solid rgba(54, 243, 255, 0.2);
  border-radius: 2rem;
  background:
    radial-gradient(circle at 50% 34%, rgba(54, 243, 255, 0.16), transparent 28%),
    radial-gradient(circle at 76% 80%, rgba(124, 92, 255, 0.18), transparent 32%),
    rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(20px);
}

/* Scan layer over command panel. */
.hero-command::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(54, 243, 255, 0.1), transparent);
  animation: commandScan 4.2s ease-in-out infinite;
}

/* Command panel header. */
.hero-command-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--soft);
  font-weight: 900;
}

/* Active status text. */
.hero-command-top strong {
  color: var(--accent);
}

/* Orbital animation wrapper. */
.hero-command-orbit {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 13rem;
}

/* Orbit rings. */
.hero-command-orbit span {
  position: absolute;
  width: clamp(8rem, 38vw, 13rem);
  height: clamp(8rem, 38vw, 13rem);
  border: 1px solid rgba(54, 243, 255, 0.24);
  border-radius: 999px;
  animation: orbitSpin 10s linear infinite;
}

/* Second orbit ring. */
.hero-command-orbit span:nth-child(2) {
  width: clamp(5.8rem, 28vw, 9rem);
  height: clamp(5.8rem, 28vw, 9rem);
  border-color: rgba(124, 92, 255, 0.32);
  animation-duration: 7s;
  animation-direction: reverse;
}

/* Third orbit ring. */
.hero-command-orbit span:nth-child(3) {
  width: clamp(3rem, 16vw, 4.5rem);
  height: clamp(3rem, 16vw, 4.5rem);
  border-color: rgba(56, 255, 182, 0.3);
  animation-duration: 4.6s;
}

/* Orbit dot. */
.hero-command-orbit span::before {
  content: "";
  position: absolute;
  top: -0.35rem;
  left: 50%;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 22px rgba(54, 243, 255, 0.85);
  transform: translateX(-50%);
}

/* Command metrics wrapper. */
.hero-command-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0;
  margin-top: auto;
  border-top: 1px solid var(--border);
}

/* Command metric row. */
.hero-command-metrics div {
  display: grid;
  gap: 0.35rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--border);
}

/* Command metric label. */
.hero-command-metrics span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Command metric value. */
.hero-command-metrics strong {
  color: var(--text);
}

/* Command scan animation. */
@keyframes commandScan {
  0% {
    transform: translateX(-120%);
  }

  55%,
  100% {
    transform: translateX(280%);
  }
}

/* Orbit rotation. */
@keyframes orbitSpin {
  to {
    transform: rotate(360deg);
  }
}

/* =========================================================
   STACK STRIP
========================================================= */

/* Animated capability strip. */
.systems-stack-strip {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

/* Moving stack track. */
.systems-stack-track {
  display: flex;
  width: max-content;
  gap: 2rem;
  padding: 1rem 0;
  color: var(--soft);
  font-size: clamp(0.86rem, 2vw, 1rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  animation: systemsStackScroll 30s linear infinite;
}

/* Stack item. */
.systems-stack-track span {
  white-space: nowrap;
}

/* Stack scroll animation. */
@keyframes systemsStackScroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* =========================================================
   SNAPSHOT
========================================================= */

/* Snapshot section. */
.systems-snapshot {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 22%, rgba(54, 243, 255, 0.1), transparent 30%),
    radial-gradient(circle at 88% 72%, rgba(124, 92, 255, 0.14), transparent 32%),
    var(--bg);
}

/* Snapshot grid. */
.systems-snapshot-grid {
  display: grid;
  gap: 2rem;
}

/* Snapshot headline. */
.systems-snapshot-copy h2 {
  max-width: 880px;
  margin-bottom: 1rem;
  font-size: clamp(2.15rem, 5.8vw, 4.9rem);
  line-height: 0.94;
  letter-spacing: -0.075em;
}

/* Snapshot copy. */
.systems-snapshot-copy p {
  max-width: 720px;
}

/* Metrics block. */
.systems-metrics {
  display: grid;
  border-top: 1px solid var(--border);
}

/* Metric row. */
.systems-metric {
  display: grid;
  grid-template-columns: 0.42fr 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

/* Animated counter. */
.systems-counter {
  color: var(--text);
  font-size: clamp(3rem, 13vw, 7rem);
  font-weight: 950;
  line-height: 0.85;
  letter-spacing: -0.08em;
}

/* Metric label. */
.systems-metric p {
  max-width: 28rem;
  margin-bottom: 0;
  color: var(--soft);
  font-weight: 700;
}

/* =========================================================
   INTERACTIVE BLUEPRINT
========================================================= */

/* Blueprint section. */
.systems-blueprint-section {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, #020617 0%, #07111f 52%, #030712 100%);
}

/* Blueprint intro headline. */
.systems-blueprint-heading h2 {
  max-width: 880px;
  margin-bottom: 1rem;
  font-size: clamp(2.15rem, 5.8vw, 4.9rem);
  line-height: 0.94;
  letter-spacing: -0.075em;
}

/* Blueprint intro copy. */
.systems-blueprint-heading p {
  max-width: 760px;
}

/* Blueprint layout. */
.systems-blueprint-grid {
  display: grid;
  gap: clamp(2rem, 6vw, 4rem);
  margin-top: 2.4rem;
}

/* Blueprint controls list. */
.blueprint-controls {
  display: grid;
  border-top: 1px solid var(--border);
}

/* Blueprint control button. */
.blueprint-control {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem 1rem;
  width: 100%;
  padding: 1.2rem 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

/* Blueprint control number. */
.blueprint-control span {
  color: var(--accent);
  font-weight: 950;
}

/* Blueprint control title. */
.blueprint-control strong {
  color: var(--text);
  font-size: clamp(1.25rem, 4vw, 2rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

/* Blueprint control description. */
.blueprint-control small {
  grid-column: 2;
  color: var(--muted);
  line-height: 1.5;
}

/* Active blueprint control. */
.blueprint-control.is-active strong,
.blueprint-control:hover strong,
.blueprint-control:focus-visible strong {
  color: var(--accent);
}

/* Blueprint stage. */
.blueprint-stage {
  position: relative;
  display: grid;
  gap: 1.4rem;
  min-height: 42rem;
  padding: clamp(1rem, 4vw, 1.4rem);
  border: 1px solid var(--border);
  border-radius: 2rem;
  background:
    radial-gradient(circle at 50% 30%, rgba(54, 243, 255, 0.12), transparent 30%),
    radial-gradient(circle at 76% 76%, rgba(124, 92, 255, 0.14), transparent 34%),
    rgba(255, 255, 255, 0.055);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Blueprint core visual.
   The --blueprint-outer-ring variable controls both the largest
   ring and the node positions. This keeps Traffic, Convert,
   Follow Up, and Track centered directly on the outer ring track. */
.blueprint-core {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 25rem;
  --blueprint-outer-ring: min(70vw, 24rem);
  --blueprint-middle-ring: min(54vw, 18rem);
  --blueprint-inner-ring: min(36vw, 11rem);
}

/* Animated blueprint rings. */
.blueprint-ring {
  position: absolute;
  width: var(--blueprint-outer-ring);
  height: var(--blueprint-outer-ring);
  border: 1px solid rgba(54, 243, 255, 0.18);
  border-radius: 999px;
  animation: blueprintRotate 18s linear infinite;
}

/* Second blueprint ring. */
.blueprint-ring:nth-child(2) {
  width: var(--blueprint-middle-ring);
  height: var(--blueprint-middle-ring);
  border-color: rgba(124, 92, 255, 0.22);
  animation-duration: 13s;
  animation-direction: reverse;
}

/* Third blueprint ring. */
.blueprint-ring:nth-child(3) {
  width: var(--blueprint-inner-ring);
  height: var(--blueprint-inner-ring);
  border-color: rgba(56, 255, 182, 0.22);
  animation-duration: 9s;
}

/* Center system label. */
.blueprint-center {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 6rem;
  height: 6rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #020617;
  font-weight: 950;
  box-shadow: 0 0 70px rgba(54, 243, 255, 0.32);
}

/* Blueprint node. */
.blueprint-node {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 6.2rem;
  min-height: 2.8rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(54, 243, 255, 0.24);
  border-radius: var(--radius-full);
  background: rgba(3, 7, 18, 0.78);
  color: var(--text);
  font-weight: 950;
  backdrop-filter: blur(16px);
  transition:
    background var(--transition-med),
    color var(--transition-med),
    border-color var(--transition-med),
    box-shadow var(--transition-med);
}

/* Traffic node position.
   The center of this node sits on the top of the outer ring. */
.blueprint-node-traffic {
  top: calc(50% - (var(--blueprint-outer-ring) / 2));
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Conversion node position.
   The center of this node sits on the right side of the outer ring. */
.blueprint-node-conversion {
  top: 50%;
  left: calc(50% + (var(--blueprint-outer-ring) / 2));
  transform: translate(-50%, -50%);
}

/* Automation node position.
   The center of this node sits on the bottom of the outer ring. */
.blueprint-node-automation {
  top: calc(50% + (var(--blueprint-outer-ring) / 2));
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Tracking node position.
   The center of this node sits on the left side of the outer ring. */
.blueprint-node-tracking {
  top: 50%;
  left: calc(50% - (var(--blueprint-outer-ring) / 2));
  transform: translate(-50%, -50%);
}

/* Active node state for traffic. */
.blueprint-stage[data-active-system="traffic"] .blueprint-node-traffic,
.blueprint-stage[data-active-system="conversion"] .blueprint-node-conversion,
.blueprint-stage[data-active-system="automation"] .blueprint-node-automation,
.blueprint-stage[data-active-system="tracking"] .blueprint-node-tracking {
  border-color: rgba(54, 243, 255, 0.72);
  background: rgba(54, 243, 255, 0.16);
  color: var(--accent);
  box-shadow: 0 0 36px rgba(54, 243, 255, 0.32);
}

/* Blueprint details wrapper. */
.blueprint-details {
  position: relative;
  min-height: 13rem;
}

/* Blueprint detail article. */
.blueprint-detail {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(1rem);
  pointer-events: none;
  transition:
    opacity var(--transition-med),
    transform var(--transition-med);
}

/* Active detail article. */
.blueprint-detail.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Detail label. */
.blueprint-detail span {
  display: inline-block;
  margin-bottom: 0.6rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Detail heading. */
.blueprint-detail h3 {
  max-width: 620px;
  margin-bottom: 0.75rem;
  color: var(--text);
  font-size: clamp(1.75rem, 5vw, 3rem);
  line-height: 0.96;
  letter-spacing: -0.065em;
}

/* Detail copy. */
.blueprint-detail p {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--soft);
}

/* Blueprint rotation animation. */
@keyframes blueprintRotate {
  to {
    transform: rotate(360deg);
  }
}

/* =========================================================
   SYSTEM BLOCKS
========================================================= */

/* Systems block wrapper. */
.systems-library {
  background: #020617;
}

/* Large system block. */
.system-block {
  position: relative;
  padding: clamp(4rem, 8vw, 8rem) 0;
  overflow: hidden;
}

/* Dark system block. */
.system-block-dark {
  background:
    radial-gradient(circle at 14% 18%, rgba(54, 243, 255, 0.12), transparent 30%),
    radial-gradient(circle at 82% 72%, rgba(124, 92, 255, 0.16), transparent 34%),
    linear-gradient(180deg, #020617 0%, #07111f 100%);
}

/* Split alternate system block. */
.system-block-split {
  background:
    radial-gradient(circle at 20% 20%, rgba(56, 255, 182, 0.08), transparent 28%),
    radial-gradient(circle at 84% 72%, rgba(54, 243, 255, 0.1), transparent 30%),
    #030712;
}

/* System block grid. */
.system-block-grid {
  display: grid;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}

/* System image block. */
.system-block-media {
  position: relative;
  min-height: clamp(21rem, 52vw, 36rem);
  border-radius: clamp(1.4rem, 4vw, 3rem);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #020617;
}

/* Image overlay. */
.system-block-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, transparent 0%, rgba(3, 7, 18, 0.62) 100%),
    radial-gradient(circle at 35% 30%, rgba(54, 243, 255, 0.16), transparent 36%);
  pointer-events: none;
}

/* System block image fills its media area. */
.system-block-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1000ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Image hover zoom. */
.system-block:hover .system-block-media img {
  transform: scale(1.055);
}

/* System content. */
.system-block-content {
  position: relative;
}

/* Large system number. */
.system-number {
  display: block;
  margin-bottom: 1rem;
  color: rgba(248, 250, 252, 0.18);
  font-size: clamp(3.5rem, 12vw, 8.5rem);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.045em;
}

/* System label. */
.system-label {
  margin-bottom: 0.8rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* System headline. */
.system-block-content h2 {
  max-width: 780px;
  margin-bottom: 1rem;
  color: var(--text);
  font-size: clamp(2rem, 5.4vw, 4.85rem);
  line-height: 0.94;
  letter-spacing: -0.075em;
}

/* System paragraph. */
.system-block-content p {
  max-width: 680px;
  color: var(--soft);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
}

/* System row list. */
.system-row-list {
  display: grid;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
}

/* System list row. */
.system-row-list span {
  display: block;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-weight: 800;
}

/* =========================================================
   ADVANTAGE MATRIX
========================================================= */

/* Advantage section. */
.systems-advantage {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 18%, rgba(56, 255, 182, 0.1), transparent 30%),
    radial-gradient(circle at 82% 66%, rgba(124, 92, 255, 0.18), transparent 34%),
    #020617;
}

/* Advantage headline. */
.systems-advantage-heading h2 {
  max-width: 880px;
  margin-bottom: 0;
  font-size: clamp(2.1rem, 5.8vw, 4.9rem);
  line-height: 0.94;
  letter-spacing: -0.075em;
}

/* Advantage rows. */
.advantage-matrix {
  margin-top: 2.4rem;
  border-top: 1px solid var(--border);
}

/* Individual advantage line. */
.advantage-line {
  display: grid;
  gap: 0.65rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--border);
}

/* Advantage number. */
.advantage-line span {
  color: var(--accent);
  font-weight: 950;
}

/* Advantage heading. */
.advantage-line h3 {
  margin-bottom: 0;
  color: var(--text);
  font-size: clamp(1.45rem, 4.4vw, 2.65rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

/* Advantage copy. */
.advantage-line p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--soft);
}

/* =========================================================
   COMMAND CENTER CTA
========================================================= */

/* Command section. */
.systems-command {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 26%, rgba(54, 243, 255, 0.16), transparent 34%),
    radial-gradient(circle at 80% 70%, rgba(124, 92, 255, 0.18), transparent 36%),
    #020617;
}

/* Command grid. */
.systems-command-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

/* Command heading. */
.command-copy h2 {
  max-width: 860px;
  margin-bottom: 1rem;
  color: var(--text);
  font-size: clamp(2.1rem, 5.9vw, 5rem);
  line-height: 0.92;
  letter-spacing: -0.075em;
}

/* Command copy. */
.command-copy p {
  max-width: 700px;
  margin-bottom: 1.5rem;
  color: var(--soft);
}

/* Terminal visual. */
.command-terminal {
  border: 1px solid rgba(54, 243, 255, 0.22);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 20% 20%, rgba(54, 243, 255, 0.1), transparent 32%),
    rgba(3, 7, 18, 0.82);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Terminal top bar. */
.terminal-top {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

/* Terminal dots. */
.terminal-top span {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.8;
}

/* Terminal dot variation. */
.terminal-top span:nth-child(2) {
  background: var(--accent-2);
}

/* Terminal dot variation. */
.terminal-top span:nth-child(3) {
  background: var(--accent-3);
}

/* Terminal body. */
.terminal-body {
  display: grid;
  gap: 0.8rem;
  padding: clamp(1rem, 4vw, 1.6rem);
}

/* Terminal line. */
.terminal-body p {
  margin: 0;
  color: var(--soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: clamp(0.88rem, 2.5vw, 1rem);
}

/* Terminal prompt. */
.terminal-body span {
  color: var(--accent);
}

/* Terminal success line. */
.terminal-success {
  color: var(--accent) !important;
}

/* =========================================================
   RESPONSIVE — TABLET
========================================================= */

@media (min-width: 760px) {
  /* Give the snapshot section a two-column layout. */
  .systems-snapshot-grid {
    grid-template-columns: 0.85fr 1.15fr;
    align-items: start;
  }

  /* Make advantage lines table-like. */
  .advantage-line {
    grid-template-columns: 0.16fr 0.45fr 1fr;
    align-items: baseline;
  }
}

/* =========================================================
   RESPONSIVE — DESKTOP
========================================================= */

@media (min-width: 980px) {
  /* Hero becomes two columns on desktop. */
  .systems-hero-grid {
    grid-template-columns: 1.1fr 0.75fr;
  }

  /* Blueprint becomes two columns on desktop. */
  .systems-blueprint-grid {
    grid-template-columns: 0.75fr 1.25fr;
    align-items: start;
  }

  /* System blocks become editorial split sections. */
  .system-block-grid {
    grid-template-columns: 0.95fr 1.05fr;
  }

  /* Split system blocks put content first. */
  .system-block-split .system-block-content {
    order: 1;
  }

  /* Split system blocks put image second. */
  .system-block-split .system-block-media {
    order: 2;
  }

  /* Command section becomes two columns. */
  .systems-command-grid {
    grid-template-columns: 0.95fr 1.05fr;
  }
}

/* =========================================================
   RESPONSIVE — LARGE DESKTOP
========================================================= */

@media (min-width: 1200px) {
  /* Refined desktop image height. */
  .system-block-media {
    min-height: 34rem;
  }
}

/* =========================================================
   RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 680px) {
  /* Keep hero content lower on mobile. */
  .systems-hero {
    align-items: end;
    padding: 7rem 0 6.5rem;
  }

  /* Stronger mobile hero overlay. */
  .systems-hero::before {
    background:
      linear-gradient(180deg, rgba(3, 7, 18, 0.38) 0%, rgba(3, 7, 18, 0.97) 70%),
      radial-gradient(circle at 50% 35%, rgba(54, 243, 255, 0.18), transparent 38%);
  }

  /* Slightly reduce hero image height on mobile. */
  .systems-hero-image {
    height: 105%;
    opacity: 0.54;
  }

  /* Stack hero CTA buttons. */
  .systems-hero-actions {
    flex-direction: column;
  }

  /* Make hero buttons full-width. */
  .systems-hero-actions .btn {
    width: 100%;
  }

  /* Keep metric rows compact. */
  .systems-metric {
    grid-template-columns: 0.34fr 1fr;
  }

  /* Keep command panel from feeling oversized. */
  .hero-command {
    min-height: 26rem;
  }

  /* Keep blueprint stage balanced. */
  .blueprint-stage {
    min-height: 41rem;
  }

  /* Scale the blueprint rings down slightly on phones so the
     side nodes stay inside the visual area. */
  .blueprint-core {
    --blueprint-outer-ring: min(66vw, 19rem);
    --blueprint-middle-ring: min(48vw, 14rem);
    --blueprint-inner-ring: min(32vw, 9rem);
  }

  /* Keep blueprint nodes compact. */
  .blueprint-node {
    min-width: 5.2rem;
    min-height: 2.55rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.88rem;
  }

  /* Reduce large system numbers on phones. */
  .system-number {
    font-size: clamp(3rem, 18vw, 5.8rem);
    line-height: 1;
    letter-spacing: -0.035em;
  }

  /* Keep system images balanced on mobile. */
  .system-block-media {
    min-height: 20rem;
  }
}

/* =========================================================
   REDUCED MOTION SUPPORT
========================================================= */

@media (prefers-reduced-motion: reduce) {
  /* Disable decorative systems-page animations when users
     prefer reduced motion. */
  .systems-loader-grid span,
  .systems-loader-beam,
  .hero-command::before,
  .hero-command-orbit span,
  .systems-stack-track,
  .blueprint-ring,
  .contact-form::before {
    animation: none !important;
  }
}