/* The brands' logos running along one line, left to right (spec 085). brands.js doubles the line
   and this slides it by half its width, without end; without the script, or for those who asked
   for less motion, the logos sit on lines, once, under the title. */
.pm-brands { --pm-brand-w: 8.5rem; --pm-brand-h: 3rem; --pm-brand-room: 2.6rem;
             position: relative; width: 100%; max-width: 60rem; margin: 4.5rem auto 0; }
.pm-brands__title { margin: 0 0 1.2rem; text-align: center; font-family: var(--pm-font-sidewall, inherit); font-size: 1.35rem;
                    font-weight: 700; color: var(--pm-brand-ink, #1c1f24); }
.pm-brands__track { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.4rem var(--pm-brand-room);
                    margin: 0; padding: 0; list-style: none; }

/* Every logo in the same box, whatever its shape: wide wordmarks and stacked ones look the same size */
.pm-brands__brand { display: flex; align-items: center; justify-content: center; width: var(--pm-brand-w); height: var(--pm-brand-h);
                    border-radius: 8px; }
.pm-brands__brand img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.pm-brands__brand:focus-visible { outline: 2px solid var(--pm-brand-blue, #1a73e8); outline-offset: -2px; }

/* The running line: faded at both edges; each logo carries its room on its right, so the two
   halves are exactly the same width and the seam never shows */
.pm-brands--line { overflow: hidden; padding: .6rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.pm-brands--line .pm-brands__track { flex-wrap: nowrap; justify-content: flex-start; gap: 0; width: max-content;
  animation: pm-brands-run var(--pm-brands-run, 80s) linear infinite; will-change: transform; }
.pm-brands--line .pm-brands__track > li { flex: none; padding-right: var(--pm-brand-room); }
.pm-brands--line:hover .pm-brands__track,
.pm-brands--line:focus-within .pm-brands__track { animation-play-state: paused; }

/* Left to right: the line starts shifted by its first half and slides back to its place */
@keyframes pm-brands-run {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

@media (max-width: 720px) {
  .pm-brands { --pm-brand-w: 6.5rem; --pm-brand-h: 2.4rem; --pm-brand-room: 1.8rem; margin-top: 3rem; }
}
