* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --marquee-gap: clamp(10px, 2vw, 20px);
    --marquee-speed: 90s;
    --marquee-height: clamp(140px, 18vw, 260px);
}

.marquee {
    width: 100%;
    overflow: hidden;
    margin-top: 160px;
    margin-bottom: 160px;
}

.marquee__viewport {
    overflow: hidden;
    transform: translateZ(0);
}

.marquee__track {
    display: flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    will-change: transform;
    animation: marquee var(--marquee-speed) linear infinite;
}

.marquee__item {
    margin: 0;
    flex: 0 0 auto;
    height: 400px;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #111;
}

.marquee__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@keyframes marquee {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(calc(-1 * var(--marquee-shift, 0px)), 0, 0); }
}

.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track {
    animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
    .marquee__track {
        animation: none;
    }
}

@media screen and (max-width: 760px) {
    .marquee {
        margin-top: 56px;
        margin-bottom: 56px;
    }

    .marquee__item {
        height: 312px;
    }
}