/* Links the work stages by their actual icon positions, including stacked layouts. */
.approach-grid.process-flow {
  position: relative;
  isolation: isolate;
  --process-duration: 6s;
}

.process-flow .process-line {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  fill: none;
  stroke-linecap: round;
}

.process-line .track {
  stroke: var(--rule);
  stroke-width: 3;
}

.process-line .pulse {
  stroke: var(--brand);
  stroke-width: 4;
  stroke-dasharray: 8 200;
  opacity: 0;
}

.process-flow article {
  position: relative;
  border-top: 0;
  padding-top: 0;
}

.process-flow .step-icon {
  position: relative;
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: 19px;
  background: var(--mist);
  color: var(--blue);
}

.process-flow .step-icon svg {
  display: block;
  width: 38px;
  height: 38px;
  stroke: currentColor;
}

@media (prefers-reduced-motion: no-preference) {
  html:not(.motion-paused) .process-flow.is-visible .pulse {
    animation: bmc-process-pulse var(--process-duration) linear infinite;
  }

  html:not(.motion-paused) .process-flow.is-visible .step-icon {
    animation: bmc-process-node var(--process-duration) linear infinite;
    animation-delay: var(--node-delay, 0s);
  }
}

@keyframes bmc-process-pulse {
  0% { stroke-dashoffset: 8; opacity: 0; }
  7% { stroke-dashoffset: 4; opacity: 1; }
  87% { stroke-dashoffset: -96; opacity: 1; }
  94%, 100% { stroke-dashoffset: -101; opacity: 0; }
}

@keyframes bmc-process-node {
  0%, 15%, 100% { border-color: var(--rule); box-shadow: 0 0 0 0 transparent; transform: scale(1); }
  5%, 8% { border-color: var(--deep); box-shadow: 0 0 0 4px var(--surface-hover); transform: scale(1.045); }
}

@media (max-width: 650px) {
  .approach-grid.process-flow { gap: 32px; }

  .process-flow article {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: start;
    column-gap: 17px;
    padding: 0;
  }

  .process-flow .step-icon {
    grid-row: 1 / span 2;
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .process-flow .step-icon svg { width: 30px; height: 30px; }
  .process-flow h3 { margin: 4px 0 12px; }
  .process-flow p { grid-column: 2; margin: 0; }
}
