/* =========================================================================
   Главбух Марго — дизайн-система
   --------------------------------------------------------------------
   Идея: «спокойный календарь». Главный страх клиента — пропустить срок
   и получить штраф; главное обещание Марго — предупредить заранее.
   Поэтому цвет здесь несёт смысл, а не украшает: зелёный = «сдано, в
   порядке», янтарный = «скоро срок, нужно внимание». Янтарь используется
   ТОЛЬКО для сроков и дедлайнов — больше нигде, иначе сигнал обесценится.
   Структура строится на волосяных линиях (строки ведомости), а не на
   карточках с тенями.
   Шрифты: Literata (заголовки и числа — тёплая серифная антиква с хорошей
   кириллицей) + Golos Text (интерфейс и текст).
   ========================================================================= */

:root {
  /* Поверхности */
  --paper: #FBFAF7;
  --surface: #FFFFFF;
  --surface-sunk: #F4F3EE;

  /* Чернила */
  --ink: #15211D;
  --ink-soft: #1E2E28;
  --text: #1A2520;
  --muted: #5C6B64;
  --muted-soft: #7E8D86;

  /* Смысловые акценты */
  --green: #11614A;
  --green-dark: #0C4B39;
  --green-tint: #E7F0EA;
  --amber: #B4720B;
  --amber-dark: #8E5A07;
  --amber-tint: #FAF0DE;

  /* Линии */
  --rule: #E4E7E1;
  --rule-strong: #C9D1CB;

  --font-display: 'Literata', 'DejaVu Serif', Georgia, 'Times New Roman', serif;
  --font-body: 'Golos Text', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --max-w: 1160px;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-pill: 999px;

  --lift: 0 1px 2px rgba(21, 33, 29, .04), 0 12px 32px -20px rgba(21, 33, 29, .3);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #101714;
    --surface: #16201C;
    --surface-sunk: #121A17;
    --text: #E6EBE7;
    --muted: #9CABA4;
    --muted-soft: #7E8D86;
    --green: #5FC49F;
    --green-dark: #86D8B8;
    --green-tint: #17302763;
    --amber: #E2A849;
    --amber-dark: #F0BC68;
    --amber-tint: #2C23114D;
    --rule: #27332E;
    --rule-strong: #3A4842;
    --ink: #0B1210;
    --ink-soft: #16201C;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
ul { padding-left: 0; list-style: none; margin: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.16;
  margin: 0 0 .5em;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 1.55rem + 3vw, 3.65rem); line-height: 1.08; }
h2 { font-size: clamp(1.65rem, 1.35rem + 1.3vw, 2.3rem); }
h3 { font-size: 1.17rem; font-weight: 600; }
h4 { font-size: 1rem; }

p { margin: 0 0 1em; max-width: 68ch; }
/* Убирает «висячие» одиночные слова в конце абзацев и пунктов списка */
p, li, dd, figcaption { text-wrap: pretty; }

/* Выделение текста — в фирменном цвете, а не в системном синем */
::selection { background: var(--green); color: #fff; }

/* Шапка липкая, поэтому якорные ссылки (например «/tarify/#zayavka»)
   без этого прокручивали бы цель прямо под шапку. */
[id] { scroll-margin-top: 92px; }
.lede { font-size: 1.14rem; color: var(--muted); max-width: 54ch; line-height: 1.58; }

strong { font-weight: 600; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 28px; }
.narrow { max-width: 760px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

:focus-visible { outline: 2.5px solid var(--green); outline-offset: 3px; border-radius: 4px; }

/* Числа — главная типографика этого сайта: всегда табличные */
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ============================ Хедер ============================ */

.site-header {
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 28px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.14rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}
.brand span { color: var(--green); }

.main-nav { display: flex; align-items: center; }
.main-nav > ul { display: flex; align-items: center; gap: 1px; }
.main-nav a.nav-link {
  display: block;
  padding: 9px 13px;
  text-decoration: none;
  color: var(--muted);
  font-size: .95rem;
  white-space: nowrap;
  border-radius: var(--r-pill);
  transition: color .15s ease, background-color .15s ease;
}
.main-nav a.nav-link:hover { color: var(--text); background: var(--surface-sunk); }
.main-nav a.nav-link[aria-current="page"] { color: var(--text); font-weight: 500; }

.has-children { position: relative; }
.submenu {
  position: absolute;
  top: calc(100% + 6px); left: 0;
  background: var(--surface);
  min-width: 286px;
  border-radius: var(--r);
  box-shadow: 0 24px 50px -16px rgba(21, 33, 29, .3);
  padding: 8px;
  display: none;
  border: 1px solid var(--rule);
}
.has-children:hover .submenu,
.has-children:focus-within .submenu { display: block; }
.submenu a {
  display: block;
  padding: 9px 12px;
  text-decoration: none;
  border-radius: var(--r-sm);
  font-size: .94rem;
  color: var(--muted);
}
.submenu a:hover { background: var(--surface-sunk); color: var(--green); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.phone-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.phone-link:hover { color: var(--green); }
.nav-toggle { display: none; }

/* ============================ Кнопки ============================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .98rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  border: 1.5px solid transparent;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .1s ease;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-outline { border-color: var(--rule-strong); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--green); color: var(--green); }
.btn-ghost-dark { border-color: rgba(255,255,255,.3); color: #fff; }
.btn-ghost-dark:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-sm { padding: 10px 19px; font-size: .92rem; }
.btn:active { transform: translateY(1px); }

@media (prefers-color-scheme: dark) {
  .btn-primary { background: var(--green); color: #07140F; }
}

/* Текстовая ссылка-действие */
.link-go {
  color: var(--green);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--green) 35%, transparent);
  padding-bottom: 1px;
}
.link-go:hover { border-bottom-color: var(--green); }

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

.hero { padding: 72px 0 60px; }
.hero .container {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 68px;
  align-items: center;
}
.hero-eyebrow {
  color: var(--green);
  font-weight: 500;
  font-size: .96rem;
  margin-bottom: 18px;
}
.hero h1 { margin-bottom: .32em; }
.hero .lede { font-size: 1.18rem; }
.hero-cta-row { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

.hero-meta {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  gap: 38px;
  flex-wrap: wrap;
}
.hero-meta div strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.hero-meta div span { color: var(--muted); font-size: .89rem; }

/* ---- Карточка «Ближайшие сроки» — единственный смелый элемент страницы ---- */

.deadlines {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 26px 28px 22px;
  box-shadow: var(--lift);
}
.deadlines-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
.deadlines-head h2 {
  font-size: 1.02rem;
  font-family: var(--font-body);
  font-weight: 600;
  margin: 0;
  letter-spacing: 0;
}
.deadlines-head span { font-size: .84rem; color: var(--muted-soft); }
.deadlines-head a { color: var(--green); text-decoration: none; }
.deadlines-head a:hover { text-decoration: underline; text-underline-offset: 3px; }

.deadline {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 20px;
  align-items: start;
  padding: 17px 0;
  border-bottom: 1px solid var(--rule);
}
.deadline:last-of-type { border-bottom: none; }
.deadline-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2px;
}
.deadline-date .d {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--text);
}
.deadline-date .m { font-size: .8rem; color: var(--muted-soft); margin-top: 4px; }
.deadline-title { font-size: .97rem; font-weight: 500; margin: 0 0 3px; }
.deadline-who { font-size: .86rem; color: var(--muted); margin: 0; }

/* Ближайший срок — единственное место янтаря */
.deadline.is-next .deadline-date .d,
.deadline.is-next .deadline-date .m { color: var(--amber-dark); }
.deadline-countdown {
  display: inline-block;
  margin-top: 7px;
  background: var(--amber-tint);
  color: var(--amber-dark);
  border-radius: var(--r-pill);
  padding: 3px 11px;
  font-size: .8rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.deadlines-note {
  margin: 16px 0 0;
  padding-top: 15px;
  border-top: 1px solid var(--rule);
  font-size: .87rem;
  color: var(--muted);
  display: flex;
  gap: 9px;
  align-items: flex-start;
  max-width: none;
}
.deadlines-note::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  margin-top: 8px;
}

/* Единственное движение на странице: карточка проявляется при загрузке */
@media (prefers-reduced-motion: no-preference) {
  .deadlines { animation: card-in .5s cubic-bezier(.2,.7,.3,1) both; }
  @keyframes card-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
  }
}

/* ============================ Секции ============================ */

section.block { padding: 78px 0; }
section.block.tight { padding: 50px 0; }
.block-head { margin-bottom: 40px; max-width: 60ch; }
.block-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.block-head h2 { margin-bottom: .3em; }

.bg-raised { background: var(--surface); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.bg-ink { background: var(--ink); color: #E8EFEA; }
.bg-ink h2, .bg-ink h3 { color: #fff; }
.bg-ink .lede, .bg-ink p { color: #A9BAB1; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }

/* ---- Список-ведомость ---- */

.ledger-list { border-top: 1px solid var(--rule); }
.ledger-list li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 15px 0;
  border-bottom: 1px solid var(--rule);
}
.ledger-list li::before {
  content: "";
  flex-shrink: 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  margin-top: 9px;
}

/* ---- Услуги: строки, а не карточки ---- */

.services-grid { border-top: 1px solid var(--rule); }
.service-card {
  display: grid;
  grid-template-columns: minmax(180px, 250px) 1fr auto;
  align-items: baseline;
  gap: 32px;
  padding: 19px 4px;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--text);
  transition: padding-left .18s ease, background-color .18s ease;
}
.service-card:hover { background: var(--surface-sunk); padding-left: 14px; }
.service-card h3 { margin: 0; font-size: 1.06rem; }
.service-card p { margin: 0; color: var(--muted); font-size: .94rem; max-width: 70ch; }
.service-card .go {
  color: var(--green);
  font-weight: 500;
  font-size: .89rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .18s ease;
}
.service-card:hover .go, .service-card:focus-visible .go { opacity: 1; }

/* ---- Почему остаются: типографика, без карточек ---- */

.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; }
.trust-card { padding-top: 22px; border-top: 2px solid var(--green); }
.trust-card h3 { margin: 0 0 10px; font-size: 1.1rem; }
.trust-card p { color: var(--muted); font-size: .97rem; margin: 0; }

/* ---- Кейсы ---- */

.case-list { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.case-item {
  padding: 32px 0;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 40px;
}
.case-item h3 { font-size: 1.14rem; margin: 0; max-width: 24ch; }
.case-item dl { margin: 0; }
.case-item dt {
  font-size: .84rem;
  color: var(--green);
  font-weight: 600;
  margin-top: 18px;
}
.case-item dt:first-child { margin-top: 0; }
.case-item dd { margin: 5px 0 0; color: var(--text); max-width: 64ch; }

/* ---- Процесс: реальная последовательность, поэтому нумерация уместна ---- */

.process-list { display: grid; gap: 0; }
.process-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}
.process-item:first-child { border-top: 1px solid var(--rule); }
.process-item .step-num {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--green);
  font-size: 1.3rem;
  font-variant-numeric: tabular-nums;
}
.process-item h3 { margin: 0 0 6px; font-size: 1.06rem; }
.process-item p { margin: 0; color: var(--muted); }

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

.faq-list { border-top: 1px solid var(--rule); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item summary {
  cursor: pointer;
  padding: 21px 4px;
  font-weight: 500;
  font-family: var(--font-body);
  font-size: 1.03rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex-shrink: 0;
  width: 11px; height: 11px;
  border-right: 1.8px solid var(--green);
  border-bottom: 1.8px solid var(--green);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.faq-item .faq-a { padding: 0 4px 23px; color: var(--muted); max-width: 70ch; }

/* ---- Инструменты ---- */

.tools-row { display: flex; flex-wrap: wrap; gap: 9px; }
.tool-chip {
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  padding: 7px 16px;
  font-size: .88rem;
  color: var(--muted);
  background: var(--surface);
}

/* ============================ Блог ============================ */

.post-list { border-top: 1px solid var(--rule); }
.post-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 28px;
  align-items: baseline;
  padding: 26px 4px;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--text);
  transition: background-color .18s ease, padding-left .18s ease;
}
.post-row:hover { background: var(--surface-sunk); padding-left: 14px; }
.post-row .post-date {
  font-size: .87rem;
  color: var(--muted-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.post-row h3 { margin: 0 0 6px; font-size: 1.22rem; }
.post-row p { margin: 0; color: var(--muted); font-size: .96rem; max-width: 66ch; }
.post-row .post-read {
  font-size: .86rem;
  color: var(--muted-soft);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Тизер блога на главной */
.post-teasers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.post-teaser {
  display: block;
  text-decoration: none;
  color: var(--text);
  padding-top: 20px;
  border-top: 2px solid var(--rule-strong);
  transition: border-color .18s ease;
}
.post-teaser:hover { border-top-color: var(--green); }
.post-teaser .post-date { font-size: .84rem; color: var(--muted-soft); font-variant-numeric: tabular-nums; }
.post-teaser h3 { margin: 10px 0 8px; font-size: 1.1rem; }
.post-teaser p { margin: 0; color: var(--muted); font-size: .93rem; }

/* Статья */
.article-head { padding: 44px 0 0; }
.article-head h1 { font-size: clamp(1.95rem, 1.5rem + 1.9vw, 2.75rem); margin-bottom: .45em; }
.article-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: .88rem;
  color: var(--muted-soft);
  margin-bottom: 18px;
  font-variant-numeric: tabular-nums;
}
.article-lede { font-size: 1.18rem; color: var(--muted); max-width: 60ch; line-height: 1.55; }

.article-body { max-width: 68ch; padding: 10px 0 20px; }
.article-body h2 { font-size: 1.55rem; margin: 2em 0 .55em; }
.article-body h3 { font-size: 1.14rem; margin: 1.7em 0 .5em; }
.article-body p { margin: 0 0 1.15em; }
.article-body ul, .article-body ol { margin: 0 0 1.3em; padding-left: 0; }
.article-body ul li {
  position: relative;
  padding-left: 26px;
  margin-bottom: .6em;
}
.article-body ul li::before {
  content: "";
  position: absolute;
  left: 4px; top: .62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
}
.article-body ol { counter-reset: li; list-style: none; }
.article-body ol li {
  position: relative;
  padding-left: 32px;
  margin-bottom: .7em;
  counter-increment: li;
}
.article-body ol li::before {
  content: counter(li) ".";
  position: absolute;
  left: 2px;
  color: var(--green);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.article-body a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.article-body strong { font-weight: 600; color: var(--text); }

.callout {
  background: var(--green-tint);
  border-radius: var(--r);
  padding: 22px 26px;
  margin: 1.8em 0;
}
.callout p { margin: 0; max-width: none; font-size: .99rem; }
.callout p + p { margin-top: .7em; }

.article-table-wrap { overflow-x: auto; margin: 1.6em 0; }
.article-body table { border-collapse: collapse; width: 100%; font-size: .95rem; min-width: 460px; }
.article-body th, .article-body td {
  text-align: left;
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.article-body th { font-weight: 600; font-size: .87rem; color: var(--muted); }
.article-body td:first-child { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 500; }

.author-note {
  margin-top: 44px;
  padding: 26px 28px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r);
}
.author-note h3 { margin: 0 0 8px; font-size: 1.05rem; }
.author-note p { margin: 0 0 14px; color: var(--muted); font-size: .96rem; }

.related { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--rule); }
.related h2 { font-size: 1.15rem; font-family: var(--font-body); font-weight: 600; margin-bottom: 14px; }
.related ul { display: grid; gap: 10px; }
.related a { color: var(--green); text-decoration: none; }
.related a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============================ Формы ============================ */

.lead-form {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 32px;
  box-shadow: var(--lift);
}
.form-row { margin-bottom: 17px; }
.form-row label {
  display: block;
  font-size: .89rem;
  font-weight: 500;
  margin-bottom: 7px;
  color: var(--text);
}
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1.5px solid var(--rule);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: .98rem;
  background: var(--paper);
  color: var(--text);
  transition: border-color .15s ease;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--green);
  outline: none;
}
.form-row textarea { min-height: 108px; resize: vertical; }
.form-consent {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: .85rem; color: var(--muted); margin: 18px 0;
}
.form-consent input { width: auto; margin-top: 3px; accent-color: var(--green); }
.form-consent a { color: var(--green); }
.form-note { font-size: .85rem; color: var(--muted); margin: 14px 0 0; }
.form-note a { color: var(--green); }

/* Подтверждение после отправки — заменяет собой форму */
.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  padding: 18px 4px;
}
.form-success-mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--green-tint);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.form-success-mark svg { width: 25px; height: 25px; }
.form-success h3 { margin: 0 0 10px; font-size: 1.32rem; }
.form-success p { color: var(--muted); max-width: 42ch; margin: 0 0 22px; font-size: .97rem; }
.form-success-links { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

@media (prefers-reduced-motion: no-preference) {
  .form-success { animation: rise-in .45s cubic-bezier(.2,.7,.3,1) both; }
}

/* ============================ CTA-полоса ============================ */

.cta-band {
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 52px 54px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: 8px; font-size: clamp(1.5rem, 1.25rem + 1vw, 2.05rem); }
.cta-band p { color: #A9BAB1; margin: 0; max-width: 52ch; }
.cta-band .btn-primary { background: #fff; color: var(--ink); }
.cta-band .btn-primary:hover { background: #E7F0EA; }

/* ============================ Каналы связи ============================ */

.channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.channel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 24px;
  text-decoration: none;
  color: var(--text);
  transition: border-color .18s ease;
}
.channel:hover { border-color: var(--green); }
.channel strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.06rem;
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.channel span { color: var(--muted); font-size: .92rem; }

/* Цена на странице услуги — сразу под подзаголовком первого экрана */
.service-price {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  margin: 26px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  max-width: none;
}
.service-price-value {
  font-family: var(--font-display);
  font-size: 1.42rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.service-price-from,
.service-price-unit {
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}
.service-price-custom { font-size: 1rem; color: var(--muted); }

/* ============================ Прайс ============================ */

.price-table { border-top: 1px solid var(--rule); }
.price-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: baseline;
  padding: 20px 4px;
  border-bottom: 1px solid var(--rule);
}
.price-name { margin: 0; font-size: 1.04rem; font-weight: 500; }
.price-note { margin: 4px 0 0; font-size: .89rem; color: var(--muted); max-width: 58ch; }
.price-value {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.price-from {
  font-family: var(--font-body);
  font-size: .86rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
}
.price-unit {
  display: block;
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0;
  text-align: right;
  margin-top: 2px;
}
.price-custom {
  font-family: var(--font-body);
  font-size: .97rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}
.price-disclaimer {
  margin: 24px 0 0;
  font-size: .92rem;
  color: var(--muted);
  max-width: 76ch;
  padding-left: 16px;
  border-left: 2px solid var(--rule-strong);
}

@media (max-width: 560px) {
  .price-row { grid-template-columns: 1fr; gap: 8px; }
  .price-value { font-size: 1.2rem; }
  .price-unit { text-align: left; display: inline; margin-left: 6px; }
}

/* ============================ Реквизиты ============================ */

.requisites { display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; }
.requisites dl { margin: 0; border-top: 1px solid var(--rule); }
.requisites dt {
  font-size: .85rem;
  color: var(--muted);
  padding-top: 15px;
}
.requisites dd {
  margin: 3px 0 0;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--rule);
  font-weight: 500;
  overflow-wrap: anywhere;
}

@media (max-width: 1000px) {
  .requisites { grid-template-columns: 1fr; gap: 0; }
  .requisites dl + dl { border-top: none; }
}

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

.site-footer {
  background: var(--ink);
  color: #A9BAB1;
  padding: 60px 0 28px;
  margin-top: 90px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 38px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-col .footer-head {
  color: #fff;
  font-family: var(--font-body);
  font-size: .88rem;
  margin: 0 0 15px;
  font-weight: 600;
}
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col a { color: #A9BAB1; text-decoration: none; font-size: .92rem; }
.footer-col a:hover { color: #fff; }
.footer-brand {
  font-family: var(--font-display);
  color: #fff;
  font-weight: 600;
  font-size: 1.12rem;
  margin-bottom: 12px;
  display: block;
  text-decoration: none;
}
.footer-brand span { color: #5FC49F; }
.footer-tagline { color: #8D9E96; font-size: .91rem; max-width: 34ch; margin-bottom: 4px; }

/* Контакты в подвале: значок + значение, а не список ссылок вперемешку */
.footer-contacts { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.footer-contacts li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 13px;
  align-items: center;
}
.footer-contacts a,
.footer-contacts span { font-size: .93rem; }
.footer-contacts a { color: #CBD8D2; text-decoration: none; }
.footer-contacts a:hover { color: #fff; }
.footer-contacts .is-static span { color: #8D9E96; }

.ico { width: 18px; height: 18px; color: #74867E; transition: color .15s ease; }
.ico-brand { width: 16px; height: 16px; }
.footer-contacts li:hover .ico { color: #5FC49F; }
.footer-legal {
  font-size: .82rem;
  color: #74867E;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-legal a { color: #8D9E96; }

/* ============================ Страница специалиста ============================ */

.person-hero { padding: 44px 0 16px; }
.person-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 60px;
  align-items: center;
  margin-top: 10px;
}
/* Фон у фото подогнан под цвет страницы, поэтому в светлой теме портрет
   растворяется без рамки. В тёмной теме скругление превращает его в
   аккуратную светлую панель, а не в режущий глаз белый прямоугольник. */
.person-photo {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #FBFAF7;
  /* Нижний край растворяется в странице, чтобы обрез жакета не читался
     как резко проведённая линия. */
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 99%);
  mask-image: linear-gradient(to bottom, #000 72%, transparent 99%);
}
.person-photo img { width: 100%; height: auto; }
.person-intro h1 { margin-bottom: .3em; }

.person-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 36px;
  margin: 32px 0 30px;
  padding-top: 26px;
  border-top: 1px solid var(--rule);
}
.person-facts dt { font-size: .86rem; color: var(--muted); margin-bottom: 5px; }
.person-facts dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Блок на главной: портрет рядом с рассказом о личной ответственности.
   Фон у этого кадра белый — ровно как у секции, на которой он стоит,
   поэтому рамка не нужна, портрет просто живёт в странице. */
.intro-split {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 64px;
  align-items: center;
}
.intro-photo {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #fff;
  -webkit-mask-image: linear-gradient(to bottom, #000 74%, transparent 99%);
  mask-image: linear-gradient(to bottom, #000 74%, transparent 99%);
}
.intro-photo img { width: 100%; height: auto; }

@media (max-width: 1000px) {
  .intro-split { grid-template-columns: 1fr; gap: 28px; }
  .intro-photo { max-width: 360px; }
}

/* Подпись автора под статьями */
.author-note {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 24px;
  align-items: start;
}
.author-avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; }
.author-role { font-size: .88rem; color: var(--green); margin: 0 0 10px; }

@media (max-width: 1000px) {
  .person-grid { grid-template-columns: 1fr; gap: 32px; }
  .person-photo { max-width: 420px; }
}
@media (max-width: 560px) {
  .person-facts { grid-template-columns: 1fr 1fr; gap: 18px 24px; }
  .author-note { grid-template-columns: 1fr; gap: 16px; }
}

/* ============================ Движение ============================ */
/* Блоки проявляются при прокрутке. Сделано на CSS scroll-driven анимациях,
   а не на JavaScript: нет скрипта в бандле, нет дёрганья при загрузке и
   нет риска, что контент останется невидимым, если скрипт не выполнился.
   Элементы, уже видимые при открытии страницы, показываются сразу —
   первый экран не анимируется, чтобы не портить скорость отрисовки.
   Браузеры без поддержки просто показывают всё статично. */

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes header-shadow {
  from { box-shadow: 0 0 0 rgba(21, 33, 29, 0); }
  to { box-shadow: 0 8px 28px -20px rgba(21, 33, 29, .55); }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .block-head,
    .trust-card,
    .service-card,
    .case-item,
    .post-row,
    .post-teaser,
    .process-item,
    .channel,
    .faq-item,
    .cta-band,
    .lead-form,
    .author-note,
    .related,
    .requisites,
    .tools-row {
      animation: rise-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
  }
  @supports (animation-timeline: scroll()) {
    .site-header {
      animation: header-shadow linear both;
      animation-timeline: scroll();
      animation-range: 0 140px;
    }
  }
}

/* ============================ Мессенджеры ============================ */
/* Монохромные, в цвете сайта — цветные фирменные кружки WhatsApp и Telegram
   выглядели бы как наклейки поверх дизайна. Узнаваемость даёт форма значка. */

.messengers {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 60;
}
.messenger {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px -2px rgba(21,33,29,.2), 0 14px 32px -12px rgba(21,33,29,.45);
  transition: background-color .18s ease, transform .18s ease;
}
.messenger svg { width: 23px; height: 23px; }
.messenger:hover { background: var(--green); transform: scale(1.06); }

.messenger-label {
  position: absolute;
  right: calc(100% + 10px);
  background: var(--ink);
  color: #fff;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  font-size: .85rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(8px);
  transition: opacity .18s ease, transform .18s ease;
}
.messenger:hover .messenger-label,
.messenger:focus-visible .messenger-label { opacity: 1; transform: none; }

@media (prefers-color-scheme: dark) {
  .messenger { background: var(--surface); border: 1px solid var(--rule); }
  .messenger:hover { background: var(--green); color: #07140F; border-color: transparent; }
  .messenger-label { background: var(--surface); border: 1px solid var(--rule); color: var(--text); }
}

/* ============================ Cookie ============================ */

.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  max-width: 620px;
  margin: 0 auto;
  background: var(--ink);
  color: #E6EBE7;
  border-radius: var(--r);
  padding: 20px 22px;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,.55);
  z-index: 100;
  display: none;
}
.cookie-banner.is-visible { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.cookie-banner p { margin: 0; font-size: .88rem; color: #A9BAB1; flex: 1 1 280px; }
.cookie-banner a { color: #fff; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-banner .btn-primary { background: #fff; color: var(--ink); }

/* ============================ Прочее ============================ */

.breadcrumbs { font-size: .85rem; color: var(--muted-soft); margin-bottom: 20px; }
.breadcrumbs a { color: var(--muted-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--green); }
.breadcrumbs span { color: var(--rule-strong); }
.breadcrumbs span[aria-current] { color: var(--muted-soft); }

.page-hero { padding: 48px 0 20px; }
.page-hero .lede { margin-top: 12px; }

.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.8em; }
.prose a { color: var(--green); }

.tag-row { display: flex; gap: 9px; flex-wrap: wrap; margin: 18px 0 28px; }
.tag {
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  padding: 6px 15px;
  font-size: .85rem;
  color: var(--muted);
}

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

@media (max-width: 1000px) {
  .hero { padding: 52px 0 60px; }
  .hero .container { grid-template-columns: 1fr; gap: 44px; }
  .two-col { grid-template-columns: 1fr; gap: 40px; }
  .trust-grid { grid-template-columns: 1fr; gap: 34px; }
  .case-item { grid-template-columns: 1fr; gap: 18px; }
  .channels { grid-template-columns: 1fr; }
  .post-teasers { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-band { padding: 38px; }
  section.block { padding: 58px 0; }
}

/* Полное горизонтальное меню (8 пунктов + телефон + кнопка) перестаёт
   помещаться в строку раньше ~1280px — переключаем на выдвижное меню
   здесь, а не только на узких экранах, чтобы пункты не переносились. */
@media (max-width: 1280px) {
  .main-nav {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--paper);
    padding: 14px 20px 40px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .22s ease;
    border-top: 1px solid var(--rule);
  }
  .main-nav.is-open { transform: translateX(0); }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a.nav-link {
    padding: 14px 8px;
    font-size: 1.04rem;
    white-space: normal;
    border-radius: var(--r-sm);
    border-bottom: 1px solid var(--rule);
    color: var(--text);
  }
  .submenu {
    position: static;
    display: block;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 8px 14px;
    min-width: 0;
  }
  .has-children .submenu { display: none; }
  .has-children.is-open .submenu { display: block; }
  .submenu a { color: var(--muted); padding: 11px 8px; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px;
    border-radius: var(--r-pill);
    border: 1px solid var(--rule-strong);
    background: transparent;
    color: var(--text);
    cursor: pointer;
  }
  .header-actions .phone-link { display: none; }
}

@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .container { padding: 0 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .deadlines { padding: 22px 20px 18px; }
  .deadline { gap: 16px; }
  .deadline-date .d { font-size: 1.55rem; }
  .hero-meta { gap: 26px; }
  .post-row { grid-template-columns: 1fr; gap: 8px; }
  .post-row .post-read { display: none; }
  .service-card { grid-template-columns: 1fr; gap: 6px; }
  .service-card .go { display: none; }
  .cta-band { padding: 30px 26px; }
  .lead-form { padding: 24px 20px; }
  /* На узком экране кнопка из шапки не нужна: тот же призыв стоит
     сразу в первом экране, а в шапке она ломает строку. */
  .header-actions .btn { display: none; }

  /* Мессенджеры уходят в правый нижний угол и поднимаются ровно на высоту
     cookie-баннера, пока он открыт (высоту считает скрипт), чтобы ничего
     друг друга не перекрывало. */
  .messengers {
    top: auto;
    transform: none;
    right: 14px;
    bottom: calc(18px + var(--cookie-h, 0px));
    flex-direction: row;
  }
  .messenger { width: 46px; height: 46px; }
  .messenger svg { width: 21px; height: 21px; }
  .messenger-label { display: none; }
}

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