/* ============================================================
   Pipeline page — page-specific styles
   Variables and resets inherited from main.css
   ============================================================ */

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--black);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── HEADER ── */
.pipeline-header {
  text-align: center;
  padding: 36px 24px 28px;
  position: relative;
}
.pipeline-logo {
  font-size: 0.72rem; font-weight: 900; letter-spacing: 3px;
  text-transform: uppercase; color: var(--gold); margin-bottom: 14px;
}
.pipeline-logo span { color: var(--white); font-weight: 300; }

.pipeline-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900; letter-spacing: -0.5px; margin-bottom: 6px;
}
.pipeline-header h1 em { font-style: normal; color: var(--gold); }

.tagline { font-size: 0.82rem; color: var(--grey); }

.header-divider {
  width: 160px; height: 1px; margin: 24px auto 0;
  background: linear-gradient(to right, transparent, rgba(232,160,32,0.5), transparent);
}

/* ── STATS BAR ── */
.stats-bar {
  display: flex; justify-content: center; gap: 0;
  max-width: 640px; margin: 0 auto;
  padding: 0 24px 36px;
  flex-wrap: wrap;
}
.stat-item {
  flex: 1; min-width: 120px;
  text-align: center;
  padding: 20px 12px;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-item strong { display: block; font-size: 1.7rem; font-weight: 900; color: var(--gold); }
.stat-item span { font-size: 0.68rem; color: var(--grey); text-transform: uppercase; letter-spacing: 1px; }

/* ── PIPELINE GRID ── */
.pipeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 12px;
}
@media (max-width: 680px) {
  .pipeline { grid-template-columns: 1fr; }
  .stat-item { min-width: 50%; }
}

/* ── TRACK ── */
.track {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--dark);
  overflow: hidden;
  transition: box-shadow 0.4s;
}
.track-gold { border-color: rgba(232,160,32,0.18); }
.track-blue  { border-color: rgba(46,159,255,0.18); }
.track-gold:hover { box-shadow: 0 0 48px rgba(232,160,32,0.08); }
.track-blue:hover  { box-shadow: 0 0 48px rgba(46,159,255,0.08); }

.track-head {
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
}
.track-num {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 900;
}
.track-gold .track-num { background: rgba(232,160,32,0.12); border: 1px solid rgba(232,160,32,0.4); color: var(--gold); }
.track-blue  .track-num { background: rgba(46,159,255,0.10); border: 1px solid rgba(46,159,255,0.3);  color: var(--blue); }
.track-head h3 { font-size: 0.98rem; font-weight: 800; margin-bottom: 2px; }
.track-head p  { font-size: 0.72rem; color: var(--grey); }

/* ── STEPS ── */
.steps { padding: 18px; display: flex; flex-direction: column; }

.step {
  background: var(--dark2);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 13px 15px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
  opacity: 0;
  transform: translateX(-16px);
  position: relative;
  overflow: hidden;
}
.step.visible { opacity: 1; transform: translateX(0); }
.step:hover   { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.5); }

.step-you   { border-color: rgba(232,160,32,0.18); }
.step-ai    { border-color: rgba(46,159,255,0.18); }
.step-share { border-color: rgba(196,128,255,0.25); background: rgba(196,128,255,0.04); }

.step::before {
  content: '';
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 0.3s; border-radius: 12px; pointer-events: none;
}
.step-you::before   { background: radial-gradient(ellipse at 0 0, rgba(232,160,32,0.1), transparent 65%); }
.step-ai::before    { background: radial-gradient(ellipse at 0 0, rgba(46,159,255,0.09), transparent 65%); }
.step-share::before { background: radial-gradient(ellipse at 0 0, rgba(196,128,255,0.1), transparent 65%); }
.step:hover::before { opacity: 1; }

.step-top { display: flex; align-items: flex-start; gap: 10px; }

.badge {
  flex-shrink: 0;
  font-size: 0.56rem; font-weight: 900; text-transform: uppercase; letter-spacing: 1px;
  padding: 3px 8px; border-radius: 20px; margin-top: 3px; white-space: nowrap;
}
.badge-you   { background: rgba(232,160,32,0.12); border: 1px solid rgba(232,160,32,0.4); color: var(--gold); }
.badge-ai    { background: rgba(46,159,255,0.10);  border: 1px solid rgba(46,159,255,0.3);  color: var(--blue); }
.badge-share { background: rgba(196,128,255,0.12); border: 1px solid rgba(196,128,255,0.38); color: var(--purple); }

.step-body h4 { font-size: 0.85rem; font-weight: 700; color: var(--white); margin-bottom: 0; transition: margin 0.25s; }
.step-body p  {
  font-size: 0.76rem; color: var(--grey); line-height: 1.55;
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease, margin-top 0.25s;
  margin-top: 0;
}
.step.open .step-body h4 { margin-bottom: 4px; }
.step.open .step-body p  { max-height: 120px; margin-top: 4px; }

/* ── CONNECTORS ── */
.connector {
  position: relative;
  height: 30px;
  display: flex; align-items: center; justify-content: center;
}
.conn-line {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  overflow: hidden;
}
.conn-line-you   { background: rgba(232,160,32,0.2); }
.conn-line-ai    { background: rgba(46,159,255,0.2); }
.conn-line-share { background: rgba(196,128,255,0.2); }

.conn-dot {
  position: absolute;
  width: 7px; height: 7px;
  border-radius: 50%;
  left: -2.5px; top: -4px;
  animation: none;
}
.conn-dot-you   { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.conn-dot-ai    { background: var(--blue); box-shadow: 0 0 6px var(--blue); }
.conn-dot-share { background: var(--purple); box-shadow: 0 0 6px var(--purple); }

@keyframes flow-down {
  0%   { top: -4px; opacity: 0; }
  10%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { top: calc(100% + 4px); opacity: 0; }
}
.conn-dot.active { animation: flow-down 1.4s ease-in-out infinite; }

.conn-label {
  position: relative; z-index: 2;
  font-size: 0.58rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
  padding: 2px 10px; border-radius: 10px;
}
.conn-label-ai   { color: var(--blue-lt);  background: rgba(46,159,255,0.08); }
.conn-label-you  { color: var(--gold-lt);  background: rgba(232,160,32,0.08); }

/* ── CONVERGE / LIVE ── */
.converge-wrap {
  max-width: 960px; margin: 0 auto;
  padding: 0 24px 16px;
  display: flex; flex-direction: column; align-items: center;
}
.converge-arms {
  display: flex; width: 100%; height: 40px;
  position: relative;
}
.arm {
  position: absolute; width: 50%; height: 100%;
  border: 2px solid rgba(232,160,32,0.15);
  border-bottom: none;
}
.arm-left  { left: 0;   border-right: none; }
.arm-right { right: 0;  border-left: none;  }

.live-node {
  background: rgba(46,204,113,0.08);
  border: 1px solid rgba(46,204,113,0.35);
  border-radius: 50px;
  padding: 14px 40px; text-align: center;
  position: relative;
  opacity: 0; transform: scale(0.92);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.live-node.visible { opacity: 1; transform: scale(1); }

.live-node::after {
  content: '';
  position: absolute; inset: -5px; border-radius: 55px;
  border: 1px solid rgba(46,204,113,0.15);
  animation: live-pulse 2.4s ease-out infinite;
}
@keyframes live-pulse {
  0%   { transform: scale(1);    opacity: 0.7; }
  100% { transform: scale(1.06); opacity: 0; }
}

.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 6px; animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.live-node h3 { font-size: 1.05rem; font-weight: 900; color: var(--green); margin-bottom: 2px; }
.live-node p  { font-size: 0.72rem; color: var(--grey); }

/* ── LEGEND ── */
.legend {
  display: flex; justify-content: center; gap: 20px; flex-wrap: wrap;
  padding: 24px 24px 8px; opacity: 0; transition: opacity 0.6s;
}
.legend.visible { opacity: 1; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; color: var(--grey); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }

/* ── CONTROLS ── */
.controls { text-align: center; padding: 8px 24px 24px; }
.replay-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(232,160,32,0.08); border: 1px solid rgba(232,160,32,0.3);
  color: var(--gold); font-size: 0.78rem; font-weight: 700;
  padding: 10px 22px; border-radius: 20px; cursor: pointer;
  transition: all 0.2s; letter-spacing: 0.4px;
}
.replay-btn:hover { background: rgba(232,160,32,0.18); border-color: var(--gold); }

/* ── PITCH CTA ── */
.pitch-cta {
  text-align: center;
  padding: 12px 24px 36px;
}
.pitch-cta a {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--gold); color: var(--black);
  font-size: 0.82rem; font-weight: 800; letter-spacing: 0.05em;
  padding: 14px 32px; border-radius: 8px;
  text-decoration: none; transition: background 0.2s, transform 0.2s;
}
.pitch-cta a:hover { background: var(--gold-lt); transform: translateY(-2px); }
