/* Food System Map — arrow motion. Paired with fsm-arrows.js.
   Nothing here changes how the map looks once the animation has finished. */

#fsm .fsm-draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
#fsm .fsm-fade { opacity: 0; }

#fsm.fsm-run .fsm-draw {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset var(--dur, 900ms) cubic-bezier(.22, .61, .36, 1) var(--delay, 0ms);
}
#fsm.fsm-run .fsm-fade {
  opacity: 1;
  transition: opacity 340ms ease-out var(--delay, 0ms);
}

/* The tour's marker: a soft darker wash travelling the arc, at the arc's own weight, so it
   never covers anything the arrow was not already covering. The motion itself is driven from
   fsm-arrows.js with the Web Animations API — CSS keyframes cannot interpolate a dashoffset
   built from custom properties, which is what made the first version snap instead of travel. */
#fsm .fsm-wash, #fsm .fsm-march { pointer-events: none; }

/* Someone who has asked for less motion gets the finished picture and nothing moving. */
@media (prefers-reduced-motion: reduce) {
  #fsm .fsm-draw { stroke-dasharray: none; stroke-dashoffset: 0; }
  #fsm .fsm-fade { opacity: 1; }
  #fsm .fsm-wash, #fsm .fsm-march { display: none; animation: none; }
  #fsm.fsm-run .fsm-draw, #fsm.fsm-run .fsm-fade { transition: none; }
}
