/* DomPro.kz — стили. Mobile-first, без внешних шрифтов. */
:root {
  --ink: #14213D;          /* заголовки, тёмные блоки */
  --text: #273142;         /* основной текст */
  --muted: #5B6472;        /* второстепенный текст */
  --line: #E1E6ED;
  --bg: #FFFFFF;
  --soft: #F4F6F9;
  --brand: #1F3A60;        /* спокойный фирменный синий: иконки, выбор в квизе */
  --brand-soft: #E8EEF6;
  --ok: #157F3D;           /* галочки */
  --accent: #CC4A0B;       /* ЕДИНСТВЕННЫЙ цвет кнопок действия */
  --accent-hover: #B03F08;
  --danger: #B42318;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(20, 33, 61, .05), 0 10px 30px rgba(20, 33, 61, .08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.55 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); /* место под нижнюю панель */
}
img, svg { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
a { color: var(--brand); }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
h1, h2, h3 { color: var(--ink); margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgba(31, 58, 96, .45); outline-offset: 2px; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.container--narrow { max-width: 820px; }

.h2 { font-size: 25px; line-height: 1.22; font-weight: 800; letter-spacing: -.01em; margin-bottom: 22px; }
.h3 { font-size: 18px; line-height: 1.3; font-weight: 700; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 13px 22px;
  border: 2px solid transparent; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 17px; line-height: 1.2; text-align: center; text-decoration: none;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color .15s, border-color .15s, color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { background: #fff; color: var(--accent); border-color: var(--accent); }
.btn--ghost:hover { background: #FFF4EE; }
.btn--lg { min-height: 56px; font-size: 18px; }
.btn--block { width: 100%; }
.btn[disabled] { cursor: progress; opacity: .8; }
.btn.is-loading::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--brand); }

/* ---------- Шапка ---------- */
.header { background: #fff; border-bottom: 1px solid var(--line); }
.header__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.logo__mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--ink); color: #fff; }
.logo__text { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.logo__text span { color: var(--muted); font-weight: 700; }
.header__contacts { display: flex; align-items: center; gap: 6px; }
.header__phone, .header__wa {
  display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 6px;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px; white-space: nowrap;
}
.header__wa span { display: none; }
.header__wa { color: var(--brand); }
@media (max-width: 359px) { .header__wa { display: none; } }
.header__cta { display: none; }

/* ---------- Первый экран ---------- */
.hero { background: linear-gradient(180deg, var(--soft) 0%, #fff 100%); padding: 18px 0 36px; }
.hero__eyebrow { display: inline-flex; align-items: baseline; gap: 8px; font-size: 14px; font-weight: 600; color: var(--brand); margin-bottom: 8px; }
.hero__eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex-shrink: 0; transform: translateY(-1px); }
.hero__title { font-size: 28px; line-height: 1.17; font-weight: 800; letter-spacing: -.015em; margin-bottom: 12px; }
.hero__sub { font-size: 16.5px; line-height: 1.5; color: #3B4556; margin-bottom: 18px; max-width: 640px; }
.hero__actions { display: grid; gap: 10px; }
.hero__note { font-size: 14px; color: var(--muted); margin: 10px 0 18px; }
.hero__facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.hero__facts li { display: flex; align-items: flex-start; gap: 9px; font-size: 15.5px; line-height: 1.4; color: var(--ink); }
.hero__facts svg { color: var(--ok); margin-top: 1px; }
.hero__card { margin-top: 28px; box-shadow: var(--shadow); }
.hero__card-label { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.hero__card-q { font-size: 20px; font-weight: 800; color: var(--ink); margin-bottom: 14px; }
.hero__card-note { font-size: 14px; color: var(--muted); margin-top: 14px; }

/* ---------- Варианты ответа (квиз) ---------- */
.opts { display: grid; gap: 10px; }
.opts--4 { grid-template-columns: repeat(4, 1fr); }
.opts--2 { grid-template-columns: repeat(2, 1fr); }
.opts--1 { grid-template-columns: 1fr; }
.opt {
  min-height: 56px; padding: 10px 12px;
  background: #fff; border: 1.5px solid #CDD5E0; border-radius: var(--radius-sm);
  font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.25;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color .12s, background-color .12s, box-shadow .12s;
}
.opt:hover { border-color: var(--brand); }
.opt.is-selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.opts--2 .opt { font-size: 16px; min-height: 52px; }
.opt--wide { text-align: left; padding: 14px 16px; }

/* ---------- Секции ---------- */
.section { padding: 52px 0; }
.section--soft { background: var(--soft); }
.section--dark { background: var(--ink); color: rgba(255, 255, 255, .86); }
.section--dark .h2 { color: #fff; }

/* Боли */
.pains { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pain__q, .pain__a { display: flex; gap: 10px; align-items: flex-start; }
.pain__q { font-weight: 700; color: var(--ink); font-size: 17px; line-height: 1.35; margin-bottom: 10px; }
.pain__q svg { color: #8B95A5; margin-top: 1px; }
.pain__a { color: var(--text); }
.pain__a svg { color: var(--ok); margin-top: 2px; }

/* Почему мы */
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.feature .h3 { margin: 14px 0 6px; }
.feature p { color: #3B4556; }
.feature__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.photo { margin: 24px 0 0; }
.photo img { width: 100%; height: auto; border-radius: var(--radius); }
.photo figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* Шаги */
.how { display: grid; gap: 28px; }
.steps { list-style: none; margin: 0; padding: 0; }
.step { position: relative; display: flex; gap: 14px; padding-bottom: 22px; }
.step:last-child { padding-bottom: 0; }
.step::before { content: ""; position: absolute; left: 17px; top: 38px; bottom: 2px; width: 2px; background: var(--line); }
.step:last-child::before { display: none; }
.step__n { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; font-size: 16px; flex-shrink: 0; }
.step .h3 { margin: 6px 0 4px; }
.step p { color: #3B4556; }
.price { box-shadow: var(--shadow); align-self: start; }
.price__list { margin: 14px 0 12px; display: grid; gap: 12px; }
.price__list div { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.price__list dt { font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.price__list dd { margin: 2px 0 0; color: var(--muted); }
.price__note { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.price__note svg { color: var(--ok); }
.price .btn { margin-top: 10px; }

/* Цифры */
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 16px; }
.stats b { display: block; font-size: 40px; line-height: 1.05; font-weight: 800; color: #fff; letter-spacing: -.02em; margin-bottom: 6px; }
.stats li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.stats span { font-size: 15px; line-height: 1.4; color: rgba(255, 255, 255, .75); }
.stats__badge {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 28px; padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; color: #fff; font-weight: 600; font-size: 15px;
}

/* Отзывы */
.reviews { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.review__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 18px; flex-shrink: 0; }
.review__name { font-weight: 700; color: var(--ink); margin: 0; line-height: 1.3; }
.review__type { font-size: 14px; color: var(--muted); margin: 0; }
.review__text { font-size: 15.5px; line-height: 1.55; color: #3B4556; position: relative; }
.review__text.is-clamped { max-height: calc(1.55em * 7); overflow: hidden; }
.review__text.is-clamped::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3em; background: linear-gradient(rgba(255, 255, 255, 0), #fff); }
.review__toggle { margin-top: 8px; padding: 6px 0; background: none; border: 0; color: var(--brand); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.reviews__more { margin-top: 20px; }

/* Основатель */
.founder { margin: 0; display: grid; gap: 18px; padding: 24px; }
.founder__photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.founder__photo--empty { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 40px; font-weight: 800; }
.founder__quote { margin: 0 0 14px; font-size: 18px; line-height: 1.55; color: var(--ink); }
.founder__name { display: flex; flex-direction: column; }
.founder__name b { color: var(--ink); }
.founder__name span { color: var(--muted); font-size: 15px; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  position: relative; list-style: none; cursor: pointer;
  padding: 18px 40px 18px 0; font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.35;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2.5px solid var(--brand); border-bottom: 2.5px solid var(--brand); transform: rotate(45deg);
  transition: transform .15s;
}
.faq__item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq__a { padding: 0 0 18px; color: #3B4556; }

/* Финальная форма */
.cta__grid { display: grid; gap: 24px; }
.cta__text { font-size: 17px; }
.cta__alt { color: rgba(255, 255, 255, .75); }
.cta__alt a { color: #fff; font-weight: 600; }
.cta .lead-form { color: var(--text); box-shadow: 0 20px 40px rgba(0, 0, 0, .25); }

/* Поля формы */
.lead-form { display: block; }
.field { display: block; margin-bottom: 14px; }
.field__label { display: block; font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field__input {
  width: 100%; height: 54px; padding: 0 14px;
  border: 1.5px solid #CDD5E0; border-radius: var(--radius-sm); background: #fff;
  font: 600 18px/1.2 var(--font); color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
.field__input::placeholder { color: #A0A8B5; font-weight: 400; }
.field__input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31, 58, 96, .15); }
.field__input.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(180, 35, 24, .12); }
.field__error { color: var(--danger); font-size: 14px; margin: -8px 0 12px; }
.seg { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.seg__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg__opt { position: relative; }
.seg__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg__opt span {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 8px 10px;
  border: 1.5px solid #CDD5E0; border-radius: var(--radius-sm); font-weight: 700; color: var(--ink); cursor: pointer;
}
.seg__opt input:checked + span { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.seg__opt input:focus-visible + span { outline: 3px solid rgba(31, 58, 96, .45); outline-offset: 2px; }
.consent { font-size: 13px; line-height: 1.45; color: var(--muted); margin: 10px 0 0; }
.consent a { color: inherit; }
.form-error { margin-top: 14px; padding: 14px; border-radius: var(--radius-sm); background: #FEF3F2; border: 1px solid #FECDCA; color: #7A271A; font-size: 15px; }
.form-error .btn { margin-top: 10px; width: 100%; }
.hp { position: absolute !important; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Контакты */
.contacts { display: grid; gap: 22px; }
.contacts__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.contacts__list li { display: flex; gap: 12px; align-items: flex-start; }
.contacts__list svg { color: var(--brand); margin-top: 2px; }
.contacts__list b { display: block; font-size: 14px; color: var(--muted); font-weight: 600; }
.contacts__list span, .contacts__list a { font-size: 17px; color: var(--ink); font-weight: 600; text-decoration: none; }
.contacts__actions { display: grid; gap: 10px; align-content: start; }
.contacts__photo { margin-top: 0; }

/* Подвал */
.footer { background: #0E1830; color: rgba(255, 255, 255, .66); padding: 32px 0 28px; font-size: 14px; line-height: 1.6; }
.footer a { color: rgba(255, 255, 255, .85); }
.footer__brand { color: #fff; font-size: 18px; font-weight: 800; }
.footer__brand span { color: rgba(255, 255, 255, .6); }
.footer__copy { margin-top: 12px; }

/* Нижняя панель (телефон) */
.mbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(20, 33, 61, .08);
}
.mbar .btn { min-height: 50px; padding: 10px 12px; font-size: 16.5px; }
body.quiz-open .mbar { display: none; }

/* ---------- Квиз ---------- */
.quiz { position: fixed; inset: 0; z-index: 100; display: flex; }
.quiz__backdrop { position: absolute; inset: 0; background: rgba(14, 24, 48, .55); }
.quiz__panel {
  position: relative; display: flex; flex-direction: column;
  width: 100%; height: 100%; background: #fff; overflow-y: auto; -webkit-overflow-scrolling: touch;
  animation: quiz-in .18s ease-out;
}
@keyframes quiz-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.quiz__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 4px; }
.quiz__title { margin: 0; font-weight: 700; color: var(--ink); font-size: 16px; }
.quiz__icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; }
.quiz__icon-btn:hover { background: var(--soft); }
.quiz__icon-btn.is-hidden { visibility: hidden; }
.quiz__progress { height: 6px; margin: 6px 20px 0; border-radius: 99px; background: var(--soft); overflow: hidden; }
.quiz__bar { height: 100%; width: 20%; background: var(--brand); border-radius: 99px; transition: width .25s ease; }
.quiz__count { font-size: 13px; color: var(--muted); margin: 8px 20px 0; }
.quiz__body { padding: 6px 20px 28px; }
.quiz__step { animation: step-in .2s ease-out; }
@keyframes step-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.quiz__q { font-size: 23px; line-height: 1.25; font-weight: 800; margin: 6px 0 18px; outline: none; }
.quiz__hint { color: #3B4556; margin: -8px 0 18px; }
.quiz__foot { font-size: 13px; color: var(--muted); margin: 22px 0 0; }
.quiz__reject { text-align: left; }
.quiz__reject-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); margin: 10px 0 8px; }
.quiz__reject p { color: #3B4556; }
.quiz__reject-actions { display: grid; gap: 10px; margin-top: 20px; }
html.quiz-lock, html.quiz-lock body { overflow: hidden; }

/* ---------- Страницы «Спасибо» и «Политика» ---------- */
.page { padding: 36px 0 56px; }
.thanks__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #E7F5EC; color: var(--ok); margin-bottom: 18px; }
.thanks__title { font-size: 27px; line-height: 1.2; font-weight: 800; margin-bottom: 12px; }
.thanks__text { font-size: 17px; color: #3B4556; margin-bottom: 24px; }
.thanks__next { margin: 28px 0; }
.thanks__next .h3 { margin-bottom: 14px; }
.thanks__actions { display: grid; gap: 10px; max-width: 420px; }
.legal h1 { font-size: 26px; line-height: 1.25; font-weight: 800; margin-bottom: 8px; }
.legal h2 { font-size: 19px; margin: 28px 0 10px; }
.legal p, .legal li { color: #333D4D; }
.legal ul, .legal ol { padding-left: 22px; margin: 0 0 12px; }
.legal li { margin-bottom: 6px; }
.legal__meta { color: var(--muted); font-size: 15px; }
.page--simple + .footer { margin-top: 0; }
body.no-mbar { padding-bottom: 0; }

/* ---------- Планшет и десктоп ---------- */
@media (min-width: 560px) {
  .hero__actions { grid-template-columns: auto auto; justify-content: start; }
  .hero__facts { grid-template-columns: 1fr 1fr; gap: 10px 20px; }
  .features { grid-template-columns: 1fr 1fr; }
  .contacts__actions { grid-template-columns: repeat(3, auto); justify-content: start; }
  .thanks__actions { grid-template-columns: auto auto; max-width: none; justify-content: start; }
}

@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .mbar { display: none; }
  .container { padding: 0 24px; }
  .header__in { min-height: 68px; }
  .header__contacts { gap: 14px; }
  .header__wa span { display: inline; }
  .header__phone { font-size: 17px; }
  .hero { padding: 48px 0 64px; }
  .hero__title { font-size: 40px; }
  .hero__sub { font-size: 18px; }
  .section { padding: 80px 0; }
  .h2 { font-size: 34px; margin-bottom: 32px; }
  .pains { grid-template-columns: 1fr 1fr; gap: 16px; }
  .pains li:last-child { grid-column: 1 / -1; }
  .stats { grid-template-columns: repeat(3, 1fr); max-width: 900px; }
  .stats li:last-child:nth-child(odd) { grid-column: auto; }
  .stats b { font-size: 48px; }
  .reviews { grid-template-columns: 1fr 1fr; gap: 16px; }
  .founder { grid-template-columns: auto 1fr; gap: 28px; padding: 36px; align-items: center; }
  .founder__photo { width: 140px; height: 140px; }
  .founder__photo--empty { font-size: 56px; }
  .founder__quote { font-size: 20px; }
  .card { padding: 24px; }
  .quiz { align-items: center; justify-content: center; padding: 24px; }
  .quiz__panel { max-width: 560px; height: auto; max-height: calc(100vh - 48px); border-radius: 20px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
  .quiz__body { padding: 6px 28px 32px; }
  .quiz__progress { margin: 6px 28px 0; }
  .quiz__count { margin: 8px 28px 0; }
  .thanks__title { font-size: 36px; }
  .legal h1 { font-size: 34px; }
}

@media (min-width: 1024px) {
  .header__cta { display: inline-flex; min-height: 44px; padding: 10px 18px; font-size: 16px; margin-left: 6px; }
  .hero__grid { display: grid; grid-template-columns: 1.25fr .85fr; gap: 56px; align-items: center; }
  .hero__card { margin-top: 0; padding: 28px; }
  .hero__title { font-size: 46px; }
  .features { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .how { grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: start; }
  .price { position: sticky; top: 24px; padding: 28px; }
  .reviews { grid-template-columns: repeat(3, 1fr); }
  .cta__grid { grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
  .contacts { grid-template-columns: 1fr 1fr; align-items: start; }
  .contacts__actions { grid-template-columns: 1fr; max-width: 320px; }
}

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