/* ============================================================
   DIAGRAM — the live architecture figure in the hero
   ============================================================ */

.figure {
  background: var(--bg-sunk);
  border: var(--bw) solid var(--line);
  border-radius: var(--r2);
}

.figure__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding: var(--s3) var(--s4);
  border-bottom: var(--bw) solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.figure__tag {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
}

.led {
  width: 6px;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--accent);
  animation: led-pulse 2.6s var(--ease) infinite;
}

@keyframes led-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.28;
  }
}

.figure__body {
  padding: var(--s5);
}

.figure__foot {
  padding: var(--s3) var(--s4);
  border-top: var(--bw) solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

/* ---------- the svg itself ---------- */

.dg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.dg__gridline {
  fill: none;
  stroke: var(--line-soft);
  stroke-width: 1;
}

.dg__box {
  fill: var(--surface);
  stroke: var(--line);
  stroke-width: 1;
}

.dg__box--accent {
  fill: var(--accent-dim);
  stroke: var(--accent-line);
}

.dg__wire {
  fill: none;
  stroke: var(--wire);
  stroke-width: 1;
}

.dg__flow {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 3 21;
  animation: dg-flow 3.2s linear infinite;
}

@keyframes dg-flow {
  to {
    stroke-dashoffset: -24;
  }
}

.dg__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  fill: var(--ink);
}

.dg__label--accent {
  fill: var(--accent);
}

.dg__sub {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  fill: var(--ink-3);
}

.dg__note {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  fill: var(--ink-3);
}

/* motion off — keep the structure, drop the travelling dashes */
@media (prefers-reduced-motion: reduce) {
  .dg__flow {
    animation: none;
    stroke-dasharray: none;
    opacity: 0;
  }

  .led {
    animation: none;
  }
}

@media (max-width: 620px) {
  .figure__body {
    padding: var(--s3);
  }
}
