/* ЭлитРазбор — дизайн-система. Собственный стиль: графит + слоновая кость + глубокий изумруд. */

:root {
  --ink: #171a1e;
  --ink-soft: #4a4f57;
  --paper: #f8f6f1;
  --card: #ffffff;
  --line: #e4dfd4;
  --accent: #175c4c;
  --accent-dark: #0f3d33;
  --accent-soft: #e7efec;
  --danger: #a83232;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(23, 26, 30, 0.08);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.25; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.7rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); margin-bottom: 0.8em; }
h3 { font-size: 1.15rem; margin-bottom: 0.5em; }

main { display: block; }
.section { max-width: 1100px; margin: 0 auto; padding: 48px 20px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  min-height: 44px;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-soft); text-decoration: none; }

/* ---------- шапка ---------- */
.nav-cb { position: absolute; opacity: 0; pointer-events: none; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 12px 20px;
  background: rgba(248, 246, 241, 0.97);
  border-bottom: 1px solid var(--line);
}
.logo {
  font-family: var(--serif); font-size: 1.35rem; font-weight: 700; color: var(--ink);
  display: flex; flex-direction: column; line-height: 1.1;
}
.logo:hover { text-decoration: none; }
.logo b { color: var(--accent); font-weight: 700; }
.logo-note { font-family: var(--sans); font-size: 0.62rem; font-weight: 400; color: var(--ink-soft); letter-spacing: 0.08em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.site-nav a { color: var(--ink); padding: 10px 2px; min-height: 44px; display: inline-flex; align-items: center; }
.site-nav a[aria-current] { color: var(--accent); font-weight: 600; }
.site-nav .nav-cta { color: #fff; padding: 11px 20px; }
.nav-close { display: none; }
.head-cta { display: none; }
.burger { display: none; }

/* мобильное меню — полноэкранный оверлей с явным ✕ (не разворот в потоке) */
@media (max-width: 860px) {
  .site-header { padding: 10px 14px; }
  .site-nav {
    display: none;
    position: fixed; inset: 0; z-index: 100;
    background: var(--paper);
    flex-direction: column; justify-content: center; align-items: center; gap: 8px;
  }
  .site-nav a { font-size: 1.3rem; padding: 14px 20px; }
  .nav-cb:checked ~ .site-header .site-nav { display: flex; }
  .nav-cb:checked ~ .site-header .burger { display: none; }
  .nav-close {
    display: flex; position: absolute; top: 14px; right: 16px;
    font-size: 1.6rem; width: 48px; height: 48px;
    align-items: center; justify-content: center; cursor: pointer;
  }
  .burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 10px; margin-left: auto; cursor: pointer;
  }
  .burger span { display: block; height: 2px; background: var(--ink); border-radius: 2px; }
  .head-cta { display: inline-block; margin-left: auto; padding: 10px 14px; font-size: 0.9rem; }
  .burger { margin-left: 0; }
}
body:has(.nav-cb:checked) { overflow: hidden; }

/* ---------- hero ---------- */
.hero { background: linear-gradient(180deg, #fdfcf9 0%, var(--paper) 100%); border-bottom: 1px solid var(--line); }
.hero-inner { max-width: 1100px; margin: 0 auto; padding: 44px 20px 52px; }
.hero h1 { max-width: 780px; }
.hero-sub { max-width: 720px; margin-top: 16px; font-size: 1.12rem; color: var(--ink-soft); }
.hero-cta { margin-top: 26px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-facts { margin-top: 30px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; max-width: 860px; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.fact b { display: block; font-family: var(--serif); font-size: 1.25rem; color: var(--accent-dark); }
.fact span { font-size: 0.88rem; color: var(--ink-soft); }
@media (max-width: 860px) {
  .hero-inner { padding: 26px 14px 34px; }
}

/* ---------- карточки направлений ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.card {
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: none; transition: box-shadow 0.15s ease;
}
.card:hover { box-shadow: var(--shadow); }
.card h3 { color: var(--ink); }
.card p { font-size: 0.94rem; color: var(--ink-soft); }
.card .stretch::after { content: ''; position: absolute; inset: 0; }
.card-min { margin-top: 10px; font-size: 0.86rem; color: var(--accent-dark); font-weight: 600; }

/* ---------- каталог разборов ---------- */
.cards-wide { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.cluster-card ul { list-style: none; padding: 0; margin-top: 4px; }
.cluster-card li { border-top: 1px solid var(--line); }
.cluster-card li:first-child { border-top: none; }
.cluster-card li a { display: block; padding: 9px 0; font-size: 0.93rem; color: var(--ink); min-height: 40px; }
.cluster-card li a:hover { color: var(--accent); text-decoration: none; }

/* ---------- шаги ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; counter-reset: step; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-dark);
  font-weight: 700; margin-bottom: 12px;
}

/* ---------- изображения ---------- */
.ph { margin: 22px 0; }
.ph picture { display: block; }
.ph img { width: 100%; height: auto; border-radius: var(--radius); display: block; background: var(--accent-soft); }
.ph figcaption { font-size: 0.82rem; color: var(--ink-soft); margin-top: 7px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ph-credit { color: #9a9488; font-size: 0.76rem; }
.ph-hero img { aspect-ratio: 16 / 9; object-fit: cover; }
.ph-strip-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 26px 0 4px; }
.ph-strip { margin: 0; }
.ph-strip img { aspect-ratio: 3 / 2; object-fit: cover; }
.ph-strip figcaption { justify-content: flex-start; }
@media (max-width: 680px) {
  .ph-strip-row { grid-template-columns: 1fr; }
}

/* ---------- контентные страницы ---------- */
.article { max-width: 780px; }
.article p, .article ul, .article ol { margin-bottom: 1em; }
.article ul, .article ol { padding-left: 1.3em; }
.article h2 { margin-top: 1.6em; }
.date-line, .author-line { font-size: 0.88rem; color: var(--ink-soft); }
.date-line { margin-bottom: 4px; }
.author-line { margin-bottom: 18px; }

.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tbl th, .tbl td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.tbl th { background: var(--accent-soft); font-weight: 600; }
/* таблицы с данными на мобиле — карточки, не боковой скролл */
@media (max-width: 680px) {
  .tbl-wrap { overflow-x: visible; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; min-width: 0; }
  .tbl thead { display: none; }
  .tbl tr { border-bottom: 2px solid var(--line); padding: 8px 0; }
  .tbl td { border: none; padding: 4px 14px; }
  .tbl td[data-th]::before { content: attr(data-th) ': '; font-weight: 600; }
}

/* ---------- FAQ ---------- */
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.faq-item summary {
  cursor: pointer; padding: 16px 18px; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.3rem; color: var(--accent); flex-shrink: 0; }
.faq-item[open] summary::after { content: '−'; }
.faq-a { padding: 0 18px 16px; color: var(--ink-soft); }
.faq-a p { margin-bottom: 0.7em; }

/* ---------- лид-форма ---------- */
.lead { background: var(--accent-dark); border-radius: 22px; max-width: 1060px; margin: 30px auto 60px; color: #fff; }
.lead-inner { padding: 40px 40px 34px; }
.lead h2 { color: #fff; }
.lead-sub { color: rgba(255, 255, 255, 0.75); max-width: 640px; margin-bottom: 24px; }
.lead-form { display: block; }
.lf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lf-cur { max-width: 100%; }
.lf-field { display: block; margin-bottom: 14px; }
.lf-field span { display: block; font-size: 0.86rem; margin-bottom: 6px; color: rgba(255, 255, 255, 0.85); }
.lf-field em { color: #f0b7b7; font-style: normal; }
.lf-field input, .lf-field select, .lf-field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.07); color: #fff; font-size: 1rem; font-family: var(--sans);
  min-height: 44px;
}
.lf-field textarea { min-height: 80px; resize: vertical; }
.lf-field input::placeholder, .lf-field textarea::placeholder { color: rgba(255, 255, 255, 0.45); }
.lf-field select option { color: var(--ink); background: #fff; }
.lf-field input:focus, .lf-field select:focus, .lf-field textarea:focus { outline: 2px solid rgba(255, 255, 255, 0.5); }
.lf-group { margin-bottom: 14px; }
.lf-label { display: block; font-size: 0.86rem; margin-bottom: 8px; color: rgba(255, 255, 255, 0.85); }
.lf-label em { color: #f0b7b7; font-style: normal; }
.lf-tabs, .lf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lf-tab, .lf-chip {
  padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.3);
  background: transparent; color: #fff; cursor: pointer; font-size: 0.92rem; min-height: 40px;
}
.lf-tab.active, .lf-chip.active { background: #fff; color: var(--accent-dark); border-color: #fff; font-weight: 600; }
.lf-hint { font-size: 0.86rem; color: #d8c9a3; margin: -4px 0 14px; }
.lf-hint.lf-hint-err { color: #f0b7b7; }
.lf-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.84rem; color: rgba(255, 255, 255, 0.8); margin: 6px 0 18px; }
.lf-consent input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; }
.lf-consent a { color: #d8c9a3; text-decoration: underline; }
.lf-submit { width: 100%; background: #fff; color: var(--accent-dark); font-size: 1.05rem; padding: 15px; }
.lf-submit:hover { background: var(--paper); }
.lf-submit[disabled] { opacity: 0.6; cursor: wait; }
.lf-status { margin-top: 12px; font-size: 0.95rem; min-height: 1.4em; }
.lf-status.ok { color: #b8e6c9; }
.lf-status.err { color: #f0b7b7; }
.lf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lead-done { text-align: center; padding: 30px 0; }
.lead-done h3 { color: #fff; font-size: 1.4rem; margin-bottom: 10px; }
.lead-done p { color: rgba(255, 255, 255, 0.8); }
@media (max-width: 720px) {
  .lead { border-radius: 0; margin: 20px 0 0; }
  .lead-inner { padding: 28px 16px; }
  .lf-row { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- футер ---------- */
.site-footer { background: var(--ink); color: #cfd2d6; margin-top: 40px; }
.foot-grid {
  max-width: 1100px; margin: 0 auto; padding: 40px 20px 20px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px;
}
.foot-grid a { display: block; color: #cfd2d6; padding: 5px 0; min-height: 32px; }
.foot-grid a:hover { color: #fff; }
.foot-brand { font-family: var(--serif); font-size: 1.2rem; color: #fff; margin-bottom: 8px; }
.foot-h { font-weight: 700; color: #fff; margin-bottom: 8px; }
.foot-grid p { font-size: 0.9rem; }
.foot-copy { max-width: 1100px; margin: 0 auto; padding: 14px 20px 26px; font-size: 0.8rem; color: #8b9097; border-top: 1px solid #2c3138; }

/* ---------- cookie ---------- */
.cookie-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px; display: flex; gap: 14px; align-items: center; max-width: 720px; margin: 0 auto;
}
.cookie-bar p { font-size: 0.84rem; color: var(--ink-soft); }
.cookie-bar .btn { flex-shrink: 0; padding: 9px 18px; }

/* ---------- 404 ---------- */
.nf { text-align: center; padding: 90px 20px; }
.nf h1 { font-size: 4rem; color: var(--accent); }
