:root {
  --navy: #2C3A4A; --navy-soft: #3D4F63; --graphite: #5A6672;
  --bg: #FAF7F2; --surface: #FFFFFF;
  --accent: #C9A227; --accent-hover: #B08D1E;
  --accent-deep: #8A6A22; --accent-deep-hover: #6E5219; /* WCAG AA: белый текст ≥4.5:1 */
  --line: #EDE7DF; --radius: 16px;
  --text: #1E2833; --muted: #5E6A77; /* WCAG AA на #FAF7F2: 5.17:1 */
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Чёткий текст и корректные картинки на всех устройствах */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
* { -webkit-tap-highlight-color: transparent; }
img, svg, video { max-width: 100%; height: auto; }
p, li { overflow-wrap: break-word; }
body {
  font-family: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6; font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { color: var(--navy); line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(26px, 4.5vw, 42px); }
h2 { font-size: clamp(22px, 3.2vw, 30px); margin-bottom: 20px; }
section { max-width: 1080px; margin: 0 auto; padding: 56px 20px; }
.disclaimer { font-size: 12px; color: var(--muted); }
/* Уважение к настройке «меньше движения» */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ---------- Шапка ---------- */
.topbar {
  background: var(--surface); color: var(--navy); padding: 12px 20px;
  display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 12px rgba(44,58,74,.10);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { font-weight: 700; letter-spacing: .5px; font-size: 18px; color: var(--navy); }
.topbar .brand span { color: var(--accent); }
.topbar a.tel { color: var(--navy); text-decoration: none; font-weight: 600; }
.topbar a.tel:hover { color: var(--accent); }

/* ---------- Первый экран ---------- */
.hero {
  max-width: none; margin: 0;
  background: linear-gradient(160deg, #FDFBF7 0%, var(--bg) 55%, #F3EEE6 100%);
  color: var(--navy); padding: 72px 20px;
}
.hero-inner { max-width: 1080px; margin: 0 auto; display: grid; gap: 40px;
  grid-template-columns: 1.1fr .9fr; align-items: start; }
.hero h1 { color: var(--navy); margin-bottom: 12px; }
.hero .subtitle { color: var(--graphite); font-size: 18px; margin-bottom: 28px; }
.hero .badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero .badges span {
  background: rgba(201,162,39,.10); border: 1px solid rgba(201,162,39,.30);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; color: #8A6A22;
}
.hero .disclaimer { color: var(--muted); margin-top: 14px; }

/* ---------- Кнопка-звонок (главный CTA) ---------- */
.cta-phone {
  display: inline-block; background: var(--accent-deep); color: #fff;
  border: none; cursor: pointer; padding: 16px 30px; border-radius: 12px;
  font-size: 17px; font-weight: 700; text-decoration: none; margin-top: 20px;
  box-shadow: 0 6px 20px rgba(138,106,34,.35); transition: background .15s ease, transform .05s ease;
}
.cta-phone:hover { background: var(--accent-deep-hover); }
.cta-phone:active { transform: scale(.99); }

/* ---------- Форма ---------- */
#lead-form {
  background: var(--surface); border-radius: var(--radius); padding: 26px;
  box-shadow: 0 16px 40px rgba(10, 20, 30, .35); display: grid; gap: 12px;
}
#lead-form h3 { font-size: 18px; margin-bottom: 4px; }
#lead-form input[type="text"], #lead-form input[type="tel"] {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 15px; background: #FBFCFD; color: var(--text);
}
#lead-form input:focus { outline: 2px solid var(--accent); border-color: transparent; }
#lead-form .consent { display: flex; gap: 8px; align-items: flex-start;
  font-size: 12.5px; color: var(--muted); }
button {
  background: var(--accent-deep); color: #fff; border: none; cursor: pointer;
  padding: 14px 26px; border-radius: 10px; font-size: 16px; font-weight: 600;
  transition: background .15s ease, transform .05s ease;
}
button:hover { background: var(--accent-deep-hover); }
button:active { transform: scale(.99); }
button:disabled { opacity: .6; cursor: not-allowed; }
.form-status { font-size: 13px; min-height: 18px; color: var(--muted); }
.form-status.is-error { color: #B3261E; font-weight: 600; }
.form-status.is-ok { color: #2E7D32; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cta-secondary {
  display: inline-block; background: var(--accent-deep); color: #fff;
  border: none; cursor: pointer; padding: 14px 26px; border-radius: 12px;
  font-size: 16px; font-weight: 600; text-decoration: none;
  box-shadow: 0 4px 16px rgba(138,106,34,.30);
  transition: background .15s ease, transform .05s ease;
}
.cta-secondary:hover { background: var(--accent-deep-hover); }
.cta-secondary:active { transform: scale(.99); }

/* ---------- Секции-карточки ---------- */
.section-alt { background: var(--surface); }
.section-alt.rounded, section[id] { }
#how-we-work ol { list-style: none; display: grid; gap: 14px; counter-reset: step; }
#how-we-work li {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px 18px 66px; position: relative; counter-increment: step;
}
#how-we-work li::before {
  content: counter(step); position: absolute; left: 18px; top: 18px;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy); color: var(--accent); font-weight: 700;
  display: grid; place-items: center;
}
#how-we-work .time { color: var(--muted); font-size: 13px; }

#price .factors { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 18px 0; }
#price .factors li, #price ul.factors li {
  list-style: none; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px;
}
.price-hero { font-size: 22px; font-weight: 700; color: var(--navy); }

#urgency {
  max-width: 1080px; background: linear-gradient(135deg, #F3EEE6 0%, #EADFCB 100%);
  color: var(--navy); border-radius: var(--radius); padding: 48px 20px; text-align: center;
  border: 1px solid var(--line);
}
#urgency h2 { color: var(--navy); }
#urgency p { color: var(--graphite); }

.cases { list-style: none; display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.cases li {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.cases .district { font-weight: 700; color: var(--navy); }
.cases .term { display: inline-block; margin-top: 10px; background: #F3EAD8;
  color: #8A6A22; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; }

/* ---------- Сравнение: выкуп vs рынок ---------- */
.compare-grid { display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin: 24px 0; }
.compare-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.compare-card h3 { margin-bottom: 14px; font-size: 18px; }
.compare-card ul { list-style: none; display: grid; gap: 10px; }
.compare-card li { padding-left: 24px; position: relative; color: var(--graphite); }
.compare-card li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 700;
}
.compare-buyout { border: 2px solid var(--accent); box-shadow: 0 8px 24px rgba(201,162,39,.15); }
.compare-buyout h3 { color: var(--accent-deep); }
.compare-market li::before { content: "✕"; color: #B0A896; }

#faq details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 10px;
}
#faq summary { cursor: pointer; font-weight: 600; color: var(--navy); }
#faq p { margin-top: 10px; color: var(--graphite); }

/* ---------- Перелинковка: статьи ---------- */
.related-links { list-style: none; display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.related-links li {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px;
}
.related-links a {
  color: var(--navy); font-weight: 600; text-decoration: none;
  min-height: 44px; display: flex; align-items: center;
}
.related-links a:hover { color: var(--accent); }

/* ---------- Футер ---------- */
footer {
  background: var(--navy); color: #D8DDE3; padding: 40px 20px; margin-top: 20px;
}
footer .footer-inner { max-width: 1080px; margin: 0 auto; }
footer a { color: #fff; font-weight: 600; text-decoration: none; font-size: 18px; }
footer nav { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; font-size: 13px; }
footer nav a { color: #C7CDD4; font-weight: 400; }
footer nav a:hover { color: var(--accent); }
footer .legal { margin-top: 10px; font-size: 12px; color: #AEB6BF; }
footer .erid { margin-top: 14px; font-size: 12px; color: #AEB6BF; }

/* ---------- Адаптив: все устройства ---------- */

/* Широкие ПК (≥1440px): крупнее заголовки, больше воздуха */
@media (min-width: 1440px) {
  h1 { font-size: clamp(40px, 3.2vw, 52px); }
  h2 { font-size: clamp(28px, 2.2vw, 34px); }
  section { padding: 64px 24px; }
  .hero { padding: 88px 24px; }
}

/* Планшеты и ноутбуки (768–1080px) */
@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr 0.9fr; }
  .compare-grid { grid-template-columns: 1fr; }
}

/* Мобильные (≤800px) */
@media (max-width: 800px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero { padding: 48px 16px; }
  section { padding: 40px 16px; }
  .topbar { flex-wrap: wrap; gap: 8px; }
  .topbar a.tel { font-size: 16px; }
  #how-we-work li { padding: 16px 16px 16px 56px; }
  #how-we-work li::before { left: 14px; top: 14px; width: 30px; height: 30px; }
  .cases { grid-template-columns: 1fr; }
  #price .factors { grid-template-columns: 1fr; }
}

/* Маленькие телефоны (≤480px): CTA на всю ширину, крупные тач-зоны */
@media (max-width: 480px) {
  .cta-phone, .cta-secondary, button { width: 100%; text-align: center; box-sizing: border-box; }
  .disclaimer { font-size: 12.5px; }
  #lead-form { padding: 20px; }
  .hero .subtitle { font-size: 16px; }
  .hero .badges span { font-size: 12px; padding: 5px 12px; }
  .compare-card { padding: 20px; }
  #faq details { padding: 14px 16px; }
  footer { padding: 32px 16px; }
}

/* Очень маленькие экраны (≤360px): компактнее отступы */
@media (max-width: 360px) {
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  .hero { padding: 40px 12px; }
  section { padding: 32px 12px; }
  .topbar { padding: 10px 12px; }
  .topbar .brand { font-size: 16px; }
  #lead-form input[type="text"], #lead-form input[type="tel"] { padding: 12px 12px; }
}

/* Тач-таргеты: кнопки и ссылки не меньше 44px по высоте */
.cta-phone, .cta-secondary, button, .topbar a.tel, footer a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Мобильная закреплённая панель действий ---------- */
.mobile-cta {
  display: none;
}
@media (max-width: 800px) {
  .mobile-cta {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 8px;
    position: fixed;
    left: 12px; right: 12px; bottom: 12px;
    z-index: 60;
  }
  .mobile-cta a {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(10,20,30,.28);
  }
  .mobile-cta .mc-call {
    background: var(--surface);
    color: var(--navy);
    border: 1px solid var(--accent);
  }
  .mobile-cta .mc-form {
    background: var(--accent-deep);
    color: #fff;
  }
  .mobile-cta .mc-form:hover { background: var(--accent-deep-hover); }
  /* освобождаем низ страницы, чтобы панель не перекрывала контент */
  body { padding-bottom: 68px; }
  footer { margin-bottom: 0; }
}
@media (min-width: 801px) {
  .mobile-cta { display: none; }
}

/* Доступность: видимый фокус для клавиатурной навигации */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}