/* =============================================================
   LOGO STRIP
   ─────────────────────────────────────────────────────────────
   Core principle: fixed-width cells with object-fit: contain
   Every logo — wide, narrow, tall, square — fits the same cell.
   Equal padding inside each cell = equal optical spacing.
   ============================================================= */

/* ── Section wrapper ─────────────────────────────────────── */
.logo-strip {
    overflow: hidden;
    padding-block: 3px;        /* vertical breathing room */
    background: #ffffff;
}

.logo-strip.section--tone-alt {
    background: var(--color-bg-alt, #f7f3ec);
}

/* ── Label ───────────────────────────────────────────────── */
.logo-strip-label {
    text-align: center;
    font-size: var(--fs-xs, 0.75rem);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-muted, #888);
    margin-bottom: var(--space-4, 1rem);
}

/* ── Inner overflow mask ─────────────────────────────────── */
.logo-strip-inner {
    overflow: hidden;
    width: 100%;
}

/* ── Track ───────────────────────────────────────────────── */
.logo-track {
    display: flex;
    align-items: center;
    width: max-content;                            /* shrink-wraps all cells */
}

/* Scroll mode: CSS animation */
.logo-strip--scroll .logo-track {
    animation: logo-scroll 32s linear infinite;
    will-change: transform;
}

/* Pause on hover */
.logo-strip--scroll:hover .logo-track {
    animation-play-state: paused;
}

/* Grid mode: wrap into rows */
.logo-strip--grid .logo-track {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-6, 1.5rem) var(--space-8, 2rem);
}

/* ── Logo cell — THE key fix ─────────────────────────────────
   Every logo lives in a fixed-width × fixed-height box.
   The image fills the box proportionally via object-fit:contain.
   Horizontal padding (--logo-cell-pad) is the "spacing" token —
   change one value, all gaps update uniformly.
   ──────────────────────────────────────────────────────────── */

:root {
    --logo-cell-max-h: 64px;
    --logo-cell-pad:   32px;  /* horizontal padding = half the gap */
}

.logo-cell {
    flex: 0 0 auto;
    padding-inline: var(--logo-cell-pad);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-cell img {
    display: block;
    width: auto;
    height: auto;
    max-height: var(--logo-cell-max-h);
    max-width: 160px;
    object-fit: contain;
    object-position: center;
    opacity: 0.7;
    transition: opacity 0.25s ease, filter 0.25s ease;
    filter: grayscale(30%);
}

/* Hover — reveal full logo */
.logo-strip:hover .logo-cell img,
.logo-cell:hover img {
    opacity: 1;
    filter: grayscale(0%);
}

/* ── Scroll animation ────────────────────────────────────── */
@keyframes logo-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }   /* -50% because items are doubled */
}

/* ── Reduced motion — freeze scroll ─────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .logo-strip--scroll .logo-track {
        animation: none;
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-4, 1rem) var(--space-6, 1.5rem);
        width: 100%;
    }
}

/* ── Mobile adjustments ──────────────────────────────────── */
@media (max-width: 767px) {
    :root {
        --logo-cell-max-h: 44px;
        --logo-cell-pad:   20px;
    }
}