/* =============================================
   Partners Band
   Infinite horizontal marquee of partner logos
   on caramel background. Home page only.
   ============================================= */

.partners-band {
  background-color: var(--color-charcoal);
  padding: 52px 0;
  overflow: hidden;
}

.partners-band__label {
  text-align: center;
  font-family: 'Red Hat Display', system-ui, sans-serif;
  font-size: var(--fs-label-sm);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: oklch(0.93 0.007 65 / 0.65);
  margin: 0 0 28px 0;
}

.partners-band__track-wrapper {
  overflow: hidden;
  width: 100%;
}

.partners-band__track {
  display: flex;
  align-items: center;
  gap: clamp(48px, 6vw, 80px);
  width: max-content;
  will-change: transform;
  /* Duration is tuned to the strip's pixel speed, not to a round number:
     fewer or wider logos change how far the track travels per second. */
  animation: partners-marquee 60s linear infinite;
}

.partners-band__logo {
  /* The set mixes a 6.4:1 wordmark with a 1:1 square, so the slot caps both
     axes instead of fixing the height -- a square logo pinned to the
     wordmark's height reads as half the size of everything beside it. */
  max-height: calc(56px * var(--logo-scale, 1));
  max-width: calc(160px * var(--logo-scale, 1));
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.9;
  flex-shrink: 0;
  display: block;
}

/* One third of the track = exactly one copy of the set (see partners-band.php). */
@keyframes partners-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-33.3333%); }
}

/* ── Narrow screens ──
   The strip travels the same distance whatever the viewport, so on a phone
   the logos crawl past one at a time and the band looks stalled. Shorter
   duration and a smaller slot so more of the set is on screen at once.
   The breakpoint is 767px, not 480px: a 600px-wide phone had the desktop
   pace, which is where "it barely moves" came from. */
@media (max-width: 767px) {
  .partners-band__track {
    animation-duration: 24s;
    gap: clamp(32px, 8vw, 48px);
  }

  .partners-band__logo {
    max-height: calc(40px * var(--logo-scale, 1));
    max-width: calc(112px * var(--logo-scale, 1));
  }
}

/* ── Reduced motion: static centered grid, hide duplicates ── */
@media (prefers-reduced-motion: reduce) {
  .partners-band__track {
    animation: none;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(32px, 5vw, 60px);
  }

  .partners-band__logo--dupe {
    display: none;
  }
}
