/*-- -------------------------- -->
<---        How It Works         -->
<--- -------------------------- -*/

@media only screen and (min-width: 0rem) {
    #how-it-works {
        padding: var(--sectionPadding);
        background-color: #fff;
        text-align: center;
    }

    #how-it-works .cs-container {
        width: 100%;
        max-width: 80rem;
        margin: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }

    #how-it-works .cs-title {
        font-family: 'Sora', sans-serif;
        font-size: clamp(1.75rem, 4vw, 2.75rem);
        font-weight: 900;
        text-transform: uppercase;
        line-height: 1.15em;
        color: #1a1a1a;
        margin: 0;
        max-width: 40rem;
    }

    #how-it-works .cs-title span {
        color: var(--primary);
    }

    /* Steps grid */
    #how-it-works .hiw-grid {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 2.5rem;
        list-style: none;
        margin: 0;
        padding: 0;
        position: relative;
    }

    /* Step item */
    #how-it-works .hiw-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
        position: relative;
    }

    /* Icon block */
    #how-it-works .hiw-icon-wrap {
        width: 5rem;
        height: 5rem;
        background-color: #1a1a1a;
        border-radius: 1rem;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        flex-shrink: 0;
        box-shadow: 0 8px 24px rgba(0,0,0,0.15);
        transform: rotate(-4deg);
    }

    #how-it-works .hiw-icon-wrap svg {
        width: 2rem;
        height: 2rem;
        stroke: #fff;
        stroke-width: 1.75;
        fill: none;
        transform: rotate(4deg);
    }

    /* Step number badge */
    #how-it-works .hiw-number {
        position: absolute;
        bottom: -0.5rem;
        right: -0.5rem;
        width: 1.5rem;
        height: 1.5rem;
        background-color: var(--primary);
        border-radius: 50%;
        font-family: 'Sora', sans-serif;
        font-size: 0.75rem;
        font-weight: 900;
        color: #fff;
        display: flex;
        justify-content: center;
        align-items: center;
        transform: rotate(4deg);
    }

    /* Text */
    #how-it-works .hiw-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    #how-it-works .hiw-heading {
        font-family: 'Sora', sans-serif;
        font-size: 1.125rem;
        font-weight: 800;
        color: #1a1a1a;
        margin: 0;
        text-transform: uppercase;
    }

    #how-it-works .hiw-text {
        font-size: 0.9375rem;
        line-height: 1.7em;
        color: #4e4b66;
        margin: 0;
        max-width: 22rem;
    }

    /* CTA */
    #how-it-works .hiw-cta {
        font-family: 'Outfit', sans-serif;
        font-size: 1rem;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        text-decoration: none;
        padding: 0.875rem 2.5rem;
        background-color: var(--primary);
        color: #fff;
        border-radius: 0.375rem;
        display: inline-block;
        transition: background-color 0.3s;
    }

    #how-it-works .hiw-cta:hover {
        background-color: var(--primaryDark);
    }
}

/* Desktop — 3 columns with arrows between */
@media only screen and (min-width: 48rem) {
    #how-it-works .hiw-grid {
        grid-template-columns: 1fr auto 1fr auto 1fr;
        align-items: start;
        gap: 0;
    }

    /* Arrow separators */
    #how-it-works .hiw-arrow {
        display: flex;
        align-items: flex-start;
        padding-top: 1.25rem;
        color: var(--primary);
    }

    #how-it-works .hiw-arrow svg {
        width: 2.5rem;
        height: 2.5rem;
        stroke: var(--primary);
        stroke-width: 2.5;
        fill: none;
    }
}

@media only screen and (max-width: 47.9rem) {
    #how-it-works .hiw-arrow {
        display: none;
    }
}
