/* How it works flow diagram - live SVG, brand palette on white. */

.hiw-flow {
  width: 100%;
}

.hiw-flow svg {
  display: block;
  width: 100%;
  height: auto;
}

/* --- Source logo strips --- */

.hiw-flow__card {
  fill: var(--color-surface);
  stroke: var(--color-border);
  stroke-width: 1;
}

.hiw-flow__strip {
  animation: 34s linear infinite;
  animation-play-state: paused;
}

.hiw-flow__strip--v {
  animation-name: hiw-strip-scroll-y;
}

.hiw-flow__strip--h {
  animation-name: hiw-strip-scroll-x;
}

.hiw-flow__strip--2 {
  animation-duration: 41s;
  animation-direction: reverse;
}

.hiw-flow__strip--3 {
  animation-duration: 29s;
}

.hiw-flow--running .hiw-flow__strip {
  animation-play-state: running;
}

@keyframes hiw-strip-scroll-y {
  to {
    transform: translateY(var(--hiw-strip-travel));
  }
}

@keyframes hiw-strip-scroll-x {
  to {
    transform: translateX(var(--hiw-strip-travel));
  }
}

/* --- Connectors --- */

.hiw-flow__wire {
  fill: none;
  stroke: rgba(38, 38, 38, 0.22);
  stroke-width: 1.25;
  stroke-dasharray: 2 5;
  stroke-linecap: round;
  animation: hiw-wire-drift 1.4s linear infinite;
  animation-play-state: paused;
}

.hiw-flow--running .hiw-flow__wire {
  animation-play-state: running;
}

@keyframes hiw-wire-drift {
  to {
    stroke-dashoffset: -7;
  }
}

/* Travelling packets are hidden until the diagram runs, otherwise they park on
   top of their path's first point and read as stray dots. */
.hiw-flow__pulse {
  opacity: 0;
}

.hiw-flow--running .hiw-flow__pulse {
  opacity: 1;
}

/* --- Context sphere --- */

.hiw-flow__sphere-face {
  fill: rgba(38, 38, 38, 0.022);
  stroke: rgba(38, 38, 38, 0.2);
  stroke-width: 1;
}

.hiw-flow__sphere-grain {
  opacity: 0.3;
}

.hiw-flow__grid {
  fill: none;
  stroke: rgba(38, 38, 38, 0.17);
  stroke-width: 1;
}

/* --- Context Warehouse core --- */

.hiw-flow__core {
  fill: var(--brand-white);
  stroke: var(--color-border-strong);
  stroke-width: 1;
  filter: drop-shadow(0 12px 26px rgba(38, 38, 38, 0.12));
}

.hiw-flow__mark {
  fill: var(--brand-blue);
}

/* --- Agents --- */

.hiw-flow__agent--blue {
  fill: var(--brand-blue);
}

.hiw-flow__agent--magenta {
  fill: var(--brand-magenta);
}

.hiw-flow__agent--orange {
  fill: var(--brand-orange);
}

.hiw-flow__agent-glyph {
  fill: none;
  stroke: var(--brand-white);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hiw-flow__agent-glyph circle {
  fill: var(--brand-white);
  stroke: none;
}

@media (prefers-reduced-motion: reduce) {
  .hiw-flow__strip,
  .hiw-flow__wire {
    animation: none;
  }
}
