/* Магазин лидов - посадка службы подбора мастеров. Mobile-first, без фреймворков. */

:root {
  --ink: #14181f;
  --ink-soft: #4a5260;
  --line: #e3e7ee;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --accent: #1f6feb;
  --accent-dark: #1a5fd0;
  --ok: #15803d;
  --radius: 14px;
  --wrap: 1080px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}

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

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; font-weight: 700; }
h1 { font-size: 28px; letter-spacing: -0.02em; }
h2 { font-size: 23px; margin-top: 0; }
h3 { font-size: 18px; }
p { margin: 0 0 14px; }

section { padding: 34px 0; }
section + section { border-top: 1px solid var(--line); }

.lead { font-size: 18px; color: var(--ink-soft); }

/* ---------- Шапка ---------- */
.top {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-soft);
}
.top b { color: var(--ink); }

/* ---------- Первый экран ---------- */
.hero { padding: 26px 0 30px; }
.hero h1 { margin-bottom: 10px; }
.hero .lead { margin-bottom: 22px; }
.hero .free { color: var(--ok); font-weight: 600; }

/* ---------- Квиз ---------- */
.quiz {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
}
.quiz__bar {
  height: 4px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 18px;
}
.quiz__bar i {
  display: block;
  height: 100%;
  width: 25%;
  background: var(--accent);
  transition: width .25s ease;
}
.quiz__step { display: none; }
.quiz__step.is-on { display: block; }
.quiz__q { font-size: 19px; font-weight: 700; margin-bottom: 14px; }

.opts { display: grid; gap: 10px; }
.opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.opt:hover, .opt:focus-visible { border-color: var(--accent); outline: none; }
.opt.is-picked { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* чекбоксы районов */
.districts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.districts label {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 12px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; cursor: pointer;
}
.districts input { width: 18px; height: 18px; accent-color: var(--accent); }

.field { margin-bottom: 14px; }
.field input[type="tel"], .field input[type="text"] {
  width: 100%; padding: 14px 16px; font: inherit;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.field input:focus { outline: none; border-color: var(--accent); }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-soft); margin-bottom: 16px; }
.consent input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.consent a { color: var(--accent); }

.btn {
  display: block; width: 100%;
  padding: 16px 20px;
  font: inherit; font-weight: 600; font-size: 17px;
  color: #fff; background: var(--accent);
  border: 0; border-radius: 10px; cursor: pointer;
}
.btn:hover { background: var(--accent-dark); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--back {
  width: auto; margin-top: 12px; padding: 8px 0;
  background: none; color: var(--ink-soft);
  font-size: 15px; font-weight: 400; text-decoration: underline;
}
.btn--back:hover { background: none; color: var(--ink); }

/* ---------- Шаги «как это работает» ---------- */
.steps { display: grid; gap: 16px; counter-reset: s; }
.step { padding-left: 46px; position: relative; }
.step::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
}
.step h3 { margin-bottom: 4px; }
.step p { margin: 0; color: var(--ink-soft); }

/* ---------- Типы работ ---------- */
.cards { display: grid; gap: 12px; }
.card { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); }
.card h3 { margin-bottom: 4px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* ---------- FAQ ---------- */
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.faq summary { font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 10px 0 0; color: var(--ink-soft); }

/* ---------- Подвал ---------- */
.foot { padding: 26px 0 90px; background: var(--bg-soft); font-size: 14px; color: var(--ink-soft); }
.foot a { color: var(--ink-soft); }
.foot p { margin: 0 0 8px; }

/* ---------- Липкая кнопка на мобиле ---------- */
.sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
}
.sticky .btn { padding: 14px; }

/* ---------- Успех ---------- */
.done { text-align: center; padding: 26px 0; }
.done__ic {
  width: 54px; height: 54px; margin: 0 auto 14px;
  border-radius: 50%; background: var(--ok); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 27px;
}

/* ---------- Планшет и десктоп ---------- */
@media (min-width: 700px) {
  body { font-size: 18px; }
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  section { padding: 48px 0; }
  .hero { padding: 40px 0 46px; }
  .hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
  .quiz { padding: 26px 24px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .districts { grid-template-columns: repeat(3, 1fr); }
  .sticky { display: none; }
  .foot { padding-bottom: 40px; }
}


/* Экран «спасибо»: вход в бота. Блок намеренно ниже подтверждения заявки —
   сначала человек видит, что заявка принята, и только потом предложение. */
.done__bot { margin-top: 22px; padding-top: 18px; border-top: 1px solid #e6e6e6; text-align: left; }
.done__bot-t { font-weight: 600; margin: 0 0 8px; }
.done__bot-l { margin: 0 0 14px; padding-left: 18px; color: #555; font-size: 15px; line-height: 1.5; }
.done__bot-l li { margin-bottom: 4px; }
.btn--bot { display: inline-block; text-decoration: none; text-align: center; }
