/* ==========================================
   HOW IT WORKS
   ========================================== */

.how-section {
    max-width: 1344px;
    margin: 0 auto;
}

.how-card {
    background: var(--purple-light);
    border-radius: 32px;
    padding: 48px 65px 72px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: relative;
}

.how-card h2 {
    font-size: 64px;
    font-weight: 800;
    line-height: 100%;
    letter-spacing: -0.03em;
    color: var(--dark-text);
    text-align: center;
    margin-bottom: 64px;
}

.how-heading-accent {
    color: var(--purple);
}

.how-heading-word-rotator {
    position: relative;
    display: inline-block;
    vertical-align: top;
    height: 1.05em;
    overflow: hidden;
}

.how-heading-word-sizer {
    visibility: hidden;
    pointer-events: none;
    white-space: nowrap;
}

.how-heading-word {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    text-align: left;
    opacity: 0;
    transform: translateY(-105%);
    animation: howWordDrop 8s ease-in-out infinite;
}

.how-heading-word:nth-child(2) {
    animation-delay: 4s;
}

.how-heading-word.is-visible {
    opacity: 1;
}

@keyframes howWordDrop {
    0% {
        opacity: 0;
        transform: translateY(-105%);
    }

    8%,
    28% {
        opacity: 1;
        transform: translateY(0);
    }

    36%,
    100% {
        opacity: 0;
        transform: translateY(105%);
    }
}

.how-right {
    display: flex;
    flex-direction: column;
    width: 666px;
    margin: 0 auto;
}

.how-step {
    background: #fff;
    border-radius: 24px;
    display: flex;
    align-items: flex-start;
    min-height: 133px;
    border: 1px solid transparent;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.how-step--1 {
    padding: 20px 32px;
}

.how-step--2 {
    padding: 20px 10px 32px 32px;
}

.how-step--3 {
    padding: 20px 21px 20px 32px;
}

.how-step.active {
    border-color: var(--purple);
}

.how-step-num {
    margin-right: 64px;
    margin-top: 10px;
    font-size: 24px;
    font-weight: 800;
    color: var(--purple);
    letter-spacing: -0.03em;
    min-width: 30px;
    flex-shrink: 0;
    line-height: 100%;
    transition: color .8s ease;
}

.how-step.inactive .how-step-num {
    color: var(--grey-60);
}

.how-step-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--dark-text);
    letter-spacing: -0.03em;
    line-height: 1.1;
    flex-shrink: 0;
    max-width: 179px;
    min-width: calc(218px - 40px);
    margin-top: 10px;
    margin-right: 40px;
}

.how-step.inactive .how-step-title {
    color: var(--grey-60);
}

.how-step-desc {
    font-size: 18px;
    font-weight: 500;
    color: var(--grey-60);
    line-height: 1.25;
    letter-spacing: -0.03em;
    flex: 1;
    transition: color .2s ease;
}

.how-step--1 .how-step-desc,
.how-step--2 .how-step-desc {
    margin-top: 10px;
}

.how-step.active .how-step-title,
.how-step.active .how-step-desc {
    color: #121212;
}

.how-arrow {
    display: flex;
    justify-content: center;
    margin: 6px 0;
}

.how-arrow img {
    width: 24px;
    height: 24px;
    display: block;
    transition: filter .2s ease;
}

@media (max-width: 1344px) {

    .how-section {
        padding: var(--section-gap) 0 0;
    }

    .how-card {
        padding: 48px 65px;
        border-radius: 20px;
    }

    .how-card h2 {
        font-size: 52px;
        white-space: normal;
        margin-bottom: 32px;
    }

    .how-right {
        width: 100%;
        margin: 0;
    }

    .how-step {
        flex-wrap: wrap;
        padding: 32px 28px;
        border-radius: 16px;
        min-height: 110px;
        align-content: flex-start;
        align-items: center;
        max-width: 614px;
        margin: 0 auto;
    }

    .how-step-num {
        min-width: auto;
        margin-top: 0;
        margin-right: 8px;
    }

    .how-step-title {
        flex: 1;
        min-width: max-content;
        margin-top: 0;
        margin-right: 0;
    }

    .how-step-desc {
        margin-top: 10px;
        flex-basis: 100%;
        width: 100%;
    }

    .how-arrow {
        margin: 3px 0;
    }

    .how-arrow img {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 651px) {
    .how-section {
        margin: 0 8px;
    }

    .how-card {
        padding: 32px 2px;
        border-radius: 15px;
    }

    .how-card h2 {
        font-size: 32px;
        margin-bottom: 18px;
    }

    .how-step {
        padding: 19px;
        border-radius: 11px;
        max-width: 305px;
        min-height: 104px;
    }

    .how-step-num {
        font-size: 18px;
    }

    .how-step-title {
        font-size: 18px;
    }

    .how-step-desc {
        font-size: 14px;
    }

    .how-arrow img {
        width: 16px;
        height: 16px;
    }
}
