/* ==========================================================================
   Logos block (site/blocks/_logos.php).

   Linked by site/pages/show.php only on a page that draws the block
   (Blocks, its `css`), after blocks.css, whose tokens it uses.
   ========================================================================== */

.logos { list-style: none; margin: 0; padding: 0; }
.logos--row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--space-3) var(--space-5); }
.logos--grid { display: grid; grid-template-columns: repeat(var(--logo-cols, 5), minmax(0, 1fr)); gap: var(--space-2); align-items: center; }
.logos--cols-3 { --logo-cols: 3; }
.logos--cols-4 { --logo-cols: 4; }
.logos--cols-6 { --logo-cols: 6; }
.logo-item { display: grid; place-items: center; min-height: 64px; }
.logos--carousel .logo-item { width: 180px; min-height: 96px; }
.logo-link { display: grid; place-items: center; width: 100%; height: 100%; }
.logo-image { max-height: 56px; width: auto; max-width: 160px; object-fit: contain; transition: filter .3s, opacity .3s; }
.logo-name { font-family: var(--font-display); font-size: var(--t-lg); color: var(--muted); text-align: center; }
.logos--grey .logo-image { filter: grayscale(1); opacity: .7; }
.logos--grey :is(.logo-link:hover, .logo-link:focus-visible) .logo-image { filter: none; opacity: 1; }
.variant-boxed .logo-item { padding: var(--space-2); border: 1px solid var(--line); border-radius: var(--corner, 0); background: var(--bg); min-height: 96px; }
.variant-boxed .logos--row .logo-item { min-width: 160px; }
@media (max-width: 900px) { .logos--grid { --logo-cols: 3; } }
@media (max-width: 480px) { .logos--grid { --logo-cols: 2; } .logos--row { gap: var(--space-3); } }

/* Logos in white, for a dark band: each drawn in white in its own shape. */
.logos--white .logo-image { filter: brightness(0) invert(1); opacity: .82; transition: opacity .3s; }
.logos--white :is(.logo-link:hover, .logo-link:focus-visible) .logo-image { opacity: 1; }
.logos--white .logo-name { color: inherit; opacity: .82; }
/* One logo in white (a dark one on a dark band), the others in their colours. */
.logo-item--white .logo-image,
.logos--grey .logo-item--white .logo-image { filter: brightness(0) invert(1); opacity: .9; }

/* A strip moving right to left without end: the logos twice over, side by
   side, each half sliding its own width, so the second takes the first's
   place as it leaves. The edges fade. Pointed at or focused, it waits; with
   less motion asked for, it stands still and can be scrolled by hand. */
/* A slim band: less room above and below than a section. */
.block-logos--marquee { padding-block: clamp(1.75rem, 1rem + 2.5vw, 3rem); }
.block-logos--marquee .block-head { margin-bottom: var(--space-2); }
.logos-marquee {
    display: flex; overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
            mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}
.logos--marquee {
    display: flex; flex: none; align-items: center; gap: clamp(2.5rem, 5vw, 5rem);
    padding-inline-end: clamp(2.5rem, 5vw, 5rem);
    animation: logos-marquee var(--logos-time, 40s) linear infinite;
}
.logos-marquee:is(:hover, :focus-within) .logos--marquee { animation-play-state: paused; }
@keyframes logos-marquee { to { transform: translateX(-100%); } }
.logos--marquee .logo-item { flex: none; min-height: 72px; }
.logos--marquee .logo-image { max-height: 46px; max-width: 170px; }
.logos--marquee .logo-name { font-size: var(--t-base); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; color: var(--text-2); }
@media (max-width: 600px) {
    .logos--marquee .logo-item { min-height: 60px; }
    .logos--marquee .logo-image { max-height: 40px; max-width: 140px; }
}
@media (prefers-reduced-motion: reduce) {
    .logos-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
    .logos--marquee { animation: none; }
    .logos--marquee[aria-hidden="true"] { display: none; }
}