:root {
  --rise: 14px;
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 var(--rise);
  }
}

@keyframes bob {
  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--success) 22%, transparent);
  }
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@keyframes drain {
  from {
    stroke-dashoffset: 6;
  }

  to {
    stroke-dashoffset: 72;
  }
}

@keyframes fall {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg);
  }

  12% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(320px) rotate(540deg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .hero .rise {
    animation: rise var(--motion-reveal) var(--ease-standard) var(--delay, 0ms)
      both;
  }

  .hero-title {
    --delay: 80ms;
  }

  .hero-lead {
    --delay: 160ms;
  }

  .hero .actions {
    --delay: 240ms;
  }

  .hero-note,
  .notes {
    --delay: 300ms;
  }

  .bob {
    animation: bob 7s ease-in-out infinite;
  }

  .float-2 .bob {
    animation-duration: 8s;
    animation-delay: -2s;
  }

  .float-3 .bob {
    animation-duration: 6.5s;
    animation-delay: -4s;
  }

  .float-4 .bob {
    animation-duration: 9s;
    animation-delay: -1s;
  }

  .float-5 .bob,
  .float-6 .bob {
    animation-duration: 4.5s;
  }

  .float-6 .bob {
    animation-delay: -2.2s;
  }

  .pulse-dot {
    animation: pulse 1.8s ease-in-out infinite;
  }

  .marquee-track {
    animation: marquee 56s linear infinite;
  }

  .marquee:hover .marquee-track {
    animation-play-state: paused;
  }

  .timer-arc {
    animation: drain 14s linear infinite alternate;
  }

  .bit {
    animation: fall 2.6s ease-in infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --rise: 0px;
  }

  .marquee-track {
    width: auto;
  }

  .marquee-group {
    flex: 1;
    flex-wrap: wrap;
    justify-content: center;
    padding-inline: var(--space-4);
  }

  .marquee-group[aria-hidden="true"] {
    display: none;
  }

  .marquee-group li {
    padding-block: var(--space-2);
  }

  .card-moving {
    transform: none;
  }
}
