/* =========================================================
   N-FLUX — HOW IT WORKS
========================================================= */

.how-it-works-section {

    position: relative;

    padding:
        var(--section-space-lg)
        0;

    overflow: hidden;

    background: var(--surface-soft);

}


/* =========================================================
   BACKGROUND
========================================================= */

.how-it-works-section::before {

    content: "";

    position: absolute;

    width: 420px;

    height: 420px;

    top: -250px;

    left: -180px;

    border-radius: 50%;

    background:
        rgba(22,141,226,.045);

    pointer-events: none;

}


.how-it-works-section::after {

    content: "";

    position: absolute;

    width: 300px;

    height: 300px;

    right: -170px;

    bottom: -180px;

    border-radius: 50%;

    background:
        rgba(53,168,83,.035);

    pointer-events: none;

}


/* =========================================================
   HEADER
========================================================= */

.how-it-works-header {

    position: relative;

    z-index: 2;

    max-width: 700px;

    margin:
        0 auto 48px;

    text-align: center;

}


.how-it-works-header
.section-eyebrow {

    justify-content: center;

}


.how-it-works-description {

    max-width: 570px;

    margin:
        0 auto;

    color: var(--text-muted);

    font-size: .88rem;

    line-height: 1.75;

}


/* =========================================================
   PROCESS
========================================================= */

.how-it-works-process {

    position: relative;

    z-index: 2;

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 0;

}


/* =========================================================
   CONNECTING LINE
========================================================= */

.how-it-works-process::before {

    content: "";

    position: absolute;

    top: 42px;

    left: 12%;

    right: 12%;

    height: 1px;

    background:
        var(--border);

    z-index: -1;

}


/* =========================================================
   STEP
========================================================= */

.process-step {

    position: relative;

    display: flex;

    flex-direction: column;

    align-items: center;

    padding:
        0 16px;

    text-align: center;

}


/* =========================================================
   STEP NUMBER
========================================================= */

.process-number {

    position: absolute;

    top: -8px;

    right: 23%;

    color:
        var(--primary);

    font-size: .85rem;

    font-weight: 850;

    letter-spacing: .04em;

}


/* =========================================================
   ICON
========================================================= */

.process-icon {

    position: relative;

    width: 84px;

    height: 84px;

    display: grid;

    place-items: center;

    margin-bottom: 24px;

    border:
        1px solid var(--border);

    border-radius: 26px;

    background:
        var(--surface);

    color:
        var(--primary);

    font-size: 1.35rem;

    box-shadow:
        var(--shadow-sm);

    transition:
        transform var(--transition),
        background var(--transition),
        color var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);

}


.process-icon::after {

    content: "";

    position: absolute;

    inset: -6px;

    border:
        1px solid
        rgba(22,141,226,.10);

    border-radius: 31px;

    opacity: 0;

    transform: scale(.9);

    transition:
        opacity var(--transition),
        transform var(--transition);

}


.process-step:hover
.process-icon {

    transform:
        translateY(-5px);

    background:
        var(--primary);

    color: #fff;

    border-color:
        var(--primary);

    box-shadow:
        0 12px 28px
        rgba(11,59,130,.16);

}


.process-step:hover
.process-icon::after {

    opacity: 1;

    transform: scale(1);

}


/* =========================================================
   STEP CONTENT
========================================================= */

.process-category {

    margin-bottom: 6px;

    color:
        var(--accent);

    font-size: .59rem;

    font-weight: 850;

    letter-spacing: .09em;

    text-transform: uppercase;

}


.process-title {

    margin:
        0 0 9px;

    color:
        var(--text);

    font-size: .94rem;

    font-weight: 800;

    line-height: 1.3;

    letter-spacing: -.02em;

}


.process-description {

    max-width: 205px;

    margin: 0;

    color:
        var(--text-muted);

    font-size: .67rem;

    line-height: 1.7;

    display: contents;

}


/* =========================================================
   BOTTOM MESSAGE
========================================================= */

.how-it-works-note {

    position: relative;

    z-index: 2;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 9px;

    width: fit-content;

    margin:
        43px auto 0;

    padding:
        10px 15px;

    border:
        1px solid var(--border);

    border-radius:
        var(--radius-pill);

    background:
        var(--surface);

    color:
        var(--text-soft);

    font-size: .8rem;

    font-weight: 700;

    box-shadow:
        var(--shadow-sm);

}


.how-it-works-note i {

    color:
        var(--accent);

    font-size: .76rem;

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .how-it-works-section {

        padding:
            var(--section-space)
            0;

    }


    .how-it-works-header {

        margin-bottom: 30px;

    }


    .how-it-works-description {

        font-size: .82rem;

        line-height: 1.7;

    }


    /* -----------------------------------------------
       MOBILE TIMELINE
    ------------------------------------------------ */

    .how-it-works-process {

        display: flex;

        flex-direction: column;

        gap: 0;

        padding-left: 8px;

    }


    .how-it-works-process::before {

        top: 35px;

        bottom: 35px;

        left: 34px;

        right: auto;

        width: 1px;

        height: auto;

    }


    .process-step {

        display: grid;

        grid-template-columns: 68px 1fr;

        align-items: start;

        gap: 16px;

        min-height: 128px;

        padding:
            0 0 22px;

        text-align: left;

    }


    .process-number {

        top: 19px;
        right: auto;
        left: -20px;
        font-size: .8rem;

    }


    .process-icon {

        width: 60px;

        height: 60px;

        margin: 0;

        border-radius: 19px;

        font-size: 1rem;

    }


    .process-icon::after {

        border-radius: 24px;

    }


    .process-category {

        margin-top: 3px;

        margin-bottom: 5px;

        font-size: .56rem;

    }


    .process-title {

        margin-bottom: 6px;

        font-size: .91rem;

    }


    .process-description {

        max-width: 100%;

        font-size: .8rem;

        line-height: 1.65;

    }


    .how-it-works-note {

        width: 100%;

        margin-top: 8px;

        text-align: center;

        line-height: 1.5;

    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .process-step {

        grid-template-columns:
            60px 1fr;

        gap: 13px;

    }


    .process-icon {

        width: 55px;

        height: 55px;

    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .process-icon,
    .process-icon::after {

        transition: none;

    }

}