/* =====================================================================
   MODULES — visual redesign
   Each module is a theatrical stage. Text is reduced; SVG does the work.
   Brand language: deep navy + brand blue accent, hairlines, Inter Tight,
   letter-spaced caps. No illustration of people/objects — abstract motion
   that *embodies* the module's job.
   ===================================================================== */

/* override the old text-heavy module cards */
.modules.modules-viz {
  grid-template-columns: repeat(3, 1fr);
}
.modules.modules-viz .module {
  padding: 0;
  display: flex; flex-direction: column;
  min-height: 460px;
  overflow: hidden;
}

/* watermark number off — the visual is the hero */
.modules.modules-viz .module::after { display: none; }

/* the visual stage takes the top half */
.mv_stage {
  position: relative;
  height: 220px;
  background: linear-gradient(180deg, #fbfcfd 0%, #f4f6f9 100%);
  border-bottom: 1px solid var(--hair);
  overflow: hidden;
  flex: 0 0 220px;
}
.module.is-active .mv_stage {
  background: linear-gradient(180deg, #fff 0%, #eef3fb 100%);
}
.mv_stage svg { width: 100%; height: 100%; display: block; }

/* the chip in the top-left of stage */
.mv_chip {
  position: absolute; top: 14px; left: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--n500);
  z-index: 2;
}
.mv_chip .mv_dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand);
  animation: mvPulse 1.8s ease-in-out infinite;
}
@keyframes mvPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.7); }
}
.mv_chip .mv_n { color: var(--ink); font-weight: 700; }

/* the status stamp top-right of stage */
.mv_stamp {
  position: absolute; top: 14px; right: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--brand);
  border: 1px solid var(--brand);
  padding: 3px 7px;
  background: rgba(255,255,255,0.8);
  line-height: 1;
  z-index: 2;
}

/* lower text body — minimal */
.mv_body {
  padding: 22px 22px 22px;
  display: flex; flex-direction: column; gap: 10px;
  flex: 1 1 auto;
}
.mv_body .mv_name {
  font-size: 21px; font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.014em; line-height: 1.15;
  margin: 0;
}
.mv_body .mv_kicker {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--brand);
  font-family: 'JetBrains Mono', monospace;
  margin: 0;
}
.mv_body .mv_desc {
  margin: 2px 0 4px;
  font-size: 14px; line-height: 1.55;
  color: var(--slate);
  letter-spacing: -0.005em;
}
.mv_shift {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 18px;
  border-top: 1px dashed var(--hair-2);
}
.mv_shift_eb {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--n500);
}
.mv_shift_row {
  display: flex; align-items: baseline; flex-wrap: wrap;
  gap: 10px;
  font-size: 17px; font-weight: 500;
  line-height: 1.25;
}
.mv_shift .b {
  color: var(--n500); text-decoration: line-through;
  text-decoration-color: var(--n400);
  text-decoration-thickness: 1.25px;
  font-size: 17px;
}
.mv_shift .arr {
  color: var(--n400);
  flex: 0 0 auto;
  width: 18px; height: 18px;
  align-self: center;
  display: inline-block;
}
.mv_shift .a {
  color: var(--brand-deep); font-weight: 700;
  font-feature-settings: "tnum" 1;
  font-size: 19px;
  letter-spacing: -0.012em;
}
@media (max-width: 640px) {
  .mv_shift_row { font-size: 15px; }
  .mv_shift .b { font-size: 15px; }
  .mv_shift .a { font-size: 17px; }
}

/* =====================================================================
   STAGE 01 — STRATEGY · branching decision tree
   ===================================================================== */
.stg-strategy .branch {
  fill: none; stroke: var(--hair-3); stroke-width: 1.25;
}
.stg-strategy .branch.live {
  stroke: var(--brand); stroke-width: 1.75;
  stroke-dasharray: 4 4;
  animation: dashFlow 1.4s linear infinite;
}
@keyframes dashFlow { to { stroke-dashoffset: -16; } }
.stg-strategy .nodeC {
  fill: #fff; stroke: var(--hair-3); stroke-width: 1.25;
}
.stg-strategy .nodeC.root { fill: var(--ink); stroke: var(--ink); }
.stg-strategy .nodeC.live { fill: var(--brand); stroke: var(--brand); }
.stg-strategy .nodeC.dead { fill: var(--paper); }
.stg-strategy .pulse {
  fill: var(--brand); opacity: 0;
  animation: stgPulse 2.4s ease-out infinite;
}
@keyframes stgPulse {
  0%   { r: 4;  opacity: 0.5; }
  80%  { r: 18; opacity: 0; }
  100% { r: 18; opacity: 0; }
}
.stg-strategy .nodeLbl {
  fill: var(--n500);
  font-family: 'JetBrains Mono', monospace;
  font-size: 7px; letter-spacing: 0.1em;
  text-transform: uppercase;
}
.stg-strategy .nodeLbl.live { fill: var(--brand); font-weight: 700; }
.stg-strategy .check {
  fill: none; stroke: #fff; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}

/* =====================================================================
   STAGE 02 — WORKFLOW · orchestrated thread weaving across stages
   ===================================================================== */
.stg-workflow .stage-tick {
  stroke: var(--hair-3); stroke-width: 1;
}
.stg-workflow .stage-lbl {
  fill: var(--n500);
  font-family: 'JetBrains Mono', monospace;
  font-size: 7px; letter-spacing: 0.16em;
  text-transform: uppercase;
}
.stg-workflow .thread {
  fill: none; stroke: var(--brand); stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 580;
  stroke-dashoffset: 580;
  animation: threadDraw 4.5s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes threadDraw {
  0%   { stroke-dashoffset: 580; }
  60%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
.stg-workflow .threadGlow {
  fill: none; stroke: var(--brand); stroke-width: 6;
  stroke-linecap: round; opacity: 0.18; filter: blur(2px);
  stroke-dasharray: 580;
  stroke-dashoffset: 580;
  animation: threadDraw 4.5s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
.stg-workflow .runner {
  fill: var(--brand);
}
.stg-workflow .approve {
  font-family: 'JetBrains Mono', monospace;
  font-size: 6.5px; letter-spacing: 0.14em;
  fill: var(--n500);
  text-transform: uppercase;
}

/* =====================================================================
   STAGE 03 — NOTICE · document with stamp + dispatch trail
   ===================================================================== */
.stg-notice .doc {
  fill: #fff; stroke: var(--n400); stroke-width: 1;
}
.stg-notice .docLine {
  stroke: var(--hair-2); stroke-width: 1; stroke-linecap: round;
}
.stg-notice .docHead {
  fill: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-size: 7px; font-weight: 700; letter-spacing: 0.16em;
}
.stg-notice .stampRing {
  fill: none; stroke: var(--brand); stroke-width: 1.5;
  opacity: 0;
  transform-origin: 158px 95px;
  animation: stampDrop 3s ease-in-out infinite;
}
.stg-notice .stampTxt {
  fill: var(--brand);
  font-family: 'JetBrains Mono', monospace;
  font-size: 7px; font-weight: 700; letter-spacing: 0.18em;
  text-anchor: middle;
  opacity: 0;
  animation: stampDrop 3s ease-in-out infinite;
}
@keyframes stampDrop {
  0%, 35%   { opacity: 0; transform: scale(1.6) rotate(-12deg); }
  45%, 90%  { opacity: 1; transform: scale(1) rotate(-12deg); }
  100%      { opacity: 0; transform: scale(1) rotate(-12deg); }
}
.stg-notice .dispPath {
  fill: none; stroke: var(--brand); stroke-width: 1.25;
  stroke-dasharray: 3 3;
  opacity: 0.5;
}
.stg-notice .dispatch {
  fill: var(--brand);
}
.stg-notice .pinRing {
  fill: none; stroke: var(--brand); stroke-width: 1.5;
  transform-origin: center;
  animation: pinPing 2.4s ease-out infinite;
  animation-delay: 1.6s;
}
@keyframes pinPing {
  0%   { r: 3; opacity: 1; }
  100% { r: 16; opacity: 0; }
}
.stg-notice .pin { fill: var(--brand); }
.stg-notice .pinLbl {
  fill: var(--brand);
  font-family: 'JetBrains Mono', monospace;
  font-size: 7px; font-weight: 700; letter-spacing: 0.16em;
}

/* =====================================================================
   STAGE 04 — CASE · court calendar with hearings dropping in
   ===================================================================== */
.stg-case .calBg { fill: #fff; stroke: var(--hair-2); }
.stg-case .calCol { stroke: var(--hair-2); stroke-width: 1; }
.stg-case .calRow { stroke: var(--hair-2); stroke-width: 1; }
.stg-case .calHead {
  fill: var(--n500);
  font-family: 'JetBrains Mono', monospace;
  font-size: 6.5px; letter-spacing: 0.16em;
  text-transform: uppercase;
}
.stg-case .calDay {
  fill: var(--n400);
  font-family: 'Inter Tight', sans-serif;
  font-size: 8px; font-weight: 500;
}
.stg-case .hear {
  fill: var(--brand); opacity: 0;
  animation: hearIn 4s ease-out infinite;
}
.stg-case .hearTxt {
  fill: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 5.5px; font-weight: 700; letter-spacing: 0.1em;
  opacity: 0;
  animation: hearIn 4s ease-out infinite;
}
@keyframes hearIn {
  0%        { opacity: 0; transform: translateY(-8px); }
  20%, 90%  { opacity: 1; transform: translateY(0); }
  100%      { opacity: 1; transform: translateY(0); }
}
.stg-case .ticker {
  stroke: var(--brand); stroke-width: 1.25;
}
.stg-case .tickerLine {
  stroke: var(--brand); stroke-width: 1;
  stroke-dasharray: 2 3;
}

/* =====================================================================
   STAGE 05 — VENDORS · network mesh with active nodes
   ===================================================================== */
.stg-vendors .vnLink {
  stroke: var(--hair-3); stroke-width: 0.75;
}
.stg-vendors .vnLink.live {
  stroke: var(--brand); stroke-width: 1;
  stroke-dasharray: 3 3;
  animation: dashFlow 1.6s linear infinite;
}
.stg-vendors .vnNode {
  fill: #fff; stroke: var(--n400); stroke-width: 1;
}
.stg-vendors .vnNode.live {
  fill: var(--brand); stroke: var(--brand);
}
.stg-vendors .vnNode.hub {
  fill: var(--ink); stroke: var(--ink);
}
.stg-vendors .vnRing {
  fill: none; stroke: var(--brand); stroke-width: 1.25;
  animation: vnPing 2.6s ease-out infinite;
}
.stg-vendors .vnRing.r2 { animation-delay: 1.0s; }
.stg-vendors .vnRing.r3 { animation-delay: 1.8s; }
@keyframes vnPing {
  0%   { r: 3;  opacity: 0.9; }
  100% { r: 14; opacity: 0; }
}
.stg-vendors .vnLbl {
  fill: var(--n500);
  font-family: 'JetBrains Mono', monospace;
  font-size: 6.5px; letter-spacing: 0.14em;
  text-transform: uppercase;
}
.stg-vendors .vnLbl.live { fill: var(--brand); font-weight: 700; }

/* =====================================================================
   STAGE 06 — AUCTION · ascending bid bars + gavel
   ===================================================================== */
.stg-auction .bidBar { fill: var(--brand); }
.stg-auction .bidBar.dim { fill: var(--hair-3); }
.stg-auction .bidLbl {
  fill: var(--n500);
  font-family: 'JetBrains Mono', monospace;
  font-size: 6.5px; letter-spacing: 0.1em;
}
.stg-auction .bidVal {
  fill: var(--ink);
  font-family: 'Inter Tight', sans-serif;
  font-size: 8px; font-weight: 700;
  font-feature-settings: "tnum" 1;
}
.stg-auction .gavel {
  fill: var(--ink);
  transform-origin: 280px 110px;
  animation: gavelStrike 3s cubic-bezier(0.7, 0, 0.4, 1) infinite;
}
@keyframes gavelStrike {
  0%, 60%   { transform: rotate(-30deg) translateY(-4px); }
  72%       { transform: rotate(0deg)   translateY(0); }
  78%       { transform: rotate(-6deg)  translateY(-2px); }
  85%, 100% { transform: rotate(-30deg) translateY(-4px); }
}
.stg-auction .strikeBlock { fill: var(--ink); }
.stg-auction .strikeFlash {
  fill: var(--brand); opacity: 0;
  animation: strikeFlash 3s ease-out infinite;
}
@keyframes strikeFlash {
  0%, 70%  { opacity: 0; }
  72%      { opacity: 0.5; }
  100%     { opacity: 0; }
}
.stg-auction .soldStamp {
  fill: var(--brand);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; font-weight: 800; letter-spacing: 0.22em;
  text-anchor: middle;
  opacity: 0;
  animation: soldIn 3s ease-out infinite;
}
.stg-auction .soldRing {
  fill: none; stroke: var(--brand); stroke-width: 1.25;
  opacity: 0;
  animation: soldIn 3s ease-out infinite;
}
@keyframes soldIn {
  0%, 72%  { opacity: 0; }
  78%, 95% { opacity: 1; }
  100%     { opacity: 0; }
}

/* on-hover speed bump for any stage */
.modules.modules-viz .module:hover .mv_stage svg * {
  animation-play-state: running;
}

/* responsive: stack to 1 col on small */
@media (max-width: 920px) {
  .modules.modules-viz { grid-template-columns: 1fr; }
  .mv_stage { height: 200px; }
}
