.section--process {
  --section-pad: clamp(72px, 8vw, 112px);
  background: var(--color-white);
}
/* The route reads as one line: phases above, nodes that light up while
   scrolling, a card per step. Vertical below 1280px, horizontal above. */
.timeline-phases {
  display: none;
}
.timeline {
  --progress: 0;
  position: relative;
  display: grid;
  gap: 16px;
  list-style: none;
}
.timeline__step {
  position: relative;
  min-width: 0;
  padding-left: 36px;
}
/* Mobile line: one segment per step, coloured once the next step is reached. */
.timeline__step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 40px;
  bottom: -40px;
  left: 7px;
  width: 2px;
  background: var(--color-line);
  transition: background 500ms var(--ease-out);
}
.timeline__step:has( + .timeline__step.is-active)::before {
  background: var(--color-primary);
}
.timeline__node {
  position: absolute;
  z-index: 1;
  top: 24px;
  left: 0;
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-line-strong);
  border-radius: 50%;
  background: var(--color-white);
  transition: background 400ms var(--ease-out), border-color 400ms var(--ease-out), box-shadow 400ms var(--ease-out);
}
.timeline__step.is-active .timeline__node {
  border-color: var(--color-primary);
  background: var(--color-primary);
  box-shadow: 0 0 0 5px var(--color-section-slate);
}
/* Steps are open columns on the route line, not boxed cards. The top padding
   centres the number on its node. */
.timeline__card {
  height: 100%;
  padding: 17px 0 28px;
}
.timeline__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.timeline__number {
  color: var(--color-accent-soft);
  font: 500 30px/1 var(--font-heading);
  transition: color 500ms var(--ease-out);
}
.timeline__step.is-active .timeline__number {
  color: var(--color-accent-text);
}
.timeline__phase {
  color: var(--color-accent-text);
  font: 500 11px/1.4 var(--font-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
/* The step number already marks each card; icons would only repeat it. */
.timeline__card .icon-circle {
  display: none;
}
.timeline__card h3 {
  margin-top: 20px;
  margin-bottom: 8px;
  font: 500 18px/1.35 var(--font-ui);
}
.timeline__card p {
  max-width: 60ch;
  color: var(--color-muted);
  font-size: 15px;
  line-height: 1.65;
}
.timeline__translation {
  display: inline-block;
  margin-top: 14px;
  padding: 3px 8px;
  border: 1px solid var(--color-line-strong);
  border-radius: 4px;
  color: var(--color-accent-text);
  font: 500 10px/1.5 var(--font-ui);
  letter-spacing: 0.08em;
}
.process-note {
  display: grid;
  gap: 20px;
  align-items: center;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--color-line);
}
.process-note p {
  max-width: 60ch;
  color: var(--color-muted);
  font-size: 16px;
}
.process-note strong {
  display: block;
  margin-bottom: 6px;
  color: var(--color-ink);
  font: 500 24px/1.3 var(--font-heading);
}
@media (min-width: 768px) {
  .process-note {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 32px;
  }
}
@media (min-width: 1280px) {
  .timeline-phases {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 28px;
  }
  /* Bracket-style labels spanning the steps of each phase. */
  .timeline-phases > span {
    position: relative;
    padding: 0 0 14px 2px;
    border-bottom: 1px solid var(--color-accent-soft);
    color: var(--color-accent-text);
    font: 500 12px/1.4 var(--font-ui);
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
  .timeline-phases > span::before {
    content: "";
    position: absolute;
    bottom: 0;
    width: 1px;
    height: 8px;
    background: var(--color-accent-soft);
    left: 0;
  }
  .timeline-phases > span::after {
    content: "";
    position: absolute;
    bottom: 0;
    width: 1px;
    height: 8px;
    background: var(--color-accent-soft);
    right: 0;
  }
  .timeline-phases > span:nth-child(1) {
    grid-column: 1 / 4;
  }
  .timeline-phases > span:nth-child(2) {
    grid-column: 4 / 6;
  }
  .timeline-phases > span:nth-child(3) {
    grid-column: 6 / 7;
  }
  .timeline {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
  }
  /* One continuous line from the first node to the last, filled by scroll
     progress (set in main.js). */
  .timeline::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 24px;
    right: calc((100% - 80px) / 6 - 24px);
    height: 2px;
    background: var(--color-line);
  }
  .timeline::after {
    content: "";
    position: absolute;
    top: 7px;
    left: 24px;
    right: calc((100% - 80px) / 6 - 24px);
    height: 2px;
    background: var(--color-primary);
    transform: scaleX(var(--progress));
    transform-origin: left;
  }
  .timeline__step {
    padding: 40px 0 0;
  }
  .timeline__step:not(:last-child)::before {
    display: none;
  }
  .timeline__node {
    top: 0;
    left: 16px;
  }
  .timeline__phase {
    display: none;
  }
  /* Text aligns with its node on the line above. */
  .timeline__card {
    padding: 0 12px 0 16px;
  }
  .timeline__number {
    font-size: 48px;
  }
  .timeline__card h3 {
    font-size: 21px;
  }
}
@media (max-width: 767px) {
  .timeline__card h3 {
    margin-top: 16px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .timeline::after {
    transition: transform 200ms linear;
  }
}
