/* =========================================================
   Holonic diagram stylesheet
   =========================================================

   This file contains styles for the site's complex visual
   diagrams and code-like panels. It is loaded after styles.css
   so it can use the shared design tokens defined there.
   ========================================================= */

/* ---------- Diagram Animation ---------- */
@keyframes pulse-line {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}
.pulse { animation: pulse-line 3.2s ease-in-out infinite; }
.pulse-2 { animation: pulse-line 3.2s ease-in-out infinite; animation-delay: 1.6s; }


/* ---------- Home Hero Diagram ---------- */
.hero-diagram {
    position: relative;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
  }
.hero-diagram svg { width: 100%; height: auto; display: block; }


/* ---------- How It Works Workbench ---------- */
.hero-workbench {
    background: var(--ink);
    color: white;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 28px 70px rgba(14,27,27,0.18);
    position: relative;
    overflow: hidden;
  }
.hero-workbench::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
      linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
  }
.workbench-bar {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 8px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.03);
    font-family: var(--mono);
    font-size: 11px;
    color: rgba(255,255,255,0.62);
    letter-spacing: 0.06em;
  }
.workbench-dot { width: 8px; height: 8px; border-radius: 50%; }
.workbench-dot.c1 { background: #E0817B; }
.workbench-dot.c2 { background: #E0BD7B; }
.workbench-dot.c3 { background: #7BC4A4; }
.workbench-body { position: relative; z-index: 1; padding: 28px; }
.flow-stack { display: grid; gap: 12px; }
.flow-row {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 16px;
    align-items: start;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.10);
  }
.flow-row:last-child { border-bottom: none; }
.flow-label {
    font-family: var(--mono);
    font-size: 10px;
    color: var(--green);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding-top: 3px;
  }
.flow-title {
    font-family: var(--serif);
    font-size: 20px;
    line-height: 1.2;
    color: white;
  }
.flow-desc {
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.52;
    color: rgba(255,255,255,0.70);
  }
.workbench-callout {
    margin-top: 22px;
    padding: 16px 18px;
    background: rgba(0,166,126,0.14);
    border: 1px solid rgba(0,166,126,0.28);
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.55;
    color: rgba(255,255,255,0.86);
  }
.workbench-callout strong { color: white; font-weight: 600; }


/* ---------- Pipeline Diagram And Stage Cards ---------- */
.pipeline-panel {
  background: white;
  border: 1px solid var(--rule);
  padding: 48px 40px 32px;
  overflow-x: auto;
}

.pipeline-svg {
  width: 100%;
  height: auto;
  display: block;
  min-width: 940px;
}

.pipeline-stage {
  cursor: pointer;
  transition: transform 0.18s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.pipeline-stage-box {
  fill: white;
  stroke: var(--navy);
  stroke-width: 1.2;
  transition: fill 0.18s ease, stroke 0.18s ease;
}

.pipeline-stage-rule {
  fill: var(--navy);
  transition: fill 0.18s ease, opacity 0.18s ease;
}

.pipeline-stage-kicker {
  fill: var(--text-dim);
  transition: fill 0.18s ease;
}

.pipeline-stage-title {
  fill: var(--text);
  transition: fill 0.18s ease;
}

.pipeline-stage-desc {
  fill: var(--text-dim);
  transition: fill 0.18s ease;
}

.pipeline-stage.is-active {
  transform: translateY(-6px) scale(1.035);
}

.pipeline-stage.is-active .pipeline-stage-box {
  fill: var(--green);
  stroke: var(--green);
}

.pipeline-stage.is-active .pipeline-stage-rule {
  fill: white;
  opacity: 0.35;
}

.pipeline-stage.is-active .pipeline-stage-kicker,
.pipeline-stage.is-active .pipeline-stage-title,
.pipeline-stage.is-active .pipeline-stage-desc {
  fill: white;
}

.pipeline-stage-marker {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.pipeline-stage-marker.is-active {
  opacity: 1;
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-left: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: white;
}

.stage {
  padding: 28px 26px 32px;
  border-right: 1px solid var(--rule);
  background: white;
  outline: none;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.stage:last-child { border-right: none; }

.stage:hover,
.stage:focus-visible,
.stage.is-active {
  background: var(--mint);
  box-shadow: inset 0 3px 0 var(--green);
}

.stage-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--green);
  letter-spacing: 0.14em;
  margin-bottom: 14px;
  display: block;
  font-weight: 500;
}

.stage h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 12px;
}

.stage p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
}

.stage em {
  font-style: italic;
  color: var(--navy);
}

@media (max-width: 900px) {
  .stage-grid { grid-template-columns: 1fr 1fr; }
  .stage:nth-child(2) { border-right: none; }
  .stage:nth-child(1),
  .stage:nth-child(2) { border-bottom: 1px solid var(--rule); }
}

@media (max-width: 560px) {
  .stage-grid { grid-template-columns: 1fr; }
  .stage {
    border-right: none;
    border-bottom: 1px solid var(--rule);
  }
  .stage:last-child { border-bottom: none; }
}

/* ---------- Diagnostic Code Block ---------- */
.code-block {
    background: var(--ink);
    color: white;
    border: 1px solid var(--navy);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
.code-block-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.025);
    font-family: var(--mono);
    font-size: 11px;
    color: rgba(255,255,255,0.55);
  }
.code-block-dot { width: 9px; height: 9px; border-radius: 50%; }
.code-block-dot.c1 { background: #E0817B; }
.code-block-dot.c2 { background: #E0BD7B; }
.code-block-dot.c3 { background: #7BC4A4; }
.code-block-path { margin-left: 14px; }
.code-block pre {
    margin: 0;
    padding: 26px 30px;
    font-family: var(--mono);
    font-size: 12.5px;
    line-height: 1.7;
    color: rgba(255,255,255,0.86);
    overflow-x: auto;
    flex: 1;
  }
.code-block .k { color: var(--text-dim-d); }
.code-block .v { color: var(--green); }
.code-block .c { color: rgba(255,255,255,0.40); font-style: italic; }
.code-block .s { color: #C8E6DA; }


/* ---------- Convergence Diagram ---------- */
.convergence-panel {
    background: var(--paper);
    border: 1px solid var(--rule);
    padding: 40px 32px 32px;
    margin: 56px 0 24px;
    overflow-x: auto;
  }
.convergence-svg {
    width: 100%;
    height: auto;
    display: block;
    min-width: 940px;
  }
.convergence-caption {
    margin-top: 32px;
    padding-left: 24px;
    border-left: 2px solid var(--green);
    font-family: var(--serif);
    font-style: italic;
    font-size: var(--font-copy-large);
    line-height: 1.4;
    color: var(--text);
    max-width: 60ch;
  }

