.how-stepper {
    --endo-step-count: 6;

    position: relative;
    min-height: calc(var(--endo-step-count) * 72svh);
    background: var(--blue);
    color: #ffffff;
}

.how-stepper__sticky {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
}

.how-stepper__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
    align-items: center;
    gap: clamp(48px, 8vw, 130px);
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    padding-block: clamp(70px, 9vh, 110px);
}

.how-stepper__content {
    position: relative;
    z-index: 2;
}

.how-stepper__title {
    margin: 0 0 30px;
    color: #ffffff;
    font-size: clamp(22px, 1.8vw, 32px);
    font-weight: 800;
    line-height: 1.15;
}

.how-stepper__title span {
    color: var(--pink);
}

.how-stepper__steps {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.how-stepper__step {
    margin: 0;
}

.how-stepper__step-button {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    width: 100%;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: #ffffff;
    text-align: left;
    cursor: pointer;
    transition:
        color 0.18s ease,
        opacity 0.18s ease,
        transform 0.18s ease;
}

.how-stepper__step-button:hover {
    color: #ffffff;
}

.how-stepper__step-button.is-active {
    color: var(--pink);
    transform: translateX(6px);
}

.how-stepper__number {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #ffffff;
    border-radius: 999px;
    background: #ffffff;
    color: var(--blue);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    transition:
        border-color 0.25s ease,
        background-color 0.25s ease,
        color 0.25s ease;
}

.how-stepper__step-button.is-active .how-stepper__number {
    border-color: var(--pink);
    background: var(--pink);
    color: #ffffff;
}

.how-stepper__label {
    font-size: clamp(14px, 1.05vw, 16px);
    font-weight: 500;
    line-height: 1.3;
}

.how-stepper__step-button.is-active .how-stepper__label {
    color: var(--pink);
    font-weight: 700;
}

.how-stepper__media {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.how-stepper__media::before {
    position: absolute;
    width: min(520px, 45vw);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle,
            rgba(228, 45, 150, 0.2) 0%,
            rgba(228, 45, 150, 0.08) 42%,
            rgba(228, 45, 150, 0) 72%);
    content: "";
    filter: blur(40px);
    pointer-events: none;
}

.how-stepper__phone {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.how-stepper__image {
    position: relative;
    z-index: 1;
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(78svh, 760px);
    object-fit: contain;
    filter: drop-shadow(0 28px 40px rgba(0, 0, 0, 0.24));
    opacity: 1;
    transform: translateY(0) scale(1);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.how-stepper__image.is-changing {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
}

@media (max-width: 780px) {
    .how-stepper {
        min-height: calc(var(--endo-step-count) * 72svh);
    }

    .how-stepper__layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        gap: 18px;
        padding-block: 26px 20px;
    }

    .how-stepper__content {
        width: 100%;
    }

    .how-stepper__title {
        margin-bottom: 16px;
        font-size: 22px;
    }

    .how-stepper__steps {
        gap: 3px;
    }

    .how-stepper__step-button {
        gap: 10px;
        padding: 3px 0;
    }

    .how-stepper__number {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }

    .how-stepper__label {
        font-size: 13px;
    }

    .how-stepper__media {
        align-self: stretch;
        min-height: 0;
    }

    .how-stepper__media::before {
        width: min(400px, 90vw);
    }

    .how-stepper__image {
        max-height: 49svh;
    }

    .how-stepper__sticky {
        top: var(--endo-mobile-header-height, 76px);
        min-height: calc(100svh - var(--endo-mobile-header-height, 76px));
    }

    .how-stepper__layout {
        min-height: calc(100svh - var(--endo-mobile-header-height, 76px));
    }
}

@media (max-width: 420px) {
    .how-stepper__layout {
        padding-block: 20px 14px;
    }

    .how-stepper__title {
        margin-bottom: 12px;
        font-size: 20px;
    }

    .how-stepper__label {
        font-size: 12px;
    }

    .how-stepper__image {
        max-height: 47svh;
    }
}

@media (prefers-reduced-motion: reduce) {

    .how-stepper__step-button,
    .how-stepper__image {
        transition: none;
    }

    .how-stepper__step-button.is-active {
        transform: none;
    }
}