/* ============================================================
   «Мой район» — дизайн-система
   Тёмная премиальная тема (главная) + светлая тема (целевые)
   Брендбук v1.1: угольная основа, золото шампань, Fraunces + Inter
   ============================================================ */

:root {
  /* Основа · тёплый угольный */
  --ugol-950: #0B0A09;
  --ugol-900: #121110;
  --ugol-800: #1B1916;
  --ugol-700: #2A2722;
  --ugol-600: #3a352e;
  --grey-500: #7A746A;
  --grey-400: #9B958A;
  --ivory-200: #D7D2C7;
  --ivory-100: #ECEAE4;

  /* Акцент · золото шампань */
  --gold-300: #E2CB94;
  --gold-400: #C9A24B;
  --gold-500: #A8842F;
  --gold-on: #1A1408;

  /* Служебные */
  --success: #7FB98A;
  --warning: #D9A441;
  --error: #C76B66;
  --info: #7FA3C7;

  /* Семантика для тёмной темы (по умолчанию) */
  --bg: var(--ugol-950);
  --surface: var(--ugol-900);
  --surface-2: var(--ugol-800);
  --border: var(--ugol-700);
  --border-strong: var(--ugol-600);
  --text: var(--ivory-100);
  --text-dim: var(--grey-400);
  --text-faint: var(--grey-500);
  --accent: var(--gold-400);
  --accent-hi: var(--gold-300);
  --accent-on: var(--gold-on);
  --shadow: 0 18px 50px -28px rgba(0,0,0,.8);

  /* Скругления */
  --r-btn: 10px;
  --r-card: 14px;
  --r-input: 10px;
  --r-modal: 18px;

  --container: 1080px;
}

/* Светлая тема — целевые страницы и PDF-подборки (§3.3) */
.theme-light {
  --bg: #FAFAF8;
  --surface: #FFFFFF;
  --surface-2: #F4F2EC;
  --border: #E7E3D9;
  --border-strong: #DAD4C6;
  --text: #15181D;
  --text-dim: #5B636E;
  --text-faint: #8A9099;
  --accent: var(--gold-400);
  --accent-hi: var(--gold-500);
  --accent-on: var(--gold-on);
  --shadow: 0 18px 50px -30px rgba(21,24,29,.22);
}

/* ---------- Сброс и база ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--gold-400); color: var(--gold-on); }

/* Шрифты заголовков */
.serif {
  font-family: Fraunces, Georgia, "PT Serif", serif;
  font-optical-sizing: auto;
  font-weight: 300;
  letter-spacing: -0.01em;
}
.serif-i { font-style: normal; }

/* ---------- Сетка ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 96px 0; }
.section--tight { padding: 64px 0; }

/* ---------- Типографика ---------- */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}
.h-xl { font-size: clamp(2.6rem, 6vw, 4.5rem); line-height: 1.02; }
.h-l  { font-size: clamp(2rem, 4.5vw, 3rem); line-height: 1.08; }
.h-m  { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.18; }
.h-s  { font-size: 1.625rem; line-height: 1.2; }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--text-dim); line-height: 1.6; }
.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.price {
  font-variant-numeric: tabular-nums slashed-zero;
  font-weight: 500;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 26px;
  border-radius: var(--r-btn);
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--gold-400);
  color: var(--gold-on);
}
.btn--primary:hover {
  background: var(--gold-300);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -14px rgba(201,162,75,.7);
}
.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost:hover { border-color: var(--gold-400); color: var(--text); }
.btn--text { background: none; color: var(--accent); height: auto; padding: 0; }
.btn--text:hover { color: var(--accent-hi); }
.btn--block { width: 100%; }
.btn--lg { height: 54px; padding: 0 32px; font-size: 16px; }

/* ---------- Метки ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.tag--gold { color: var(--accent); border-color: color-mix(in srgb, var(--gold-400) 40%, transparent); background: color-mix(in srgb, var(--gold-400) 12%, transparent); }
.tag--success { color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, transparent); background: color-mix(in srgb, var(--success) 14%, transparent); }

/* ---------- Карточки ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 28px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card--hover:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--gold-400) 30%, var(--border));
  box-shadow: var(--shadow);
}

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark { width: 30px; height: 30px; color: var(--accent); flex: none; }
.brand__name {
  font-size: 17px;
  letter-spacing: .02em;
  font-weight: 500;
}
.brand__name b { font-weight: 600; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { color: var(--text-dim); font-size: 14px; font-weight: 500; transition: color .18s; }
.nav a:hover { color: var(--text); }
.nav__cta { margin-left: 6px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero__glow {
  position: absolute;
  inset: -20% 30% auto -10%;
  height: 540px;
  background: radial-gradient(60% 60% at 30% 20%, color-mix(in srgb, var(--gold-400) 16%, transparent), transparent 70%);
  pointer-events: none;
  filter: blur(8px);
}
.hero__inner { position: relative; padding: 120px 0 110px; max-width: 760px; }
.hero h1 { margin: 22px 0 0; }
.hero .lead { margin: 26px 0 38px; max-width: 600px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero__note { font-size: 13px; color: var(--text-faint); margin-top: 22px; }

/* ---------- Полоски-метрики ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.stat { background: var(--surface); padding: 28px 24px; }
.stat__num { font-family: Fraunces, serif; font-weight: 300; font-size: 2.4rem; line-height: 1; color: var(--accent); }
.stat__label { margin-top: 10px; font-size: 13px; color: var(--text-dim); }

/* ---------- Блоки ---------- */
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head .eyebrow { display: block; margin-bottom: 16px; }
.section-head h2 { margin: 0 0 16px; }

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* Шаги «как это работает» */
.step { position: relative; }
.step__num {
  font-family: Fraunces, serif;
  font-weight: 300;
  font-size: 1.4rem;
  color: var(--accent);
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--gold-400) 35%, var(--border));
  border-radius: 999px;
  margin-bottom: 20px;
}
.step h3 { margin: 0 0 8px; font-size: 1.2rem; font-weight: 600; }
.step p { margin: 0; color: var(--text-dim); font-size: 15px; }

/* Ценности */
.value h3 { margin: 0 0 8px; font-family: Fraunces, serif; font-weight: 400; font-size: 1.35rem; }
.value p { margin: 0; color: var(--text-dim); font-size: 15px; }
.value__icon { width: 28px; height: 28px; color: var(--accent); margin-bottom: 18px; }

/* Сегменты */
.segment {
  display: flex; flex-direction: column;
  min-height: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 34px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.segment:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--gold-400) 34%, var(--border)); box-shadow: var(--shadow); }
.segment h3 { margin: 16px 0 10px; font-family: Fraunces, serif; font-weight: 400; font-size: 1.7rem; }
.segment p { color: var(--text-dim); margin: 0 0 22px; }
.segment ul { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 10px; }
.segment li { position: relative; padding-left: 24px; font-size: 14px; color: var(--text-dim); }
.segment li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 6px; height: 6px; border-radius: 999px; background: var(--accent); }
.segment__foot { margin-top: auto; }

/* Боли клиента */
.pain {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid color-mix(in srgb, var(--error) 70%, var(--border));
  border-radius: var(--r-card);
  padding: 24px 26px;
}
.pain__q { font-family: Fraunces, serif; font-weight: 400; font-style: normal; font-size: 1.2rem; margin: 0 0 10px; }
.pain__a { margin: 0; color: var(--text-dim); font-size: 14.5px; }
.pain__a b { color: var(--text); font-weight: 600; }

/* Что внутри гида */
.contents { display: grid; gap: 14px; }
.content-row {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.content-row:last-child { border-bottom: none; }
.content-row__n { color: var(--accent); font-family: Fraunces, serif; font-weight: 300; font-size: 1.1rem; flex: none; width: 30px; }
.content-row__t b { display: block; font-weight: 600; margin-bottom: 3px; }
.content-row__t span { color: var(--text-dim); font-size: 14px; }

/* ---------- Лид-форма ---------- */
.leadform {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-modal);
  padding: 32px;
  box-shadow: var(--shadow);
}
.leadform h3 { margin: 0 0 6px; font-family: Fraunces, serif; font-weight: 400; font-size: 1.5rem; }
.leadform p.sub { margin: 0 0 22px; color: var(--text-dim); font-size: 14.5px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 7px; }
.field input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-input);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  transition: border-color .18s, box-shadow .18s;
}
.field input::placeholder { color: var(--text-faint); }
.field input:focus {
  outline: none;
  border-color: var(--gold-400);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-400) 18%, transparent);
}
.field input.invalid { border-color: var(--error); }
.consent { font-size: 12px; color: var(--text-faint); margin: 14px 0 0; line-height: 1.5; }
.consent a { color: var(--accent); }
.form-success {
  display: none;
  text-align: center;
  padding: 16px 8px;
}
.form-success.show { display: block; }
.form-success__icon {
  width: 56px; height: 56px; margin: 0 auto 16px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 16%, transparent);
  color: var(--success);
}
.form-success h3 { margin: 0 0 8px; }
.form-success p { color: var(--text-dim); margin: 0; }
.form-fields.hidden { display: none; }

/* Hero целевой страницы (split) */
.lead-hero { padding: 70px 0 30px; }
.lead-hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.lead-hero h1 { margin: 18px 0 0; }
.lead-hero .lead { margin: 22px 0 26px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 30px; font-size: 15px; color: var(--text-dim); }
.checklist li::before {
  content: "";
  position: absolute; left: 0; top: 3px;
  width: 18px; height: 18px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold-400) 18%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23C9A24B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ---------- Цитата/обоснование ---------- */
.quote {
  border-left: 3px solid var(--accent);
  padding: 6px 0 6px 26px;
  font-family: Fraunces, serif;
  font-weight: 300;
  font-size: 1.4rem;
  line-height: 1.4;
  color: var(--text);
}

/* ---------- CTA-полоса ---------- */
.cta-band {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-modal);
  padding: 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { margin: 0 0 14px; }
.cta-band p { color: var(--text-dim); max-width: 540px; margin: 0 auto 30px; }

/* ---------- Футер ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 40px;
  background: var(--bg);
}
.footer-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-col h4 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); margin: 0 0 14px; font-weight: 600; }
.footer-col a { display: block; color: var(--text-dim); font-size: 14px; padding: 5px 0; transition: color .15s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--text-faint); }

/* Разделитель */
.divider { height: 1px; background: var(--border); border: none; margin: 0; }

/* Анимация появления */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 940px) {
  .lead-hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .nav { display: none; }
  .nav--mini { display: flex; gap: 16px; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .hero__inner { padding: 84px 0 70px; }
  .cta-band { padding: 38px 24px; }
  .leadform { padding: 24px; }
}

/* Мини-навигация (только лого + 1 ссылка) видна на узких */
.nav--mini { display: none; }
@media (max-width: 720px) { .nav--mini { display: flex; align-items: center; } }
