/* Дом, который работает — лендинг. Без внешних зависимостей и шрифтов. */

:root {
  --bg: #faf7f1;
  --surface: #fffdf9;
  --tint: #f2ebde;
  --ink: #1b1b19;
  --ink-2: #3f3c36;
  --muted: #5f5a50;
  --line: #e0d8c9;
  --line-2: #cdc2ad;
  --accent: #8a4a00;
  --accent-2: #b4650a;
  --amber: #f2c078;
  --amber-soft: #fbeed6;
  --dark: #23231f;
  --on-dark: #f3eee4;
  --on-dark-2: #d3cbbb;
  --focus: #8a4a00;
  --focus-dark: #ffd08a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(40, 33, 20, .05), 0 10px 28px -20px rgba(40, 33, 20, .45);
  --maxw: 1140px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.62 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; }
svg { display: block; }

h1, h2, h3 { margin: 0 0 .6em; line-height: 1.15; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 6.2vw, 3.4rem); line-height: 1.07; letter-spacing: -.03em; }
h2 { font-size: clamp(1.55rem, 3.8vw, 2.35rem); }
h3 { font-size: 1.16rem; line-height: 1.3; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: .35em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
strong { font-weight: 650; }
blockquote { margin: 0; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
.section--dark :focus-visible, .site-footer :focus-visible { outline-color: var(--focus-dark); }

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--dark);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus { top: 12px; color: #fff; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 1.3em;
  height: 1.3em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.wrap--narrow { max-width: 860px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.kicker {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.section--dark .kicker { color: var(--amber); }

.section { padding-block: clamp(48px, 7.5vw, 90px); }
section[id], main[id], #lead-form { scroll-margin-top: 84px; }
.section--tint { background: var(--tint); }
.section--dark { background: var(--dark); color: var(--on-dark); }

.section-lead {
  margin: 0 0 28px;
  max-width: 62ch;
  font-size: 1.2rem;
  color: var(--ink-2);
}
.section--dark .section-lead { color: var(--on-dark-2); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: #fffdf9;
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { background: #6f3b00; color: #fffdf9; }
.btn-lg { min-height: 56px; padding: 15px 30px; font-size: 1.05rem; }
.btn-sm { min-height: 44px; padding: 9px 16px; font-size: .93rem; }
.btn-block { width: 100%; margin-top: 8px; }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn-outline:hover { background: var(--amber-soft); color: var(--ink); border-color: var(--accent); }

/* ---------- Шапка ---------- */

.site-header--doc .header-phone { margin-left: auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 247, 241, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 70px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}
.brand-mark { width: 32px; height: 32px; fill: none; stroke: var(--accent); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.brand-text { font-weight: 700; line-height: 1.15; font-size: 1rem; }
.brand-text small { display: block; font-weight: 400; font-size: 14px; letter-spacing: .02em; color: var(--muted); }
.brand:hover { color: var(--ink); }
.nav { display: flex; gap: 20px; margin-inline: auto; font-size: .94rem; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 6px 0; }
.nav a:hover { color: var(--accent); text-decoration: underline; }
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  font-size: .95rem;
}
.header-phone .ico { color: var(--accent); }
.header-cta { flex: none; }

/* ---------- Первый экран ---------- */

.hero {
  background:
    radial-gradient(1100px 420px at 82% -10%, #f6ead5 0%, rgba(250, 247, 241, 0) 62%),
    var(--bg);
  padding-block: clamp(36px, 6vw, 64px) clamp(40px, 6vw, 72px);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  align-items: center;
  gap: clamp(24px, 4vw, 52px);
}
.hero-copy { min-width: 0; }
.hero .lead { font-size: 1.12rem; color: var(--ink-2); max-width: 56ch; }
.hero-points { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; gap: 12px; }
.hero-points li { display: flex; gap: 12px; align-items: flex-start; margin: 0; font-size: .99rem; }
.hero-points .ico { color: var(--accent); margin-top: 3px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.hero-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 14px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}
.price-lines { display: flex; flex-direction: column; gap: 2px; }
.nw { white-space: nowrap; }
.micro { margin: 16px 0 0; font-size: .92rem; color: var(--muted); max-width: 52ch; }

.hero-art { margin: 0; min-width: 0; }
.hero-art > svg { border-radius: 18px; box-shadow: var(--shadow); }
.hero-badge {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  align-items: center;
  gap: 2px 10px;
  margin: -26px 14px 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  position: relative;
}
.badge-num { font-size: 1.4rem; font-weight: 700; color: var(--accent); line-height: 1; letter-spacing: -.02em; }
.badge-txt { font-size: 14px; line-height: 1.3; color: var(--muted); }
.badge-link { grid-column: 1 / -1; display: inline-flex; align-items: center; min-height: 44px; margin-top: 2px; font-size: 14px; color: var(--accent); }

/* ---------- Якорные чипы ---------- */

.anchor-chips {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.anchor-chips .wrap {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-block: 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.anchor-chips .wrap::-webkit-scrollbar { display: none; }
.anchor-chips a {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-2);
  font-size: .95rem;
  white-space: nowrap;
  text-decoration: none;
}
.anchor-chips a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Проблема ---------- */

.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.quote {
  margin: 0;
  padding: 24px 24px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: 4px var(--radius) var(--radius) 4px;
}
.quote blockquote { font-size: 1.03rem; line-height: 1.55; color: var(--ink); margin-bottom: 14px; }
.quote figcaption { font-size: .9rem; color: var(--muted); }

/* ---------- Решение ---------- */

.solutions .card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .5em; }
.card p { font-size: .98rem; }
.tag {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: #6b3a00;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
}
.outcome, .honest {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: .92rem !important;
  background: #f4f1e9;
  border: 1px solid var(--line);
}
.honest { background: transparent; border-style: dashed; }

/* ---------- Пакеты ---------- */

.packages {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  margin-top: 8px;
}
.pkg {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px 22px 22px;
}
.pkg--featured {
  background: #fffaf0;
  border: 2px solid var(--accent);
  box-shadow: 0 16px 40px -30px rgba(120, 70, 0, .65);
  padding-top: 18px;
}
.pkg-badge {
  display: inline-block;
  align-self: flex-start;
  margin: 0 0 12px;
  padding: 6px 12px;
  border-radius: 10px;
  line-height: 1.3;
  max-width: 100%;
  background: var(--accent);
  color: #fffdf9;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
}
.pkg h3 { margin-bottom: 2px; font-size: 1.4rem; }
.pkg-price {
  margin: 0 0 12px;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--accent);
  line-height: 1.1;
}
.pkg-for { font-size: .95rem; color: var(--ink-2); }
.label {
  display: block;
  margin: 18px 0 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.pkg-list { padding-left: 1.2em; margin-bottom: 4px; font-size: .93rem; }
.pkg-list li { margin-bottom: .4em; }
.pkg-factors { list-style: none; padding: 0; margin-bottom: 18px; font-size: .9rem; color: var(--ink-2); }
.pkg-factors li { position: relative; padding-left: 16px; }
.pkg-factors li::before { content: "—"; position: absolute; left: 0; color: var(--accent-2); }
.pkg-delta {
  margin: -6px 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.pkg-addon { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.pkg-excl {
  margin: 16px 0 0;
  padding: 12px 14px;
  background: #f4f1e9;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  color: var(--ink-2);
}
.pkg-excl strong { color: var(--ink); }
.pkg-term { margin-top: 16px; font-size: .9rem; }
.pkg .btn { margin-top: auto; }
.pkg > .pkg-term + .label { margin-top: 14px; }

.compare-title { margin: clamp(40px, 6vw, 64px) 0 18px; font-size: 1.35rem; }
.compare-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.compare { width: 100%; border-collapse: collapse; font-size: .94rem; }
.compare th, .compare td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: #f6f1e6; }
.compare thead th + th, .compare td { text-align: center; }
.compare thead th + th { text-align: center; }
.compare tbody th { font-weight: 500; width: 42%; }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare .is-featured { background: #fdf3e2; }
.compare thead .is-featured { background: #f8e6c7; color: var(--ink); }
.compare-mobile { display: none; }
.compare-note { margin: 18px 0 0; font-size: .95rem; color: var(--ink-2); }
.disclaimer { margin: 14px 0 0; font-size: .88rem; color: var(--muted); max-width: 70ch; }

/* ---------- Девять шагов ---------- */

.steps {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  margin: 0;
  padding: 20px 22px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 10px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  letter-spacing: .1em;
  color: var(--accent-2);
}
.steps h3 { font-size: 1.06rem; }
.steps p { font-size: .93rem; color: var(--ink-2); margin: 0; }

/* ---------- Автономность ---------- */

.anchor-nums {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 28px;
  margin: 28px 0 24px;
  padding-top: 22px;
  border-top: 1px solid rgba(243, 238, 228, .22);
}
.anchor-num { min-width: 0; }
.num { display: block; font-size: clamp(3rem, 9vw, 4.6rem); font-weight: 700; line-height: .95; letter-spacing: -.04em; color: var(--amber); }
.num-cap { display: block; margin-top: 10px; font-size: .92rem; color: var(--on-dark-2); max-width: 26ch; }
.anchor-note { grid-column: 1 / -1; margin: 0; font-size: .92rem; color: var(--on-dark-2); }
.section--dark .prose { max-width: 74ch; color: var(--on-dark); }
.section--dark .prose p { font-size: 1.02rem; }
.footnote {
  margin: 20px 0 30px;
  max-width: 78ch;
  padding: 14px 16px;
  border-left: 3px solid var(--amber);
  background: rgba(255, 253, 249, .06);
  font-size: 14px;
  line-height: 1.6;
  color: var(--on-dark-2);
}
.auto-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: start;
  margin: 36px 0 12px;
}
.auto-text h3, .auto-cols h3 { margin-top: 26px; color: var(--on-dark); }
.auto-text h3:first-of-type { margin-top: 22px; }
.auto-text .lead-sm { font-size: 1.02rem; }
.auto-art { margin: 0; }
.auto-art svg { border-radius: 14px; }
.ticks, .crosses { list-style: none; padding: 0; }
.ticks li, .crosses li { position: relative; padding-left: 28px; margin-bottom: 10px; font-size: .97rem; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .28em;
  width: 16px;
  height: 16px;
  background: var(--amber) no-repeat center / contain;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 8.5l4 4 8-9'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 8.5l4 4 8-9'/%3E%3C/svg%3E") center / contain no-repeat;
}
.crosses li::before { content: "—"; position: absolute; left: 0; color: var(--accent-2); }
.section--dark .crosses li::before { color: var(--amber); }
.auto-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 8px 36px;
  margin-top: 20px;
}
.auto-cols p { font-size: .95rem; color: var(--on-dark-2); }
.section--dark .auto-cols a { color: var(--amber); }

/* ---------- Процесс ---------- */

.timeline { list-style: none; padding: 0; margin: 30px 0 0; counter-reset: tl; }
.timeline li {
  position: relative;
  counter-increment: tl;
  margin: 0;
  padding: 0 0 26px 34px;
  border-left: 2px solid var(--line-2);
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: counter(tl);
  position: absolute;
  left: -15px;
  top: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fffdf9;
  font-size: 14px;
  font-weight: 700;
}
.timeline h3 { margin-bottom: .3em; font-size: 1.08rem; }
.timeline p { font-size: .97rem; color: var(--ink-2); margin: 0; }

/* ---------- Условия ---------- */

.terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 44px; margin-top: 12px; }
.terms article { padding: 26px 0 22px; border-top: 2px solid var(--line); min-width: 0; }
.terms h3 { margin-bottom: .45em; }
.terms p, .terms li { font-size: .97rem; color: var(--ink-2); }
.term-wide { grid-column: 1 / -1; }

/* ---------- FAQ ---------- */

.faq { margin-top: 24px; border-top: 1px solid var(--line-2); }
.faq-item { border-bottom: 1px solid var(--line-2); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1.02rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-q { min-width: 0; }
.faq-item summary::after {
  content: "+";
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item summary:hover { color: var(--accent); }
.faq-a { padding: 0 0 20px; max-width: 72ch; }
.faq-a p { font-size: .97rem; color: var(--ink-2); margin: 0; }

/* ---------- Контакты и форма ---------- */

.contact { background: var(--bg); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: clamp(28px, 4.5vw, 56px); align-items: start; }
.contact-copy p { font-size: .98rem; color: var(--ink-2); max-width: 56ch; }
.contact-phone { margin: 26px 0 30px; }
.contact-phone a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.01em;
}
.contact-phone a:hover { color: var(--accent); }
.contact-phone .ico { color: var(--accent); }
.contact-phone p { margin: 8px 0 0; font-size: .9rem; color: var(--muted); }
.after-form { border-top: 1px solid var(--line); padding-top: 20px; max-width: 52ch; }
.after-form h3 { font-size: 1.05rem; }
.after-form p { font-size: .94rem; }

.form-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow);
  min-width: 0;
}
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: .93rem; font-weight: 600; }
.optional { font-weight: 400; color: var(--muted); font-size: 14px; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1.5px solid var(--line-2);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(138, 74, 0, .22);
  outline-offset: 0;
}
.hint { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

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

.pkg-choice {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  min-width: 0;
}
.pkg-choice legend {
  padding: 0;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px;
  padding: 8px 14px;
  border: 1.5px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fffdf9;
}
.chip[aria-pressed="true"]:hover { color: #fffdf9; }

.consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 18px 0 6px;
}
.consent input {
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--accent);
  flex: none;
}
.consent label { font-size: .88rem; line-height: 1.45; color: var(--ink-2); }
.form-error {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1.5px solid #9c4a12;
  border-radius: 10px;
  background: #fbeee3;
  color: #5f2600;
  font-size: .92rem;
}
.form-error p { margin: 0 0 6px; font-size: .92rem; }
.form-error p:last-child { margin: 0; }
.form-error a { color: #5f2600; }
#form-error-text:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
#form-result:focus { outline: none; }
#form-result:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.form-success {
  padding: 4px 2px;
}
.form-success h3 { color: var(--accent); }
.form-success p { font-size: .97rem; }
.result-summary { font-weight: 650; color: var(--ink); }

/* ---------- Подвал ---------- */

.site-footer { background: #efe7d8; border-top: 1px solid var(--line-2); padding: 44px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 28px; }
.footer-brand { margin: 0 0 6px; font-weight: 700; font-size: 1.02rem; }
.footer-desc, .footer-note { margin: 6px 0 0; font-size: .86rem; color: var(--muted); }
.footer-label { margin: 0 0 8px; font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.site-footer p { font-size: .92rem; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); }
.site-footer a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line-2);
}
.footer-bottom p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- Страницы документов ---------- */

.doc-page { padding: 42px 0 64px; }
.doc { max-width: 760px; }
.doc h1 { font-size: clamp(1.7rem, 4.4vw, 2.4rem); }
.doc h2 { font-size: 1.22rem; margin: 32px 0 .6em; }
.doc p, .doc li { font-size: .97rem; color: var(--ink-2); }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc-list { padding-left: 1.3em; }
.doc-list li { margin-bottom: .7em; }
.doc-meta { color: var(--muted); font-size: .88rem; }
.doc-back { margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); }


/* ---------- Страница «Заявка принята» ---------- */

.thanks-page {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 70px);
  min-height: calc(100dvh - 70px);
  padding: clamp(32px, 7vw, 64px) 20px;
}
.thanks-card {
  width: 100%;
  max-width: 520px;
  padding: clamp(26px, 4vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  text-align: center;
}
.thanks-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--amber-soft);
}
.thanks-icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.thanks-card h1 { font-size: clamp(1.7rem, 5vw, 2.1rem); margin-bottom: .5em; }
.thanks-card p { color: var(--ink-2); font-size: .98rem; }
.thanks-phone { margin: 22px 0 6px; font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; }
.thanks-phone a { color: var(--ink); text-decoration: none; }
.thanks-phone a:hover { color: var(--accent); }
.thanks-back { margin: 18px 0 0; font-size: .95rem; }

/* ---------- Мобильная липкая панель ---------- */

.mobile-bar { display: none; }

@media (max-width: 768px) {
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .mobile-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(250, 247, 241, .97);
    border-top: 1px solid var(--line-2);
    box-shadow: 0 -8px 24px -18px rgba(30, 25, 15, .5);
    transform: translateY(115%);
    opacity: 0;
    pointer-events: none;
    transition: transform .18s ease, opacity .18s ease;
  }
  .mobile-bar a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    border-radius: 999px;
    font-weight: 650;
    text-decoration: none;
  }
  .mb-call { border: 2px solid var(--line-2); color: var(--ink); background: var(--surface); }
  .mb-call .ico { color: var(--accent); }
  .mb-measure { background: var(--accent); color: #fffdf9; }
  .mb-measure:hover { color: #fffdf9; }

  body.bar-visible .mobile-bar { transform: none; opacity: 1; pointer-events: auto; }

  /* форма в фокусе — панель уезжает, чтобы не закрывать поля и клавиатуру */
  body:has(#lead-form :focus) .mobile-bar,
  body.is-typing .mobile-bar { transform: translateY(115%); opacity: 0; pointer-events: none; }
}

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

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

@media (max-width: 1024px) {
  .packages { grid-template-columns: 1fr; max-width: 640px; }
  .nav { gap: 14px; }
  .auto-grid { grid-template-columns: 1fr; }
  .auto-art { order: -1; max-width: 520px; }
}

@media (max-width: 1180px) {
  .nav { display: none; }
  .header-phone { margin-left: auto; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .header-phone { margin-left: auto; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 560px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .section { padding-block: 44px; }
  .header-cta { display: none; }
  .header-inner { min-height: 62px; gap: 12px; }
  .brand-text small { display: none; }
  .header-phone span { display: none; }
  .header-phone .ico { width: 26px; height: 26px; }
  .header-phone { padding: 8px; margin-left: auto; border: 1px solid var(--line-2); border-radius: 50%; }

  .compare-wrap { display: none; }
  .compare-mobile { display: grid; gap: 10px; }
  .cmp-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
  }
  .cmp-card summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    font-weight: 650;
  }
  .cmp-card summary::-webkit-details-marker { display: none; }
  .cmp-card summary > span:first-child { margin-right: auto; }
  .cmp-price { font-size: .88rem; font-weight: 600; color: var(--accent); white-space: nowrap; }
  .cmp-card summary::after {
    content: "+";
    flex: none;
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-2);
    border-radius: 50%;
    color: var(--accent);
    font-weight: 400;
  }
  .cmp-card[open] summary::after { content: "−"; }
  .cmp-card[open] summary { border-bottom: 1px solid var(--line); }
  .cmp-list { list-style: none; margin: 0; padding: 4px 16px 10px; }
  .cmp-list li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin: 0;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: .92rem;
  }
  .cmp-list li:last-child { border-bottom: 0; }
  .cmp-list li > span { color: var(--ink-2); }
  .cmp-list li > b { flex: none; max-width: 48%; font-weight: 600; text-align: right; }
  .cmp-list li > b.none { color: var(--muted); font-weight: 400; }

  .contact-grid { grid-template-columns: 1fr; }
  .terms { grid-template-columns: 1fr; gap: 0; }
  .anchor-nums { grid-template-columns: 1fr; gap: 18px; }
  .auto-cols { gap: 4px 24px; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .hero-badge { grid-template-columns: auto 1fr; }
  .badge-num { font-size: 1.3rem; }
  .quote { padding: 18px 18px 16px; }
  .pkg { padding: 20px 18px; }
  .pkg-price { font-size: 1.65rem; }
  .form-panel { padding: 18px 16px; }
  .footer-bottom { margin-top: 24px; }
}

@media (max-width: 380px) {
  .header-phone span { display: none; }
  .hero-actions .btn-lg { width: 100%; }
  .nav { display: none; }
}
