/* ============================================================
   Срочный выкуп квартир — стили
   Тёмный первый экран (navy + золото, как на баннерах), светлые секции.
   ============================================================ */

:root {
  --navy-950: #070D18;
  --navy-900: #0A1322;
  --navy-800: #0F1C33;
  --navy-700: #17294A;
  --navy-600: #22396A;

  --gold-200: #FBE3B5;
  --gold-400: #EFC581;
  --gold-500: #DDA858;
  --gold-700: #9A6A1F;
  --gold-800: #855A14; /* мелкий золотой текст на светлом фоне: контраст 5:1 */
  --gold-tint: #FBF1DC;
  --gold-line: #EBD3A4;

  --paper: #F6F3EC;
  --paper-2: #EDE8DD;
  --white: #FFFFFF;

  --ink: #0E1626;
  --ink-2: #3B4658;
  --ink-3: #6B7586;
  --line: #E4DED1;
  --line-2: #D8D2C4;
  --line-3: #B9B2A2;

  --err: #C8442F;
  --err-text: #B23A27;
  --err-tint: #FDF4F2;

  --r-sm: 12px;
  --r: 16px;
  --r-lg: 24px;
  --shadow: 0 18px 50px rgba(7, 13, 24, .45);
  --shadow-soft: 0 6px 24px rgba(14, 22, 38, .06);

  --wrap: 1228px;
  --font-h: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-b: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
img, svg { display: block; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.ico {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Знак: домик с замочной скважиной, одна заливка */
.mark { width: 36px; height: 36px; flex: none; fill: currentColor; color: var(--gold-400); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 56px; padding: 0 28px;
  border: 0; border-radius: var(--r-sm);
  font-family: var(--font-b); font-size: 16px; font-weight: 600; line-height: 1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn .ico { width: 20px; height: 20px; }

.btn-gold {
  background: linear-gradient(180deg, #F4D292 0%, var(--gold-500) 100%);
  color: #1A1205;
  box-shadow: 0 8px 22px rgba(221, 168, 88, .32);
}
.btn-navy { background: var(--navy-900); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .3); }
.btn-quiet { background: transparent; color: var(--ink-2); padding: 0 14px; }

@media (hover: hover) {
  .btn-gold:hover { background: linear-gradient(180deg, #F8DBA4 0%, #E4B265 100%); box-shadow: 0 10px 26px rgba(221, 168, 88, .42); }
  .btn-navy:hover { background: var(--navy-700); }
  .btn-ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .55); }
  .btn-quiet:hover { color: var(--ink); }
}

.btn-sm { height: 44px; padding: 0 18px; font-size: 14px; }
.btn-lg { height: 60px; padding: 0 32px; font-size: 17px; }
.btn-block { width: 100%; }

/* Отправка: script.js ставит disabled и меняет текст на «Отправляем…» */
.btn[disabled] { cursor: default; box-shadow: none; transform: none; }
.btn-gold[disabled] { background: #EBDDBF; color: #5C4A22; }
.btn-navy[disabled] { background: #55607A; color: #fff; }
.btn[disabled]::before {
  content: ''; flex: none; width: 18px; height: 18px; border-radius: 50%;
  border: 2.4px solid currentColor; border-left-color: transparent; border-bottom-color: transparent;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 19, 34, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: #fff;
}
.header-row { display: flex; align-items: center; gap: 24px; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; color: #fff; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; }
.brand-txt b { font-family: var(--font-h); font-weight: 800; font-size: 15px; letter-spacing: .05em; text-transform: uppercase; }
.brand-txt small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-400); margin-top: 4px; }

.nav { display: flex; gap: 28px; margin: 0 auto; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; color: rgba(255, 255, 255, .8); text-decoration: none; white-space: nowrap; }
.nav a:hover { color: #fff; }

.header-contacts { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav + .header-contacts { margin-left: 0; }
.msg-btn {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1.5px solid rgba(255, 255, 255, .22); border-radius: 50%; color: #fff;
  transition: border-color .15s ease, color .15s ease;
}
.msg-btn:hover { border-color: var(--gold-400); color: var(--gold-400); }
.msg-btn .ico { width: 18px; height: 18px; }
.header-phone {
  display: inline-flex; align-items: center; min-height: 44px; margin: 0 6px;
  font-family: var(--font-h); font-weight: 700; font-size: 17px;
  color: #fff; text-decoration: none; white-space: nowrap;
}

/* ---------- Первый экран ---------- */
.hero { position: relative; overflow: hidden; color: #fff; background: var(--navy-900); }
/* Один файл на все ширины; пока грузится — видна подложка .hero */
.hero-img {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
}
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--navy-900) 0%, rgba(10, 19, 34, .82) 30%, rgba(10, 19, 34, .4) 44%, rgba(10, 19, 34, 0) 52%);
}
.hero > .wrap, .stats-band { position: relative; z-index: 1; }

/* Шире 1440: кадр растёт быстрее экрана и прижат к правому краю —
   брелок остаётся в полосе между текстом и формой, а не уходит под форму */
@media (min-width: 1441px) {
  .hero-img { left: auto; right: 0; width: calc(131.58% - 455px); object-position: 50% 60%; }
  .hero::after {
    background: linear-gradient(90deg, var(--navy-900) 0%, rgba(10, 19, 34, .82) 30%, rgba(10, 19, 34, .4) 44%, rgba(10, 19, 34, 0) calc(35.53% + 238px));
  }
}
/* Шире 1920: раскладка 1920 замирает по центру, правый край кадра уходит в фон */
@media (min-width: 1921px) {
  .hero-img { left: 50%; right: auto; width: 2071px; margin-left: -1111px; }
  .hero::after {
    background:
      linear-gradient(90deg, rgba(10, 19, 34, 0) calc(50% + 720px), var(--navy-900) calc(50% + 960px)),
      linear-gradient(90deg, var(--navy-900) 0%, rgba(10, 19, 34, .82) calc(50% - 384px), rgba(10, 19, 34, .4) calc(50% - 115px), rgba(10, 19, 34, 0) calc(50% - 40px));
  }
}

.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 410px;
  gap: 64px; align-items: center; padding-top: 64px; padding-bottom: 56px;
}

.eyebrow { font-size: 13px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: rgba(255, 255, 255, .8); }
.eyebrow i { font-style: normal; color: var(--gold-400); margin: 0 4px; }
.eyebrow-dark { color: var(--gold-800); margin-bottom: 12px; }

.hero-title { margin-top: 20px; font-family: var(--font-h); font-weight: 800; }
.hero-title span { display: block; }
.ht-1 { font-size: clamp(46px, 4.2vw, 60px); line-height: 1; letter-spacing: -.01em; text-transform: uppercase; white-space: nowrap; }
.ht-2 {
  width: fit-content; margin-top: 4px; padding-bottom: 4px;
  font-size: clamp(90px, 8.1vw, 116px); line-height: .96; letter-spacing: -.01em; text-transform: uppercase;
  background: linear-gradient(180deg, var(--gold-200) 0%, var(--gold-400) 48%, #D39A49 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ht-3 { margin-top: 6px; font-size: clamp(26px, 2.2vw, 32px); line-height: 1.15; font-weight: 600; }

.hero-sub { margin-top: 14px; font-size: 18px; color: rgba(255, 255, 255, .82); }

/* Плашка процента и три пункта — в один ряд */
.hero-offer { display: flex; flex-wrap: wrap; align-items: stretch; gap: 20px 28px; max-width: 630px; margin-top: 30px; }
.offer-pill {
  flex: none; display: flex; flex-direction: column; justify-content: center; gap: 8px;
  min-width: 236px; padding: 22px 26px;
  border: 1.5px solid rgba(239, 197, 129, .55); border-radius: 20px;
  background: rgba(10, 19, 34, .6);
}
.offer-pill b { font-family: var(--font-h); font-weight: 800; font-size: 52px; line-height: 1; white-space: nowrap; color: var(--gold-400); }
.offer-pill span { font-size: 16px; line-height: 1.3; color: rgba(255, 255, 255, .88); }

.hero-points { flex: 1 1 280px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.hero-points li { display: flex; align-items: center; gap: 14px; font-size: 16px; line-height: 1.3; }
/* Две строки на пункт: текст не заходит на сюжет фото справа */
.hero-points li > span:last-child { max-width: 200px; }
.pt-ico {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 1.5px solid var(--gold-400); border-radius: 50%;
  background: rgba(10, 19, 34, .5); color: var(--gold-400);
}
.pt-ico .ico { width: 20px; height: 20px; }

.hero-form { width: 100%; }

.stats-band { border-top: 1px solid rgba(255, 255, 255, .12); background: rgba(7, 13, 24, .68); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); padding: 28px 0 32px; }
.stats li { padding: 0 24px; border-left: 1px solid rgba(255, 255, 255, .12); }
.stats li:first-child { padding-left: 0; border-left: 0; }
.stats b {
  display: block; font-family: var(--font-h); font-weight: 800;
  font-size: clamp(26px, 2.4vw, 34px); line-height: 1.1; color: var(--gold-400); white-space: nowrap;
}
.stats span { display: block; max-width: 210px; margin-top: 6px; font-size: 14px; line-height: 1.35; color: rgba(255, 255, 255, .76); }

/* ---------- Формы ---------- */
.card-form {
  position: relative; background: #fff; color: var(--ink);
  border-radius: var(--r-lg); padding: 30px; box-shadow: var(--shadow);
}
.card-form-flat { box-shadow: var(--shadow-soft); border: 1px solid var(--line); }

.cf-title { font-family: var(--font-h); font-weight: 800; font-size: 24px; line-height: 1.15; color: var(--navy-900); }
.cf-sub { margin-top: 8px; font-size: 15px; color: var(--ink-2); }
.cf-title + .field, .cf-title + .hp + .field { margin-top: 18px; }
.cf-sub + .hp + .field, .cf-sub + .field { margin-top: 18px; }

.field { display: block; margin-bottom: 14px; }
.field-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--ink-3); }
.field input, .field textarea {
  display: block; width: 100%; padding: 0 16px;
  border: 1.5px solid var(--line-2); border-radius: var(--r-sm);
  background: #fff; font-size: 16px; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input { height: 54px; }
.field textarea { padding: 14px 16px; resize: vertical; min-height: 96px; line-height: 1.4; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); opacity: 1; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(34, 57, 106, .16);
}
.field input.is-invalid { border-color: var(--err); box-shadow: 0 0 0 3px rgba(200, 68, 47, .12); }

/* Согласие: свой чекбокс, зона клика — вся строка (от 44 px) */
.consent {
  display: flex; gap: 12px; align-items: flex-start; min-height: 44px; margin: 4px 0 14px;
  font-size: 13px; line-height: 1.4; color: var(--ink-3); cursor: pointer;
}
.consent input {
  -webkit-appearance: none; appearance: none;
  flex: none; width: 22px; height: 22px; margin: 0;
  border: 1.5px solid var(--line-3); border-radius: 6px;
  background: #fff center / 14px no-repeat; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.consent input:checked {
  border-color: var(--navy-900); background-color: var(--navy-900);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23EFC581' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.consent a { color: var(--ink-2); }
.consent.is-invalid { color: var(--err-text); }
.consent.is-invalid a { color: var(--err-text); }
.consent.is-invalid input { border-color: var(--err); background-color: var(--err-tint); box-shadow: 0 0 0 3px rgba(200, 68, 47, .12); }

.form-msg {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 0 0 12px; font-size: 14px; line-height: 1.4; color: var(--err-text);
}
.form-msg::before {
  content: ''; flex: none; width: 18px; height: 18px; margin-top: 1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B23A27' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 7v6M12 16.5v.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.cf-alt { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; margin-top: 10px; font-size: 14px; color: var(--ink-3); }
.cf-alt a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; color: var(--navy-700); text-decoration: none; }
.cf-alt a:hover { text-decoration: underline; }
.cf-alt .ico { width: 16px; height: 16px; }

/* После отправки script.js ставит форме data-sent и оставляет в ней только .form-ok */
.lead-form[data-sent] { display: grid; place-items: center; }
.card-form[data-sent] { min-height: 380px; }
.modal .lead-form[data-sent] { min-height: 260px; }

.form-ok { text-align: center; padding: 12px 4px; }
.ok-ico {
  display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 22px;
  border-radius: 50%; background: var(--navy-900); color: var(--gold-400);
}
.ok-ico .ico { width: 34px; height: 34px; stroke-width: 2.2; }
.form-ok h3 { font-family: var(--font-h); font-weight: 800; font-size: 26px; line-height: 1.15; color: var(--navy-900); }
.form-ok p { max-width: 360px; margin: 10px auto 0; font-size: 17px; color: var(--ink-2); }
.form-ok .ok-dev { margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: #FFF4D6; color: #7A5A12; font-size: 13px; line-height: 1.4; }

/* ---------- Секции ---------- */
.section { padding: 96px 0; }
.section-alt { background: #fff; }
.section-dark { color: #fff; background: var(--navy-900); }

.sec-head { max-width: 760px; margin-bottom: 44px; }
.sec-title { font-family: var(--font-h); font-weight: 800; font-size: clamp(26px, 3vw, 40px); line-height: 1.12; letter-spacing: -.01em; color: var(--navy-900); }
.sec-lead { margin-top: 14px; font-size: 18px; line-height: 1.5; color: var(--ink-2); max-width: 640px; }
.section-dark .sec-title { color: #fff; }
.section-dark .sec-lead { color: rgba(255, 255, 255, .8); }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ---------- Сложные ситуации ---------- */
/* Залог — главная карточка: все реальные сделки залоговые */
.sit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 20px; }
.sit-list { display: flex; flex-direction: column; gap: 16px; }

.s-card {
  flex: 1; display: flex; align-items: center; gap: 20px;
  padding: 24px 28px; border: 1px solid var(--line); border-radius: var(--r); background: #fff;
}
.s-ico {
  display: grid; place-items: center; width: 52px; height: 52px; flex: none;
  border-radius: 14px; background: var(--gold-tint); color: var(--gold-800);
}
.s-card h3 { font-family: var(--font-h); font-weight: 700; font-size: 19px; line-height: 1.25; color: var(--navy-900); }
.s-card p { margin-top: 4px; font-size: 15px; color: var(--ink-2); }

.s-card-main {
  position: relative; overflow: hidden;
  flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 48px;
  min-height: 348px; padding: 36px;
  border: 0; border-radius: var(--r-lg); background: var(--navy-900); color: #fff;
}
.s-card-main .s-ico {
  position: relative; width: 60px; height: 60px;
  border: 1.5px solid var(--gold-400); border-radius: 50%; background: transparent; color: var(--gold-400);
}
.s-card-main .s-ico .ico { width: 26px; height: 26px; }
.s-card-main .s-body { position: relative; max-width: 340px; }
.s-card-main h3 { font-weight: 800; font-size: 32px; line-height: 1.15; letter-spacing: -.01em; color: #fff; }
.s-card-main p { margin-top: 12px; font-size: 18px; line-height: 1.45; color: rgba(255, 255, 255, .82); }
.s-deco {
  position: absolute; right: -34px; bottom: -44px; width: 250px; height: 250px;
  color: var(--gold-400); stroke-width: .7; opacity: .2; pointer-events: none;
}

.direct {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px;
  margin-top: 20px; padding: 24px 28px;
  border: 1px solid var(--gold-line); border-radius: 20px; background: var(--gold-tint);
}
.direct-ico { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--navy-900); color: var(--gold-400); }
.direct-ico .ico { width: 22px; height: 22px; stroke-width: 2.2; }
.direct p { flex: 1 1 320px; font-family: var(--font-h); font-weight: 700; font-size: 20px; line-height: 1.3; color: var(--navy-900); }

/* ---------- Шаги ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps li { position: relative; }
.steps li:not(:last-child)::after {
  content: ''; position: absolute; top: 28px; left: 72px; right: -12px;
  border-top: 1.5px dashed var(--line-2);
}
.step-n {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--navy-900); color: var(--gold-400);
  font-family: var(--font-h); font-weight: 800; font-size: 20px;
}
.steps li:last-child .step-n { background: linear-gradient(180deg, #F4D292 0%, var(--gold-500) 100%); color: #1A1205; }
.steps h3 { margin-top: 20px; font-family: var(--font-h); font-weight: 700; font-size: 19px; line-height: 1.25; color: var(--navy-900); }
.steps p { margin-top: 8px; font-size: 15px; color: var(--ink-2); max-width: 260px; }

/* ---------- Сделки ---------- */
.case { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.case-top { flex: 1; padding: 24px; }
.case-loc { display: flex; align-items: flex-start; gap: 10px; line-height: 1.3; color: var(--navy-900); }
.case-loc .ico { width: 20px; height: 20px; margin-top: 2px; color: var(--gold-800); }
.case-loc b { display: block; font-weight: 600; font-size: 18px; }
.case-loc span span { display: block; margin-top: 2px; font-size: 15px; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.chips li {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px;
  border-radius: 8px; background: var(--paper); font-size: 13px; line-height: 1.3; color: var(--ink-2);
}
.chips .chip-lock { background: var(--gold-tint); color: #6A470F; }
.chips .ico { width: 13px; height: 13px; stroke-width: 2.2; }
.case-sum {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 16px 24px 18px; background: var(--navy-900); color: #fff;
}
.case-sum span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .76); }
.case-sum b { font-family: var(--font-h); font-weight: 800; font-size: 28px; line-height: 1.1; color: var(--gold-400); white-space: nowrap; }

/* ---------- Квиз ---------- */
.quiz-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 64px; align-items: center; }
.quiz-copy .sec-title { max-width: 520px; }
.factors-title { margin-top: 40px; font-size: 13px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-400); }
.factors { max-width: 480px; margin-top: 8px; }
.factors li { display: flex; align-items: baseline; gap: 20px; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.factors b { flex: none; width: 132px; font-weight: 600; font-size: 17px; }
.factors span { font-size: 15px; color: rgba(255, 255, 255, .76); }
.factors-total { margin-top: 22px; font-size: 17px; color: rgba(255, 255, 255, .88); }
.factors-total b { margin: 0 2px; font-family: var(--font-h); font-weight: 800; font-size: 26px; color: var(--gold-400); white-space: nowrap; }

.quiz { display: flex; flex-direction: column; width: 100%; padding: 32px; }
.quiz[data-sent] { display: grid; min-height: 480px; }
.quiz-progress { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.quiz-count { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.quiz-count b { color: var(--ink); }
/* Пять сегментов: маска режет сплошную полосу, ширину заливки по-прежнему ставит script.js */
.quiz-bar {
  flex: 1; height: 6px; border-radius: 3px; background: var(--paper-2); overflow: hidden;
  -webkit-mask: linear-gradient(90deg, #000 0, #000 calc(100% - 4px), transparent calc(100% - 4px)) 0 0 / 20% 100%;
  mask: linear-gradient(90deg, #000 0, #000 calc(100% - 4px), transparent calc(100% - 4px)) 0 0 / 20% 100%;
}
.quiz-bar i { display: block; height: 100%; width: 20%; background: var(--gold-500); transition: width .25s ease; }

.q-step { display: none; border: 0; padding: 0; margin: 0; min-width: 0; min-height: 268px; }
.q-step.is-active { display: block; }
.q-step legend { padding: 0; margin-bottom: 18px; font-family: var(--font-h); font-weight: 800; font-size: 22px; line-height: 1.2; color: var(--navy-900); }
.q-hint { font-size: 14px; color: var(--ink-3); }

.opts { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.opts-col { flex-direction: column; margin-bottom: 14px; }
.opt { position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt span {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-width: 56px; min-height: 52px; padding: 12px 18px;
  border: 1.5px solid var(--line-2); border-radius: var(--r-sm); background: #fff;
  font-size: 16px; font-weight: 500; color: var(--ink);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.opts-col .opt span { justify-content: flex-start; padding: 12px 16px; }
/* Индикатор: круг — один ответ, квадрат — несколько */
.opts-col .opt span::before {
  content: ''; flex: none; width: 22px; height: 22px;
  border: 1.5px solid var(--line-3); border-radius: 50%; background: #fff center / 14px no-repeat;
  transition: background-color .15s ease, border-color .15s ease;
}
.opts-col .opt input[type="checkbox"] + span::before { border-radius: 6px; }

@media (hover: hover) {
  .opt:hover span { border-color: var(--navy-600); background: var(--paper); }
  .opt:hover span::before { border-color: var(--navy-600); }
}

.opt input:checked + span { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.opts-col .opt input[type="radio"]:checked + span::before {
  border-color: var(--gold-400);
  background: radial-gradient(circle, var(--navy-900) 0, var(--navy-900) 4px, var(--gold-400) 4.6px);
}
.opts-col .opt input[type="checkbox"]:checked + span::before {
  border-color: var(--gold-400); background-color: var(--gold-400);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A1322' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.opt input:focus-visible + span { outline: 2px solid var(--gold-500); outline-offset: 2px; }
.opts.is-invalid .opt span { border-color: var(--err); background: var(--err-tint); }
.opts.is-invalid .opt span::before { border-color: var(--err); }

.quiz .form-msg { margin: 0; }
.quiz-nav { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 16px; }
.quiz-nav .btn-gold { margin-left: auto; }

/* ---------- Партнёрам ---------- */
.partners-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 460px); gap: 64px; align-items: center; }
.partners-grid .sec-lead { max-width: 600px; }
.ticks { margin-top: 28px; display: grid; gap: 14px; }
.ticks li { display: flex; align-items: center; gap: 14px; font-size: 17px; line-height: 1.4; }
.ticks .ico {
  width: 28px; height: 28px; padding: 6.5px; border-radius: 50%;
  background: var(--navy-900); color: var(--gold-400); stroke-width: 2.6;
}

/* ---------- Вопросы ---------- */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 64px; align-items: start; }
.faq-wrap .sec-head { margin-bottom: 0; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 72px; padding: 18px 0; list-style: none; cursor: pointer;
  font-family: var(--font-h); font-weight: 700; font-size: 18px; line-height: 1.3; color: var(--navy-900);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex: none; width: 36px; height: 36px;
  border: 1.5px solid var(--line-2); border-radius: 50%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23855A14' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 16px no-repeat;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { max-width: 720px; padding: 0 60px 24px 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }

/* ---------- Финальный призыв ---------- */
.cta { padding: 72px 0; color: #fff; background: var(--navy-900); }
.cta-inner {
  position: relative; overflow: hidden;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px 48px;
  padding: 48px 56px; border: 1px solid rgba(239, 197, 129, .28); border-radius: var(--r-lg); background: var(--navy-800);
}
.cta-deco { position: absolute; left: -70px; bottom: -110px; width: 300px; height: 300px; opacity: .06; pointer-events: none; }
.cta-copy { position: relative; flex: 1 1 420px; min-width: 0; }
.cta h2 { max-width: 560px; font-family: var(--font-h); font-weight: 800; font-size: clamp(26px, 2.8vw, 38px); line-height: 1.12; letter-spacing: -.01em; }
.cta p { max-width: 560px; margin-top: 14px; font-size: 18px; color: rgba(255, 255, 255, .8); }
.cta-btns { position: relative; display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Подвал ---------- */
.site-footer { background: var(--navy-950); color: rgba(255, 255, 255, .68); font-size: 14px; padding: 48px 0 56px; }
.footer-grid { display: grid; grid-template-columns: 1.1fr .8fr 1.4fr; gap: 48px; align-items: start; }
.footer-note { margin-top: 16px; max-width: 300px; }
.footer-phone { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--font-h); font-weight: 700; font-size: 20px; color: #fff; text-decoration: none; }
.footer-msg { display: flex; gap: 20px; }
.footer-msg a { display: inline-flex; align-items: center; min-height: 44px; color: var(--gold-400); text-decoration: none; }
.footer-msg a:hover { text-decoration: underline; }
.footer-legal p + p { margin-top: 10px; }
.footer-legal a { color: rgba(255, 255, 255, .84); }

/* ---------- Мобильная панель ---------- */
.mbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  grid-template-columns: 1fr 1.25fr; gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(10, 19, 34, .96);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, .1);
  transform: translateY(110%); transition: transform .25s ease;
}
.mbar.is-on { transform: translateY(0); }
.mbar .btn { height: 48px; padding: 0 12px; font-size: 15px; }
.mbar .btn .ico { width: 18px; height: 18px; }

/* ---------- Окно обратного звонка ---------- */
.modal {
  width: min(440px, calc(100vw - 32px)); padding: 36px 30px 30px;
  border: 0; border-radius: var(--r-lg); background: #fff; color: var(--ink);
  box-shadow: var(--shadow);
}
.modal::backdrop { background: rgba(7, 13, 24, .68); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal .cf-title { padding-right: 36px; }
.modal-x {
  position: absolute; top: 10px; right: 10px; display: grid; place-items: center;
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); cursor: pointer;
}
.modal-x:hover { background: var(--paper); color: var(--ink); }
.modal-x .ico { width: 22px; height: 22px; }

/* ---------- Уведомление о cookie (показывается только при подключённой Метрике) ---------- */
.cookie {
  position: fixed; left: 16px; bottom: 16px; z-index: 70; max-width: 380px;
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  font-size: 13px; line-height: 1.4; color: var(--ink-2);
}
.cookie .btn { height: 44px; padding: 0 14px; font-size: 14px; }

/* ---------- Страница документа (политика) ---------- */
.doc { max-width: 820px; padding-top: 56px; padding-bottom: 80px; }
.doc h1 { font-family: var(--font-h); font-weight: 800; font-size: clamp(26px, 3.4vw, 36px); line-height: 1.15; color: var(--navy-900); }
.doc h2 { margin-top: 40px; font-family: var(--font-h); font-weight: 700; font-size: 20px; color: var(--navy-900); }
.doc p, .doc li { margin-top: 12px; color: var(--ink-2); line-height: 1.6; }
.doc ul { list-style: disc; padding-left: 22px; }
.doc .doc-meta { margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.doc a { color: var(--navy-700); }

/* ============================================================
   Адаптив
   ============================================================ */

/* Ниже 1200 между текстом и формой не остаётся места под сюжет фото: форма уходит под текст */
@media (max-width: 1199px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; padding-top: 48px; }
  .hero-form { max-width: 520px; }
  .hero-img { bottom: auto; width: 150%; max-width: none; height: 640px; object-position: 0 50%; }
  .hero::after {
    bottom: auto; height: 640px;
    background:
      linear-gradient(180deg, rgba(10, 19, 34, 0) 70%, var(--navy-900) 100%),
      linear-gradient(90deg, var(--navy-900) 0%, rgba(10, 19, 34, .7) 45%, rgba(10, 19, 34, 0) 75%);
  }
  .ht-1 { font-size: 48px; }
  .ht-2 { font-size: 94px; }
  .ht-3 { font-size: 28px; }
}

@media (max-width: 1120px) {
  .nav { display: none; }
  .header-contacts, .nav + .header-contacts { margin-left: auto; }
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .stats li:nth-child(odd) { padding-left: 0; border-left: 0; }
  .sit-grid { grid-template-columns: 1fr; }
  .s-card-main { min-height: 0; }
  .quiz-grid, .partners-grid, .faq-wrap { grid-template-columns: 1fr; gap: 40px; }
  .quiz, .partners-grid .card-form { max-width: 560px; }
  .faq-wrap { gap: 24px; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 32px 28px; }
  .steps li::after { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-legal { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .hero-img { width: 160%; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 72px; }
  .wrap { padding: 0 16px; }

  .header-row { height: 60px; gap: 12px; justify-content: space-between; }
  .msg-btn, .header-contacts .btn { display: none; }
  .brand { gap: 10px; min-width: 0; }
  .mark { width: 32px; height: 32px; }
  .brand-txt { white-space: normal; }
  .brand-txt b { max-width: 140px; font-size: 12px; line-height: 1.2; }
  .brand-txt small { display: none; }
  .header-phone { font-size: 15px; margin: 0; }

  /* Первый экран: фото только под текстом, сюжет справа; форма — после трёх пунктов */
  .hero-img { width: 100%; height: 580px; object-position: 38% 50%; }
  .hero::after {
    height: 580px;
    background:
      linear-gradient(180deg, rgba(10, 19, 34, 0) 76%, var(--navy-900) 100%),
      linear-gradient(90deg, rgba(10, 19, 34, .78) 0%, rgba(10, 19, 34, .55) 40%, rgba(10, 19, 34, 0) 70%);
  }
  .hero-grid { gap: 32px; padding-top: 32px; padding-bottom: 0; }
  .eyebrow { font-size: 11px; letter-spacing: .2em; }
  .eyebrow i { margin: 0 2px; }
  .eyebrow-dark { font-size: 12px; margin-bottom: 10px; }
  .hero-title { margin-top: 14px; }
  .ht-1 { font-size: 33px; }
  .ht-2 { font-size: 62px; padding-bottom: 2px; }
  .ht-3 { font-size: 22px; }
  .hero-sub { max-width: 250px; margin-top: 12px; font-size: 16px; line-height: 1.4; }
  .hero-offer { display: block; margin-top: 20px; }
  .offer-pill { display: inline-flex; flex-direction: row; align-items: center; gap: 14px; min-width: 0; padding: 14px 18px; border-radius: 16px; background: rgba(10, 19, 34, .66); }
  .offer-pill b { font-size: 40px; }
  .offer-pill span { max-width: 96px; font-size: 14px; line-height: 1.25; }
  .hero-points { margin-top: 22px; }
  .hero-points li { gap: 12px; font-size: 15px; }
  .hero-points li > span:last-child { max-width: 180px; }
  .hero-form { max-width: none; }

  .stats-band { border-top: 0; background: none; }
  .stats { gap: 22px 16px; margin-top: 32px; padding: 24px 0 32px; border-top: 1px solid rgba(255, 255, 255, .12); }
  .stats li { padding: 0; border-left: 0; }
  .stats b { font-size: 22px; }
  .stats span { max-width: none; }

  .card-form { padding: 22px 18px; border-radius: 20px; }
  .cf-title { font-size: 22px; }
  .consent input { width: 24px; height: 24px; }
  .card-form[data-sent] { min-height: 320px; }

  .section { padding: 56px 0; }
  .sec-head { margin-bottom: 28px; }
  .sec-title { line-height: 1.15; }
  .sec-lead { margin-top: 12px; font-size: 16px; }
  .grid-4 { grid-template-columns: 1fr; gap: 14px; }

  .sit-grid, .sit-list { gap: 12px; }
  .s-card { align-items: flex-start; gap: 16px; padding: 20px; }
  .s-ico { width: 48px; height: 48px; border-radius: 12px; }
  .s-card h3 { font-size: 17px; }
  .s-card p { margin-top: 6px; }
  .s-card-main { gap: 20px; padding: 24px; border-radius: 20px; }
  .s-card-main .s-ico { width: 52px; height: 52px; }
  .s-card-main .s-ico .ico { width: 24px; height: 24px; }
  .s-card-main h3 { font-size: 24px; }
  .s-card-main p { margin-top: 8px; font-size: 16px; }
  .s-deco { right: -26px; top: -22px; bottom: auto; width: 170px; height: 170px; stroke-width: .8; }

  .direct { display: block; margin-top: 16px; padding: 22px 20px; }
  .direct p { margin-top: 14px; font-size: 17px; }
  .direct .btn { width: 100%; height: 52px; margin-top: 18px; }

  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { display: grid; grid-template-columns: 48px 1fr; column-gap: 16px; padding-bottom: 26px; }
  .steps li:last-child { padding-bottom: 0; }
  .steps li:not(:last-child)::after {
    display: block; top: 52px; bottom: 4px; left: 23px; right: auto;
    border-top: 0; border-left: 1.5px dashed var(--line-2);
  }
  .steps .step-n { grid-row: span 2; width: 48px; height: 48px; font-size: 18px; }
  .steps h3 { margin-top: 2px; font-size: 18px; }
  .steps p { margin-top: 6px; max-width: none; }

  .case-top { padding: 20px; }
  .case-loc b { display: inline; font-size: 17px; }
  .case-loc span span { display: inline; margin-top: 0; }
  .chips { margin-top: 14px; }
  .case-sum { padding: 14px 20px 16px; }
  .case-sum b { font-size: 26px; }

  /* Квиз: карточка сразу после заголовка, список «от чего зависит цена» — под ней */
  .quiz-grid { display: flex; flex-direction: column; gap: 0; }
  .quiz-copy { display: contents; }
  .quiz-copy .sec-title { order: 1; }
  .quiz-copy .sec-lead { order: 2; }
  .quiz { order: 3; max-width: none; margin-top: 28px; padding: 22px 18px; }
  .factors-title { order: 4; margin-top: 36px; }
  .factors { order: 5; max-width: none; margin-top: 6px; }
  .factors-total { order: 6; margin-top: 20px; font-size: 16px; }
  .factors li { display: block; padding: 14px 0; }
  .factors b { display: block; width: auto; }
  .factors span { display: block; margin-top: 2px; }
  .factors-total b { font-size: 22px; }
  .quiz-progress { gap: 14px; margin-bottom: 20px; }
  .q-step { min-height: 0; }
  .q-step legend { margin-bottom: 16px; font-size: 20px; }
  .quiz-nav { padding-top: 20px; }
  .quiz-nav .btn-gold { flex: 1; }
  .quiz[data-sent] { min-height: 360px; }

  .partners-grid { gap: 28px; }
  .partners-grid .card-form { max-width: none; }
  .ticks { margin-top: 22px; gap: 12px; }
  .ticks li { align-items: flex-start; gap: 12px; font-size: 16px; }
  .ticks .ico { width: 24px; height: 24px; padding: 5.5px; }

  .faq summary { gap: 16px; min-height: 64px; padding: 14px 0; font-size: 16px; }
  .faq summary::after { width: 32px; height: 32px; background-size: 14px; }
  .faq details p { padding: 0 0 20px; font-size: 15px; }

  .cta { padding: 40px 0 48px; }
  .cta-inner { display: block; padding: 28px 22px; border-radius: 20px; }
  .cta-deco { left: auto; right: -56px; top: -60px; bottom: auto; width: 200px; height: 200px; }
  .cta p { margin-top: 12px; font-size: 16px; }
  .cta-btns { display: grid; gap: 12px; margin-top: 24px; }
  .cta-btns .btn { width: 100%; height: 56px; font-size: 16px; }

  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-note { margin-top: 14px; max-width: none; }
  .footer-legal { padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); }
  .site-footer { padding: 40px 0 104px; }

  .mbar { display: grid; }
  .cookie { left: 12px; right: 12px; bottom: 80px; max-width: none; }

  /* Окно на мобильном прижато к низу экрана */
  .modal {
    width: 100%; max-width: 100%; margin: auto 0 0;
    padding: 30px 18px calc(24px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
  }
  .modal .cf-title { padding-right: 40px; }
  .modal-x { top: 8px; right: 8px; }
}

@media (max-width: 380px) {
  .opts-col .opt span { padding: 12px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
