.how-we-work {
    --hww-brand: var(--color_brand);
    --hww-brand-ink: oklch(from var(--hww-brand) min(l, 0.52) c h);
    --hww-bg: #f7f8fb;
    --hww-surface: #fff;
    --hww-ink: #1a2340;
    --hww-muted: #5c6b8a;
    --hww-line: #e8eaf2;
    background: var(--hww-bg);
    padding: 64px 20px 56px;
    color: var(--hww-ink);
}

@supports not (color: oklch(from #000 l c h)) {
    .how-we-work {
        --hww-brand-ink: color-mix(in srgb, var(--hww-brand) 50%, #000);
    }
}

.hww-header {
    text-align: center;
    margin-bottom: 40px;
}

.hww-title {
    font-size: clamp(26px, 4vw, 42px);
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.15;
    color: var(--hww-ink);
}

.hww-subtitle {
    margin-top: 10px;
    font-size: clamp(14px, 1.8vw, 17px);
    color: var(--hww-muted);
    font-weight: 400;
}

.hww-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 0 auto 16px;
}

.hww-card {
    background: var(--hww-surface);
    border-radius: 20px;
    padding: 28px 28px 36px;
    position: relative;
    overflow: hidden;
    min-height: 220px;
}

.hww-card::after {
    content: '';
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--hww-brand) 6%, transparent);
    pointer-events: none;
}

.hww-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--hww-brand-ink);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.hww-card-body {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.hww-icon-box {
    flex-shrink: 0;
    width: 68px;
    height: 68px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--hww-brand) 10%, #f0f2f8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hww-icon-box svg {
    width: 32px;
    height: 32px;
    stroke: var(--hww-brand-ink);
    fill: none;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ─── Text ─── */
.hww-card-text {
    flex: 1;
}

.hww-card-title {
    font-size: clamp(15px, 1.5vw, 18px);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
    color: var(--hww-ink);
}

.hww-card-desc {
    font-size: clamp(13px, 1.2vw, 15px);
    color: var(--hww-muted);
    line-height: 1.6;
}

.hww-arrow {
    position: absolute;
    bottom: 18px;
    right: 22px;
    width: 90px;
    height: 36px;
    opacity: 0.55;
}

.hww-arrow svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* ─── Features bar ─── */
.hww-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    background: var(--hww-surface);
    border-radius: 20px;
    margin: 0 auto;
    overflow: hidden;
}

.hww-feature {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px;
    position: relative;
}

/* Dividers between features */
.hww-feature+.hww-feature::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: var(--hww-line);
}

.hww-feat-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--hww-brand) 10%, #f0f2f8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hww-feat-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--hww-brand-ink);
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hww-feat-text strong {
    display: block;
    font-size: clamp(13px, 1.2vw, 15px);
    font-weight: 700;
    color: var(--hww-ink);
    margin-bottom: 3px;
}

.hww-feat-text span {
    font-size: clamp(13px, 1vw, 14px);
    color: var(--hww-muted);
    line-height: 1.4;
}

@media (max-width: 820px) {
    .how-we-work {
        padding: 44px 16px 40px;
    }

    .hww-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .hww-card:last-child .hww-arrow {
        display: none;
    }

    .hww-features {
        grid-template-columns: 1fr;
    }

    .hww-feature+.hww-feature::before {
        top: 0;
        left: 10%;
        width: 80%;
        height: 1px;
    }

    .hww-feature {
        padding: 18px 20px;
    }

    .hww-step {
        width: 30px;
        height: 30px;
        font-size: 13px;
        margin-bottom: 14px;
    }
}

@media (max-width: 480px) {
    .hww-card {
        padding: 22px 20px 32px;
    }

    .hww-card-body {
        flex-direction: column;
        gap: 14px;
    }

    .hww-icon-box {
        width: 56px;
        height: 56px;
    }
}

@media (prefers-contrast: more) {
    .how-we-work {
        --hww-ink: #121a33;
        --hww-muted: #414d66;
        --hww-line: #c3c9da;
        --hww-brand-ink: oklch(from var(--hww-brand) min(l, 0.42) c h);
    }

    .hww-card,
    .hww-features {
        outline: 1px solid var(--hww-line);
        outline-offset: -1px;
    }
}

@media (forced-colors: active) {

    .hww-icon-box svg,
    .hww-feat-icon svg {
        stroke: CanvasText;
    }

    .hww-step {
        background: ButtonFace;
        color: ButtonText;
        border: 1px solid ButtonText;
    }

    .hww-card::after,
    .hww-arrow {
        display: none;
    }

    .hww-card,
    .hww-features {
        border: 1px solid CanvasText;
    }
}

/* ─── Опционально: экономия рендеринга для блока ниже первого экрана.
   Включать только если секция реально вне вьюпорта при загрузке.
.hww-card {
    content-visibility: auto;
    contain-intrinsic-size: auto 220px;
}
─── */