/* The small illustrations on the homepage's solution cards. */

@layer utilities {
  @media (prefers-reduced-motion: no-preference) {
    .motion-safe\:animate-mini-bar {
      animation: mini-bar 3.2s var(--ease-in-out) calc(var(--mini-step, 0) * -260ms) infinite alternate;
    }

    .motion-safe\:animate-pulse-run {
      animation: pulse-run 2.4s var(--ease-in-out) var(--pulse-delay, 0s) infinite;
    }
  }

  @container not (width >= 521px) {
    @media (prefers-reduced-motion: no-preference) {
      /* The same pulse when a narrow card runs the flow top to bottom. */
      .\@max-\[521px\]\:motion-safe\:animate-pulse-run-y {
        animation: pulse-run-y 2.4s var(--ease-in-out) var(--pulse-delay, 0s) infinite;
      }
    }
  }

  /* A chart bar's place in the row, so the bars move out of step with each other. */
  .mini-step-0 {
    --mini-step: 0;
  }

  .mini-step-1 {
    --mini-step: 1;
  }

  .mini-step-2 {
    --mini-step: 2;
  }

  .mini-step-3 {
    --mini-step: 3;
  }

  .mini-step-4 {
    --mini-step: 4;
  }

  .mini-step-5 {
    --mini-step: 5;
  }

  .mini-step-6 {
    --mini-step: 6;
  }

  .mini-step-7 {
    --mini-step: 7;
  }

  .mini-step-8 {
    --mini-step: 8;
  }

  .mini-step-9 {
    --mini-step: 9;
  }

  .mini-step-10 {
    --mini-step: 10;
  }

  .mini-step-11 {
    --mini-step: 11;
  }

  /* The flow's second link: its pulse runs half a beat after the first one's. */
  .pulse-later {
    --pulse-delay: 1.2s;
  }
}

@keyframes mini-bar {
  from {
    transform: scaleY(0.72);
  }
  to {
    transform: scaleY(1);
  }
}

@keyframes pulse-run {
  0% {
    transform: translateX(-100%);
  }
  50%,
  100% {
    transform: translateX(100%);
  }
}

@keyframes pulse-run-y {
  0% {
    transform: translateY(-100%);
  }
  50%,
  100% {
    transform: translateY(100%);
  }
}
