/* ═══════════════════════════════════════════════════════════
   pipeline.css — "From Market to Outcome" scroll pipeline
   Premium SVG node-graph section for landing page.
   Sits between Stats row and Scanners section.
   Uses existing CSS vars: --cyan, --green, --white, --muted,
   --border, --border2, --font-mono, --font-display
   ═══════════════════════════════════════════════════════════ */

#pipeline {
  padding: 5rem 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

#pipeline .sec-tag { margin-bottom: 0.5rem; }

#pipeline-svg-wrap {
  position: relative;
  margin-top: 2.5rem;
}

#pipeline-svg-wrap svg {
  display: block;
  overflow: visible;
}

/* ── Flow lines ── */
.pl-flow {
  stroke-dasharray: 4 8;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.pl-flow.on { opacity: 0.55; }

@media (prefers-reduced-motion: no-preference) {
  .pl-flow.on { animation: pl-dash 1.4s linear infinite; }
}
@keyframes pl-dash { to { stroke-dashoffset: -24; } }

/* ── Particles traveling along flow paths ── */
.pl-particle {
  opacity: 0;
}
.pl-particle.on { opacity: 1; }

/* ── Nodes ── */
.pl-node {
  cursor: pointer;
  opacity: 0;
  transform: scale(0.85);
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.pl-node.on {
  opacity: 1;
  transform: scale(1);
}
.pl-node .pl-circle {
  fill: #0d1117;
  stroke: #1e2836;
  stroke-width: 1;
  transition: stroke 0.25s ease, stroke-width 0.25s ease, filter 0.25s ease;
}
.pl-node:hover .pl-circle,
.pl-node.active .pl-circle {
  stroke: #00e5c8;
  stroke-width: 1.5;
  filter: drop-shadow(0 0 8px rgba(0,229,200,0.45));
}
.pl-node:hover .pl-flow-out,
.pl-node.active .pl-flow-out {
  opacity: 0.9 !important;
  stroke-width: 2;
}

.pl-node text {
  font-family: var(--font-mono);
  fill: var(--white);
  letter-spacing: 0.04em;
}
.pl-node .pl-sub {
  fill: var(--muted);
  font-size: 9px;
}
.pl-node .pl-title {
  font-size: 11px;
  font-weight: 700;
}

@media (prefers-reduced-motion: no-preference) {
  .pl-ring {
    animation: pl-pulse 2.6s ease-in-out infinite;
    transform-box: fill-box;
    transform-origin: center;
  }
}
@keyframes pl-pulse {
  0%, 100% { opacity: 0.25; transform: scale(1); }
  50%      { opacity: 0.6;  transform: scale(1.18); }
}

/* ── Cards below diagram ── */
#pipeline-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.85rem;
  margin-top: 2rem;
}
.pl-card {
  background: #0d1117;
  border: 1px solid #1e2836;
  border-radius: 8px;
  padding: 0.9rem;
  opacity: 0.3;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.4s ease;
}
.pl-card.on {
  opacity: 1;
  transform: translateY(0);
  border-color: rgba(0,229,200,0.25);
}
.pl-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--white);
  margin-bottom: 4px;
}
.pl-card-desc {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Mobile ── */
@media (max-width: 720px) {
  #pipeline { padding: 3rem 1rem; }
  #pipeline-svg-wrap svg { min-height: 480px; }
}
