:root {
    --color-text: #FE6B02;
    --color-bg: #fff;
    --color-bg-accent: #FE6B02;
    --size: clamp(6rem, 1rem + 20vmin, 14rem);
    --gap: calc(var(--size) / 10);
    --duration: 60s;
    --scroll-start: 0;
    --scroll-end: calc(-100% - var(--gap));
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-text: papayawhip;
        --color-bg: #fff;
        --color-bg-accent: #FE6B02;
    }
}

.logo-partners {
    display: grid;
    align-content: center;
    overflow: hidden;
    gap: var(--gap);
    width: 100%;
    padding: 20px 0;
    font-family: system-ui, sans-serif;
    font-size: 0.5rem;
    line-height: 1.5;
    color: var(--color-text);
    background-color: var(--color-bg);
}

.marquee {
    display: flex;
    overflow: hidden;
    user-select: none;
    gap: var(--gap);
    mask-image: linear-gradient(
        var(--mask-direction, to right),
        hsl(0 0% 0% / 0),
        hsl(0 0% 0% / 1) 20%,
        hsl(0 0% 0% / 1) 80%,
        hsl(0 0% 0% / 0)
    );
}

.marquee__group {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: var(--gap);
    min-width: 100%;
    animation: scroll-x var(--duration) linear infinite;
}

@media (prefers-reduced-motion: reduce) {
    .marquee__group {
        animation-play-state: paused;
    }
}

.marquee--reverse .marquee__group {
    animation-direction: reverse;
    animation-delay: -3s;
}

@keyframes scroll-x {
    from {
        transform: translateX(var(--scroll-start));
    }
    to {
        transform: translateX(var(--scroll-end));
    }
}

/* Logo tiles */
.marquee svg {
    display: block;
    width: var(--size);
    fill: #000;
    background: #fff;
    aspect-ratio: 16 / 9;
    padding: calc(var(--size) / 10);
    border-radius: 0.5rem;
    border: 2px solid #e5e5e5;
    flex-shrink: 0;
}

/* Parent wrapper */
.wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    margin: auto;
    max-width: 100vw;
    overflow: hidden;
}

/* ============================================================
   BREAKPOINTS
   ============================================================ */

@media (max-width: 768px) {
    :root {
        --size: clamp(5rem, 1rem + 18vmin, 10rem);
        --duration: 40s;
    }
}

@media (max-width: 480px) {
    :root {
        --size: clamp(4rem, 1rem + 22vmin, 8rem);
        --duration: 30s;
    }
}