/* ============================================================
   process-timeline.css — Editorial 7-stage procurement timeline
   Centerpiece graphic on the homepage between Services and the
   Client Marquee. CSS-only baseline (no JS required).
   ============================================================ */

.process-timeline {
  padding: 90px 0 100px;
  background: var(--color-cream);
  color: var(--color-ink);
  position: relative;
}

.process-timeline .section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 4rem;
}

.process-timeline .section-head .eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
}

.process-timeline .section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--color-ink);
  margin-bottom: 1rem;
}

.process-timeline .section-head .lede {
  margin-bottom: 0;
}

/* ---- Stage list ---- */

.timeline-stages {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.timeline-stage {
  position: relative;
}

.stage-marker {
  display: flex;
  align-items: center;
  position: relative;
}

.stage-num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: rgba(15, 23, 42, 0.55);
  background: var(--color-cream);
  padding: 0 0.65rem;
  position: relative;
  z-index: 2;
}

.timeline-stage[data-sugallat="true"] .stage-num {
  color: var(--color-cobalt);
  font-weight: 600;
}

/* Cobalt dot for Sugallat-intervention stages */
.timeline-stage[data-sugallat="true"] .stage-marker::after {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--color-cobalt);
  border-radius: 50%;
  position: absolute;
  z-index: 3;
}

.stage-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--color-ink);
  margin: 0 0 0.6rem;
}

.stage-desc {
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(15, 23, 42, 0.68);
  margin: 0;
}

.timeline-legend {
  margin: 3rem auto 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.legend-dot {
  width: 9px;
  height: 9px;
  background: var(--color-cobalt);
  border-radius: 50%;
  display: inline-block;
}

/* ============================================================
   DESKTOP ≥1024px — horizontal 7-column grid with connector rule
   ============================================================ */

@media (min-width: 1024px) {
  .timeline-stages {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1.25rem;
  }

  /* Horizontal connector rule running through stage numbers */
  .timeline-stages::before {
    content: "";
    position: absolute;
    top: 13px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--color-rule);
    z-index: 1;
  }

  .timeline-stage {
    padding-top: 0;
    display: flex;
    flex-direction: column;
  }

  .stage-marker {
    justify-content: flex-start;
    height: 28px;
    margin-bottom: 1.5rem;
  }

  .stage-num {
    margin-left: -0.65rem;
  }

  /* Cobalt dot positioned next to the stage number on the rule */
  .timeline-stage[data-sugallat="true"] .stage-marker::after {
    top: 9px;
    right: 0.5rem;
  }

  .stage-title {
    font-size: 1.18rem;
  }

  .stage-desc {
    font-size: 0.88rem;
  }
}

/* ============================================================
   TABLET 768–1023px — 4+3 wrap (still horizontal-feeling)
   ============================================================ */

@media (min-width: 768px) and (max-width: 1023px) {
  .timeline-stages {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem 1.5rem;
  }

  .timeline-stage {
    padding-top: 0;
  }

  /* Connector breaks at row boundary — render per-row via top border on row 1 only */
  .timeline-stage::before {
    content: "";
    position: absolute;
    top: 13px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--color-rule);
    z-index: 0;
  }

  .stage-marker {
    height: 28px;
    margin-bottom: 1rem;
    justify-content: flex-start;
  }

  .stage-num {
    margin-left: -0.65rem;
  }

  .timeline-stage[data-sugallat="true"] .stage-marker::after {
    top: 9px;
    right: 0.5rem;
  }
}

/* ============================================================
   MOBILE <768px — vertical stack with thin LEFT rule
   ============================================================ */

@media (max-width: 767px) {
  .process-timeline {
    padding: 64px 0 72px;
  }

  .process-timeline .section-head {
    margin-bottom: 2.5rem;
    text-align: left;
    padding: 0 1rem;
  }

  .timeline-stages {
    padding-left: 2.25rem;
    position: relative;
    margin: 0 1rem;
  }

  /* Vertical left rule connecting stages */
  .timeline-stages::before {
    content: "";
    position: absolute;
    top: 0.5rem;
    bottom: 0.5rem;
    left: 0.85rem;
    width: 1px;
    background: var(--color-rule);
  }

  .timeline-stage {
    padding: 0 0 2rem;
    position: relative;
  }

  .timeline-stage:last-child {
    padding-bottom: 0;
  }

  .stage-marker {
    display: block;
    margin-bottom: 0.6rem;
  }

  .stage-num {
    font-size: 1.6rem;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.6);
    background: transparent;
    padding: 0;
    display: inline-block;
  }

  .timeline-stage[data-sugallat="true"] .stage-num {
    color: var(--color-cobalt);
  }

  /* Cobalt dot on the left rule for Sugallat stages */
  .timeline-stage[data-sugallat="true"] .stage-marker::after {
    top: 0.85rem;
    left: -1.85rem;
    width: 11px;
    height: 11px;
  }

  .stage-title {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
  }

  .stage-desc {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .timeline-legend {
    text-align: left;
    justify-content: flex-start;
    padding: 0 1rem;
    margin-top: 1rem;
  }
}

@media (max-width: 480px) {
  .stage-num {
    font-size: 1.45rem;
  }
  .stage-title {
    font-size: 1.1rem;
  }
}
