/* Шаблон «карточки»: белые плитки на сером поле.
   Фотография живёт внутри плитки, а не растянута фоном во весь экран.
   Внизу липкая панель с кнопкой — её нет ни в одном другом шаблоне. */

:root {
    --primary: #2b2f52;
    --accent: #d1603d;
    --accent-dark: #b04c2d;
    --ink: #21242e;
    --muted: #666c7d;
    --line: #e6e8ef;
    --paper: #ffffff;
    --field: #eceef4;
    --radius: 20px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Rubik', system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--field);
    line-height: 1.6;
    padding-bottom: 78px;   /* место под липкую панель */
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

.hold { max-width: 1080px; margin: 0 auto; padding: 0 18px; }
.h2b { font-size: clamp(1.5rem, 2.4vw, 2.1rem); font-weight: 700; letter-spacing: -0.02em; }
.subb { color: var(--muted); margin-top: 8px; }

.tile { background: var(--paper); border-radius: var(--radius); padding: 34px; margin-bottom: 18px; }
.tile--hero { padding: 0; overflow: hidden; }
.tile--dark { background: var(--primary); color: #fff; }
.tile--dark .subb { color: rgba(255,255,255,0.72); }

/* ── Шапка ───────────────────────────────────────────────────────────────── */
.nav { padding: 16px 0; }
.nav__inner { display: flex; align-items: center; justify-content: space-between; }
.nav__logo { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.nav__btn { background: var(--primary); color: #fff; border: none; border-radius: 999px;
            padding: 11px 24px; font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer; }
.nav__btn:hover { background: var(--accent); }

/* ── Первый экран внутри плитки ──────────────────────────────────────────── */
.hero2 { display: grid; grid-template-columns: 1.1fr 0.9fr; min-height: 420px; }
.hero2__text { padding: 46px 40px; align-self: center; }
.hero2__title { font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 800; line-height: 1.12;
                letter-spacing: -0.03em; }
.hero2__desc { color: var(--muted); margin-top: 16px; font-size: 1.05rem; max-width: 460px; }
.hero2__hint { color: var(--muted); font-size: 0.86rem; margin-top: 16px; max-width: 440px; }
.hero2__pic { background: url('/static/img/hero-bg.jpg?v=ca54af74') center center / cover no-repeat; min-height: 300px; }

.btn2 { display: inline-block; margin-top: 24px; background: var(--accent); color: #fff; border: none;
        border-radius: 999px; padding: 15px 34px; font: inherit; font-weight: 700; cursor: pointer; }
.btn2:hover { background: var(--accent-dark); }

/* ── Цифры отдельными плитками ───────────────────────────────────────────── */
.nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px;
        margin-bottom: 18px; }
.nums__tile { margin: 0; padding: 26px 22px; text-align: center; }
.nums__value { display: block; font-weight: 800; font-size: clamp(1.15rem, 1vw + 0.8rem, 1.7rem);
               color: var(--primary); letter-spacing: -0.02em; text-wrap: balance; }
.nums__label { display: block; color: var(--muted); font-size: 0.84rem; margin-top: 6px; }

/* ── Мелкие плитки внутри плитки ─────────────────────────────────────────── */
.mini { margin-top: 26px; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.mini__box { background: var(--field); border-radius: 14px; padding: 20px; }
.mini__box h3 { font-size: 1rem; font-weight: 700; }
.mini__box p { color: var(--muted); font-size: 0.92rem; margin-top: 6px; }

/* ── Этапы горизонтальными плитками с крупным номером ────────────────────── */
.flow { margin-top: 26px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.flow__box { background: var(--field); border-radius: 14px; padding: 22px; position: relative; }
.flow__num { display: block; font-size: 2rem; font-weight: 800; color: var(--accent); line-height: 1;
             letter-spacing: -0.04em; }
.flow__box h3 { font-size: 1rem; font-weight: 700; margin-top: 10px; }
.flow__box p { color: var(--muted); font-size: 0.9rem; margin-top: 5px; }

/* ── Вопросы ─────────────────────────────────────────────────────────────── */
.qs { margin-top: 22px; display: grid; gap: 10px; }
.qs__item { background: var(--field); border-radius: 14px; padding: 16px 20px; }
.qs__item summary { font-weight: 600; cursor: pointer; list-style: none; position: relative; padding-right: 26px; }
.qs__item summary::-webkit-details-marker { display: none; }
.qs__item summary::after { content: '↓'; position: absolute; right: 0; color: var(--accent); }
.qs__item[open] summary::after { content: '↑'; }
.qs__item p { color: var(--muted); font-size: 0.93rem; margin-top: 10px; }

.dark__row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.dark__phone { font-weight: 700; font-size: 1.15rem; margin-top: 24px; }

/* ── Подвал ──────────────────────────────────────────────────────────────── */
.base { padding: 16px 18px 30px; }
.base__name { font-weight: 700; }
.base__legal { color: var(--muted); font-size: 0.8rem; margin-top: 6px; }
.base__legal a { text-decoration: underline; }
.base__note { color: var(--muted); font-size: 0.74rem; margin-top: 10px; line-height: 1.6; }

/* ── Липкая панель снизу ─────────────────────────────────────────────────── */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--paper);
        border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
        gap: 20px; padding: 12px 18px; box-shadow: 0 -6px 24px rgba(20, 25, 50, 0.07); }
.dock__text { color: var(--muted); font-size: 0.9rem; }
.dock__btn { background: var(--accent); color: #fff; border: none; border-radius: 999px;
             padding: 12px 28px; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
.dock__btn:hover { background: var(--accent-dark); }

/* ── Окно заявки ─────────────────────────────────────────────────────────── */
.lead { position: fixed; inset: 0; z-index: 100; display: none; }
.lead.is-open { display: block; }
.lead__backdrop { position: absolute; inset: 0; background: rgba(25, 28, 45, 0.6); }
.lead__card { position: relative; max-width: 540px; margin: 6vh auto; background: var(--paper);
              border-radius: var(--radius); padding: 32px; max-height: 88vh; overflow-y: auto; }
.lead__close { position: absolute; top: 12px; right: 16px; background: none; border: none;
               font-size: 1.9rem; line-height: 1; color: var(--muted); cursor: pointer; }
.lead__title { font-size: 1.4rem; font-weight: 700; }
.lead__sub { color: var(--muted); font-size: 0.92rem; margin: 6px 0 20px; }

.lead-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lead-form__label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.lead-form__label > span:first-of-type { color: var(--accent); }
.lead-form__label--wide { grid-column: 1 / -1; }
.lead-form__input { width: 100%; margin-top: 5px; border: 1px solid var(--line); border-radius: 12px;
                    padding: 12px 14px; font: inherit; background: var(--paper); }
.lead-form__input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.lead-form__phone { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.lead-form__code { font-weight: 700; }
.lead-form__consent { grid-column: 1 / -1; display: flex; gap: 8px; font-size: 0.84rem; color: var(--muted); }
.lead-form__error { grid-column: 1 / -1; color: #b3261e; font-size: 0.85rem; font-weight: 600; }
.lead-form__submit { grid-column: 1 / -1; background: var(--accent); color: #fff; border: none;
                     border-radius: 999px; padding: 15px; font: inherit; font-weight: 700; cursor: pointer; }
.lead-form__submit:hover:not(:disabled) { background: var(--accent-dark); }
.lead-form__submit:disabled { opacity: 0.6; cursor: default; }
.lead-form__legal { grid-column: 1 / -1; font-size: 0.75rem; color: var(--muted); }
.lead-form__legal a { text-decoration: underline; }
.lead-form__done { text-align: center; padding: 20px 0; }
.lead-form__done-mark { width: 50px; height: 50px; margin: 0 auto 12px; border-radius: 50%;
                        background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 1.5rem; }
.lead-form__done-title { font-weight: 700; font-size: 1.05rem; }
.lead-form__done-text { color: var(--muted); margin-top: 5px; }

@media (max-width: 860px) {
    .hero2 { grid-template-columns: 1fr; }
    .hero2__pic { min-height: 220px; order: -1; }
    .hero2__text { padding: 30px 24px; }
    .tile { padding: 24px 20px; }
    .dock__text { display: none; }
    .lead-form { grid-template-columns: 1fr; }
}


/* Палитра сайта */
:root {
    --primary: #1F2A44;
    --color-primary: #1F2A44;
    --primary-dark: #161e30;
    --color-primary-dark: #161e30;
    --primary-light: #6d7485;
    --primary-deep: #1a2339;
    --primary-darker: #0d121e;
    --accent: #3A8FB7;
    --color-accent: #3A8FB7;
    --accent-hover: #2d6f8e;
    --color-accent-hover: #2d6f8e;
    --accent-light: #92c1d7;
}
