/*
 * Velocity Scrolling Header — public styles.
 * Seamless CSS-only marquee. The content is duplicated in markup,
 * and we translate the track by -50% so the second copy aligns perfectly
 * with where the first one started, giving an infinite loop.
 */

.vsh-banner {
    width: 100%;
    overflow: hidden;
    position: relative;
    line-height: 1.4;
    padding: 0.6em 0;
    box-sizing: border-box;
}

.vsh-banner__track {
    display: inline-flex;
    flex-wrap: nowrap;
    white-space: nowrap;
    will-change: transform;
    animation-name: vsh-scroll;
    animation-duration: 20s;          /* overridden inline */
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.vsh-banner__item {
    display: inline-block;
    padding: 0 2.5em;        /* gap between repetitions */
    flex: 0 0 auto;
}

.vsh-banner__item a {
    color: inherit;
    text-decoration: underline;
}

@keyframes vsh-scroll {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-50%, 0, 0); }
}

/* Pause on hover for readability. */
.vsh-banner:hover .vsh-banner__track {
    animation-play-state: paused;
}

/* Respect users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
    .vsh-banner__track {
        animation: none;
        transform: none;
        white-space: normal;
        display: block;
        text-align: center;
    }
    .vsh-banner__item:nth-child(2) {
        display: none;  /* hide the duplicate */
    }
}
