/* ==========================================================================
   Коллегия юристов — автоюристы Санкт-Петербурга
   Единый файл стилей. Mobile-first. Без фреймворков.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Переменные
   -------------------------------------------------------------------------- */

/* Атрибут hidden обязан скрывать: правило класса с display перебивает
   браузерное [hidden]{display:none}, и скрытый блок остаётся видимым. */
[hidden] { display: none !important; }

:root {
  /* Палитра */
  --ink:            #173B43;
  --brand:          #00786A;
  --brand-deep:     #027267;
  --teal:           #18918A;
  --accent:         #FCC11F;
  --accent-hover:   #FFD34D;
  --accent-active:  #E8AE0A;
  --base:           #FFFFFF;
  --warm-white:     #FCFCF7;
  --surface:        #F6F6F4;
  --border:         #E8E1D6;
  --body:           #222222;
  --muted:          #6B7B7F;

  --on-dark:        rgba(255, 255, 255, .70);
  --on-dark-dim:    rgba(255, 255, 255, .55);
  --on-dark-line:   rgba(255, 255, 255, .15);
  --on-dark-field:  rgba(255, 255, 255, .35);

  /* Типографика */
  --font-ui:   'Golos Text', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --font-text: 'Noto Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

  --fs-h1:     clamp(30px, 4vw, 44px);
  --fs-h2:     clamp(24px, 3vw, 34px);
  --fs-h3:     20px;
  --fs-lead:   18px;
  --fs-body:   16px;
  --fs-ui:     15px;
  --fs-small:  13px;
  --fs-num:    38px;

  /* Сетка и ритм */
  --container:  1320px;
  --pad-x:      16px;
  --gutter:     24px;
  --section-y:  48px;
  --sp-1:  8px;
  --sp-2:  16px;
  --sp-3:  24px;
  --sp-4:  32px;
  --sp-5:  40px;
  --sp-6:  48px;
  --sp-8:  64px;

  /* Радиусы */
  --r-pill: 24px;
  --r-sm:   4px;
  --r-0:    0;

  /* Прочее */
  --header-top-h: 64px;
  --header-nav-h: 46px;
  --dur: .22s;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

@media (min-width: 768px) {
  :root { --pad-x: 24px; --gutter: 28px; --section-y: 72px; }
}

@media (min-width: 1024px) {
  :root { --gutter: 32px; --section-y: 96px; }
}

/* --------------------------------------------------------------------------
   2. База и сброс
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--base);
  color: var(--body);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  font-weight: 600;
}

h1 { font-size: var(--fs-h1); line-height: 1.15; letter-spacing: -.01em; }
h2 { font-size: var(--fs-h2); line-height: 1.2; }
h3 { font-size: var(--fs-h3); line-height: 1.3; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

a { color: var(--brand); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--teal); }

button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection { background: var(--accent); color: var(--ink); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px; top: 0; z-index: 200;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 600;
  padding: 12px 20px;
}
.skip-link:focus { left: 0; }

.icon { flex: none; }

/* --------------------------------------------------------------------------
   3. Контейнер, секции, типографические утилиты
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--pad-x) * 2);
  margin: 0 auto;
  padding-inline: var(--pad-x);
}

.section { padding-block: var(--section-y); background: var(--base); }
.section--surface { background: var(--surface); }
.section--tight { padding-block: calc(var(--section-y) * .6); }

.section__head { margin-bottom: var(--sp-5); }

.section__head--row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  align-items: flex-end;
  justify-content: space-between;
}

.section__title { margin: 0; }
.section__lead { margin-top: var(--sp-2); max-width: 62ch; }
.section__more { margin-top: var(--sp-4); }
.section__head-action { padding-bottom: 4px; }

.eyebrow {
  margin: 0 0 10px;
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  line-height: 1;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--brand);
}

.lead {
  font-family: var(--font-ui);
  font-size: var(--fs-lead);
  line-height: 1.55;
  font-weight: 400;
  color: var(--ink);
}

.muted { color: var(--muted); font-size: var(--fs-small); line-height: 1.4; }

.tnum { font-variant-numeric: tabular-nums; }

/* Вертикальная жёлтая линия-акцент */
.accent-block {
  border-left: 3px solid var(--accent);
  padding-left: var(--sp-2);
}

.quote {
  margin: var(--sp-4) 0 0;
  border-left: 3px solid var(--accent);
  padding-left: var(--sp-2);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   4. Кнопки и ссылки
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  font-weight: 600;
  line-height: 1;
  text-align: center;
  border: 0;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}

.btn--primary {
  height: 48px;
  padding: 0 28px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--ink);
}
.btn--primary:hover { background: var(--accent-hover); color: var(--ink); }
.btn--primary:active { background: var(--accent-active); transform: translateY(1px); }

.btn--secondary {
  height: 46px;
  padding: 0 24px;
  border-radius: var(--r-sm);
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-weight: 500;
}
.btn--secondary:hover { background: var(--ink); color: var(--base); }
.btn--secondary:active { transform: translateY(1px); }

.btn--on-dark {
  border-color: var(--on-dark-field);
  color: var(--base);
}
.btn--on-dark:hover { background: var(--base); color: var(--ink); border-color: var(--base); }

.btn--block { display: flex; width: 100%; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  font-weight: 500;
  color: var(--brand);
}
.link-arrow svg { transition: transform var(--dur) var(--ease); }
.link-arrow span { border-bottom: 1px solid transparent; transition: border-color var(--dur) var(--ease); }
.link-arrow:hover { color: var(--brand); }
.link-arrow:hover svg { transform: translateX(4px); }
.link-arrow:hover span { border-bottom-color: currentColor; }

/* Круглая кнопка-стрелка в строках каталога */
.catalog__go {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--brand);
  background: transparent;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.catalog__go:hover { background: var(--brand); border-color: var(--brand); color: var(--base); }

/* --------------------------------------------------------------------------
   5. Формы
   -------------------------------------------------------------------------- */

.form { display: flex; flex-direction: column; gap: var(--sp-3); }

.field { display: flex; flex-direction: column; gap: 6px; }

.field__label {
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--muted);
}

.field__input {
  width: 100%;
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  line-height: 1.4;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  border-radius: 0;
  transition: border-color var(--dur) var(--ease);
}
.field__input::placeholder { color: var(--muted); }
.field__input:focus { outline: none; border-bottom-color: var(--accent); }
.field__input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
textarea.field__input { resize: vertical; min-height: 44px; }
select.field__input { appearance: none; cursor: pointer; }

/* Форма на тёмном фоне */
.form--dark .field__label { color: var(--on-dark); }
.form--dark .field__input {
  color: var(--base);
  border-bottom-color: var(--on-dark-field);
}
.form--dark .field__input::placeholder { color: var(--on-dark-dim); }
.form--dark .field__input:focus { border-bottom-color: var(--accent); }
.form--dark select.field__input option { color: var(--ink); }

.checkbox {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.checkbox input {
  position: absolute;
  opacity: 0;
  width: 18px; height: 18px;
  margin: 0;
}
.checkbox__box {
  width: 18px; height: 18px;
  margin-top: 2px;
  border: 1px solid var(--border);
  background: transparent;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.checkbox input:checked + .checkbox__box {
  background: var(--brand);
  border-color: var(--brand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 10.4 3.6 3.6 7.4-8'/%3E%3C/svg%3E");
  background-size: 14px 14px;
  background-position: center;
  background-repeat: no-repeat;
}
.checkbox input:focus-visible + .checkbox__box { outline: 2px solid var(--accent); outline-offset: 2px; }
.checkbox__text a { color: inherit; border-bottom: 1px solid currentColor; }
.checkbox__text a:hover { color: var(--brand); }

.form--dark .checkbox { color: var(--on-dark); }
.form--dark .checkbox__box { border-color: var(--on-dark-field); }
.form--dark .checkbox__text a:hover { color: var(--accent); }

.form__status {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  min-height: 18px;
}
.form__status.is-ok { color: var(--brand); }
.form--dark .form__status.is-ok { color: var(--accent); }
.form__status.is-error { color: #B4341C; }
.form--dark .form__status.is-error { color: #FFB4A2; }

.field.has-error .field__input { border-bottom-color: #B4341C; }
.form--dark .field.has-error .field__input { border-bottom-color: #FFB4A2; }

/* --------------------------------------------------------------------------
   6. Шапка
   -------------------------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 60;
  background: var(--warm-white);
}

.site-header.is-sticky {
  position: fixed;
  inset: 0 0 auto;
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
}

.header-top { min-height: var(--header-top-h); }

.header-top__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--header-top-h);
}

/* Логотип */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  color: var(--ink);
}
.logo:hover { color: var(--ink); }
.logo__mark { flex: none; display: block; }
.logo__text { display: flex; flex-direction: column; }
.logo__name {
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.15;
  font-weight: 600;
  color: var(--ink);
}
.logo__descriptor {
  font-family: var(--font-ui);
  font-size: 11px;
  line-height: 1.2;
  color: var(--muted);
}

.header-contacts,
.header-mail,
.header-search,
.header-cta { display: none; }

.header-contacts { flex-direction: column; line-height: 1.2; }
.header-phone {
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.header-phone:hover { color: var(--brand); }
.header-schedule { font-family: var(--font-ui); font-size: 12px; color: var(--muted); }

.header-mail { font-family: var(--font-ui); font-size: var(--fs-ui); color: var(--ink); }
.header-mail:hover { color: var(--brand); }

.header-search { position: relative; align-items: center; width: 190px; }
.header-search__input {
  width: 100%;
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 6px 28px 6px 0;
}
.header-search__input::placeholder { color: var(--muted); }
.header-search__input:focus { outline: none; border-bottom-color: var(--accent); }
.header-search__btn {
  position: absolute;
  right: 0; bottom: 4px;
  background: none; border: 0; padding: 2px;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--dur) var(--ease);
}
.header-search__btn:hover { color: var(--brand); }

.header-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--ink);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.header-icon-btn:hover { background: var(--brand); border-color: var(--brand); color: var(--base); }

.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px; height: 40px;
  padding: 0 9px;
  background: none;
  border: 0;
  cursor: pointer;
}
.burger span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Второй ярус — только десктоп */
.header-nav { display: none; }

/* --------------------------------------------------------------------------
   7. Мобильная панель меню
   -------------------------------------------------------------------------- */

.mobile-nav {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 130;
  width: 100vw;
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  background: var(--warm-white);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s var(--ease);
  overflow-y: auto;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav.is-open { transform: translateX(0); }

.mobile-nav__backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(23, 59, 67, .45);
}
.mobile-nav__backdrop[hidden] { display: none; }

.mobile-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-top-h);
  padding: 0 var(--pad-x);
  border-bottom: 1px solid var(--border);
}
.mobile-nav__title {
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}
.mobile-nav__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: none; border: 0;
  color: var(--ink);
  cursor: pointer;
}
.mobile-nav__close:hover { color: var(--brand); }

.mobile-nav__body { flex: 1; padding: var(--sp-2) var(--pad-x); }

.mobile-nav__item { border-bottom: 1px solid var(--border); }

.mobile-nav__row { display: flex; align-items: center; justify-content: space-between; }

.mobile-nav__link {
  display: block;
  padding: 14px 0;
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
}
.mobile-nav__link:hover { color: var(--brand); }
.mobile-nav__item.is-active > .mobile-nav__link,
.mobile-nav__item.is-active .mobile-nav__row .mobile-nav__link {
  color: var(--brand);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.mobile-nav__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--brand);
  cursor: pointer;
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.mobile-nav__toggle[aria-expanded="true"] { transform: rotate(45deg); background: var(--brand); color: var(--base); border-color: var(--brand); }

.mobile-nav__sub { padding: 0 0 12px 0; }
.mobile-nav__sub[hidden] { display: none; }
.mobile-nav__sub a {
  display: block;
  padding: 8px 0 8px 16px;
  border-left: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  color: var(--body);
}
.mobile-nav__sub a:hover { color: var(--brand); border-left-color: var(--brand); }

.mobile-nav__foot {
  padding: var(--sp-3) var(--pad-x) var(--sp-5);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}
.mobile-nav__phone {
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}
.mobile-nav__phone:hover { color: var(--brand); }
.mobile-nav__schedule { font-family: var(--font-ui); font-size: var(--fs-small); color: var(--muted); }

.messenger-row { display: flex; gap: 10px; }
.messenger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--brand);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.messenger-btn:hover { background: var(--brand); border-color: var(--brand); color: var(--base); }

.messenger-row--footer .messenger-btn {
  border-color: rgba(255, 255, 255, .25);
  color: var(--base);
}
.messenger-row--footer .messenger-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }

/* --------------------------------------------------------------------------
   8. Первый экран главной
   -------------------------------------------------------------------------- */

.hero-main {
  position: relative;
  background: var(--warm-white);
}

.hero-main__inner {
  display: flex;
  flex-direction: column;
}

.hero-main__text {
  padding-block: var(--sp-5) var(--sp-6);
  order: 2;
}

.hero-main__title { margin-bottom: var(--sp-3); }
.hero-main__lead { margin-bottom: var(--sp-4); max-width: 46ch; }

.hero-main__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: var(--sp-4);
}

.hero-main__note {
  border-left: 3px solid var(--accent);
  padding-left: var(--sp-2);
  max-width: 44ch;
}
.hero-main__note-title {
  margin: 0 0 4px;
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  font-weight: 600;
  color: var(--ink);
}
.hero-main__note-text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }

.hero-main__media {
  position: relative;
  order: 1;
  overflow: hidden;
  background: var(--ink);
}
.hero-main__media img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  filter: grayscale(.55) contrast(1.03) brightness(1.04);
}
.media-tint,
.hero-main__tint,
.page-hero__tint {
  position: absolute;
  inset: 0;
  background: var(--ink);
  opacity: .26;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.hero-main__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--border);
  order: 3;
}
.hero-main__stat {
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
}
.hero-main__stat:nth-child(odd) { border-right: 1px solid var(--border); padding-right: var(--sp-3); }
.hero-main__stat:nth-child(even) { padding-left: var(--sp-3); }
.hero-main__stat-value {
  display: block;
  font-family: var(--font-ui);
  font-size: 28px;
  line-height: 1.1;
  font-weight: 600;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.hero-main__stat-label {
  display: block;
  margin-top: 4px;
  font-size: var(--fs-small);
  line-height: 1.4;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   9. Шапка внутренней страницы
   -------------------------------------------------------------------------- */

.page-hero { background: var(--warm-white); overflow: hidden; }

.page-hero__inner { display: flex; flex-direction: column; }

.page-hero__text { padding-block: var(--sp-4) var(--sp-6); order: 2; }
.page-hero__title { margin-bottom: var(--sp-3); }
.page-hero__lead { margin-bottom: var(--sp-4); max-width: 52ch; }

.page-hero__links { margin-bottom: var(--sp-4); display: flex; flex-direction: column; gap: 10px; }
.page-hero__links a {
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  font-weight: 500;
  color: var(--brand);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  display: inline-block;
}
.page-hero__links a:hover { border-bottom-color: var(--brand); }

.page-hero__media { position: relative; order: 1; background: var(--ink); }
.page-hero__media img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  filter: grayscale(.55) contrast(1.03) brightness(1.04);
}

/* --------------------------------------------------------------------------
   10. Хлебные крошки
   -------------------------------------------------------------------------- */

.breadcrumbs { background: var(--warm-white); padding-top: var(--sp-3); }
.breadcrumbs__list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.breadcrumbs__item {
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  color: var(--muted);
}
.breadcrumbs__item + .breadcrumbs__item::before {
  content: '/';
  margin-right: 6px;
  color: var(--border);
}
.breadcrumbs__item a { color: var(--muted); }
.breadcrumbs__item a:hover { color: var(--brand); }
.breadcrumbs__item span { color: var(--ink); }

/* --------------------------------------------------------------------------
   11. Нумерованная сетка-таблица
   -------------------------------------------------------------------------- */

.num-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--border);
}

.num-grid__cell {
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
}

.num-grid__num {
  display: block;
  font-family: var(--font-ui);
  font-size: var(--fs-num);
  line-height: 1;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  margin-bottom: 14px;
}

.num-grid__title { margin-bottom: 10px; font-size: var(--fs-h3); }
.num-grid__title a { color: var(--ink); }
.num-grid__title a:hover { color: var(--brand); }

.num-grid__text {
  margin-bottom: var(--sp-2);
  font-size: 15px;
  line-height: 1.6;
  color: var(--body);
}

.num-grid__cell--promo {
  background: var(--brand);
  color: var(--base);
  padding: var(--sp-4) var(--sp-3);
  border-bottom-color: var(--brand);
}
.num-grid__promo-title { color: var(--base); margin-bottom: 12px; font-size: var(--fs-h3); }
.num-grid__promo-text { color: rgba(255, 255, 255, .82); font-size: 15px; line-height: 1.6; margin-bottom: var(--sp-3); }
.num-grid__promo-phone {
  display: block;
  margin-bottom: var(--sp-3);
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
}
.num-grid__promo-phone:hover { color: var(--accent-hover); }

/* --------------------------------------------------------------------------
   12. Этапы работы
   -------------------------------------------------------------------------- */

.steps { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }

/* Врезка о фирме вместо портрета: тёмная плашка в цветах сайта */
.steps__card {
  background: var(--ink);
  color: var(--base);
  border-radius: var(--r-sm);
  padding: var(--sp-4) var(--sp-3);
  border-left: 3px solid var(--accent);
}
.steps__card-label {
  margin: 0 0 12px;
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  line-height: 1;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
}
.steps__card-title {
  margin: 0 0 12px;
  font-family: var(--font-ui);
  font-size: 22px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--base);
}
.steps__card-text { margin: 0 0 var(--sp-3); font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, .82); }
.steps__card-stat {
  margin: 0;
  padding-top: var(--sp-2);
  border-top: 1px solid var(--on-dark-line);
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  color: rgba(255, 255, 255, .82);
}
.steps__card-stat span { display: block; font-size: var(--fs-num); line-height: 1.1; font-weight: 500; color: var(--accent); }

.steps__list { border-top: 1px solid var(--border); }
.steps__item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--sp-2);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
}
.steps__num {
  font-family: var(--font-ui);
  font-size: 26px;
  line-height: 1.1;
  font-weight: 500;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.steps__title { margin-bottom: 6px; font-size: 18px; }
.steps__text { margin: 0; font-size: 15px; line-height: 1.6; }

/* --------------------------------------------------------------------------
   13. Сетки карточек
   -------------------------------------------------------------------------- */

.cards-grid { display: grid; grid-template-columns: 1fr; gap: var(--gutter); }

/* Карточка кейса */
.case-card {
  background: var(--base);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
}
.section:not(.section--surface) .case-card { background: var(--surface); }

.case-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  color: var(--muted);
}
.case-card__car { color: var(--ink); font-weight: 500; }
.case-card__cat { position: relative; padding-left: 12px; }
.case-card__cat::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--teal);
  transform: translateY(-50%);
}

.case-card__title { font-size: 18px; margin-bottom: var(--sp-2); }
.case-card__title a { color: var(--ink); }
.case-card__title a:hover { color: var(--brand); }

.case-card__sums { margin: 0 0 var(--sp-3); }
.case-card__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.case-card__row dt {
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  color: var(--muted);
}
.case-card__row dd {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  font-weight: 500;
  color: var(--ink);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.case-card__strong { color: var(--brand) !important; font-weight: 600 !important; }
.case-card .link-arrow { margin-top: auto; }

/* Карточка практики коллегии (без имён и портретов) */
.practice-card {
  background: var(--base);
  border: 1px solid var(--border);
  border-top: 3px solid var(--brand);
  border-radius: var(--r-sm);
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
}
.section:not(.section--surface) .practice-card { background: var(--surface); }

.practice-card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  color: var(--muted);
}
.practice-card__num { font-size: 15px; font-weight: 500; color: var(--brand); }
.practice-card__staff { text-align: right; }
.practice-card__staff strong { font-size: 18px; font-weight: 600; color: var(--ink); }

.practice-card__title { font-size: 18px; margin-bottom: 10px; }
.practice-card__title a { color: var(--ink); }
.practice-card__title a:hover { color: var(--brand); }
.practice-card__text { margin-bottom: var(--sp-2); font-size: 15px; line-height: 1.6; }

.practice-card__tasks { margin: 0 0 var(--sp-2); border-top: 1px solid var(--border); }
.practice-card__tasks li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  line-height: 1.4;
  color: var(--ink);
}
.practice-card__tasks .icon { flex: 0 0 auto; margin-top: 2px; color: var(--brand); }

.practice-card__price { margin-bottom: var(--sp-2); font-family: var(--font-ui); font-size: var(--fs-small); color: var(--muted); }
.practice-card__price strong { font-size: var(--fs-ui); font-weight: 600; color: var(--brand); }
.practice-card .link-arrow { margin-top: auto; }

/* Карточка статьи */
.news-card { display: flex; flex-direction: column; }
.news-card__media { display: block; background: var(--ink); border-radius: var(--r-sm); overflow: hidden; }
.news-card__media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: grayscale(.6) contrast(1.02);
  transition: filter var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.news-card:hover .news-card__media img { filter: grayscale(.2); transform: scale(1.02); }

.news-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: var(--sp-2) 0 8px;
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  color: var(--muted);
}
.news-card__cat { color: var(--brand); font-weight: 500; }
.news-card__title { font-size: 18px; margin-bottom: 8px; }
.news-card__title a { color: var(--ink); }
.news-card__title a:hover { color: var(--brand); }
.news-card__excerpt { font-size: 15px; line-height: 1.6; margin-bottom: var(--sp-2); }
.news-card .link-arrow { margin-top: auto; }

/* Плитка быстрых ссылок */
.tile-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--border);
}
.tile {
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
}
.tile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--base);
  margin-bottom: var(--sp-2);
}
.tile__title { font-size: 17px; margin-bottom: 10px; }
.tile__title a { color: var(--ink); }
.tile__title a:hover { color: var(--brand); }

/* Карточка отзыва */
.review-card { display: flex; flex-direction: column; }
.review-card__scan {
  display: block;
  width: 100%;
  padding: 0;
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.review-card__scan img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  filter: grayscale(.65) contrast(1.03);
  transition: filter var(--dur) var(--ease);
}
.review-card__scan:hover img { filter: grayscale(.15); }
.review-card__zoom {
  position: absolute;
  right: 10px; bottom: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--base);
}
.review-card__text {
  margin: var(--sp-2) 0 var(--sp-2);
  font-size: 15px;
  line-height: 1.6;
}
.review-card__author { margin: auto 0 2px; font-family: var(--font-ui); font-size: 16px; font-weight: 600; color: var(--ink); }
.review-card__meta { margin: 0; font-family: var(--font-ui); font-size: var(--fs-small); color: var(--muted); }

/* --------------------------------------------------------------------------
   14. Каталог услуг / прайс
   -------------------------------------------------------------------------- */

.catalog { border-top: 1px solid var(--border); }

.catalog__group {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--border);
}

.catalog__category {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  margin-bottom: 10px;
}
.catalog__category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  flex: none;
  border-radius: 50%;
  background: var(--brand);
  color: var(--base);
}
.catalog__intro { font-size: 14px; line-height: 1.6; color: var(--muted); margin: 0; }

.catalog__row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 12px 8px;
  margin-inline: -8px;
  border-bottom: 1px solid var(--border);
  transition: background-color var(--dur) var(--ease);
}
.catalog__row:hover { background: var(--surface); }
.catalog__rows > .catalog__row:last-child { border-bottom: 0; }

.catalog__name {
  flex: 1;
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  line-height: 1.4;
  color: var(--ink);
}
.catalog__name:hover { color: var(--brand); }
.catalog__price {
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Смежные услуги */
.related-list { border-top: 1px solid var(--border); }
.related-list__row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) 8px;
  margin-inline: -8px;
  border-bottom: 1px solid var(--border);
  transition: background-color var(--dur) var(--ease);
}
.related-list__row:hover { background: var(--base); }
.related-list__body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.related-list__name { font-family: var(--font-ui); font-size: 17px; font-weight: 500; color: var(--ink); }
.related-list__name:hover { color: var(--brand); }
.related-list__text { font-family: var(--font-ui); font-size: var(--fs-small); color: var(--muted); }

/* --------------------------------------------------------------------------
   15. Аккордеон
   -------------------------------------------------------------------------- */

.accordion { border-top: 1px solid var(--border); }
.accordion__item { border-bottom: 1px solid var(--border); }
.accordion__heading { margin: 0; font-size: inherit; font-weight: inherit; }

.accordion__btn {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-2);
  width: 100%;
  padding: var(--sp-2) 0;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--ink);
  transition: color var(--dur) var(--ease);
}
.accordion__btn:hover { color: var(--brand); }
.accordion__btn[aria-expanded="true"] { color: var(--brand); }

.accordion__ind {
  position: relative;
  flex: none;
  width: 20px; height: 20px;
  margin-top: 3px;
}
.accordion__ind::before,
.accordion__ind::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.accordion__ind::before { width: 14px; height: 1.5px; }
.accordion__ind::after  { width: 1.5px; height: 14px; }
.accordion__btn[aria-expanded="true"] .accordion__ind::after { transform: translate(-50%, -50%) scaleY(0); opacity: 0; }

.accordion__panel { overflow: hidden; }
.accordion__panel[hidden] { display: none; }
.accordion__inner { padding: 0 0 var(--sp-3); max-width: 78ch; font-size: 15px; line-height: 1.7; }

/* --------------------------------------------------------------------------
   16. Слайдер
   -------------------------------------------------------------------------- */

.slider { position: relative; overflow: hidden; }
.slider__track {
  display: flex;
  gap: var(--gutter);
  transition: transform .35s var(--ease);
  will-change: transform;
}
.slider__slide { flex: 0 0 100%; min-width: 0; }

.slider__controls { display: flex; gap: 8px; }
.slider__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.slider__btn:hover { background: var(--brand); border-color: var(--brand); color: var(--base); }
.slider__btn[disabled] { opacity: .35; cursor: default; }
.slider__btn[disabled]:hover { background: transparent; color: var(--brand); border-color: var(--border); }

.slider__dots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--sp-3); }
.slider__dot {
  width: 28px; height: 3px;
  padding: 0;
  border: 0;
  background: var(--border);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease);
}
.slider__dot.is-active { background: var(--accent); }
.slider__dot:hover { background: var(--teal); }

/* --------------------------------------------------------------------------
   17. Табы и офисы
   -------------------------------------------------------------------------- */

.tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-4);
}
.tabs__btn {
  position: relative;
  padding: 10px 0;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  font-weight: 500;
  color: var(--ink);
  transition: color var(--dur) var(--ease);
}
.tabs__btn::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: transparent;
  transition: background-color var(--dur) var(--ease);
}
.tabs__btn:hover { color: var(--brand); }
.tabs__btn.is-active { color: var(--brand); }
.tabs__btn.is-active::after { background: var(--accent); }

.tabs__panel[hidden] { display: none; }

.offices-map { position: relative; display: grid; grid-template-columns: 1fr; gap: var(--sp-2); }
.offices-map__canvas {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  overflow: hidden;
  height: 300px;
}
.offices-map__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.offices-map__panel {
  background: var(--brand);
  color: var(--base);
  padding: var(--sp-3);
  border-radius: var(--r-sm);
}
.offices-map__title { color: var(--base); font-size: 18px; margin-bottom: var(--sp-2); }
.offices-map__dl { margin: 0 0 var(--sp-3); }
.offices-map__dl dt {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .72);
  margin-top: 12px;
}
.offices-map__dl dt:first-child { margin-top: 0; }
.offices-map__dl dd {
  margin: 2px 0 0;
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  line-height: 1.5;
  color: var(--base);
}
.offices-map__dl dd a { color: var(--accent); font-weight: 600; }
.offices-map__dl dd a:hover { color: var(--accent-hover); }

.offices-map__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.offices-map__route {
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  font-weight: 500;
  color: var(--accent);
  border-bottom: 1px solid var(--on-dark-line);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.offices-map__route:hover { color: var(--accent-hover); border-bottom-color: var(--accent-hover); }

/* --------------------------------------------------------------------------
   18. Полоса мессенджеров
   -------------------------------------------------------------------------- */

.messengers-band { display: grid; grid-template-columns: 1fr; background: var(--ink); }

.messengers-band__text {
  padding: var(--section-y) var(--pad-x);
  color: var(--base);
}
.messengers-band__inner { max-width: 560px; margin-left: auto; }
.messengers-band__title { color: var(--base); margin-bottom: var(--sp-2); }
.messengers-band__desc { color: var(--on-dark); font-size: 15px; line-height: 1.65; margin-bottom: var(--sp-3); }

.accent-block__label { margin: 0 0 2px; font-family: var(--font-ui); font-size: var(--fs-small); color: var(--on-dark); }
.accent-block__value {
  font-family: var(--font-ui);
  font-size: 26px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.accent-block__value:hover { color: var(--accent-hover); }

.messengers-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: var(--sp-4); }
.messengers-list__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 18px 0 8px;
  border: 1px solid var(--on-dark-field);
  border-radius: var(--r-sm);
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  font-weight: 500;
  color: var(--base);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.messengers-list__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--base);
}
.messengers-list__item:hover { background: var(--base); color: var(--ink); border-color: var(--base); }

.messengers-band__media { position: relative; background: var(--ink); min-height: 240px; }
.messengers-band__media img {
  width: 100%; height: 100%;
  min-height: 240px;
  object-fit: cover;
  filter: grayscale(.55) contrast(1.03) brightness(1.04);
}

/* --------------------------------------------------------------------------
   19. Тёмная полоса консультации и зелёная CTA
   -------------------------------------------------------------------------- */

.consult-band { background: var(--ink); color: var(--base); padding-block: var(--section-y); }
.consult-band__inner { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }
.consult-band__title { color: var(--base); margin-bottom: var(--sp-2); }
.consult-band__desc { color: var(--on-dark); font-size: 15px; line-height: 1.65; margin-bottom: var(--sp-3); }
.consult-band__phone-wrap { border-left: 3px solid var(--accent); padding-left: var(--sp-2); margin: 0; }
.consult-band__label { display: block; font-family: var(--font-ui); font-size: var(--fs-small); color: var(--on-dark); }
.consult-band__phone {
  font-family: var(--font-ui);
  font-size: 26px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.consult-band__phone:hover { color: var(--accent-hover); }

.cta-band {
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  color: var(--base);
  padding-block: var(--section-y);
}
.cta-band__inner { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }
.cta-band__title { color: var(--base); margin-bottom: var(--sp-2); max-width: 20ch; }
.cta-band__desc { color: rgba(255, 255, 255, .82); font-size: 15px; line-height: 1.65; margin-bottom: var(--sp-3); }
.cta-band__label { margin: 0 0 2px; font-family: var(--font-ui); font-size: var(--fs-small); color: rgba(255, 255, 255, .8); }
.cta-band__phone {
  font-family: var(--font-ui);
  font-size: 28px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.cta-band__phone:hover { color: var(--accent-hover); }

/* --------------------------------------------------------------------------
   20. Модальное окно и лайтбокс
   -------------------------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--sp-3) var(--pad-x);
  overflow-y: auto;
}
.modal[hidden] { display: none; }

.modal__backdrop { position: fixed; inset: 0; background: rgba(23, 59, 67, .6); border: 0; }

.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: auto;
  background: var(--base);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--sp-4) var(--sp-3);
}
.modal__close {
  position: absolute;
  top: 8px; right: 8px;
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none; border: 0;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--dur) var(--ease);
}
.modal__close:hover { color: var(--ink); }
.modal__title { margin-bottom: 10px; font-size: 24px; }
.modal__text { font-size: 15px; line-height: 1.6; color: var(--muted); margin-bottom: var(--sp-3); }
.modal__form { gap: var(--sp-3); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4) var(--pad-x);
  background: rgba(23, 59, 67, .92);
}
.lightbox[hidden] { display: none; }
.lightbox__inner { margin: 0; max-width: 720px; max-height: 100%; overflow: auto; }
.lightbox__img { width: 100%; height: auto; border: 1px solid rgba(255, 255, 255, .2); }
.lightbox__caption {
  margin-top: 12px;
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  color: var(--on-dark);
  text-align: center;
}
.lightbox__close {
  position: absolute;
  top: 12px; right: 12px;
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 50%;
  color: var(--base);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.lightbox__close:hover { background: var(--base); color: var(--ink); }

/* --------------------------------------------------------------------------
   21. Кнопка «наверх»
   -------------------------------------------------------------------------- */

.to-top {
  position: fixed;
  right: 16px; bottom: 16px;
  z-index: 90;
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--base);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease);
}
.to-top:hover { background: var(--brand); }
.to-top[hidden] { display: none; }

/* --------------------------------------------------------------------------
   22. Футер
   -------------------------------------------------------------------------- */

.site-footer { background: var(--ink); color: var(--base); padding-block: var(--sp-6) var(--sp-4); }

.footer-top { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }

.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-brand__descriptor {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  color: var(--on-dark);
  max-width: 30ch;
}
.footer-col--brand { padding-bottom: var(--sp-3); border-bottom: 1px solid var(--on-dark-line); }
.messenger-row--footer { margin-top: 4px; }

.footer-col__title {
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  font-weight: 600;
  color: var(--base);
  margin: 0;
}

.footer-acc { border-bottom: 1px solid var(--on-dark-line); }
.footer-acc__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 0;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
}
.footer-acc__ind {
  position: relative;
  width: 16px; height: 16px;
  flex: none;
}
.footer-acc__ind::before,
.footer-acc__ind::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  background: var(--base);
  transform: translate(-50%, -50%);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.footer-acc__ind::before { width: 12px; height: 1.5px; }
.footer-acc__ind::after  { width: 1.5px; height: 12px; }
.footer-acc__btn[aria-expanded="true"] .footer-acc__ind::after { transform: translate(-50%, -50%) scaleY(0); opacity: 0; }
.footer-acc__panel[hidden] { display: none; }
.footer-acc__panel { padding-bottom: var(--sp-3); }

.footer-list li + li { margin-top: 10px; }
.footer-list a,
.footer-offices a { color: var(--on-dark); font-family: var(--font-ui); font-size: var(--fs-ui); }
.footer-list a:hover { color: var(--accent); }

.footer-offices li {
  display: flex;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  color: var(--on-dark);
}
.footer-offices li + li { margin-top: 12px; }
.footer-offices strong { color: var(--base); font-weight: 500; }
.footer-offices__icon { flex: none; color: var(--teal); margin-top: 2px; }

.footer-phone {
  display: inline-block;
  margin-top: var(--sp-3);
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.footer-phone:hover { color: var(--accent-hover); }
.footer-mail { display: block; margin-top: 6px; font-family: var(--font-ui); font-size: var(--fs-ui); color: var(--on-dark); }
.footer-mail:hover { color: var(--accent); }
.footer-schedule { margin: 6px 0 0; font-family: var(--font-ui); font-size: var(--fs-small); color: var(--on-dark-dim); }

.footer-middle {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--on-dark-line);
}
.footer-middle__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  color: var(--on-dark);
}
.footer-middle__item:hover { color: var(--accent); }

.footer-bottom {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  padding-top: var(--sp-3);
  font-size: 12px;
  line-height: 1.6;
  color: var(--on-dark-dim);
}
.footer-bottom p { margin: 0 0 4px; }
.footer-bottom__disclaimer { max-width: 62ch; }
.footer-bottom__links { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.footer-bottom__links a { color: var(--on-dark-dim); border-bottom: 1px solid transparent; }
.footer-bottom__links a:hover { color: var(--accent); border-bottom-color: currentColor; }

/* --------------------------------------------------------------------------
   23. Внутренние блоки страниц
   -------------------------------------------------------------------------- */

/* Текстовый SEO-блок */
.prose { max-width: 78ch; font-size: var(--fs-body); line-height: 1.75; }
.prose h2 { margin: var(--sp-5) 0 var(--sp-2); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: var(--sp-4) 0 10px; }
.prose p { margin-bottom: 1em; }
.prose a { border-bottom: 1px solid currentColor; }
.prose ul { margin: 0 0 1.2em; }
.prose ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 10px;
}
.prose ul li::before {
  content: '';
  position: absolute;
  left: 0; top: .62em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal);
}
.prose ol { counter-reset: prose; margin: 0 0 1.2em; }
.prose ol li {
  counter-increment: prose;
  position: relative;
  padding-left: 32px;
  margin-bottom: 10px;
}
.prose ol li::before {
  content: counter(prose, decimal-leading-zero);
  position: absolute;
  left: 0; top: 0;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.prose blockquote {
  margin: var(--sp-3) 0;
  border-left: 3px solid var(--accent);
  padding-left: var(--sp-2);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
}

/* Двухколоночный текст статьи */
.article-layout { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }
.article-aside { display: flex; flex-direction: column; gap: var(--sp-3); }

.aside-box {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--sp-3);
  background: var(--base);
}
.aside-box__title { font-size: 17px; margin-bottom: 12px; }
.aside-box li + li { margin-top: 10px; }
.aside-box a { font-family: var(--font-ui); font-size: var(--fs-ui); }

.aside-box--dark { background: var(--ink); border-color: var(--ink); color: var(--base); }
.aside-box--dark .aside-box__title { color: var(--base); }
.aside-box--dark p { color: var(--on-dark); font-size: 14px; line-height: 1.6; }
.aside-box--dark .aside-phone {
  display: block;
  margin: 10px 0 var(--sp-2);
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
}

/* Мета статьи */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: var(--sp-2) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  color: var(--muted);
  margin-bottom: var(--sp-4);
}
.article-meta__item { display: inline-flex; align-items: center; gap: 8px; }
.article-meta__item strong { color: var(--ink); font-weight: 500; }

.article-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
  margin-top: var(--sp-4);
}
.article-share__label { font-family: var(--font-ui); font-size: var(--fs-small); color: var(--muted); }

/* Пагинация */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: var(--sp-5);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}
.pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px; height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.pagination__link:hover { background: var(--brand); border-color: var(--brand); color: var(--base); }
.pagination__link.is-active { background: var(--ink); border-color: var(--ink); color: var(--base); }
.pagination__gap { padding: 0 6px; color: var(--muted); }

/* Фильтр-чипсы */
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--sp-4); }
.filter-chip {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: transparent;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.filter-chip:hover { border-color: var(--brand); color: var(--brand); }
.filter-chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--base); }

/* Статистика цифрами */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.stat {
  padding: var(--sp-3);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat__value {
  display: block;
  font-family: var(--font-ui);
  font-size: 32px;
  line-height: 1.1;
  font-weight: 600;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.stat__label { display: block; margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--muted); }

/* Таблица фактов дела */
.facts { border-top: 1px solid var(--border); }
.facts__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.facts__key { font-family: var(--font-ui); font-size: var(--fs-small); color: var(--muted); }
.facts__val { font-family: var(--font-ui); font-size: var(--fs-ui); color: var(--ink); font-variant-numeric: tabular-nums; }

/* Список судебных дел */
.trial-list { border-top: 1px solid var(--border); }
.trial-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: var(--sp-3) 8px;
  margin-inline: -8px;
  border-bottom: 1px solid var(--border);
  transition: background-color var(--dur) var(--ease);
}
.trial-row:hover { background: var(--surface); }
.trial-row__num { font-family: var(--font-ui); font-size: var(--fs-small); color: var(--brand); font-weight: 500; }
.trial-row__title { font-size: 17px; }
.trial-row__title a { color: var(--ink); }
.trial-row__title a:hover { color: var(--brand); }
.trial-row__court { font-family: var(--font-ui); font-size: 14px; color: var(--muted); }
.trial-row__result {
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
  font-weight: 500;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}
.trial-row__date { font-family: var(--font-ui); font-size: var(--fs-small); color: var(--muted); }

/* Карточка цены услуги */
.price-card {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--sp-3);
  background: var(--surface);
}
.price-card__label { font-family: var(--font-ui); font-size: var(--fs-small); color: var(--muted); margin: 0 0 4px; }
.price-card__value {
  font-family: var(--font-ui);
  font-size: 30px;
  line-height: 1.1;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin: 0 0 var(--sp-2);
}
.price-card__list { margin-bottom: var(--sp-3); }
.price-card__list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.55;
}
.price-card__list li svg { position: absolute; left: 0; top: 2px; color: var(--brand); }

/* Карта сайта */
.sitemap-tree { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
.sitemap-group { border-top: 1px solid var(--border); padding-top: var(--sp-2); }
.sitemap-group__title { font-size: 17px; margin-bottom: 12px; }
.sitemap-group li { padding: 7px 0; border-bottom: 1px solid var(--border); }
.sitemap-group li a { font-family: var(--font-ui); font-size: var(--fs-ui); color: var(--ink); }
.sitemap-group li a:hover { color: var(--brand); }
.sitemap-group li span { display: block; font-size: 12px; color: var(--muted); }

/* Страница 404 */
.error-block { padding-block: var(--section-y); background: var(--warm-white); }
.error-block__inner { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); align-items: center; }
.error-block__code {
  font-family: var(--font-ui);
  font-size: clamp(72px, 18vw, 150px);
  line-height: 1;
  font-weight: 600;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  margin: 0;
}
.error-block__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--sp-3); }
.error-block__art img { width: 100%; height: auto; }

/* Документы и дипломы */
.docs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gutter); }
.doc-card { border: 1px solid var(--border); background: var(--base); padding: 0; cursor: pointer; }
.doc-card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.doc-card__cap {
  display: block;
  padding: 10px 12px;
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  line-height: 1.4;
  color: var(--muted);
  text-align: left;
}
.doc-card:hover { border-color: var(--brand); }
.doc-card:hover .doc-card__cap { color: var(--ink); }

/* Факты о практике */
.lawyer-facts { border-top: 1px solid var(--border); margin: var(--sp-3) 0; }
.lawyer-facts__row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
}
.lawyer-facts__row dt { color: var(--muted); font-size: var(--fs-small); }
.lawyer-facts__row dd { margin: 0; color: var(--ink); }

/* Отделы (контакты) */
.dept-list { border-top: 1px solid var(--border); }
.dept-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: var(--fs-ui);
}
.dept-list__name { color: var(--body); }
.dept-list__mail { color: var(--brand); }
.dept-list__mail:hover { border-bottom: 1px solid currentColor; }

/* Двухколоночный сплит текст + форма на светлом */
.split { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }

.form-card {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--sp-3);
  background: var(--base);
}
.section--surface .form-card { background: var(--base); }

/* Поиск по вопросам */
.search-box { position: relative; max-width: 520px; }
.search-box__input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: 17px;
  color: var(--ink);
}
.search-box__input:focus { outline: none; border-bottom-color: var(--accent); }
.search-box__input::placeholder { color: var(--muted); }
.search-box__btn {
  position: absolute;
  right: 0; top: 8px;
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none; border: 0;
  color: var(--brand);
  cursor: pointer;
}
.search-box__empty { margin-top: var(--sp-3); font-family: var(--font-ui); font-size: var(--fs-ui); color: var(--muted); }
.search-box__empty[hidden] { display: none; }

/* --------------------------------------------------------------------------
   24. Появление при скролле
   -------------------------------------------------------------------------- */

[data-reveal] > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
[data-reveal].is-visible > * { opacity: 1; transform: none; }
[data-reveal].is-visible > *:nth-child(2) { transition-delay: .06s; }
[data-reveal].is-visible > *:nth-child(3) { transition-delay: .12s; }
[data-reveal].is-visible > *:nth-child(4) { transition-delay: .18s; }
[data-reveal].is-visible > *:nth-child(5) { transition-delay: .24s; }
[data-reveal].is-visible > *:nth-child(6) { transition-delay: .3s; }
.no-js [data-reveal] > * { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   25. Брейкпоинт 480px
   -------------------------------------------------------------------------- */

@media (min-width: 480px) {
  .footer-bottom__links { flex-direction: row; flex-wrap: wrap; gap: 16px; }
  .hero-main__media img { height: 320px; }
  .page-hero__media img { height: 280px; }
}

/* --------------------------------------------------------------------------
   26. Брейкпоинт 768px — планшет
   -------------------------------------------------------------------------- */

@media (min-width: 768px) {

  .cards-grid--3,
  .cards-grid--4 { grid-template-columns: repeat(2, 1fr); }

  .num-grid { grid-template-columns: repeat(2, 1fr); column-gap: var(--gutter); }
  .num-grid__cell { padding: var(--sp-4) 0; }
  .num-grid__cell--promo { padding: var(--sp-4); }

  .tile-grid { grid-template-columns: repeat(2, 1fr); column-gap: var(--gutter); }

  .catalog__group { grid-template-columns: 1fr 2fr; gap: var(--gutter); }

  .steps__item { grid-template-columns: 72px 1fr; }

  .slider__slide { flex: 0 0 calc((100% - var(--gutter)) / 2); }

  .offices-map { grid-template-columns: 1fr; }
  .offices-map__canvas { height: 420px; }

  .messengers-band { grid-template-columns: 1fr 1fr; }
  .messengers-band__text { padding-left: var(--pad-x); padding-right: var(--sp-5); }
  .messengers-band__inner { max-width: none; }

  .consult-band__inner,
  .cta-band__inner { grid-template-columns: 45fr 55fr; gap: var(--sp-6); }

  .footer-top { grid-template-columns: repeat(2, 1fr); gap: var(--sp-5) var(--gutter); }
  .footer-col--brand { border-bottom: 0; padding-bottom: 0; }
  .footer-middle { flex-direction: row; align-items: center; justify-content: space-between; }
  .footer-bottom { grid-template-columns: 1.4fr 1fr; gap: var(--sp-5); }

  .stat-grid { grid-template-columns: repeat(4, 1fr); }

  .facts__row { grid-template-columns: 260px 1fr; gap: var(--sp-3); align-items: baseline; }

  .trial-row {
    grid-template-columns: 1.6fr 1fr;
    grid-template-areas:
      'num    date'
      'title  result'
      'court  result';
    column-gap: var(--gutter);
    align-items: start;
  }
  .trial-row__num    { grid-area: num; }
  .trial-row__date   { grid-area: date; text-align: right; }
  .trial-row__title  { grid-area: title; }
  .trial-row__court  { grid-area: court; }
  .trial-row__result { grid-area: result; align-self: center; }

  .article-layout { grid-template-columns: 1fr; }

  .split { grid-template-columns: 1fr 1fr; gap: var(--sp-6); }

  .sitemap-tree { grid-template-columns: repeat(2, 1fr); }

  .docs-grid { grid-template-columns: repeat(3, 1fr); }

  .error-block__inner { grid-template-columns: 1.2fr 1fr; gap: var(--sp-6); }

  .hero-main__stats { grid-template-columns: repeat(4, 1fr); }
  .hero-main__stat { padding-inline: var(--sp-3); border-right: 1px solid var(--border); }
  .hero-main__stat:first-child { padding-left: 0; }
  .hero-main__stat:last-child { border-right: 0; }
  .hero-main__stat:nth-child(odd),
  .hero-main__stat:nth-child(even) { padding-inline: var(--sp-3); }
  .hero-main__stat:first-child { padding-left: 0; }
}

/* --------------------------------------------------------------------------
   27. Брейкпоинт 1024px — десктоп
   -------------------------------------------------------------------------- */

@media (min-width: 1024px) {

  /* Шапка */
  .burger,
  .header-icon-btn--phone { display: none; }

  .header-contacts { display: flex; }
  .header-mail { display: inline-block; }
  .header-search { display: flex; }
  .header-cta { display: inline-flex; }

  .header-top__inner { gap: var(--sp-4); }

  .header-nav {
    display: block;
    border-top: 1px solid var(--border);
    min-height: var(--header-nav-h);
  }
  .main-nav__list { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
  .main-nav__item { position: relative; }
  .main-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 13px 0;
    font-family: var(--font-ui);
    font-size: var(--fs-ui);
    font-weight: 500;
    line-height: 1.2;
    color: var(--ink);
    position: relative;
  }
  .main-nav__link::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: transparent;
    transition: background-color var(--dur) var(--ease);
  }
  .main-nav__link:hover { color: var(--brand); }
  .main-nav__item.is-active > .main-nav__link { color: var(--brand); }
  .main-nav__item.is-active > .main-nav__link::after { background: var(--accent); }
  .main-nav__chev { transition: transform var(--dur) var(--ease); }
  .main-nav__item.has-sub:hover .main-nav__chev,
  .main-nav__item.is-open .main-nav__chev { transform: rotate(180deg); }

  .submenu {
    position: absolute;
    top: 100%; left: -20px;
    z-index: 70;
    min-width: 520px;
    background: var(--base);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: var(--sp-3) var(--sp-3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
  }
  .main-nav__item.has-sub:hover .submenu,
  .main-nav__item.has-sub:focus-within .submenu,
  .main-nav__item.is-open .submenu {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  /* У правых пунктов меню выпадающий список шире оставшегося места:
     прижимаем его к правому краю пункта, иначе он вылезает за окно. */
  .main-nav__item.has-sub:nth-last-child(-n+3) .submenu { left: auto; right: -20px; }

  .submenu__list { columns: 2; column-gap: var(--sp-4); }
  .submenu__list li { break-inside: avoid; margin-bottom: 12px; }
  .submenu__list a {
    font-family: var(--font-ui);
    font-size: var(--fs-ui);
    line-height: 1.35;
    color: var(--ink);
    display: inline-block;
  }
  .submenu__list a:hover { color: var(--brand); }

  /* Шапка поверх фото героя на главной:
     верхний ярус остаётся сплошным, ярус меню становится прозрачным над фото */
  .is-home .site-header--overlay:not(.is-sticky) {
    position: absolute;
    inset: 0 0 auto;
    background: transparent;
  }
  .is-home .site-header--overlay:not(.is-sticky) .header-nav {
    background: linear-gradient(to right, var(--warm-white) 0, var(--warm-white) 48%, transparent 48%);
    border-top-color: transparent;
  }
  .is-home .hero-main { padding-top: calc(var(--header-top-h) + var(--header-nav-h)); }

  /* Герой главной: сплит 48/52, фото уходит за контейнер */
  .hero-main__inner {
    display: grid;
    grid-template-columns: 48fr 52fr;
    align-items: stretch;
    position: relative;
  }
  .hero-main__text {
    order: 1;
    padding-block: var(--sp-8) var(--sp-8);
    padding-right: var(--sp-6);
  }
  .hero-main__media {
    order: 2;
    position: absolute;
    top: calc(-1 * var(--header-nav-h));
    bottom: -40px;
    left: 48%;
    width: 50vw;
    right: auto;
  }
  .hero-main__media img { width: 100%; height: 100%; }
  /* Светлая вуаль под строкой меню, чтобы пункты читались поверх фото */
  .hero-main__media::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: calc(var(--header-nav-h) + 24px);
    background: linear-gradient(to bottom, rgba(252, 252, 247, .94) 0, rgba(252, 252, 247, .72) 60%, rgba(252, 252, 247, 0) 100%);
    z-index: 2;
    pointer-events: none;
  }
  .hero-main__stats { order: 3; grid-column: 1 / 2; padding-right: var(--sp-6); }

  /* Шапка внутренней страницы */
  .page-hero__inner {
    display: grid;
    grid-template-columns: 48fr 52fr;
    position: relative;
    align-items: center;
    min-height: 380px;
  }
  .page-hero__text { order: 1; padding-block: var(--sp-6) var(--sp-8); padding-right: var(--sp-6); }
  .page-hero__media {
    order: 2;
    position: absolute;
    top: 0; bottom: 0;
    left: 48%;
    width: 50vw;
  }
  .page-hero__media img { height: 100%; }
  .page-hero__links { flex-direction: column; align-items: flex-start; }

  /* Сетки */
  .cards-grid--3 { grid-template-columns: repeat(3, 1fr); }
  .cards-grid--4 { grid-template-columns: repeat(4, 1fr); }
  .num-grid { grid-template-columns: repeat(3, 1fr); }
  .tile-grid { grid-template-columns: repeat(3, 1fr); }

  .slider__slide { flex: 0 0 calc((100% - var(--gutter) * 2) / 3); }

  .steps { grid-template-columns: 5fr 7fr; gap: var(--sp-6); align-items: start; }

  .offices-map { grid-template-columns: minmax(0, 1fr) 380px; align-items: stretch; }
  .offices-map__canvas { height: auto; min-height: 460px; }
  .offices-map__panel { padding: var(--sp-4); }

  .messengers-band__text { padding-left: max(var(--pad-x), calc((100vw - var(--container)) / 2)); }

  .article-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: var(--sp-6); }
  .article-aside { position: sticky; top: 100px; align-self: start; }

  .footer-top { grid-template-columns: 1.2fr 1fr 1fr 1.4fr; gap: var(--gutter); }
  .footer-acc { border-bottom: 0; }
  .footer-acc__btn { padding: 0 0 var(--sp-2); cursor: default; pointer-events: none; }
  .footer-acc__ind { display: none; }
  .footer-acc__panel { padding-bottom: 0; }
  .footer-acc__panel[hidden] { display: block !important; }

  .sitemap-tree { grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }

  .docs-grid { grid-template-columns: repeat(4, 1fr); }

  .to-top { right: 28px; bottom: 28px; }
}

/* --------------------------------------------------------------------------
   28. Брейкпоинт 1280px
   -------------------------------------------------------------------------- */

@media (min-width: 1280px) {
  .hero-main__text { padding-block: 88px 72px; }
  .modal__dialog { max-width: 520px; padding: var(--sp-5); }
  .submenu { min-width: 560px; }
}

/* --------------------------------------------------------------------------
   29. Уважение к настройкам движения
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] > * { opacity: 1 !important; transform: none !important; }
}

/* --------------------------------------------------------------------------
   30. Печать
   -------------------------------------------------------------------------- */

@media print {
  .site-header, .mobile-nav, .mobile-nav__backdrop, .to-top,
  .modal, .lightbox, .cta-band, .consult-band, .messengers-band { display: none !important; }
  body { color: #000; background: #fff; }
  .section { padding-block: 12px; }
}
