/* Motion is an enhancement, never the visibility gate for content. */
.circuit-overview .section-head,
.circuit-works .section-head,
.circuit-discover .section-head,
.circuit-team .section-head { position: relative; }
.circuit-overview .section-head::after,
.circuit-works .section-head::after,
.circuit-discover .section-head::after,
.circuit-team .section-head::after {
  content: ''; position: absolute; left: 0; bottom: -18px;
  width: clamp(90px, 15vw, 200px); height: 2px; background: var(--accent);
  transform: scaleX(var(--connection-progress, 1)); transform-origin: left;
  transition: transform 520ms cubic-bezier(.2,.8,.2,1); pointer-events: none;
}
.circuit-overview .section-head::after { background: #174456; }
.circuit-areas { position: relative; overflow: hidden; }
.circuit-areas::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 15%; height: 2px;
  background: #75def5; transform: translateX(-110%); opacity: 0;
  pointer-events: none; animation: circuit-signal 6s linear -2s infinite; animation-play-state: paused;
}
html[data-circuit-motion=running] .circuit-areas[data-motion-active=true]::after { animation-play-state: running; }
/* Per-service lane/node decoration has one owner: ambient.css. */
.final-cta { position: relative; overflow: hidden; }
.final-cta::before {
  content: ''; position: absolute; left: var(--page-pad); right: var(--page-pad); top: 20px;
  height: 2px; background: #145369; opacity: .55; pointer-events: none;
  transform: scaleX(var(--connection-progress, 1)); transform-origin: right;
  transition: transform 700ms cubic-bezier(.2,.8,.2,1);
}
.final-cta::after {
  content: ''; position: absolute; left: var(--page-pad); right: var(--page-pad); top: 20px;
  height: 2px; background: linear-gradient(90deg, transparent 0 43%, #137f9c 43% 53%, transparent 53%);
  background-size: 220% 100%; opacity: .85; pointer-events: none;
  animation: circuit-transmission 7s linear -3s infinite; animation-play-state: paused;
}
html[data-circuit-motion=running] .final-cta[data-motion-active=true]::after { animation-play-state: running; }
.site-footer { position: relative; }
.site-footer::before {
  content: ''; position: absolute; top: 0; left: var(--page-pad); width: 110px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 600ms cubic-bezier(.2,.8,.2,1); pointer-events: none;
}
.site-footer[data-motion-seen=true]::before { transform: scaleX(1); }
html[data-circuit-motion=paused] .section-head::after,
html[data-circuit-motion=paused] .circuit-works .work-item::before,
html[data-circuit-motion=paused] .final-cta::before,
html[data-circuit-motion=paused] .site-footer::before { transition: none; }
@keyframes circuit-signal {
  0% { transform: translateX(-110%); opacity: .75; }
  10%, 90% { opacity: .85; }
  100% { transform: translateX(775%); opacity: .75; }
}
@keyframes circuit-transmission {
  from { background-position: 0 0; }
  to { background-position: 220% 0; }
}
@media (max-width: 800px), (pointer: coarse) {
  .circuit-areas::after { animation-duration: 8s; }
  .final-cta::after { animation-duration: 9s; }
  .circuit-overview .section-head::after,
  .circuit-works .section-head::after,
  .circuit-discover .section-head::after,
  .circuit-team .section-head::after { transition-duration: 350ms; }
}
@media (prefers-reduced-motion: reduce) {
  .circuit-areas::after { animation: none; display: none; }
  .final-cta::after { animation: none; display: none; }
  .circuit-overview .section-head::after,
  .circuit-works .section-head::after,
  .circuit-discover .section-head::after,
  .circuit-team .section-head::after,
  .final-cta::before,
  .site-footer::before { transition: none; transform: none; }
}
