/* LOGO STRIP: network of collaborations. A quiet band between the represented companies and the
   newsletter. The thread meets it with a node and keeps running in the left margin: the strip is
   inset between the margins (soft fades at both ends), so the line never passes under the logos. */
.logos {
  /* Cells in vw: about 4-5 logos on screen at any desktop width */
  --logo-cell: clamp(11rem, 18vw, 24rem);
  --logo-h: clamp(5.5rem, 7vw, 9.5rem);
  --logo-gap: var(--gutter);
  --marquee-duration: 115s;
  padding-block: clamp(3.5rem, 8vh, 6rem);
  border-top: 1px solid var(--c-line);
}
.logos__head { align-items: center; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.logos__title { grid-column: 1 / -1; font-size: var(--t-m); font-weight: 500; letter-spacing: -0.012em; }

/* Viewport: inset between the margins, fading at the ends */
.logos__viewport {
  margin-inline: var(--margin);
  overflow: clip;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.logos__track {
  display: flex; width: max-content;
  animation: logos-marquee var(--marquee-duration) linear infinite;
}
.logos__list { display: flex; gap: var(--logo-gap); padding-right: var(--logo-gap); }
.logos__item { flex: none; width: var(--logo-cell); height: var(--logo-h); }

@keyframes logos-marquee { to { translate: -50% 0; } }

/* Pause: on hover, on keyboard focus inside, and off screen */
@media (hover: hover) { .logos__viewport:hover .logos__track { animation-play-state: paused; } }
.logos__viewport:focus-within .logos__track,
.logos.is-offscreen .logos__track { animation-play-state: paused; }

/* Uniform treatment: monochrome and dimmed at rest, full color on hover / focus of a linked logo */
.logos__cell, .logos__link {
  display: grid; place-items: center;
  width: 100%; height: 100%;
  padding: 0.5rem 0.75rem;
}
.logos__img {
  max-width: 100%; max-height: calc(var(--logo-h) * 0.5);
  width: auto; height: auto; object-fit: contain;
  filter: grayscale(1); opacity: 0.62;
  transition: filter 0.5s var(--ease-soft), opacity 0.5s var(--ease-soft), scale 0.6s var(--ease-out);
}
@media (hover: hover) {
  .logos__link:hover .logos__img { filter: none; opacity: 1; scale: 1.04; }
}
.logos__link:focus-visible { outline-offset: -2px; }
.logos__link:focus-visible .logos__img { filter: none; opacity: 1; }

@media (max-width: 767px) {
  .logos { --logo-cell: 8.5rem; --logo-h: 4.25rem; --marquee-duration: 55s; }
}

/* Reduced motion: no marquee, one static wrapped grid, the copy removed */
@media (prefers-reduced-motion: reduce) {
  .logos__track { animation: none; width: auto; }
  .logos__viewport { -webkit-mask-image: none; mask-image: none; }
  .logos__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--logo-cell), 1fr)); row-gap: 0.5rem; padding-right: 0; width: 100%; }
  .logos__item { width: auto; }
  .logos__list[data-logos-copy] { display: none; }
}
