/*
 * Universal Plywood — Homepage Discover Our Brands carousel
 * v1.2.04
 * Figma-style horizontal photographic cards with per-brand images, hover story
 * panels, smooth scrolling and direct links to dedicated Brand pages.
 */

html body.home .up-home-brands-strip {
    --up-brand-card-gap: 22px;
    --up-brand-card-width: clamp(220px, 19vw, 286px);
    /* Keep the text aligned to the centred shell, while the carousel itself
       continues all the way to the right edge of the section. */
    --up-brand-edge-gutter: max(6.25vw, calc((100vw - 1350px) / 2));
    background: #f7f5f1;
    color: #2d2a26;
    padding: 94px 0 76px;
    box-sizing: border-box;
    overflow: hidden;
}

html body.home .up-home-brands-strip__shell {
    width: min(1350px, calc(100% - 12.5vw));
    margin: 0 auto;
    padding: 0 !important;
}

html body.home .up-home-brands-strip__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 455px);
    column-gap: clamp(64px, 8vw, 120px);
    align-items: start;
}

html body.home .up-home-brands-strip__kicker {
    margin: 0 0 28px !important;
    color: #2d2a26 !important;
    font-family: Inter, sans-serif !important;
    font-size: 11px !important;
    line-height: 1 !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
    text-transform: lowercase;
}

html body.home .up-home-brands-strip__heading h2 {
    margin: 0 !important;
    color: #2d2a26 !important;
    font-family: Inter, sans-serif !important;
    font-size: 32px !important;
    line-height: 1.05 !important;
    font-weight: 400 !important;
    letter-spacing: -0.02em !important;
    text-transform: lowercase;
}

html body.home .up-home-brands-strip__copy {
    padding-top: 40px;
}

html body.home .up-home-brands-strip__copy p {
    margin: 0 0 28px !important;
    max-width: 440px;
    color: #2d2a26 !important;
    font-family: Inter, sans-serif !important;
    font-size: 13px !important;
    line-height: 1.38 !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
}

html body.home .up-home-brands-strip__link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 14px !important;
    color: #2d2a26 !important;
    font-family: Inter, sans-serif !important;
    font-size: 13px !important;
    line-height: 1 !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    text-transform: lowercase;
    transition: color .25s ease;
}

html body.home .up-home-brands-strip__link:hover,
html body.home .up-home-brands-strip__link:focus-visible {
    color: #62a744 !important;
}

html body.home .up-home-brands-strip__viewport {
    margin-top: 70px;
    width: calc(100% + var(--up-brand-edge-gutter));
    max-width: none;
    margin-right: calc(-1 * var(--up-brand-edge-gutter));
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    overscroll-behavior-inline: contain;
    cursor: grab;
    touch-action: pan-x pan-y;
    /* A little extra breathing room keeps hover transforms from clipping. */
    padding: 4px 0 8px;
}

html body.home .up-home-brands-strip__viewport::-webkit-scrollbar {
    display: none;
}

html body.home .up-home-brands-strip__viewport.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
    user-select: none;
}

html body.home .up-home-brands-strip__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: var(--up-brand-card-width);
    gap: var(--up-brand-card-gap);
    width: max-content;
    min-width: 100%;
    padding-right: 2px;
}

html body.home .up-home-brands-strip__card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 0.80;
    overflow: hidden;
    background: #d8d2ca;
    color: #fff !important;
    text-decoration: none !important;
    scroll-snap-align: start;
    isolation: isolate;
    outline: 0;
    transform: translateZ(0);
}

html body.home .up-home-brands-strip__card-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .7s cubic-bezier(.2,.68,.23,1), filter .5s ease;
    z-index: -3;
}

html body.home .up-home-brands-strip__card-shade {
    position: absolute;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(20,18,15,.02) 35%, rgba(20,18,15,.10) 54%, rgba(20,18,15,.70) 100%);
    transition: background .45s ease;
}

html body.home .up-home-brands-strip__card-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px 20px 18px;
    box-sizing: border-box;
}

html body.home .up-home-brands-strip__brand-mark {
    display: flex;
    min-height: 36px;
    align-items: flex-end;
    justify-content: flex-start;
    transform: translateY(0);
    transition: transform .45s cubic-bezier(.2,.68,.23,1), opacity .35s ease;
}

html body.home .up-home-brands-strip__brand-mark img {
    display: block;
    width: auto;
    height: auto;
    max-width: 128px;
    max-height: 42px;
    object-fit: contain;
    object-position: left bottom;
    filter: brightness(0) invert(1);
}

html body.home .up-home-brands-strip__brand-name {
    color: #fff !important;
    font-family: Inter, sans-serif !important;
    font-size: 17px !important;
    line-height: 1 !important;
    font-weight: 500 !important;
    text-transform: lowercase;
}

html body.home .up-home-brands-strip__hover-panel {
    display: block;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(18px);
    transition:
        max-height .55s cubic-bezier(.2,.68,.23,1),
        opacity .32s ease .03s,
        transform .45s cubic-bezier(.2,.68,.23,1);
}

html body.home .up-home-brands-strip__hover-title,
html body.home .up-home-brands-strip__hover-copy,
html body.home .up-home-brands-strip__hover-link {
    display: block;
    color: #fff !important;
    font-family: Inter, sans-serif !important;
}

html body.home .up-home-brands-strip__hover-title {
    margin-top: 16px;
    font-size: 15px !important;
    line-height: 1.1 !important;
    font-weight: 500 !important;
    text-transform: lowercase;
}

html body.home .up-home-brands-strip__hover-copy {
    margin-top: 10px;
    font-size: 12px !important;
    line-height: 1.42 !important;
    font-weight: 400 !important;
    opacity: .94;
}

html body.home .up-home-brands-strip__hover-link {
    margin-top: 15px;
    font-size: 12px !important;
    line-height: 1 !important;
    font-weight: 400 !important;
    text-transform: lowercase;
}

html body.home .up-home-brands-strip__card:hover .up-home-brands-strip__card-image,
html body.home .up-home-brands-strip__card:focus-visible .up-home-brands-strip__card-image {
    transform: scale(1.055);
    filter: saturate(.9) contrast(1.02);
}

html body.home .up-home-brands-strip__card:hover .up-home-brands-strip__card-shade,
html body.home .up-home-brands-strip__card:focus-visible .up-home-brands-strip__card-shade {
    background:
        linear-gradient(180deg, rgba(20,18,15,.08) 18%, rgba(20,18,15,.42) 54%, rgba(20,18,15,.90) 100%);
}

html body.home .up-home-brands-strip__card:hover .up-home-brands-strip__brand-mark,
html body.home .up-home-brands-strip__card:focus-visible .up-home-brands-strip__brand-mark {
    transform: translateY(-2px);
}

html body.home .up-home-brands-strip__card:hover .up-home-brands-strip__hover-panel,
html body.home .up-home-brands-strip__card:focus-visible .up-home-brands-strip__hover-panel {
    max-height: 210px;
    opacity: 1;
    transform: translateY(0);
}

html body.home .up-home-brands-strip__card:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.95);
}

html body.home .up-home-brands-strip__controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    margin-top: 24px;
}

html body.home .up-home-brands-strip__control {
    appearance: none;
    -webkit-appearance: none;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #2d2a26 !important;
    width: 34px;
    height: 34px;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: Inter, sans-serif !important;
    font-size: 17px !important;
    line-height: 1 !important;
    font-weight: 400 !important;
    cursor: pointer;
    transition: opacity .2s ease, transform .2s ease, color .2s ease;
}

html body.home .up-home-brands-strip__control:hover,
html body.home .up-home-brands-strip__control:focus-visible {
    color: #62a744 !important;
    transform: translateX(1px);
}

html body.home .up-home-brands-strip__control--prev:hover,
html body.home .up-home-brands-strip__control--prev:focus-visible {
    transform: translateX(-1px);
}

html body.home .up-home-brands-strip__control:disabled {
    opacity: .22;
    cursor: default;
    transform: none !important;
}

html body.home .up-home-brands-strip__empty {
    display: block;
    margin-top: 58px;
    font-family: Inter, sans-serif;
    font-size: 13px;
    line-height: 1.4;
}

@media (max-width: 1100px) {
    html body.home .up-home-brands-strip {
        --up-brand-card-width: clamp(220px, 28vw, 275px);
        --up-brand-edge-gutter: 48px;
        padding: 78px 0 70px;
    }
    html body.home .up-home-brands-strip__shell {
        width: calc(100% - 96px);
    }
    html body.home .up-home-brands-strip__top {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
        gap: 68px;
    }
    html body.home .up-home-brands-strip__viewport {
        margin-top: 60px;
    }
}

@media (max-width: 767px) {
    html body.home .up-home-brands-strip {
        --up-brand-card-gap: 14px;
        --up-brand-card-width: min(72vw, 280px);
        --up-brand-edge-gutter: 24px;
        padding: 58px 0 54px;
    }
    html body.home .up-home-brands-strip__shell {
        width: calc(100% - 48px);
    }
    html body.home .up-home-brands-strip__top {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    html body.home .up-home-brands-strip__kicker {
        margin-bottom: 20px !important;
    }
    html body.home .up-home-brands-strip__heading h2 {
        font-size: 28px !important;
    }
    html body.home .up-home-brands-strip__copy {
        padding-top: 0;
    }
    html body.home .up-home-brands-strip__copy p {
        max-width: 360px;
        margin-bottom: 24px !important;
    }
    html body.home .up-home-brands-strip__viewport {
        margin-top: 44px;
        padding-right: 24px;
        scroll-snap-type: x mandatory;
    }
    html body.home .up-home-brands-strip__card-content {
        padding: 20px 17px 16px;
    }
    html body.home .up-home-brands-strip__hover-copy {
        font-size: 11px !important;
    }
    html body.home .up-home-brands-strip__controls {
        margin-top: 17px;
    }
}

@media (hover: none) {
    html body.home .up-home-brands-strip__card:hover .up-home-brands-strip__hover-panel {
        max-height: 0;
        opacity: 0;
        transform: translateY(18px);
    }
    html body.home .up-home-brands-strip__card:hover .up-home-brands-strip__card-image {
        transform: none;
        filter: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html body.home .up-home-brands-strip__viewport {
        scroll-behavior: auto;
    }
    html body.home .up-home-brands-strip__card-image,
    html body.home .up-home-brands-strip__card-shade,
    html body.home .up-home-brands-strip__brand-mark,
    html body.home .up-home-brands-strip__hover-panel,
    html body.home .up-home-brands-strip__control {
        transition: none !important;
    }
}
