/* ==========================================================================
   LUX&GO — Home / How It Works + Membership CTA
   ========================================================================== */

.home-how {
    padding-block: clamp(52px, 4.2vw, 66px);
    background-color: var(--color-off-white);
    /* Followed by the dark footer — no stray divider before that cut. */
    border-bottom: none;
}

/* Process flow and CTA share one row, split by a hairline divider. */
.home-how__inner {
    display: grid;
    grid-template-columns: minmax(0, 3fr) 1px minmax(240px, 1fr);
    column-gap: clamp(32px, 3.4vw, 56px);
}

/* Process ---------------------------------------------------------------- */

.home-how__eyebrow {
    font-family: var(--font-body);
    font-weight: var(--fw-semibold);
    font-size: clamp(0.6875rem, 0.65rem + 0.1vw, 0.8125rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-lux-blue);
}

.home-how__title {
    margin-top: clamp(8px, 0.8vw, 12px);
    font-family: var(--font-heading);
    font-weight: var(--fw-semibold);
    font-size: clamp(1.75rem, 1.5rem + 0.7vw, 2.25rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: var(--color-text);
}

.home-how__steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(20px, 2vw, 36px);
    margin-top: clamp(32px, 2.8vw, 44px);
}

.home-how__step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
}

.home-how__step-icon img {
    width: 20px;
    height: 20px;
}

.home-how__marker {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: clamp(12px, 1.1vw, 16px);
}

.home-how__number {
    font-family: var(--font-body);
    font-weight: var(--fw-medium);
    font-size: clamp(1rem, 0.94rem + 0.15vw, 1.25rem);
    color: var(--color-lux-blue);
}

.home-how__connector {
    flex: 1;
    height: 1px;
    background-color: var(--color-border);
}

.home-how__step-title {
    margin-top: clamp(10px, 0.9vw, 14px);
    font-family: var(--font-heading);
    font-weight: var(--fw-semibold);
    font-size: clamp(0.9375rem, 0.9rem + 0.15vw, 1.125rem);
    text-transform: uppercase;
    color: var(--color-text);
}

.home-how__step-copy {
    max-width: 240px;
    margin-top: 6px;
    font-family: var(--font-body);
    font-weight: var(--fw-regular);
    font-size: clamp(0.75rem, 0.72rem + 0.1vw, 0.875rem);
    line-height: 1.55;
    color: var(--color-text-muted);
}

/* Divider ------------------------------------------------------------------- */

.home-how__divider {
    background-color: var(--color-border);
}

/* CTA ----------------------------------------------------------------------- */

.home-how__cta {
    align-self: center;
}

.home-how__cta-title {
    font-family: var(--font-heading);
    font-weight: var(--fw-semibold);
    font-size: clamp(1rem, 0.94rem + 0.2vw, 1.25rem);
    line-height: 1.25;
    text-transform: uppercase;
    color: var(--color-text);
}

.home-how__cta-title-line {
    display: block;
}

.home-how__cta-copy {
    margin-top: 10px;
    font-family: var(--font-body);
    font-weight: var(--fw-regular);
    font-size: clamp(0.75rem, 0.72rem + 0.1vw, 0.875rem);
    line-height: 1.55;
    color: var(--color-text-muted);
}

.home-how__cta-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: clamp(42px, 3vw, 46px);
    padding-inline: clamp(18px, 1.5vw, 24px);
    margin-top: clamp(16px, 1.4vw, 22px);
    border-radius: var(--radius-sm);
    background-color: var(--color-lux-blue);
    color: var(--color-white);
    font-family: var(--font-body);
    font-weight: var(--fw-semibold);
    font-size: clamp(0.8125rem, 0.78rem + 0.1vw, 0.875rem);
    white-space: nowrap;
    transition: background-color var(--transition-base), transform var(--transition-base);
}

.home-how__cta-link:hover {
    background-color: var(--color-lux-blue-strong);
    transform: translateY(-1px);
}

.home-how__cta-link:active {
    transform: translateY(1px);
}

.home-how__cta-link:focus-visible {
    outline: 2px solid var(--color-obsidian);
    outline-offset: 3px;
}

.home-how__cta-link-icon {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-base);
}

.home-how__cta-link:hover .home-how__cta-link-icon {
    transform: translateX(2px);
}

@media (prefers-reduced-motion: reduce) {
    .home-how__cta-link,
    .home-how__cta-link-icon {
        transition: none;
    }

    .home-how__cta-link:hover,
    .home-how__cta-link:active,
    .home-how__cta-link:hover .home-how__cta-link-icon {
        transform: none;
    }
}

/* Tablet and mobile ------------------------------------------------------------- */

/*
   The horizontal process becomes a vertical timeline: the icon and the rule that
   joins it to the next step sit in a left rail, the number and copy to its right.
   The last step ships no connector, so the rail ends where it should.
*/
@media (max-width: 1023px) {
    .home-how {
        padding-block: clamp(48px, 10vw, 64px);
    }

    .home-how__inner {
        grid-template-columns: minmax(0, 1fr);
        row-gap: clamp(30px, 4.5vw, 44px);
    }

    .home-how__divider {
        display: none;
    }

    .home-how__steps {
        grid-template-columns: minmax(0, 1fr);
        margin-top: clamp(26px, 4vw, 36px);
    }

    .home-how__step {
        --step-gap: clamp(22px, 3.4vw, 30px);

        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        column-gap: clamp(14px, 2.4vw, 20px);
        padding-bottom: var(--step-gap);
    }

    .home-how__step:last-child {
        padding-bottom: 0;
    }

    .home-how__step-icon {
        grid-column: 1;
        grid-row: 1;
    }

    /* Lets the number and the connector be placed independently. */
    .home-how__marker {
        display: contents;
    }

    .home-how__number {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
    }

    /*
       Stretched rather than sized: a percentage height against an auto grid area
       resolves to nothing. The negative bottom margin carries the rule across the
       step gap so it meets the next icon.
    */
    .home-how__connector {
        grid-column: 1;
        /* span, not -1: the rows here are implicit, so a negative line has
           nothing to resolve against and the rule would collapse to one row. */
        grid-row: 2 / span 2;
        width: 1px;
        height: auto;
        align-self: stretch;
        justify-self: center;
        margin-top: 10px;
        margin-bottom: calc(-1 * var(--step-gap));
    }

    .home-how__step-title {
        grid-column: 2;
        grid-row: 2;
        margin-top: clamp(10px, 1.6vw, 14px);
    }

    .home-how__step-copy {
        grid-column: 2;
        grid-row: 3;
        max-width: 420px;
    }

    .home-how__cta {
        align-self: start;
    }

    .home-how__cta-link {
        height: 46px;
    }
}

@media (max-width: 767px) {
    .home-how__title {
        font-size: clamp(1.5rem, 1.3rem + 1vw, 1.875rem);
    }
}
