:root {
    --ink: #14202e;
    --muted: #5b6b7d;
    --line: #e2e8ef;
    --bg: #ffffff;
    --bg-alt: #f3f6f9;
    --brand: #0e3a5b;
    --brand-2: #16608f;
    --accent: #f26a1b;
    --accent-dark: #d4550c;
    --ok: #1f8a4c;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(14, 58, 91, .10);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--brand-2); }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(28px, 4.2vw, 44px); letter-spacing: -.01em; }
h2 { font-size: clamp(22px, 2.8vw, 30px); }
h3 { font-size: 18px; }
[hidden] { display: none !important; }
.icon { display: inline-block; width: 24px; height: 24px; flex: none; vertical-align: middle; }
.nav__menu .icon { width: 20px; height: 20px; color: var(--brand-2); }

/* Kicker над H1 */
.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 6px 14px 6px 6px; border-radius: 999px; background: #fff; box-shadow: 0 2px 8px rgba(14, 58, 91, .08); font-size: 14px; font-weight: 600; color: var(--brand); }
.kicker__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; }
.kicker__icon .icon { width: 18px; height: 18px; }

/* Шаги */
.section--steps { padding-top: 0; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 24px 20px 20px; border-radius: var(--radius); background: var(--bg-alt); }
.step:not(:last-child)::after { content: ""; position: absolute; top: 48px; right: -16px; width: 12px; height: 12px; border-top: 2px solid #b9cadb; border-right: 2px solid #b9cadb; transform: rotate(45deg); }
.step__icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 14px; border-radius: 16px; background: var(--brand); color: #fff; box-shadow: 0 8px 18px rgba(14, 58, 91, .25); }
.step__icon .icon { width: 28px; height: 28px; }
.step__num { position: absolute; top: 18px; right: 20px; font-size: 40px; font-weight: 800; line-height: 1; color: #dde6ef; }
.step h3 { margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 820px; }
.section { padding-block: 48px; }
.section--alt { background: var(--bg-alt); }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 14px 24px; border: 0; border-radius: 10px; cursor: pointer;
    font-family: inherit; font-weight: 600; font-size: 16px; line-height: 1.2; white-space: nowrap; text-decoration: none; transition: background .15s, transform .15s;
}
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-dark); color: #fff; }
.btn--block { width: 100%; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: wait; }

/* Header */
.header { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.header__row { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.header__cta { padding: 12px 18px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand); }
.logo__mark { display: block; flex: none; width: 40px; height: 40px; }
.logo__text { font-weight: 800; font-size: 20px; line-height: 1; white-space: nowrap; }
.logo__text small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav__group { position: relative; }
.nav__toggle, .nav__link {
    background: none; border: 0; padding: 10px 12px; font-family: inherit; font-weight: 500; font-size: 15px; line-height: 1; white-space: nowrap; color: var(--ink);
    cursor: pointer; text-decoration: none; border-radius: 8px;
}
.nav__toggle::after { content: "▾"; margin-left: 5px; font-size: 11px; color: var(--muted); }
.nav__toggle:hover, .nav__link:hover { background: var(--bg-alt); color: var(--ink); }
.nav__menu {
    display: none; position: absolute; top: 100%; left: 0; min-width: 290px; margin: 0; padding: 8px;
    list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.nav__group:hover .nav__menu, .nav__group:focus-within .nav__menu { display: block; }
.nav__menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 15px; }
.nav__menu a:hover { background: var(--bg-alt); }
.header__contacts { margin-left: auto; text-align: right; line-height: 1.2; }
.header__phone { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.header__phone .icon { width: 18px; height: 18px; color: var(--accent); }
.header__hours { display: block; font-size: 12px; color: var(--muted); }
.burger { display: none; }

/* Hero */
.hero { background: linear-gradient(160deg, #eaf2f8 0%, #f8fafc 60%); padding-block: 24px 48px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; align-items: start; }
.hero__lead { font-size: 18px; color: #2c3b4d; max-width: 640px; }
.params { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 28px 0; }
.params > div { background: #fff; border-radius: 12px; padding: 14px 16px; box-shadow: 0 2px 8px rgba(14, 58, 91, .06); }
.params__icon { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 8px; border-radius: 10px; background: #e6f0f7; color: var(--brand-2); }
.params__icon .icon { width: 20px; height: 20px; }
.params dt { font-size: 13px; color: var(--muted); }
.params dd { margin: 4px 0 0; font-weight: 700; font-size: 17px; }
.hero__bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: 16px; align-items: center; }
.hero__bottom .trust { flex-direction: column; gap: 12px; }
.hero__art { margin: 0; }
.hero__art img { display: block; width: 100%; height: auto; }
.trust { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; color: #2c3b4d; font-size: 15px; }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.trust .icon { width: 20px; height: 20px; color: var(--ok); }

/* Crumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 20px; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: #aab5c2; }
.crumbs a { color: var(--muted); }

/* Form */
.lead-form { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.lead-form__title { font-weight: 800; font-size: 21px; line-height: 1.3; margin: 0; }
.lead-form__sub { color: var(--muted); font-size: 14px; margin: 4px 0 16px; }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field input, .field select {
    width: 100%; padding: 12px 14px; font-family: inherit; font-size: 16px; color: var(--ink);
    background: #fff; border: 1px solid #cfd8e3; border-radius: 10px;
}
.field input:focus, .field select:focus { outline: 2px solid var(--brand-2); outline-offset: -1px; border-color: transparent; }
.field input.is-invalid, .field select.is-invalid { border-color: #d33; }
.check { display: flex; gap: 8px; font-size: 13px; color: var(--muted); margin: 4px 0 14px; }
.check input { margin-top: 3px; flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.lead-form__error { color: #c62828; font-size: 14px; margin: 0 0 10px; }

/* Benefits */
.benefits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.benefit { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s; }
.benefit:hover { border-color: #cfe0ee; box-shadow: var(--shadow); }
.benefit__icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 14px; border-radius: 14px; background: linear-gradient(135deg, #fff1e8, #ffe0cc); color: var(--accent-dark); }
.benefit__icon .icon { width: 26px; height: 26px; }
.benefit h3 { margin-bottom: 6px; }
.benefit p { margin: 0; color: var(--muted); font-size: 15px; }

/* Tiles */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tiles__group { background: #fff; border-radius: var(--radius); padding: 20px; }
.tiles__group ul { list-style: none; padding: 0; margin: 0; }
.tiles__group h3 { margin-bottom: 10px; }
.tiles__group li + li { margin-top: 4px; }
.tiles__group a { display: flex; align-items: center; gap: 12px; padding: 8px; margin-inline: -8px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.tiles__group a:hover { background: var(--bg-alt); color: var(--brand-2); }
.tiles__icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 10px; background: #e6f0f7; color: var(--brand-2); }
.tiles__icon .icon { width: 22px; height: 22px; }
.tiles__arrow { width: 18px; height: 18px; margin-left: auto; color: #aab5c2; flex: none; transition: transform .15s; }
.tiles__group a:hover .tiles__arrow { transform: translateX(3px); color: var(--brand-2); }

/* Calculator */
.calc { background: var(--brand); color: #fff; border-radius: 20px; padding: 32px; }
.calc__title { color: #fff; }
.calc__grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; }
.range { display: block; margin-bottom: 22px; }
.range__head { display: flex; justify-content: space-between; margin-bottom: 8px; color: #cfe0ee; }
.range output { color: #fff; font-weight: 700; font-size: 18px; }
.range input { width: 100%; accent-color: var(--accent); }
.calc__result { background: rgba(255, 255, 255, .08); border-radius: var(--radius); padding: 20px; }
.calc__result p { margin: 0; }
.calc__payment { font-size: 34px; font-weight: 800; margin: 4px 0 8px !important; }
.calc__meta { color: #cfe0ee; margin-bottom: 16px !important; }
.calc__note { font-size: 12px; color: #9fbad0; margin-top: 12px !important; }

/* Cards / article */
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.card { background: #fff; border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); }
.card--accent { background: #fff6ef; border-color: #fbd9c2; }
.card__title { display: flex; align-items: center; gap: 12px; }
.card__icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: #e6f0f7; color: var(--brand-2); }
.card__icon .icon { width: 24px; height: 24px; }
.list-check, .list-doc { list-style: none; padding: 0; margin: 0; }
.list-check li, .list-doc li { position: relative; padding: 6px 0 6px 32px; }
.list-check .icon, .list-doc .icon { position: absolute; left: 0; top: 8px; width: 20px; height: 20px; }
.list-check .icon { color: var(--ok); }
.list-doc .icon { color: var(--brand-2); }
.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.article { font-size: 17px; }
.article h2 { margin-top: 1.6em; }
.article h2:first-child { margin-top: 0; }
.article li { margin-bottom: 6px; }
.article__psk { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 32px; }
.aside { position: sticky; top: 90px; display: grid; gap: 16px; }
.aside__title { font-weight: 700; margin: 0 0 8px; }
.aside__list { list-style: none; padding: 0; margin: 0; }
.aside__list li { padding: 5px 0; }
.aside__list a { display: flex; align-items: flex-start; gap: 10px; }
.aside__list .icon { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--brand-2); }
.aside__badge { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 10px; border-radius: 50%; background: var(--accent); color: #fff; }
.aside__badge .icon { width: 22px; height: 22px; }
.aside__phone { font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 900px; }
.faq__item { background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.faq__item summary { cursor: pointer; padding: 16px 44px 16px 20px; font-weight: 600; list-style: none; position: relative; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; position: absolute; right: 20px; top: 12px; font-size: 22px; color: var(--brand-2); }
.faq__item[open] summary::after { content: "−"; }
.faq__item p { margin: 0; padding: 0 20px 18px; color: #2c3b4d; }

/* Chips */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.chips a { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: 15px; }
.chips a:hover { border-color: var(--brand-2); color: var(--brand-2); }

/* Regions */
.regions { columns: 3 280px; column-gap: 32px; margin-top: 24px; }
.regions__item { break-inside: avoid; margin-bottom: 20px; }
.regions__title { font-weight: 700; margin: 0 0 4px; }
.regions ul { list-style: none; padding: 0; margin: 0; }

/* CTA */
.section--cta { background: var(--brand); color: #fff; }
.section--cta h2 { color: #fff; }
.cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.cta p { color: #cfe0ee; margin: 0; }
.cta h2 { display: flex; align-items: center; gap: 12px; }
.cta__icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--accent); }
.cta__icon .icon { width: 24px; height: 24px; }

/* Кредитор */
.lender-card { margin: 32px 0 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-alt); font-size: 15px; }
.lender-card p { margin: 0 0 10px; }
.lender-card__title { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--brand); }
.lender-card__title .icon { width: 22px; height: 22px; color: var(--ok); }
.lender-card__list { margin: 0; display: grid; gap: 8px; }
.lender-card__list div { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px; }
.lender-card__list dt { color: var(--muted); }
.lender-card__list dd { margin: 0; }
.lender-card__warn { margin: 12px 0 0 !important; font-size: 14px; color: #8a4b00; }
@media (max-width: 640px) { .lender-card__list div { grid-template-columns: minmax(0, 1fr); gap: 0; } }

/* Обратный звонок */
.callback-fab {
    position: fixed; z-index: 40;
    /* На широких экранах держим кнопку у правого края контента (.wrap 1200px), а не у края окна. */
    right: max(calc(20px + env(safe-area-inset-right, 0px)), calc((100vw - 1200px) / 2 - 62px - 24px));
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    display: grid; place-items: center; width: 62px; height: 62px;
    border: 0; border-radius: 50%; cursor: pointer; color: #fff;
    background: var(--accent); box-shadow: 0 10px 24px rgba(242, 106, 27, .45);
    transition: transform .15s, background .15s;
}
.callback-fab:hover { background: var(--accent-dark); transform: scale(1.06); }
.callback-fab:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 3px; }
.callback-fab .icon { width: 28px; height: 28px; }
.callback-fab::before {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    border: 2px solid var(--accent); animation: fab-pulse 2.4s ease-out infinite;
}
@keyframes fab-pulse {
    0% { transform: scale(1); opacity: .7; }
    70%, 100% { transform: scale(1.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .callback-fab::before { animation: none; display: none; }
}
.callback {
    width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
    padding: 0; border: 0; border-radius: 18px; overflow: auto;
    box-shadow: 0 24px 60px rgba(14, 58, 91, .3);
}
.callback::backdrop { background: rgba(11, 36, 56, .55); }
.callback[open] { animation: callback-in .18s ease-out; }
@keyframes callback-in { from { opacity: 0; transform: translateY(12px); } }
.lead-form--callback { box-shadow: none; padding: 28px 24px 24px; }
.callback__title { display: flex; align-items: center; gap: 12px; padding-right: 40px; }
.callback__icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: #fff1e8; color: var(--accent); }
.callback__icon .icon { width: 22px; height: 22px; }
.callback__close {
    position: absolute; top: 10px; right: 10px; width: 40px; height: 40px;
    border: 0; border-radius: 50%; background: var(--bg-alt); color: var(--muted);
    font-size: 26px; line-height: 1; cursor: pointer;
}
.callback__close:hover { background: var(--line); color: var(--ink); }

/* Footer */
.footer { background: #0b2438; color: #b8c7d6; padding-block: 48px 24px; font-size: 14px; }
.footer a { color: #dbe6f0; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.footer__cols ul { list-style: none; padding: 0; margin: 0; }
.footer__cols li { padding: 3px 0; }
.footer__title { color: #fff; font-weight: 700; margin: 0 0 8px; }
.footer__legal { border-top: 1px solid #1d3d57; margin-top: 32px; padding-top: 20px; font-size: 13px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 16px; }

@media (max-width: 1080px) {
    .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: #fff; border-bottom: 1px solid var(--line); padding: 12px 20px; margin: 0; max-height: calc(100vh - 68px); overflow: auto; }
    .nav.is-open { display: flex; }
    .nav__menu { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 8px 12px; min-width: 0; }
    .nav__toggle { text-align: left; font-weight: 700; }
    .nav__toggle::after { content: none; }
    .burger { display: block; order: 3; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
    .burger span, .burger span::before, .burger span::after { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--ink); content: ""; }
    .burger span { top: 21px; }
    .burger span::before { top: -7px; left: 0; right: 0; }
    .burger span::after { top: 7px; left: 0; right: 0; }
    .header__cta { display: none; }
    .hero__grid, .article-grid, .calc__grid { grid-template-columns: minmax(0, 1fr); }
    .hero__art { display: none; }
    .hero__bottom { display: block; }
    .hero__bottom .trust { flex-direction: row; gap: 8px 20px; }
    .aside { position: static; }
    .benefits, .footer__cols, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .step:not(:last-child)::after { display: none; }
}

@media (max-width: 640px) {
    .callback__title { font-size: 18px; gap: 10px; padding-right: 28px; white-space: nowrap; }
    .callback__icon { width: 36px; height: 36px; }
    .callback__icon .icon { width: 20px; height: 20px; }
    .callback-fab { width: 56px; height: 56px; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
    .wrap { padding-inline: 16px; }
    .section { padding-block: 32px; }
    .header__hours, .logo__text small { display: none; }
    .header__phone { font-size: 15px; }
    .params { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .benefits, .tiles, .two-col, .footer__cols, .steps { grid-template-columns: minmax(0, 1fr); }
    .benefit { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 14px; }
    .benefit__icon { grid-row: span 2; margin: 0; }
    .header__phone .icon { display: none; }
    .calc { padding: 20px; }
    .cta { flex-direction: column; align-items: flex-start; }
}
