/* ==========================================================================
   LUX&GO — Home / For Business. For Family. For Life.
   ========================================================================== */

.home-use-cases {
    padding-block: clamp(70px, 6vw, 90px);
    background-color: var(--color-white);
    /* Followed by dark Premium Mobility — no stray divider before that cut. */
    border-bottom: none;
}

/* Header ---------------------------------------------------------------- */

.home-use-cases__header {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns), 1fr);
    column-gap: var(--grid-gap);
    align-items: end;
    margin-bottom: clamp(36px, 3.2vw, 52px);
}

.home-use-cases__intro-heading {
    grid-column: 1 / 8;
}

.home-use-cases__eyebrow {
    margin-bottom: clamp(14px, 1.2vw, 20px);
}

.home-use-cases__title {
    font-family: var(--font-heading);
    font-weight: var(--fw-medium);
    font-size: clamp(2.375rem, 2rem + 0.9vw, 2.875rem);
    line-height: 1.08;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: var(--color-text);
}

.home-use-cases__title-line {
    display: block;
}

.home-use-cases__description {
    grid-column: 9 / 13;
    max-width: 360px;
    font-family: var(--font-body);
    font-weight: var(--fw-regular);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    color: var(--color-text-muted);
}

/* Cards ------------------------------------------------------------------- */

/* Three fixed tracks: the third card can never wrap to a second row. */
.home-use-cases__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(20px, 1.8vw, 28px);
}

.home-use-case {
    min-width: 0;
}

.home-use-case__media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-sm);
    /* Dark so the overlay text stays legible before a photo is added. */
    background-color: var(--color-graphite);
}

/* Scrim that keeps the overlay readable over any photograph. */
.home-use-case__media::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to top,
        rgba(9, 10, 12, 0.88) 0%,
        rgba(9, 10, 12, 0.45) 34%,
        rgba(9, 10, 12, 0) 64%
    );
    pointer-events: none;
}

.home-use-case__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms ease;
}

.home-use-case__media:hover .home-use-case__image {
    transform: scale(1.02);
}

/* Overlay ------------------------------------------------------------------- */

.home-use-case__overlay {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 0;
    left: 0;
    padding: clamp(18px, 1.6vw, 26px);
}

.home-use-case__accent {
    display: block;
    width: 34px;
    height: 2px;
    background-color: var(--color-lux-blue);
}

.home-use-case__label {
    margin-top: clamp(10px, 0.9vw, 14px);
    font-family: var(--font-heading);
    font-weight: var(--fw-medium);
    font-size: clamp(1.375rem, 1.2rem + 0.5vw, 1.75rem);
    line-height: 1.1;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: var(--color-white);
}

.home-use-case__copy {
    margin-top: 8px;
    font-family: var(--font-body);
    font-weight: var(--fw-regular);
    font-size: clamp(0.8125rem, 0.78rem + 0.1vw, 0.9375rem);
    line-height: 1.5;
    color: var(--color-off-white);
}

.home-use-case__copy-line {
    display: block;
}

@media (prefers-reduced-motion: reduce) {
    .home-use-case__image {
        transition: none;
    }

    .home-use-case__media:hover .home-use-case__image {
        transform: none;
    }
}

/* Tablet and mobile ------------------------------------------------------------- */

/*
   Three tracks would leave each card too small to read below 1024px, so the row
   becomes a native scroll-snap rail — no slider script, no library. The rail
   bleeds to the viewport edges so a card can sit flush while scrolling.
*/
@media (max-width: 1023px) {
    .home-use-cases__header {
        grid-template-columns: minmax(0, 1fr);
        row-gap: clamp(16px, 2.4vw, 24px);
    }

    .home-use-cases__intro-heading,
    .home-use-cases__description {
        grid-column: 1 / -1;
    }

    .home-use-cases__description {
        max-width: 520px;
    }

    .home-use-cases__grid {
        display: flex;
        gap: clamp(14px, 2vw, 20px);
        margin-inline: calc(-1 * var(--page-gutter));
        padding-inline: var(--page-gutter);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: var(--page-gutter);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    /* Hidden visually only — the rail stays keyboard and pointer scrollable. */
    .home-use-cases__grid::-webkit-scrollbar {
        display: none;
    }

    .home-use-case {
        flex: 0 0 56vw;
        scroll-snap-align: start;
    }

    .home-use-case__media {
        aspect-ratio: auto;
        height: clamp(360px, 46vw, 460px);
    }
}

@media (max-width: 767px) {
    .home-use-cases {
        padding-block: clamp(48px, 12vw, 64px);
    }

    .home-use-cases__title {
        font-size: clamp(1.875rem, 1.6rem + 1.2vw, 2.375rem);
    }

    /* One card dominant, the next just visible as a swipe affordance. */
    .home-use-case {
        flex: 0 0 84vw;
    }

    .home-use-case__media {
        height: clamp(420px, 62vh, 520px);
    }
}
