:root {
    --bg: #ffffff;
    --text: #0B1F33;
    --muted: #5A6B80;
    --card: #F6F8FB;
    --line: #E6ECF3;
    --primary: #0EA5E9;
    --primary-600: #0284C7;
    --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    --radius: 12px;
    --gap: 16px;
    --header-h: 72px;
}

html[data-theme="dark"] {
    --bg: #0B1220;
    --text: #E6ECF3;
    --muted: #A3B1C6;
    --card: #121A2C;
    --line: #1E2A40;
    --primary: #38BDF8;
    --primary-600: #7DD3FC;
    --shadow: 0 6px 28px rgba(0, 0, 0, .45);
}

*, *::before, *::after {
    box-sizing: border-box
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    line-height: 1.5;
    overflow-x: hidden
}

body {
    padding-top: var(--header-h)
}

img {
    max-width: 100%;
    height: auto;
    display: block
}

a {
    color: var(--primary);
    text-decoration: none
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px
}

/* Шапка */
header {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .75);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line)
}

html[data-theme="dark"] header {
    background: rgba(11, 18, 32, .65)
}

.head {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 16px
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0
}

.brand-name {
    font-weight: 800;
    letter-spacing: .2px;
    font-size: 16px;
    white-space: nowrap
}

.brand-name-mob {
    display: none;
    font-weight: 800;
    letter-spacing: .2px;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

nav.nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 0 0 auto;
    justify-content: flex-end;
    min-width: 0
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 18px
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px
}

.nav-link {
    color: var(--muted);
    font-weight: 500;
    white-space: nowrap
}

.nav-link:hover {
    color: var(--text)
}

/* Кнопки */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 600;
    cursor: pointer;
    transition: .2s ease;
    white-space: nowrap
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 6px 16px rgba(14, 165, 233, .25)
}

.btn-primary:hover {
    background: var(--primary-600)
}

.btn-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--text)
}

.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary)
}

.btn-icon {
    width: 44px;
    padding: 0;
    gap: 0
}

/* Герой */
.hero {
    padding: 40px 0 32px
}

.hero-box {
    background: linear-gradient(180deg, rgba(14, 165, 233, .06), transparent 70%);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 28px
}

.hero-grid {
    display: grid;
    grid-template-columns:minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 24px;
    align-items: stretch
}

.hero-left {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%
}

.h1 {
    font-size: 36px;
    line-height: 1.15;
    margin: 0;
    font-weight: 800;
    letter-spacing: .2px
}

.lead {
    color: var(--muted);
    font-size: 16px;
    margin-top: 16px
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px
}

.badge {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--bg);
    border: 1px solid var(--line);
    color: var(--text);
    font-weight: 600;
    font-size: 13px
}

.hero-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 32px;
    align-items: center
}

.kpi {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    margin-top: 40px
}

.kpi .card {
    text-align: center;
    flex: 0 0 200px
}

.kpi .num {
    font-weight: 800;
    font-size: 22px;
    margin-bottom: 4px
}

.trust {
    display: grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: auto;
    padding-top: 24px
}

.trust .pill {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    background: var(--bg)
}

.trust .icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px
}

.trust .icon svg {
    width: 28px;
    height: 28px;
    display: block
}

html[data-theme="dark"] .trust .pill {
    background: transparent
}

/* Процесс */
.process {
    border-radius: 14px;
    padding: 20px;
    border: 1px solid var(--line);
    height: 100%;
    background: radial-gradient(1200px 1200px at -10% -20%, rgba(14, 165, 233, .08), transparent 50%),
    radial-gradient(800px 800px at 110% 120%, rgba(2, 132, 199, .08), transparent 60%),
    linear-gradient(180deg, rgba(2, 132, 199, .04), rgba(2, 132, 199, .02));
}

.process h3 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 800
}

.psteps {
    display: grid;
    gap: 10px
}

.pstep {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px
}

.pstep .title {
    font-weight: 700;
    margin-bottom: 4px
}

.pstep .desc {
    color: var(--muted);
    font-size: 14px
}

.pstep .title .n {
    color: #075985;
    background: #E0F2FE;
    border: 1px solid #BFE7FB;
    border-radius: 999px;
    padding: 2px 8px;
    margin-right: 8px;
    font-weight: 800;
    font-size: 12px
}

html[data-theme="dark"] .pstep .title .n {
    background: #0B2A3B;
    color: #7DD3FC;
    border-color: #14334A
}

/* Секции */
section {
    padding: 40px 0;
    scroll-margin-top: calc(var(--header-h) + 12px)
}

.section-title {
    font-size: 26px;
    margin: 0 0 16px;
    font-weight: 800
}

.grid {
    display: grid;
    gap: var(--gap)
}

.cols-4 {
    grid-template-columns:repeat(4, minmax(0, 1fr))
}

.cols-3 {
    grid-template-columns:repeat(3, minmax(0, 1fr))
}

.cols-2 {
    grid-template-columns:repeat(2, minmax(0, 1fr))
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow);
    transition: transform .25s ease, box-shadow .25s ease
}

.card:hover {
    border-color: var(--primary);
    transform: translateY(-2px)
}

.small {
    color: var(--muted);
    font-size: 14px
}

.divider {
    height: 1px;
    background: var(--line);
    margin: 16px 0
}

footer {
    border-top: 1px solid var(--line);
    padding: 24px 0;
    color: var(--muted);
    font-size: 14px
}

/* Карусели */
.carousel {
    position: relative;
    padding-bottom: 48px
}

.carousel-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 2 * var(--gap)) / 3);
    gap: var(--gap);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    padding-bottom: 8px;
    align-items: stretch;
    scroll-behavior: smooth;
}

@media (max-width: 900px) {
    .carousel-track {
        grid-auto-columns: calc((100% - var(--gap)) / 2)
    }
}

@media (max-width: 640px) {
    .carousel-track {
        grid-auto-columns: 100%
    }
}

.carousel-track::-webkit-scrollbar {
    height: 8px
}

.carousel-track::-webkit-scrollbar-thumb {
    background: var(--line);
    border-radius: 8px
}

.carousel-item {
    scroll-snap-align: start;
    display: flex
}

.carousel-item .card {
    flex: 1 1 auto;
    height: 100%;
    opacity: .98;
    transform: translateY(4px);
    transition: opacity .25s ease, transform .25s ease
}

.carousel-item.inview .card {
    opacity: 1;
    transform: none
}

.carousel .nav {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 0 2px
}

.carousel .btn-nav {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    color: var(--text)
}

@media (max-width: 640px) {
    .carousel .nav {
        display: none
    }
}

/* Отзывы */
.review-head {
    display: flex;
    gap: 14px;
    align-items: center
}

.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--line);
    flex: 0 0 64px
}

.review-name {
    font-weight: 700
}

.review-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px
}

.review-text {
    margin-top: 10px;
    color: var(--text);
    font-size: 14.5px;
    line-height: 1.55
}

/* Партнёры */
.partners {
    display: grid;
    grid-template-columns:repeat(5, 1fr);
    gap: 16px
}

.partner {
    height: 80px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px
}

.partner a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%
}

.partner img {
    max-height: 44px;
    max-width: 100%;
    height: auto;
    width: auto;
    display: block;
    object-fit: contain
}

/* Модалки — базовые стили */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 12, 24, .6);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 110;
    padding: 16px
}

.modal {
    width: 100%;
    max-width: 520px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow)
}

.modal-header {
    padding: 16px 16px 8px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between
}

.modal-title {
    font-weight: 800
}

.modal-body {
    padding: 16px
}

.modal-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: flex-end;
    gap: 10px
}

.input {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px
}

.input label {
    font-weight: 600;
    font-size: 14px
}

.input input {
    height: 44px;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--text);
    border-radius: 10px;
    padding: 0 12px;
    outline: none;
    min-width: 0
}

.input input:focus {
    border-color: var(--primary)
}

.row-2 {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 10px
}

/* Мессенджеры: кнопка + контакт под ней */
.contact-grid {
    display: grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px
}

@media (max-width: 480px) {
    .contact-grid {
        grid-template-columns:1fr
    }
}

.contact-col {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.btn-wa {
    background: #25D366;
    color: #fff
}

.btn-tg {
    background: #2AABEE;
    color: #fff
}

.btn-wa svg, .btn-tg svg {
    width: 18px;
    height: 18px
}

.contact-item {
    background: var(--card);
    border: 1px dashed var(--line);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: center
}

.copyline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: transparent;
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    font-size: 15px
}

.copy-ico {
    width: 16px;
    height: 16px;
    color: var(--muted)
}

/* Тост */
.toast {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    background: var(--text);
    color: var(--bg);
    padding: 10px 14px;
    border-radius: 10px;
    display: none;
    z-index: 120
}

/* Адаптив */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns:minmax(0, 1fr)
    }

    .cols-3, .cols-4 {
        grid-template-columns:repeat(2, minmax(0, 1fr))
    }

    .partners {
        grid-template-columns:repeat(4, 1fr)
    }

    .nav-left {
        display: none
    }
}

@media (max-width: 640px) {
    .brand-name {
        display: none
    }

    .brand-name-mob {
        display: block
    }

    .head {
        min-height: auto;
        padding: 10px 0;
        gap: 10px
    }

    .brand {
        flex: 1 1 auto;
        min-width: 0
    }

    nav.nav {
        flex: 0 0 auto;
        gap: 12px
    }

    .nav-actions {
        gap: 8px
    }

    .btn {
        height: 40px;
        padding: 0 12px
    }

    .btn-icon {
        width: 40px
    }

    .cols-3, .cols-4, .cols-2 {
        grid-template-columns:1fr
    }

    .h1 {
        font-size: 28px
    }

    .row-2 {
        grid-template-columns:1fr
    }

    .sticky-cta {
        display: block
    }

    .partners {
        grid-template-columns:repeat(2, 1fr)
    }

    .carousel .nav {
        display: none
    }

    .kpi {
        display: grid;
        grid-template-columns:1fr 1fr;
        gap: 8px;
        margin-top: 24px
    }

    .kpi .card {
        flex: initial
    }

    .kpi .card:nth-child(3) {
        grid-column: 1 / -1
    }

    .trust {
        grid-template-columns:1fr
    }

    .trust .pill {
        display: block
    }

    .trust .icon {
        display: none
    }
}

/* Sticky CTA */
.sticky-cta {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 40;
    display: none
}

/* Модалки: безопасная высота и скролл контента */
.overlay {
    align-items: center;
    justify-content: center
}

.modal {
    display: flex;
    flex-direction: column;
    max-width: 520px;
    width: 100%;
    max-height: calc(100vh - 32px);
    padding-bottom: env(safe-area-inset-bottom, 0);
    padding-top: env(safe-area-inset-top, 0);
}

@supports (height:100dvh) {
    .modal {
        max-height: calc(100dvh - 32px)
    }
}

.modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto
}

.modal-header, .modal-footer {
    flex: 0 0 auto
}

@media (max-width: 380px) {
    .modal-header, .modal-body, .modal-footer {
        padding-left: 12px;
        padding-right: 12px
    }
}
