/* =========================================================
   How It Works
   ========================================================= */

.how-it-works {

    position: relative;

    width: 100%;

    padding: 90px 0 100px;

    background: #05050d;

    overflow: hidden;

}


/* Subtle background glow */

.how-it-works::before {

    content: "";

    position: absolute;

    width: 500px;
    height: 500px;

    left: -250px;
    top: 100px;

    background: radial-gradient(
        circle,
        rgba(239,17,17,.12) 0%,
        rgba(239,17,17,0) 70%
    );

    pointer-events: none;

}


.how-it-works::after {

    content: "";

    position: absolute;

    width: 450px;
    height: 450px;

    right: -250px;
    bottom: -200px;

    background: radial-gradient(
        circle,
        rgba(239,17,17,.08) 0%,
        rgba(239,17,17,0) 70%
    );

    pointer-events: none;

}


/* =========================================================
   Container
   ========================================================= */

.how-it-works-container {

    position: relative;

    z-index: 2;

    width: min(1180px, calc(100% - 60px));

    margin: 0 auto;

}


/* =========================================================
   Header
   ========================================================= */

.how-it-works-header {

    max-width: 720px;

    margin: 0 auto 65px;

    text-align: center;

}


.how-it-works-eyebrow {

    display: inline-block;

    margin-bottom: 14px;

    color: #ef1111;

    font-size: 12px;

    font-weight: 700;

    letter-spacing: 3px;

}


.how-it-works-header h2 {

    margin: 0;

    color: #ffffff;

    font-size: clamp(30px, 3vw, 42px);

    font-weight: 700;

    line-height: 1.15;

}


.how-it-works-header h2 span {

    color: #ffffff;

}


.how-it-works-header p {

    max-width: 600px;

    margin: 18px auto 0;

    color: rgba(255,255,255,.55);

    font-size: 15px;

    line-height: 1.7;

}


/* =========================================================
   Steps
   ========================================================= */

.how-it-works-steps {

    position: relative;

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 25px;

}


/* Connecting line */

.how-it-works-steps::before {

    content: "";

    position: absolute;

    top: 45px;

    left: 12.5%;

    right: 12.5%;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            rgba(239,17,17,.15),
            rgba(239,17,17,.7),
            rgba(239,17,17,.15)
        );

    z-index: 0;

}


/* =========================================================
   Step Card
   ========================================================= */

.how-step {

    position: relative;

    z-index: 1;

    min-height: 275px;

    padding: 25px 25px 22px;

    display: flex;

    flex-direction: column;

    background: #ffffff;

    border: 1px solid rgba(255,255,255,.08);

    border-radius: 12px;

    text-align: left;

    overflow: hidden;

    transition:
        transform .25s ease,
        box-shadow .25s ease;

}

.how-step::before {

    content: "";

    position: absolute;

    top: 0;

    left: 0;

    width: 100%;

    height: 3px;

    background: linear-gradient(
        90deg,
        #ef1111,
        rgba(239,17,17,.15)
    );

}
.how-step-top {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 25px;

}

.how-step-label {

    color: #a0a0aa;

    font-size: 9px;

    font-weight: 700;

    letter-spacing: 2px;

}

.how-step:hover .how-step-icon {

    background: #ef1111;

    border-color: #ef1111;

    transform: translateY(-3px);

}


.how-step:hover .how-step-icon svg {

    stroke: #ffffff;

}


/* =========================================================
   Number
   ========================================================= */

.how-step-number {

    position: static;

    color: #ef1111;

    font-size: 12px;

    font-weight: 700;

    letter-spacing: 1px;

}

/* =========================================================
   Icon
   ========================================================= */

.how-step-icon {

    width: 62px;

    height: 62px;

    margin: 0 0 22px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #101018;

    border: 1px solid rgba(239,17,17,.25);

    border-radius: 14px;

    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.03),
        0 8px 20px rgba(0,0,0,.08);

    transition:
        background .25s ease,
        border-color .25s ease,
        transform .25s ease;

}


.how-step-icon svg {

    width: 27px;

    height: 27px;

    fill: none;

    stroke: #ef1111;

    stroke-width: 1.8;

    stroke-linecap: round;

    stroke-linejoin: round;

}



/* =========================================================
   Text
   ========================================================= */

.how-step-content {

    flex: 1;

}


.how-step h3 {

    margin: 0 0 10px;

    color: #10101a;

    font-size: 20px;

    font-weight: 700;

    line-height: 1.2;

}


.how-step p {

    max-width: 240px;

    margin: 0;

    color: #777783;

    font-size: 13px;

    line-height: 1.7;

}


/* =========================================================
   Action
   ========================================================= */

.how-it-works-action {

    display: flex;

    justify-content: center;

    margin-top: 50px;

}


.how-register-button {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: 150px;

    height: 45px;

    padding: 0 25px;

    color: #ef1111;

    background: #ffffff;

    border: 1px solid #ffffff;

    border-radius: 8px;

    text-decoration: none;

    font-size: 14px;

    font-weight: 500;

    transition:
        color .2s ease,
        background-color .2s ease,
        border-color .2s ease,
        transform .2s ease;

}


.how-register-button:hover {

    color: #ffffff;

    background: #ef1111;

    border-color: #ef1111;

    transform: translateY(-2px);

}

.how-step-footer {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-top: 25px;

    padding-top: 16px;

    border-top: 1px solid #eeeeee;

}


.how-step-footer span:first-child {

    color: #9999a2;

    font-size: 9px;

    font-weight: 700;

    letter-spacing: 1.5px;

}


.how-step-arrow {

    color: #ef1111;

    font-size: 20px;

    line-height: 1;

    transition: transform .2s ease;

}


.how-step:hover .how-step-arrow {

    transform: translateX(5px);

}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 991px) {

    .how-it-works {

        padding: 75px 0 85px;

    }


    .how-it-works-steps {

        grid-template-columns:
            repeat(2, 1fr);

        gap: 20px;

    }


    .how-it-works-steps::before {

        display: none;

    }


    .how-step {

        min-height: 255px;

    }

}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 600px) {

    .how-it-works {

        padding: 60px 0 70px;

    }


    .how-it-works-container {

        width: min(100% - 40px, 500px);

    }


    .how-it-works-header {

        margin-bottom: 40px;

    }


    .how-it-works-header h2 {

        font-size: 30px;

    }


    .how-it-works-header p {

        font-size: 14px;

    }


    .how-it-works-steps {

        grid-template-columns: 1fr;

        gap: 15px;

    }


    .how-step {

        min-height: auto;

        padding: 28px 25px;

    }


    .how-step-icon {

        margin-bottom: 17px;

    }

}