/* HOSTREND — reusable trust-building customer logo marquee.
   Theme colours and motion geometry are supplied by global semantic tokens. */
.host-customer-logo-marquee {
    --host-customer-logo-marquee-bg: var(--customer-logo-marquee-background, #FFFFFF);
    --host-customer-logo-marquee-text: var(--customer-logo-marquee-text, #131B24);
    --host-customer-logo-marquee-filter: var(--customer-logo-marquee-logo-filter, brightness(0));
    --host-customer-logo-marquee-opacity: var(--customer-logo-marquee-logo-opacity, .70);
    display: block;
    position: relative;
    isolation: isolate;
    width: 100%;
    margin: 0;
    margin-block-start: calc(var(--customer-logo-marquee-overlap, 50px) * -1);
    padding-block-start: var(--customer-logo-marquee-padding-top, 6px);
    padding-block-end: var(--customer-logo-marquee-padding-bottom, 24px);
    overflow: hidden;
    background: var(--host-customer-logo-marquee-bg);
    color: var(--host-customer-logo-marquee-text);
    border: 0;
    box-shadow: none;
}

.host-customer-logo-marquee__inner {
    width: min(calc(100% - 40px), var(--container-xl, 1440px));
    margin-inline: auto;
}

.host-customer-logo-marquee__title {
    max-width: 100%;
    margin: 0 0 var(--customer-logo-marquee-title-logo-gap, var(--component-group-space, 24px));
    color: var(--host-customer-logo-marquee-text);
    font-family: var(--font-primary, "Be Vietnam Pro", sans-serif);
    font-size: clamp(15px, 1.2vw, 17px);
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: -.018em;
    text-align: center;
    text-wrap: balance;
}

.host-customer-logo-marquee__viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent 0%, #000 var(--customer-logo-marquee-edge-fade, 8%), #000 calc(100% - var(--customer-logo-marquee-edge-fade, 8%)), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 var(--customer-logo-marquee-edge-fade, 8%), #000 calc(100% - var(--customer-logo-marquee-edge-fade, 8%)), transparent 100%);
}

.host-customer-logo-marquee__track {
    display: flex;
    width: max-content;
    max-width: none;
    align-items: center;
    animation: hostCustomerLogoMarquee var(--customer-logo-marquee-duration, 42s) linear infinite;
    will-change: transform;
}

.host-customer-logo-marquee__group {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
}

.host-customer-logo-marquee__item {
    display: flex;
    flex: 0 0 var(--customer-logo-marquee-item-width, clamp(92px, 10.5vw, 136px));
    align-items: center;
    justify-content: center;
    width: var(--customer-logo-marquee-item-width, clamp(92px, 10.5vw, 136px));
    height: var(--customer-logo-marquee-item-height, 42px);
    margin-inline-end: var(--customer-logo-marquee-gap, clamp(14px, 1.7vw, 24px));
}

.host-customer-logo-marquee__logo {
    display: block;
    width: auto;
    height: auto;
    max-width: min(100%, var(--customer-logo-marquee-logo-max-width, 116px));
    max-height: var(--customer-logo-marquee-logo-height, clamp(24px, 2.4vw, 32px));
    object-fit: contain;
    object-position: center;
    opacity: var(--host-customer-logo-marquee-opacity);
    filter: var(--host-customer-logo-marquee-filter);
    user-select: none;
    -webkit-user-drag: none;
    transition: opacity 180ms ease;
    transform: none !important;
}

/* Logo marks stay in place on hover; the marquee itself never pauses. */
.host-customer-logo-marquee__item:hover .host-customer-logo-marquee__logo,
.host-customer-logo-marquee__item:focus-within .host-customer-logo-marquee__logo {
    opacity: var(--host-customer-logo-marquee-opacity);
    transform: none !important;
}

/* Continuous logo motion: pointer hover must not pause the marquee. */

@keyframes hostCustomerLogoMarquee {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-16.6666667%, 0, 0); }
}

@media (max-width: 767px) {
    .host-customer-logo-marquee {
        padding-block-start: var(--customer-logo-marquee-padding-top, 4px);
        padding-block-end: max(var(--space-24, 24px), var(--customer-logo-marquee-padding-bottom, 24px));
    }
    .host-customer-logo-marquee__inner {
        width: calc(100% - 28px);
    }
    .host-customer-logo-marquee__title {
        font-size: clamp(14px, 3.6vw, 16px);
        margin-bottom: max(var(--component-group-space-mobile, 12px), var(--space-16, 16px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .host-customer-logo-marquee__viewport {
        overflow: visible;
        mask-image: none;
        -webkit-mask-image: none;
    }
    .host-customer-logo-marquee__track {
        width: 100%;
        max-width: 100%;
        animation: none !important;
        transform: none !important;
        will-change: auto;
    }
    .host-customer-logo-marquee__group {
        flex: 1 1 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 12px;
    }
    .host-customer-logo-marquee__group[aria-hidden="true"] {
        display: none;
    }
    .host-customer-logo-marquee__item {
        flex: 0 1 112px;
        width: auto;
        height: 48px;
        margin: 0;
    }
    .host-customer-logo-marquee__logo {
        max-height: 32px;
        transition: none;
    }
    .host-customer-logo-marquee__item:hover .host-customer-logo-marquee__logo,
    .host-customer-logo-marquee__item:focus-within .host-customer-logo-marquee__logo {
        transform: none !important;
    }
}
