.logo-carousel {
  margin-top: 1rem;
  overflow: hidden;
  contain: paint;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.logo-track {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: max-content;
  padding: 0.5rem 0;
  will-change: transform;
  animation: logo-scroll linear infinite;
  animation-duration: var(--scroll-duration, 30s);
  animation-play-state: paused;
}

/* Animation only starts once JS has measured the exact loop distance,
   avoiding a jump from changing the animation mid-flight. */
.logo-track.is-ready {
  animation-play-state: running;
}

.logo-track .logo-item {
  flex-shrink: 0;
}

.logo-track .logo-image {
  display: block;
  height: 36px;
  width: auto;
  object-fit: contain;
}

@keyframes logo-scroll {
  to {
    transform: translateX(calc(-1 * var(--scroll-distance, 50%)));
  }
}

.logo-carousel.pause-on-hover:hover .logo-track,
.logo-carousel.pause-on-hover:focus-within .logo-track {
  animation-play-state: paused;
}

/* With reduced motion requested the strip still scrolls (slower, see
   carousel.js), but hovering/focusing it always pauses it. */
@media (prefers-reduced-motion: reduce) {
  .logo-carousel:hover .logo-track,
  .logo-carousel:focus-within .logo-track {
    animation-play-state: paused;
  }
}
