.client-carousel {
  min-width: 0;
}

.client-carousel__stage {
  position: relative;
  min-width: 0;
}

.client-carousel__viewport {
  display: flex;
  overflow: hidden;
}

.client-carousel__group {
  display: grid;
  flex: 0 0 100%;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  transition: filter 360ms ease, opacity 360ms ease;
}

.client-carousel__repeat {
  display: none;
}

.client-carousel__logo {
  display: grid;
  min-height: clamp(90px, 9vw, 126px);
  min-width: 0;
  padding: 12px clamp(10px, 1.8vw, 24px);
  place-items: center;
}

.client-carousel__logo:focus-visible {
  border-radius: 12px;
  outline: 2px solid var(--ink);
  outline-offset: -4px;
}

.client-carousel__logo .client-mark {
  width: 100%;
  height: clamp(30px, 3.4vw, 45px);
}

.client-carousel__logo img {
  filter: grayscale(1);
  opacity: .65;
}

.client-carousel__overlay {
  display: grid;
  justify-items: center;
  padding-block-start: 12px;
}

.client-carousel__story {
  display: flex;
  max-width: 100%;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 14px;
  text-align: center;
}

.client-carousel__count {
  color: var(--muted);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

@media (max-width: 620px) {
  .client-carousel__group {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: no-preference) {
  .client-carousel__viewport:not(:has(.client-carousel__logo:focus-visible)) {
    --fade-width: clamp(30px, 8vw, 112px);
    --edge-mask: linear-gradient(
      to right,
      transparent,
      #0003 calc(var(--fade-width) * .24),
      #000b calc(var(--fade-width) * .62),
      #000 var(--fade-width),
      #000 calc(100% - var(--fade-width)),
      #000b calc(100% - var(--fade-width) * .62),
      #0003 calc(100% - var(--fade-width) * .24),
      transparent
    );
    -webkit-mask-image: var(--edge-mask);
    mask-image: var(--edge-mask);
  }

  .client-carousel__viewport:not(:has(.client-carousel__logo:focus-visible)) .client-carousel__group {
    flex-basis: max(100%, 820px);
    grid-template-columns: repeat(6, minmax(0, 1fr));
    animation: client-carousel-scroll 24s linear infinite;
  }

  .client-carousel__viewport:not(:has(.client-carousel__logo:focus-visible)) .client-carousel__repeat {
    display: grid;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .client-carousel__overlay {
    position: absolute;
    inset: 0;
    align-items: center;
    padding: 8px 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 360ms ease;
  }

  .client-carousel__stage:not(:has(.client-carousel__logo:focus-visible)):is(:hover, :focus-within) .client-carousel__group {
    animation-play-state: paused;
    filter: blur(6px);
    opacity: .4;
    pointer-events: none;
  }

  .client-carousel__stage:not(:has(.client-carousel__logo:focus-visible)):is(:hover, :focus-within) .client-carousel__overlay {
    opacity: 1;
  }

  .client-carousel__stage:is(:hover, :focus-within) .client-carousel__story a {
    pointer-events: auto;
  }
}

@keyframes client-carousel-scroll {
  to { transform: translateX(-100%); }
}

body.redesign .client-carousel .proof-label {
  grid-area: 1 / 1;
  min-height: 44px;
  padding-inline: 46px;
  justify-content: center;
  text-align: center;
  font-size: .9375rem;
  letter-spacing: 0;
  text-transform: none;
}

.client-carousel .logo-motion {
  grid-area: 1 / 1;
  place-self: center end;
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #686d69;
  cursor: pointer;
}
.logo-motion svg { display: block; width: 16px; height: 16px; fill: currentColor; }
.logo-motion__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.client-carousel .logo-motion:hover { background: #f3f4f3; color: #242624; }
.client-carousel .logo-motion:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }
.client-carousel .logo-motion[hidden], .logo-motion > [hidden] { display: none; }
.client-carousel .is-paused .client-carousel__viewport .client-carousel__group { animation-play-state: paused; }
