/* ============================================================
   KSS-UZ — тёплая «интерьерная» система. Bricolage Grotesque + Hanken
   Grotesk. Приоритет: читаемость → доверие → эстетика.
   Палитра тёплая, но контраст высокий (WCAG ≥ 4.5:1 для текста).
   Вся иерархия цвета/размера — через токены ниже.
   ============================================================ */

:root {
  /* поверхности (тёплый бежево-кремовый характер сохранён) */
  --bg:#EEE7DC; --bg-2:#E7DECF; --surface:#FBF8F2; --surface-2:#F5EFE4;

  /* ТЕКСТ — перестроен для контраста */
  --ink:#211D19;     /* главные заголовки */
  --text:#211D19;    /* основной содержательный текст — почти чёрный */
  --muted:#5E564C;   /* вторичный содержательный текст (был слишком светлый) */
  --faint:#6E665B;   /* служебный минимум — не светлее этого */

  --line:#E0D6C6; --line-2:#D3C7B3;
  --accent:#B0662A; --accent-ink:#8F5015; --accent-soft:#F3E7D4; --accent-line:#E3C99F;
  --danger:#9E3823;  /* ошибки — тёмно-кирпичный, высокий контраст */
  --you:#2C6349; --you-soft:#E7F0E9;

  --radius:22px; --radius-tile:16px;
  --shadow:0 2px 4px rgba(58,42,24,.05), 0 14px 34px rgba(58,42,24,.09);
  --shadow-soft:0 1px 2px rgba(58,42,24,.05), 0 4px 14px rgba(58,42,24,.05);
  --display:"Bricolage Grotesque","Hanken Grotesk",-apple-system,Segoe UI,Roboto,sans-serif;
  --body:"Hanken Grotesk",-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;
}

* { box-sizing:border-box; } html,body { margin:0; padding:0; }
body {
  background:var(--bg); color:var(--text); font-family:var(--body);
  font-size:18px; line-height:1.55; -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
button { font-family:inherit; color:inherit; }
body::before {
  content:""; position:fixed; inset:0 0 auto 0; height:340px; z-index:0;
  background:radial-gradient(120% 100% at 50% -20%, rgba(176,102,42,.10), rgba(176,102,42,0) 70%); pointer-events:none;
}
.app { position:relative; z-index:1; max-width:520px; margin:0 auto; width:100%; min-height:100dvh; display:flex; flex-direction:column; }

/* шапка */
.topbar { padding:18px 24px 0; }
.topbar-in { display:flex; align-items:center; justify-content:space-between; }
.brand { font-family:var(--display); font-weight:600; font-size:16px; letter-spacing:-.01em; color:var(--ink); display:inline-flex; align-items:center; gap:9px; }
.brand-mark { width:22px; height:22px; flex:none; color:var(--accent); }
.back { background:none; border:none; cursor:pointer; padding:6px 2px; font-size:15px; color:var(--muted); font-weight:600; }
.back:hover { color:var(--ink); }

/* прогресс */
.progress { display:flex; gap:6px; padding:16px 24px 0; transition:opacity .3s ease; }
.seg { height:5px; flex:1; border-radius:100px; background:var(--line-2); overflow:hidden; }
.seg > i { display:block; height:100%; width:0; background:var(--accent); border-radius:100px; transition:width .45s cubic-bezier(.4,0,.2,1); }
.seg.done > i { width:100%; }

/* контейнер экрана */
.screen { flex:1; padding:26px 24px 40px; width:100%; }
.screen-body { display:flex; flex-direction:column; }
.screen.leaving > .screen-body { opacity:0; transform:translateY(7px); transition:opacity .15s ease, transform .15s ease; }
.screen-body.entering { opacity:0; transform:translateY(12px); }
.screen-body { transition:opacity .38s cubic-bezier(.2,.7,.2,1), transform .38s cubic-bezier(.2,.7,.2,1); opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce) { .screen-body, .screen.leaving > .screen-body, .seg > i, .quote { transition:none !important; animation:none !important; } }

/* ---- ТИПОГРАФИКА (mobile-first) ---- */
.h1 { font-family:var(--display); font-weight:700; font-size:30px; line-height:1.15; letter-spacing:-.02em; color:var(--ink); margin:0 0 16px; }
.h2 { font-family:var(--display); font-weight:700; font-size:26px; line-height:1.2; letter-spacing:-.015em; color:var(--ink); margin:0 0 12px; }
.lead { font-size:18px; line-height:1.55; color:var(--text); margin:0 0 14px; }
.hint { font-size:16px; line-height:1.45; color:var(--text); margin:0 0 18px; }
.kicker { font-family:var(--display); font-weight:600; font-size:15px; color:var(--accent-ink); margin:0 0 12px; }
.q { font-family:var(--display); font-weight:700; font-size:21px; line-height:1.25; letter-spacing:-.01em; color:var(--ink); margin:8px 0 6px; }
.subtitle { font-size:20px; font-weight:600; line-height:1.4; color:var(--ink); margin:0 0 18px; }
.outro { font-size:18px; line-height:1.5; color:var(--text); margin:16px 0 4px; font-weight:600; }

/* крючок */
.hook { min-height:58vh; justify-content:center; }
.hook .meta { display:inline-flex; align-self:flex-start; margin:18px 0 4px; font-size:15px; font-weight:500; color:var(--text);
  background:var(--surface); border:1px solid var(--line); border-radius:100px; padding:9px 16px; }

/* ---- КНОПКИ / CTA (белый bold, максимальный контраст) ---- */
.btn, .pay {
  appearance:none; border:none; cursor:pointer; width:100%; min-height:60px; margin-top:26px; padding:18px 24px;
  background:var(--accent); color:#fff; border-radius:var(--radius);
  font-family:var(--display); font-size:19px; font-weight:700; letter-spacing:.01em; text-align:center; text-decoration:none;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 6px 18px rgba(176,102,42,.30); transition:transform .12s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover, .pay:hover { background:var(--accent-ink); box-shadow:0 8px 22px rgba(143,80,21,.34); }
.btn:active, .pay:active { transform:scale(.985); }
.btn.secondary { background:var(--ink); box-shadow:none; min-height:52px; margin-top:14px; font-size:17px; }
.pay { min-height:68px; font-size:20px; font-weight:700; margin-top:20px; }
.pay.loading { opacity:.9; cursor:default; }

/* ---- ВАРИАНТЫ ОТВЕТА ---- */
.options { display:flex; flex-direction:column; gap:11px; margin-top:6px; }
.option {
  display:flex; align-items:center; gap:14px; text-align:left; cursor:pointer;
  background:var(--surface); border:1.5px solid var(--line-2); border-radius:var(--radius-tile); padding:19px 20px;
  box-shadow:var(--shadow-soft); transition:border-color .16s, background .16s, transform .12s, box-shadow .16s;
}
.option:hover { border-color:var(--accent); box-shadow:var(--shadow); transform:translateY(-1px); }
.option:active { transform:scale(.99); }
.option[disabled] { cursor:default; }
.option-mark { flex:none; width:26px; height:26px; border-radius:50%; border:2px solid var(--line-2); position:relative; transition:border-color .16s, background .16s; }
.option:hover .option-mark { border-color:var(--accent); }
.option.sel { border-color:var(--accent); background:var(--accent-soft); box-shadow:0 0 0 1.5px var(--accent); }
.option.sel .option-mark { border-color:var(--accent); background:var(--accent); }
.option.sel .option-mark::after { content:""; position:absolute; left:7px; top:3px; width:6px; height:11px; border:solid #fff; border-width:0 2.5px 2.5px 0; transform:rotate(45deg); }
.option-label { font-size:18.5px; font-weight:600; letter-spacing:-.01em; color:var(--ink); }
/* сегмент: название → сумы → доллары (каждый на своей строке) */
.seg-option { align-items:center; }
.seg-text { display:flex; flex-direction:column; gap:3px; }
.seg-name { font-family:var(--display); font-weight:700; font-size:19px; letter-spacing:-.01em; color:var(--ink); }
.seg-range { font-size:16.5px; font-weight:500; color:var(--text); font-variant-numeric:tabular-nums; }
.seg-usd { display:block; margin-top:1px; font-size:15px; font-weight:600; color:var(--text); font-variant-numeric:tabular-nums; }

/* ---- три сметы (экран сравнения) ---- */
.quotes { display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; margin:4px 0 22px; }
.quote { background:var(--surface); border:1px solid var(--line-2); border-radius:14px; padding:15px 10px; text-align:center; box-shadow:var(--shadow-soft);
  animation:pop .5s cubic-bezier(.2,.8,.2,1) both; }
.quote:nth-child(2){animation-delay:.07s;} .quote:nth-child(3){animation-delay:.14s;}
@keyframes pop { from{opacity:0;transform:translateY(12px) scale(.96);} to{opacity:1;transform:none;} }
.quote-who { font-size:14px; font-weight:600; color:var(--text); margin-bottom:6px; }
.quote-sum { font-family:var(--display); font-weight:700; font-size:18px; letter-spacing:-.02em; color:var(--ink); font-variant-numeric:tabular-nums; line-height:1.1; }

/* ---- ключевая мысль ---- */
.keyline { margin-top:20px; padding:18px 20px; background:var(--surface); border:1px solid var(--line-2);
  border-left:4px solid var(--accent); border-radius:14px; font-size:18px; line-height:1.5; font-weight:500; color:var(--text); }
.keyline.strong { font-family:var(--display); font-weight:700; font-size:20px; letter-spacing:-.01em; color:var(--accent-ink);
  background:var(--accent-soft); border-color:var(--accent-line); border-left-color:var(--accent); }

/* ---- экран 4 — две комплектации ---- */
.compare2 { display:grid; grid-template-columns:1fr auto 1fr; align-items:stretch; gap:10px; margin:6px 0 4px; }
.cmp-card { background:var(--surface); border:1px solid var(--line-2); border-radius:16px; padding:16px 15px; display:flex; flex-direction:column; gap:8px; box-shadow:var(--shadow-soft); }
.cmp-tag { font-family:var(--display); font-weight:700; font-size:14px; color:var(--accent-ink); text-transform:uppercase; letter-spacing:.02em; }
.cmp-body { font-size:16.5px; line-height:1.45; font-weight:500; color:var(--text); }
.cmp-vs { align-self:center; font-family:var(--display); font-weight:700; font-size:14px; color:var(--ink); writing-mode:vertical-rl; transform:rotate(180deg); padding:2px 0; }

/* ---- экран 6 — список решений ---- */
.qlist { list-style:none; margin:8px 0 0; padding:0; display:flex; flex-direction:column; gap:10px; }
.qlist li { background:var(--surface); border:1px solid var(--line-2); border-radius:14px; padding:16px 18px 16px 48px; position:relative;
  font-family:var(--display); font-weight:600; font-size:18px; line-height:1.35; letter-spacing:-.01em; color:var(--ink); box-shadow:var(--shadow-soft); }
.qlist li::before { content:"?"; position:absolute; left:16px; top:50%; transform:translateY(-50%); width:24px; height:24px;
  background:var(--accent); color:#fff; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:15px; font-weight:700; }

/* ---- экран 7 — две цели ---- */
.goals { display:flex; flex-direction:column; gap:12px; margin:4px 0; }
.goal { border-radius:18px; padding:18px 20px; display:flex; flex-direction:column; gap:8px; }
.goal-label { font-family:var(--display); font-weight:700; font-size:15px; text-transform:uppercase; letter-spacing:.03em; }
.goal-body { font-size:17px; line-height:1.5; color:var(--text); }
.goal-you { background:var(--you-soft); border:1px solid #BFD8C9; } .goal-you .goal-label { color:var(--you); }
.goal-maker { background:var(--surface); border:1px solid var(--line-2); } .goal-maker .goal-label { color:var(--ink); }

/* ---- экран 8 — шаги ---- */
.steps-title { color:var(--accent-ink); }
.steps { display:flex; flex-direction:column; gap:2px; margin:8px 0 2px; position:relative; }
.step { display:flex; gap:16px; align-items:flex-start; padding:12px 0; }
.step-n { flex:none; width:38px; height:38px; border-radius:50%; background:var(--accent); color:#fff; font-family:var(--display); font-weight:700; font-size:18px; display:flex; align-items:center; justify-content:center; box-shadow:0 4px 10px rgba(176,102,42,.25); position:relative; z-index:1; }
.step:not(:last-child) .step-n::after { content:""; position:absolute; left:50%; top:38px; transform:translateX(-50%); width:2px; height:calc(100% + 4px); background:var(--accent-line); z-index:0; }
.step-t { font-size:18px; line-height:1.5; font-weight:500; color:var(--text); padding-top:7px; }

/* ---- экран 9 — большая витрина ---- */
.showcase-img { width:100%; border-radius:var(--radius); overflow:hidden; margin:6px 0 18px; box-shadow:var(--shadow); background:var(--surface-2); }
.showcase-img img { width:100%; height:auto; object-fit:cover; display:block; }
.showcase-img.ph { aspect-ratio:16/11; display:flex; align-items:center; justify-content:center;
  background:radial-gradient(90% 120% at 70% 10%, rgba(176,102,42,.16), rgba(176,102,42,0) 60%), linear-gradient(135deg, var(--surface-2), var(--bg-2));
  border:1px dashed var(--line-2); }
.ph-in { display:flex; flex-direction:column; align-items:center; gap:12px; color:var(--muted); text-align:center; padding:0 30px; max-width:340px; }
.ph-in span { font-size:15px; line-height:1.45; }

/* ---- экран 10 — оффер ---- */
.offer-head { margin-bottom:6px; color:var(--ink); }
.offer-range { font-family:var(--display); font-weight:700; font-size:22px; color:var(--accent-ink); letter-spacing:-.02em; font-variant-numeric:tabular-nums; margin:0 0 16px; }
.price-block { margin:22px 0 6px; padding:20px; background:var(--ink); color:#F6EEE3; border-radius:18px; }
.price-label { display:block; font-size:16px; font-weight:500; color:#DCC9B4; margin-bottom:6px; }
.price-row { display:flex; align-items:baseline; gap:9px; }
.price-num { font-family:var(--display); font-weight:800; font-size:44px; letter-spacing:-.03em; line-height:1; color:#fff; font-variant-numeric:tabular-nums; }
.price-cur { font-family:var(--display); font-weight:600; font-size:24px; color:#DCC9B4; }
.inc-title { font-family:var(--display); font-weight:700; font-size:16px; color:var(--text); margin:22px 0 12px; text-transform:uppercase; letter-spacing:.02em; }
.inc-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px; }
.inc-list li { display:flex; gap:12px; align-items:flex-start; font-size:18px; line-height:1.45; color:var(--text); }
.inc-ic { flex:none; width:22px; height:22px; margin-top:2px; color:var(--accent); }

/* ---- спасибо ---- */
.thanks { align-items:center; text-align:center; min-height:56vh; justify-content:center; }
.thanks-mark { color:var(--accent); width:70px; height:70px; margin:0 auto 22px; }
.thanks-mark svg { width:100%; height:100%; }
.thanks .lead { max-width:400px; }
.secondary { margin-top:22px; padding-top:22px; border-top:1px solid var(--line); width:100%; max-width:400px; }
.sec-prompt { font-family:var(--display); font-weight:600; font-size:17px; color:var(--ink); margin:0 0 4px; }
.sec-note { font-size:15px; line-height:1.5; color:var(--text); margin:10px 0 0; }

/* ---- подвал ---- */
.foot { text-align:center; padding:14px 24px calc(22px + env(safe-area-inset-bottom)); font-size:14px; color:var(--faint); }
:focus-visible { outline:3px solid var(--accent); outline-offset:3px; border-radius:8px; }

/* десктоп: тёплая карточка-колонка */
@media (min-width:560px) {
  body { background:var(--bg-2); }
  .app { margin:28px auto; min-height:calc(100dvh - 56px); background:var(--bg); border:1px solid var(--line-2); border-radius:30px; overflow:hidden; box-shadow:0 20px 60px rgba(58,42,24,.14); }
}
/* узкие экраны — сравнение материалов в столбец */
@media (max-width:380px) {
  .compare2 { grid-template-columns:1fr; }
  .cmp-vs { writing-mode:horizontal-tb; transform:none; text-align:center; padding:2px 0; }
  .quotes { gap:7px; } .quote-sum { font-size:16px; }
}

/* ---- экран 11 — форма телефона ---- */
.lead-form { width:100%; max-width:400px; margin:24px auto 0; text-align:left; display:flex; flex-direction:column; }
.lead-label { font-family:var(--display); font-weight:600; font-size:16px; color:var(--ink); margin-bottom:8px; }
.lead-input {
  width:100%; font-family:var(--body); font-size:19px; padding:16px 18px; color:var(--ink);
  background:var(--surface); border:1.5px solid var(--line-2); border-radius:14px; box-shadow:var(--shadow-soft);
  transition:border-color .15s; -webkit-appearance:none;
}
.lead-input::placeholder { color:var(--faint); }
.lead-input:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft); }
.lead-error { color:var(--danger); font-size:15px; margin-top:8px; font-weight:600; }
.lead-error::before { content:"⚠ "; }
.lead-btn { margin-top:14px; }
.lead-consent { font-size:15.5px; line-height:1.5; color:var(--text); margin:14px 0 0; }
.lead-form .sec-note { text-align:left; margin-top:8px; }
.lead-form.done { align-items:center; text-align:center; }
.lead-ok { color:var(--accent); width:52px; height:52px; margin:6px auto 14px; }
.lead-ok svg { width:100%; height:100%; }
.lead-ok-title { font-family:var(--display); font-weight:700; font-size:20px; color:var(--ink); margin:0 0 8px; }
.lead-ok-body { font-size:16.5px; line-height:1.55; color:var(--text); margin:0; max-width:340px; }
