/* ==================================================================
   uristi-advokati.ru
   1. Токены, сброс, типографика, контейнер, кнопки, формы
   ================================================================== */

/* Атрибут hidden обязан скрывать: правило класса с display перебивает
   браузерное [hidden]{display:none}, и скрытый блок остаётся видимым. */
[hidden] { display: none !important; }

:root {
  /* Тёмно-синий */
  --navy: #0B1A43;
  --navy-900: #071233;
  --navy-800: #051945;
  --navy-line: #22335C;

  /* Красный. --red — плоский токен для линеек, рамок и заливок без мелкого
     текста. Для мелкого текста и для плашек с белым текстом берутся --red-ink
     и --red-surface: те же оттенки, затемнённые до контраста AA. */
  --red: #E32D49;
  --red-ink: #C81E38;
  --red-surface: #D8213F;
  --red-top: #DE2545;
  --red-bot: #D51E3C;
  --red-edge: #930A1F;
  --red-hover: #C81E38;
  --red-hover-edge: #7C0A1C;
  --red-tint: #FBF3F5;
  --red-tint-2: #FDF2F5;
  --red-deep: #A81733;

  /* Голубой акцент */
  --cyan: #0A9FCE;
  --cyan-ink: #08769C;

  /* Мессенджер */
  --green: #0F7A38;
  --green-edge: #0A5A28;
  --green-hover: #0C6B30;

  /* Нейтральные */
  --bg: #FFFFFF;
  --bg-alt: #F2F2F2;
  --card-gray: #757575;
  --line: #E2E2E2;
  --line-soft: #E8E8E8;
  --text: #333333;
  --head: #101010;
  --muted: #666666;
  --muted-2: #6B6B6B;
  --on-navy-muted: #8391B0;

  /* Типографика */
  --font-sans: "Nunito Sans", "Segoe UI", Arial, Helvetica, sans-serif;

  /* Ритм */
  --container: 1300px;
  --gutter: 15px;
  --section-y: 80px;
  --hdr-h: 72px;

  /* Форма */
  --radius: 4px;
  --radius-card: 5px;
  --shadow-sticky: 0 6px 24px rgba(11, 26, 67, .10);

  /* Точечная сетка на тёмных фотополосах */
  --dots: radial-gradient(rgba(255, 255, 255, .10) 1px, transparent 1px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 28px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4, h5, p, ul, ol, figure, blockquote, table { margin: 0; }
ul, ol { padding: 0; list-style: none; }

img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

table { border-collapse: collapse; width: 100%; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--red-surface); color: #fff; padding: 12px 20px;
  font-weight: 700; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Типографика ---------- */

.h1, h1 {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 28px;
  line-height: 36px;
  letter-spacing: -.015em;
  color: var(--head);
}

.h2, h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 26px;
  line-height: 34px;
  letter-spacing: -.01em;
  color: var(--head);
}

.h3, h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 20px;
  line-height: 28px;
  color: var(--head);
}

h4 { font-family: var(--font-sans); font-weight: 700; font-size: 17px; line-height: 26px; color: var(--head); }

.lead { font-size: 17px; line-height: 30px; }
.muted { color: var(--muted); font-size: 14px; line-height: 22px; }
.small { font-size: 13px; line-height: 20px; color: var(--muted); }

/* Рубрикатор: плотный гротеск + линейка 2px */
.rule-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 20px;
  line-height: 28px;
  color: var(--head);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--head);
  margin-bottom: 24px;
}

/* Заголовок секции */
.sec-title { margin-bottom: 12px; }
.sec-head { margin-bottom: 34px; max-width: 760px; }
.sec-head .lead { color: var(--text); margin-top: 10px; }
.on-dark .sec-title, .on-dark h2, .on-dark h3 { color: #fff; }
.on-dark { color: rgba(255, 255, 255, .88); }
.on-dark .muted, .on-dark .small { color: var(--on-navy-muted); }

/* Ссылка внутри текста */
.txt a, .prose a {
  color: var(--red-ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.txt a:hover, .prose a:hover { text-decoration: none; }

.on-dark a:not(.btn):not(.soc):not(.soc-btn) { color: #fff; }

/* ---------- Контейнер и секции ---------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: 48px 0; }
.section--alt { background: var(--bg-alt); }
.section--navy { background: var(--navy); color: rgba(255, 255, 255, .88); }
.section--tight { padding: 32px 0; }

/* Тёмная фотополоса с точечной сеткой */
.photo-band { position: relative; overflow: hidden; background: var(--navy); color: #fff; }
.photo-band__media { position: absolute; inset: 0; }
.photo-band__media img { width: 100%; height: 100%; object-fit: cover; }
.photo-band__veil {
  position: absolute; inset: 0;
  background: linear-gradient(rgba(11, 26, 67, .78), rgba(0, 0, 0, .78)), var(--dots);
  background-size: auto, 8px 8px;
}
.photo-band > .container { position: relative; z-index: 1; }

.dots-overlay { background-image: var(--dots); background-size: 8px 8px; }

/* Разделительная линейка */
.hr { height: 1px; background: var(--line); border: 0; margin: 32px 0; }
.hr--dark { background: var(--navy-line); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  text-align: center;
  border: 0;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .12s ease, box-shadow .18s ease;
}

.btn--primary {
  background: linear-gradient(180deg, var(--red-top), var(--red-bot));
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--red-edge);
}
.btn--primary:hover { background: var(--red-hover); box-shadow: inset 0 -3px 0 var(--red-hover-edge); }
.btn--primary:active { transform: translateY(1px); box-shadow: inset 0 -2px 0 var(--red-hover-edge); }

.btn--secondary {
  background: transparent;
  color: var(--navy);
  box-shadow: inset 0 0 0 2px var(--navy);
}
.btn--secondary:hover { background: var(--navy); color: #fff; }
.btn--secondary:active { transform: translateY(1px); }

.btn--light {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 2px #fff;
}
.btn--light:hover { background: #fff; color: var(--navy); }
.btn--light:active { transform: translateY(1px); }

.btn--messenger {
  background: var(--green);
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--green-edge);
}
.btn--messenger:hover { background: var(--green-hover); }
.btn--messenger:active { transform: translateY(1px); box-shadow: inset 0 -2px 0 var(--green-edge); }

.btn--sm { min-height: 40px; padding: 0 18px; font-size: 14px; }

.btn--outline-red {
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
  color: var(--red-ink);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--red);
}
.btn--outline-red:hover { background: var(--red); color: #fff; }
.btn--outline-red:active { transform: translateY(1px); }

.btn--block { display: flex; width: 100%; }

/* Ghost-ссылка со стрелкой */
.ghost-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--red-ink);
  font-weight: 700;
  font-size: 15px;
}
.ghost-link .ico { transition: transform .18s ease; }
.ghost-link:hover .ico { transform: translateX(4px); }
.on-dark .ghost-link { color: #fff; }

.link-cyan { color: var(--cyan-ink); font-weight: 600; }
.link-cyan:hover { text-decoration: underline; }
.on-dark .link-cyan { color: var(--cyan); }

/* Фокус — единый для всего проекта */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Формы ---------- */

.field {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 24px;
  transition: border-color .18s ease;
}
.field::placeholder { color: var(--muted-2); }
.field:hover { border-color: #C9C9C9; }
.field:focus { border-color: var(--cyan); outline-offset: 1px; }

textarea.field { min-height: 128px; resize: vertical; }

select.field {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237A7A7A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

.form__row { margin-bottom: 16px; }
.form__label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
  margin-bottom: 6px;
  color: var(--head);
}
.on-dark .form__label { color: #fff; }

.form__grid { display: grid; gap: 16px; }

.form__consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 20px;
  color: var(--muted);
}
.form__consent input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--red);
}
.on-dark .form__consent { color: var(--on-navy-muted); }

/* Чек-лист с галочкой в кружке */
.checklist { display: grid; gap: 14px; }
.checklist li { display: flex; gap: 14px; align-items: flex-start; }
.checklist__mark {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
}
.checklist__mark .ico { width: 13px; height: 13px; }

/* Звёзды */
.stars { display: inline-flex; gap: 3px; color: #D6D6D6; }
.stars__i { display: inline-flex; }
.stars__i.is-on { color: #F5A623; }
.stars__i.is-on .ico { fill: #F5A623; stroke: #F5A623; }

/* Чип «Дело выиграно» */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius);
  background: var(--red-surface);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
}
.chip--ghost {
  background: #fff;
  color: var(--red-ink);
  box-shadow: inset 0 0 0 1px var(--red);
}

/* ==================================================================
   2. Шапка, навигация, бургер, мобильное меню, футер
   ================================================================== */

/* ---------- Ярус 1: utility ---------- */

.topbar {
  display: none;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.topbar__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  font-size: 13px;
  line-height: 20px;
}
.topbar__right { display: flex; align-items: center; gap: 26px; }
.topbar__item { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.topbar__item .ico { color: var(--cyan); flex: 0 0 auto; }
.topbar__mail:hover { color: var(--cyan-ink); }

/* ---------- Ярус 2: основная строка ---------- */

.hdr {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--navy);
  color: #fff;
}
.hdr.is-stuck { box-shadow: 0 2px 0 var(--navy-line); }

.hdr__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--hdr-h);
}

/* Логотип */
.logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  padding: 8px 0;
}
.logo__mark { flex: 0 0 auto; color: #fff; width: 34px; height: 34px; }
.logo__txt { display: flex; flex-direction: column; }
.logo__name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 19px;
  line-height: 24px;
  white-space: nowrap;
}
.logo__sub {
  font-size: 11px;
  line-height: 14px;
  color: var(--on-navy-muted);
  display: none;
}
.logo:hover .logo__mark { color: var(--red); }

/* ---------- Навигация ---------- */

/* .nav — прозрачный клипующий слой во весь экран: закрытая панель уезжает
   за его правый край и не создаёт горизонтальную прокрутку документа. */
.nav {
  position: fixed;
  inset: 0;
  width: 100%;
  z-index: 80;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  transition: visibility .28s ease;
}
/* Клики принимает только сама панель: мимо неё они проходят к подложке и закрывают меню. */
.nav.is-open { visibility: visible; }
.nav.is-open .nav__panel { pointer-events: auto; }

.nav__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(88vw, 380px);
  background: var(--navy);
  padding: 78px 20px 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(100%);
  transition: transform .28s ease;
}
.nav.is-open .nav__panel { transform: translateX(0); }

.nav__list { display: flex; flex-direction: column; }

.nav__item { position: relative; border-bottom: 1px solid var(--navy-line); }

.nav__link {
  display: block;
  padding: 14px 40px 14px 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  color: #fff;
}
.nav__link:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.nav__link.is-active { color: #fff; box-shadow: inset 3px 0 0 var(--red); }

.nav__toggle {
  position: absolute;
  right: 0;
  top: 10px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--on-navy-muted);
  transition: transform .2s ease, color .2s ease;
}
.nav__toggle:hover { color: #fff; }
.nav__toggle[aria-expanded="true"] { transform: rotate(180deg); color: #fff; }

.subnav { display: none; padding: 0 0 12px 14px; }
.subnav.is-open { display: block; }
.subnav a {
  display: block;
  padding: 8px 0;
  font-size: 14px;
  line-height: 22px;
  color: rgba(255, 255, 255, .82);
}
.subnav a:hover { color: #fff; text-decoration: underline; }

.nav__mobile-foot {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--navy-line);
  display: grid;
  gap: 10px;
}
.nav__phone { font-size: 22px; font-weight: 800; line-height: 30px; color: #fff; }
.nav__hours { font-size: 13px; line-height: 20px; color: var(--on-navy-muted); margin-bottom: 6px; }

/* Подложка ниже шапки (у .hdr z-index 60): иначе она накрывала выехавшую панель меню
   и любое нажатие в панели закрывало меню. */
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(5, 12, 32, .6);
  opacity: 0;
  transition: opacity .28s ease;
}
.nav-backdrop.is-on { opacity: 1; }

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

.hdr__tools { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.hdr__social { display: none; align-items: center; gap: 4px; }
.hdr__sep { display: none; width: 1px; height: 26px; background: var(--navy-line); }

.soc {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  color: #fff;
  transition: background-color .18s ease, color .18s ease;
}
.soc:hover { background: var(--red); }

.hdr__search-btn {
  display: none;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius);
  color: #fff;
  transition: background-color .18s ease;
}
.hdr__search-btn:hover { background: var(--navy-line); }

.hdr__cta { display: none; min-height: 44px; padding: 0 22px; font-size: 14px; }

.burger {
  width: 44px;
  height: 44px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 0 9px;
  z-index: 90;
  position: relative;
}
.burger__bar {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .24s ease, opacity .18s ease;
}
.burger[aria-expanded="true"] .burger__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__bar:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Панель поиска ---------- */

.search-panel { background: var(--navy-800); border-top: 1px solid var(--navy-line); }
.search-panel__in { display: flex; gap: 10px; padding-top: 14px; padding-bottom: 14px; }
.search-panel .field { min-height: 46px; }
.search-panel .btn { min-height: 46px; flex: 0 0 auto; }

/* ---------- Ярус 3: хлебные крошки ---------- */

.crumbs__list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; line-height: 20px; }
.crumbs__item + .crumbs__item::before { content: "/"; margin-right: 6px; opacity: .6; }
.crumbs--dark { color: rgba(255, 255, 255, .85); }
.crumbs--dark a:hover { text-decoration: underline; }
.crumbs--light { color: var(--muted); }
.crumbs--light a:hover { color: var(--red-ink); }

/* ---------- Шапка страницы ---------- */

.page-hero { position: relative; overflow: hidden; background: var(--navy); color: #fff; }
.page-hero__media { position: absolute; inset: 0; }
.page-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero__veil {
  position: absolute; inset: 0;
  background: linear-gradient(rgba(11, 26, 67, .70), rgba(0, 0, 0, .72)), var(--dots);
  background-size: auto, 8px 8px;
}
.page-hero__in { position: relative; z-index: 1; padding: 34px 15px 44px; }
.page-hero__title {
  font-family: var(--font-sans);
  font-size: 28px;
  line-height: 36px;
  color: #fff;
  margin-top: 16px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}
.page-hero__lead { margin-top: 14px; max-width: 720px; font-size: 16px; line-height: 27px; color: rgba(255, 255, 255, .88); }

.page-head { padding: 28px 0 8px; }
.page-head__title { margin-top: 14px; }
.page-head__lead { margin-top: 12px; max-width: 760px; font-size: 17px; line-height: 29px; }

/* ==================================================================
   Футер
   ================================================================== */

.foot { background: var(--navy); color: #fff; }

.foot__social { border-bottom: 1px solid var(--navy-line); }
.foot__social-in {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 28px;
  padding-bottom: 28px;
}
.foot__social-title { font-size: 15px; font-weight: 700; }
.foot__social-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.soc-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid var(--navy-line);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: background-color .18s ease, border-color .18s ease;
}
.soc-btn:hover { background: var(--red-surface); border-color: var(--red-surface); }

.foot__grid {
  display: grid;
  gap: 32px;
  padding-top: 40px;
  padding-bottom: 40px;
}

.foot__logo {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 24px;
  line-height: 32px;
  color: #fff;
}
.foot__brand-sub { font-size: 13px; line-height: 20px; color: var(--on-navy-muted); margin-top: 4px; }
.foot__copy { font-size: 13px; line-height: 20px; color: var(--on-navy-muted); margin-top: 16px; }

.foot__list { display: grid; gap: 12px; }
.foot__link {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  line-height: 24px;
  color: #fff;
  transition: color .18s ease;
}
.foot__link:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.foot__tick {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
}
.foot__link.is-active {
  background: var(--red-surface);
  color: #fff;
  padding: 2px 10px 2px 6px;
  border-radius: var(--radius);
  margin-left: -6px;
}
.foot__link.is-active .foot__tick { background: #fff; color: var(--red); }

.foot__col--contacts { display: grid; gap: 10px; justify-items: start; }
.foot__phone { font-size: 22px; font-weight: 800; line-height: 30px; color: #fff; }
.foot__phone:hover { color: #fff; text-decoration: underline; }
.foot__mail, .foot__hours {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  line-height: 24px;
  color: #fff;
}
.foot__mail .ico, .foot__hours .ico { color: var(--cyan); flex: 0 0 auto; }
.foot__mail:hover { color: var(--cyan); }
.foot__hours { color: var(--on-navy-muted); }
.foot__col--contacts .btn { margin-top: 8px; }

.foot__legal { background: var(--navy-900); }
.foot__legal-in {
  display: grid;
  gap: 14px;
  padding-top: 22px;
  padding-bottom: 22px;
  font-size: 12px;
  line-height: 20px;
  color: var(--on-navy-muted);
}
.foot__legal-right p { font-weight: 600; }

/* ==================================================================
   3A. Секции: главная, общие блоки, сайдбар
   ================================================================== */

/* ---------- Разметка с сайдбаром ---------- */

.layout { display: grid; gap: 32px; padding: 40px 0 56px; }
/* Без min-width: 0 колонка грида растягивается по min-content содержимого: таблица
   образцов документов в .price-scroll (нерасторжимая колонка «Просмотреть DOCX, 24 КБ»)
   раздувала колонку до 376px и на 375px весь service.php уезжал за край окна. */
.layout__main { min-width: 0; }
.layout__aside { display: grid; gap: 24px; align-content: start; min-width: 0; }

/* Читаемая колонка */
.readable { max-width: 880px; margin: 0 auto; }

/* ---------- hero-slider ---------- */

.hero { position: relative; background: var(--navy); color: #fff; overflow: hidden; }
.hero__track { position: relative; }
.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease, visibility .5s ease;
}
.hero__slide.is-active { position: relative; opacity: 1; visibility: visible; }
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__veil {
  position: absolute; inset: 0;
  background: linear-gradient(rgba(11, 26, 67, .62), rgba(0, 0, 0, .72)), var(--dots);
  background-size: auto, 8px 8px;
}
.hero__in {
  position: relative;
  z-index: 1;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 64px 15px 76px;
}
.hero__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 28px;
  line-height: 36px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}
.hero__title span { display: block; }
.hero__lead {
  margin-top: 16px;
  max-width: 660px;
  font-size: 16px;
  line-height: 27px;
  color: rgba(255, 255, 255, .9);
  text-shadow: 0 1px 8px rgba(0, 0, 0, .4);
}
.hero__actions { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.hero__dots {
  position: absolute;
  left: 0; right: 0; bottom: 22px;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.hero__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  transition: background-color .18s ease, transform .18s ease;
}
.hero__dot.is-active { background: var(--red); transform: scale(1.2); }

.hero__arrow {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px; height: 48px;
  place-items: center;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, .5);
  border-radius: var(--radius);
  transition: background-color .18s ease, border-color .18s ease;
}
.hero__arrow:hover { background: var(--red); border-color: var(--red); }
.hero__arrow--prev { left: 20px; }
.hero__arrow--next { right: 20px; }

/* ---------- intro-consult ---------- */

.intro { position: relative; }
.intro__grid { display: grid; gap: 28px; align-items: center; }
.intro__figure { display: grid; place-items: center; }
.intro__figure svg { width: 100%; max-width: 260px; height: auto; color: rgba(255, 255, 255, .28); }
.intro__body p { margin-top: 14px; color: rgba(255, 255, 255, .85); }
.intro__divider { height: 1px; background: var(--navy-line); margin: 24px 0 18px; }

/* ---------- practice-strip ---------- */

.practice__grid { display: grid; gap: 0; }
.practice__item {
  padding: 22px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
}
.practice__item:last-child { border-bottom: 0; }
.practice__icon { color: #fff; margin-bottom: 12px; }
.practice__title { font-size: 17px; font-weight: 700; line-height: 26px; color: #fff; }
.practice__text { margin-top: 6px; font-size: 14px; line-height: 23px; color: rgba(255, 255, 255, .78); }

/* ---------- services-showcase ---------- */

.showcase__grid { display: grid; gap: 24px; }

.tile {
  position: relative;
  display: block;
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  color: #fff;
  background: var(--navy);
  isolation: isolate;
}
.tile__media { position: absolute; inset: 0; }
.tile__media img { width: 100%; height: 100%; object-fit: cover; }
.tile__veil { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); transition: background-color .22s ease; }
.tile:hover .tile__veil { background: rgba(0, 0, 0, .60); }

.tile--navy { background: var(--navy); }
.tile--gray { background: var(--card-gray); }
.tile--red { background: linear-gradient(180deg, var(--red-top), var(--red-bot)); }
.tile--red:hover { background: var(--red-hover); }

.tile__watermark {
  position: absolute;
  top: -18px;
  right: -18px;
  color: rgba(255, 255, 255, .08);
  pointer-events: none;
}
.tile__watermark .ico { width: 180px; height: 180px; stroke-width: 1; }

.tile__label {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 22px;
  font-size: 18px;
  font-weight: 700;
  line-height: 26px;
  transition: transform .22s ease;
}
.tile:hover .tile__label { transform: translateX(4px); }
.tile--red .tile__label { align-items: center; justify-content: space-between; gap: 14px; }

/* ---------- cases-and-blog ---------- */

.cb__grid { display: grid; gap: 40px; }
.cb__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.cb__nav { display: flex; gap: 8px; }
.cb__arrow {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  color: var(--navy);
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.cb__arrow:hover { background: var(--red-surface); border-color: var(--red-surface); color: #fff; }

/* ---------- Карточка дела ---------- */

.case {
  background: #fff;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-card);
  padding: 22px;
  display: grid;
  gap: 18px;
}
.case__side { display: flex; align-items: center; gap: 14px; }
.case__gerb { color: var(--navy); flex: 0 0 auto; }
.case__gerb .ico { width: 56px; height: 56px; }
.case__date { font-size: 14px; font-weight: 700; line-height: 22px; color: var(--head); }
.case__cat { font-size: 13px; line-height: 20px; color: var(--muted); }
.case__rows { display: grid; gap: 10px; }
.case__row { font-size: 15px; line-height: 25px; }
.case__row b { color: var(--head); font-weight: 700; }
.case__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.case__sum { font-size: 18px; font-weight: 800; color: var(--red-ink); }

/* ---------- Список блога (строки) ---------- */

.blog-list { display: grid; }
.blog-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line-soft);
}
.blog-row:first-child { padding-top: 0; }
.blog-row__thumb { flex: 0 0 auto; width: 150px; height: 150px; border-radius: var(--radius); overflow: hidden; }
.blog-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-row__title { font-size: 18px; font-weight: 700; line-height: 26px; color: var(--head); }
.blog-row__title a:hover { color: var(--red-ink); }
.blog-row__meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; line-height: 20px; color: var(--muted-2); margin-top: 6px; }
.blog-row__author { color: var(--cyan-ink); font-weight: 600; }
.blog-row__lead { margin-top: 10px; font-size: 15px; line-height: 25px; color: var(--text); }
.blog-row__more { margin-top: 14px; }

/* Компактный список заголовков */
.blog-mini { display: grid; }
.blog-mini__item { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.blog-mini__item:first-child { padding-top: 0; }
.blog-mini__date { font-size: 13px; line-height: 20px; color: var(--muted-2); }
.blog-mini__title { display: block; margin-top: 4px; font-size: 16px; font-weight: 700; line-height: 25px; color: var(--head); }
.blog-mini__title:hover { color: var(--red-ink); }
.blog-mini__author { font-size: 13px; color: var(--cyan-ink); font-weight: 600; }

/* ---------- how-we-work ---------- */

.steps { display: grid; gap: 22px; counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  align-items: start;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.steps .step:last-child { border-bottom: 0; padding-bottom: 0; }
.step__num {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 26px;
  line-height: 34px;
  color: var(--red-ink);
}
.step__title { font-size: 17px; font-weight: 700; line-height: 26px; color: var(--head); display: flex; align-items: center; gap: 10px; }
.step__title .ico { color: var(--cyan-ink); flex: 0 0 auto; }
.step__text { margin-top: 8px; font-size: 15px; line-height: 25px; }

/* ---------- director-word ---------- */

.director__grid { display: grid; gap: 26px; align-items: start; }
.director__photo { position: relative; max-width: 320px; }
.director__photo img { width: 100%; border-radius: var(--radius-card); }
.director__name { margin-top: 14px; font-size: 17px; font-weight: 700; color: var(--head); }
.director__role { font-size: 13px; color: var(--muted); }
.director__text p { margin-top: 14px; }
.director__sign { margin-top: 18px; font-family: var(--font-sans); font-size: 20px; color: var(--navy); }

/* Врезка-цитата со сдвинутой плашкой */
.quote-box { position: relative; margin: 28px 0; }
.quote-box::before {
  content: "";
  position: absolute;
  left: 10px; top: 10px; right: -10px; bottom: -10px;
  background: var(--red-deep);
  z-index: 0;
}
.quote-box__in {
  position: relative;
  z-index: 1;
  background: #fff;
  border: 1px solid var(--red);
  padding: 24px 24px 24px 62px;
}
.quote-box__mark { position: absolute; left: 20px; top: 22px; color: var(--red); }
.quote-box p { font-family: var(--font-sans); font-size: 18px; line-height: 30px; color: var(--head); }
.quote-box cite { display: block; margin-top: 12px; font-style: normal; font-size: 13px; color: var(--muted); }

/* ---------- team ---------- */

.team__grid { display: grid; gap: 24px; }
.lawyer-card { display: flex; flex-direction: column; }
.lawyer-card__photo { background: var(--navy); aspect-ratio: 3 / 4; overflow: hidden; }
.lawyer-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.lawyer-card__body {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 0;
  padding: 18px;
  display: grid;
  gap: 8px;
  justify-items: start;
  flex: 1;
}
.lawyer-card__name { font-size: 17px; font-weight: 700; line-height: 25px; color: var(--red-ink); }
.lawyer-card__role { font-size: 13px; line-height: 20px; color: var(--muted); }
.lawyer-card__exp { font-size: 14px; line-height: 22px; }
.lawyer-card .btn { margin-top: 6px; }

/* ---------- advantages ---------- */

.adv__grid { display: grid; gap: 20px; }
.adv {
  display: grid;
  gap: 12px;
  padding: 24px;
  background: var(--bg-alt);
  border-radius: var(--radius-card);
}
.section--alt .adv { background: #fff; }
.adv__icon { color: var(--cyan-ink); }
.adv__title { font-size: 17px; font-weight: 700; line-height: 26px; color: var(--head); }
.adv__text { font-size: 15px; line-height: 25px; }

/* ---------- Показатели ---------- */

.facts__grid { display: grid; gap: 18px; }
.fact {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--bg-alt);
  padding: 24px;
}
.fact__icon { color: var(--cyan-ink); flex: 0 0 auto; }
.fact__icon .ico { width: 48px; height: 48px; }
.fact__num { font-family: var(--font-sans); font-weight: 800; font-size: 36px; line-height: 44px; color: var(--red); }
.fact__label { font-size: 14px; line-height: 22px; color: var(--muted); }

.facts--dark .fact { background: transparent; flex-direction: column; text-align: center; gap: 10px; border-bottom: 1px solid var(--navy-line); }
.facts--dark .fact:last-child { border-bottom: 0; }
.facts--dark .fact__icon { color: #fff; }
.facts--dark .fact__label { color: var(--on-navy-muted); }
/* под красными цифрами светлое фото: затемнение плотнее, чтобы цифры читались */
.facts--dark .photo-band__veil { background: linear-gradient(rgba(11, 26, 67, .88), rgba(0, 0, 0, .88)), var(--dots); background-size: auto, 8px 8px; }

/* ---------- contact-info ---------- */

.cinfo__grid { display: grid; gap: 20px; }
.cinfo__item {
  display: grid;
  gap: 8px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}
.section--alt .cinfo__item { border-color: transparent; }
.cinfo__icon { color: var(--cyan-ink); }
.cinfo__label { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cinfo__value { font-size: 17px; font-weight: 700; line-height: 27px; color: var(--head); }
.cinfo__value a:hover { color: var(--red-ink); }
.cinfo__note { font-size: 14px; line-height: 22px; color: var(--muted); }

/* ---------- promo-cards ---------- */

.promo__grid { display: grid; gap: 20px; }
.promo {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}
.promo__icon { color: var(--cyan-ink); }
.promo__title { font-size: 18px; font-weight: 700; line-height: 27px; color: var(--head); }
.promo__text { font-size: 15px; line-height: 25px; }

/* ---------- documents ---------- */

.docs__grid { display: grid; gap: 16px; }
.doc-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.doc-item__icon { color: var(--cyan-ink); flex: 0 0 auto; }
.doc-item__title { font-size: 15px; font-weight: 700; line-height: 24px; color: var(--head); }
.doc-item__note { font-size: 13px; line-height: 20px; color: var(--muted); margin-top: 2px; }

/* ---------- price-table ---------- */

.price-wrap { background: var(--bg-alt); padding: 16px; border-radius: var(--radius-card); margin-bottom: 26px; }
/* position:relative обязателен: иначе .sr-only внутри широкой таблицы
   позиционируется от вьюпорта и создаёт горизонтальную прокрутку страницы. */
.price-scroll { overflow-x: auto; position: relative; }
.price-table { min-width: 560px; background: #fff; }
.price-table caption {
  caption-side: top;
  text-align: left;
  background: var(--red-surface);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  line-height: 22px;
  padding: 14px 18px;
}
.price-table th, .price-table td { padding: 13px 18px; text-align: left; font-size: 15px; line-height: 24px; }
.price-table thead th { background: var(--red-surface); color: #fff; font-weight: 700; font-size: 15px; }
.price-table tbody tr:nth-child(even) { background: var(--red-tint); }
.price-table tbody tr:hover { background: #F7E9EC; }
.price-table td:nth-child(2) { white-space: nowrap; font-weight: 700; color: var(--head); }
.price-table td:last-child { text-align: right; width: 1%; white-space: nowrap; }

/* ---------- consult-form ---------- */

.consult { position: relative; }
.consult__grid { display: grid; gap: 28px; align-items: start; }
.consult__aside p { margin-top: 12px; color: rgba(255, 255, 255, .85); }
.consult__phone { display: inline-flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 24px; font-weight: 800; color: #fff; }
.consult__phone .ico { color: var(--cyan); }
.consult__form {
  background: #fff;
  border-radius: var(--radius-card);
  padding: 26px;
  color: var(--text);
}
/* Карточка формы белая, поэтому отменяем светлый текст полосы .on-dark. */
.on-dark .consult__form,
.on-dark .consult__form p,
.on-dark .consult__form span,
.on-dark .consult__form .small { color: var(--text); }
.on-dark .consult__form .form__consent { color: var(--muted); }
.on-dark .consult__form a:not(.btn):not(.soc):not(.soc-btn) { color: var(--red-ink); }
.consult__form .form__label { color: var(--head); }
.on-dark .consult__form .consult__form-title,
.consult__form-title { font-size: 20px; font-weight: 700; line-height: 28px; color: var(--head); margin-bottom: 16px; }

/* ---------- Сайдбар ---------- */

.side-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 22px;
}
.side-card__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  line-height: 26px;
  color: var(--head);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--head);
  margin-bottom: 16px;
}
.side-card--booking {
  box-shadow: var(--shadow-sticky);
  border-color: transparent;
}
.side-card--pink { background: var(--red-tint-2); border-color: #F6DCE3; }
.side-card--navy { background: var(--navy); border-color: transparent; color: rgba(255, 255, 255, .88); }
.side-card--navy .side-card__title { color: #fff; border-bottom-color: var(--red); }

.side-list { display: grid; gap: 10px; }
.side-list a {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 24px;
  color: var(--text);
}
.side-list a:hover { color: var(--red-ink); }
.side-list .ico { flex: 0 0 auto; margin-top: 5px; color: var(--red); }
.side-list__count { margin-left: auto; font-size: 13px; color: var(--muted); }

.side-card .form__row:last-of-type { margin-bottom: 12px; }
.side-card__note { font-size: 13px; line-height: 20px; color: var(--muted); margin-top: 12px; }

/* ==================================================================
   3B. Секции внутренних страниц
   ================================================================== */

/* ---------- Каталог услуг ---------- */

.cat-group { margin-bottom: 44px; }
.cat-group:last-child { margin-bottom: 0; }
.cat-grid { display: grid; gap: 30px; grid-template-columns: 1fr; }
.cat-card { display: block; }
.cat-card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-alt); }
.cat-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.cat-card:hover .cat-card__media img { transform: scale(1.04); }
.cat-card__title { margin-top: 12px; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--red-ink); }
.cat-card:hover .cat-card__title { text-decoration: underline; }
.cat-card__price { font-size: 13px; line-height: 20px; color: var(--muted); margin-top: 2px; }

.lead-band { padding: 34px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lead-band p { font-size: 17px; line-height: 30px; }
.lead-band p + p { margin-top: 14px; }

/* ---------- Страница услуги ---------- */

.svc-intro__media { border-radius: var(--radius-card); overflow: hidden; aspect-ratio: 16 / 9; }
.svc-intro__media img { width: 100%; height: 100%; object-fit: cover; }
.svc-callout {
  margin-top: 22px;
  padding: 20px 22px;
  background: var(--red-tint-2);
  border-left: 3px solid var(--red);
  display: grid;
  gap: 14px;
}
.svc-callout__title { font-size: 17px; font-weight: 700; line-height: 26px; color: var(--head); }
.svc-callout__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.svc-lead { margin-top: 22px; font-size: 18px; line-height: 30px; color: var(--red-ink); font-weight: 600; }

/* Типографика длинного текста */
.prose h2 { margin: 34px 0 14px; font-size: 24px; line-height: 32px; }
.prose h3 { margin: 26px 0 12px; }
.prose p { margin-bottom: 16px; }
.prose > *:first-child { margin-top: 0; }
.prose ul:not(.checklist):not(.side-list) { display: grid; gap: 10px; margin-bottom: 18px; }
.prose ul:not(.checklist):not(.side-list) > li { position: relative; padding-left: 22px; }
.prose ul:not(.checklist):not(.side-list) > li::before {
  content: ""; position: absolute; left: 4px; top: 12px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--red);
}
.prose ol { counter-reset: n; display: grid; gap: 10px; margin-bottom: 18px; }
.prose ol > li { position: relative; padding-left: 32px; counter-increment: n; }
.prose ol > li::before {
  content: counter(n) ".";
  position: absolute; left: 0; top: 0;
  font-weight: 800; color: var(--red-ink);
}
.prose .checklist { margin-bottom: 18px; }
.prose table { margin-bottom: 22px; }
.prose figure { margin: 24px 0; }
.prose figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }

/* Аккордеон */
.acc { display: grid; gap: 10px; margin: 26px 0; }
.acc__item { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.acc__btn {
  width: 100%;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  text-align: left;
  font-size: 16px;
  font-weight: 700;
  line-height: 25px;
  color: var(--head);
}
.acc__btn:hover { color: var(--red-ink); }
.acc__btn .ico { flex: 0 0 auto; color: var(--red); transition: transform .22s ease; }
.acc__btn[aria-expanded="true"] .ico { transform: rotate(180deg); }
.acc__panel { padding: 0 18px 18px; font-size: 15px; line-height: 25px; }
.acc__panel[hidden] { display: none; }

/* Таблица образцов документов */
.doc-table th, .doc-table td { padding: 13px 16px; font-size: 15px; line-height: 24px; text-align: left; border-bottom: 1px solid var(--line); }
.doc-table thead th { background: var(--red-surface); color: #fff; font-weight: 700; border-bottom: 0; }
.doc-table tbody tr:nth-child(even) { background: var(--red-tint); }
.doc-table td:last-child { text-align: right; white-space: nowrap; }

/* ---------- О компании ---------- */

.legal-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 26px;
}
.legal-list { display: grid; gap: 12px; }
.legal-list li { display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.legal-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.legal-list dt, .legal-list__label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.legal-list__value { font-size: 16px; line-height: 26px; color: var(--head); }

.scope__grid { display: grid; gap: 28px; align-items: start; }
.scope__list { display: grid; gap: 12px; }
.scope__list a { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 26px; }
.scope__list a:hover { color: var(--red-ink); }
.scope__list .ico { flex: 0 0 auto; margin-top: 6px; color: var(--red); }

/* ---------- Карточка юриста ---------- */

.lw-hero__grid { display: grid; gap: 28px; align-items: start; }
.lw-hero__photo { position: relative; max-width: 320px; }
.lw-hero__photo::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--red);
  z-index: 0;
}
.lw-hero__photo img { position: relative; z-index: 1; width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.lw-hero__name { font-family: var(--font-sans); font-size: 26px; line-height: 34px; color: #fff; }
.lw-hero__role { font-size: 14px; line-height: 22px; color: var(--on-navy-muted); margin-top: 4px; }

.tabs { margin-top: 22px; }
.tabs__list { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs__btn {
  padding: 11px 18px;
  border-radius: var(--radius);
  border: 2px solid rgba(255, 255, 255, .5);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.tabs__btn:hover { border-color: #fff; }
.tabs__btn[aria-selected="true"] {
  background: linear-gradient(180deg, var(--red-top), var(--red-bot));
  border-color: transparent;
  box-shadow: inset 0 -3px 0 var(--red-edge);
}
.tabs__panel { margin-top: 20px; font-size: 16px; line-height: 27px; color: rgba(255, 255, 255, .88); }
.tabs__panel[hidden] { display: none; }
.tabs__panel p + p { margin-top: 14px; }

/* ---------- Дела и пагинация ---------- */

.cases-list { display: grid; gap: 20px; }

.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.pagination a, .pagination span {
  min-width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  color: var(--head);
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.pagination a:hover { border-color: var(--red); color: var(--red-ink); }
.pagination .is-current { background: var(--red-surface); border-color: var(--red-surface); color: #fff; }
.pagination .is-gap { border-color: transparent; background: transparent; color: var(--muted); }

/* ---------- Отзывы ---------- */

.rev-summary {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 26px;
  display: grid;
  gap: 20px;
  align-items: center;
}
.rev-summary__score { display: flex; align-items: center; gap: 18px; }
.rev-summary__num { font-family: var(--font-sans); font-weight: 800; font-size: 48px; line-height: 56px; color: var(--red); }
.rev-summary__meta { font-size: 14px; line-height: 22px; color: var(--muted); }
.rev-bars { display: grid; gap: 7px; }
.rev-bar { display: grid; grid-template-columns: 34px 1fr 40px; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.rev-bar__track { height: 8px; background: var(--bg-alt); border-radius: 4px; overflow: hidden; }
.rev-bar__fill { height: 100%; background: var(--red); }

.rev-list { display: grid; gap: 18px; }
.review {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 22px;
}
.review__head { display: flex; gap: 14px; align-items: center; }
.review__avatar {
  flex: 0 0 auto;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
}
.review__name { font-size: 16px; font-weight: 700; line-height: 24px; color: var(--head); }
.review__meta { font-size: 13px; line-height: 20px; color: var(--muted); }
.review__stars { margin-left: auto; }
.review__service { margin-top: 12px; font-size: 13px; color: var(--cyan-ink); font-weight: 600; }
.review__text { margin-top: 10px; font-size: 15px; line-height: 25px; }
.review__text.is-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.review__more { margin-top: 10px; color: var(--red-ink); font-weight: 700; font-size: 14px; }
.review__more:hover { text-decoration: underline; }

.rate-input { display: flex; gap: 6px; }
.rate-input button { color: #D6D6D6; padding: 2px; transition: color .15s ease; }
.rate-input button.is-on { color: #F5A623; }
.rate-input button.is-on .ico { fill: #F5A623; stroke: #F5A623; }

/* ---------- Цены ---------- */

.price-note {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 26px;
  margin: 28px 0;
}
.price-note p + p { margin-top: 12px; }

/* ---------- Блог ---------- */

.blog-filter {
  display: grid;
  gap: 12px;
  background: var(--bg-alt);
  padding: 20px;
  border-radius: var(--radius-card);
  margin-bottom: 28px;
}
.blog-filter__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Статья ---------- */

.art-author {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 22px;
  margin-bottom: 22px;
}
.art-author__main { display: flex; gap: 16px; align-items: center; }
.art-author__photo { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 50%; overflow: hidden; background: var(--navy); }
.art-author__photo img { width: 100%; height: 100%; object-fit: cover; }
.art-author__role { font-size: 13px; line-height: 20px; color: var(--muted); }
.art-author__name { font-size: 18px; font-weight: 700; line-height: 26px; color: var(--red-ink); }
.art-author__name:hover { text-decoration: underline; }
.art-author__spec-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 8px; }
.art-author__spec a { display: block; font-size: 15px; line-height: 26px; color: var(--cyan-ink); }
.art-author__spec a:hover { text-decoration: underline; }

.art-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: var(--bg-alt);
  padding: 16px 18px;
  border-radius: var(--radius);
  margin-bottom: 18px;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--text);
}
.tag-chip:hover { border-color: var(--red); color: var(--red-ink); }

.art-stats { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; color: var(--muted); margin-bottom: 26px; }
.art-stats span { display: inline-flex; align-items: center; gap: 7px; }
.art-stats .ico { color: var(--cyan-ink); }

.toc { background: var(--bg-alt); border-radius: var(--radius-card); padding: 22px; margin: 26px 0; }
.toc__title { font-family: var(--font-sans); font-size: 18px; color: var(--head); margin-bottom: 14px; }
.toc__list { counter-reset: t; display: grid; gap: 10px; }
.toc__list li { counter-increment: t; display: flex; gap: 14px; align-items: baseline; }
.toc__list li::before {
  content: counter(t, decimal-leading-zero);
  font-weight: 800;
  font-size: 22px;
  color: #8A8A8A;
  flex: 0 0 auto;
}
.toc__list a { font-size: 15px; line-height: 25px; }
.toc__list a:hover { color: var(--red-ink); }

.art-share {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 30px 0;
}
.art-share__title { font-weight: 700; font-size: 15px; color: var(--head); }
.art-share__list { display: flex; gap: 8px; }
.art-share__list a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--navy);
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.art-share__list a:hover { background: var(--red-surface); border-color: var(--red-surface); color: #fff; }
.art-share__all { margin-left: auto; }

/* ---------- Контакты ---------- */

.contacts-main__grid { display: grid; gap: 24px; align-items: start; }
.contacts-main__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.map-wrap { position: relative; }
.map-wrap__caption { padding: 14px 0; font-size: 14px; color: var(--muted); }
.map-frame { width: 100%; height: 300px; border: 0; display: block; background: var(--bg-alt); }
.map-wrap__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; padding: 14px 0; }
.map-wrap__bar .map-wrap__caption { padding: 0; }
.map-wrap__links { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 14px; line-height: 22px; }

.qr-card {
  background: #fff;
  border-radius: var(--radius-card);
  padding: 26px;
  color: var(--text);
  display: grid;
  gap: 14px;
  justify-items: start;
}
.qr-card__code { width: 148px; height: 148px; }
.qr-card__row { display: flex; gap: 10px; align-items: center; font-size: 16px; line-height: 26px; }
.qr-card__row .ico { color: var(--cyan-ink); flex: 0 0 auto; }
.qr-card__row b { font-weight: 700; color: var(--head); }

/* ---------- 404 ---------- */

.nf { text-align: center; }
.nf__num {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 96px;
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .5);
}
.nf__text { margin-top: 16px; font-size: 17px; line-height: 29px; color: rgba(255, 255, 255, .88); max-width: 640px; margin-inline: auto; }
.nf__form { display: flex; gap: 10px; max-width: 520px; margin: 26px auto 0; flex-wrap: wrap; }
.nf__form .field { flex: 1 1 220px; }
.nf__actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.popular__grid { display: grid; gap: 12px; }
.popular__grid a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  transition: border-color .18s ease, color .18s ease;
}
.popular__grid a:hover { border-color: var(--red); color: var(--red-ink); }
.popular__grid .ico { color: var(--red); flex: 0 0 auto; }

/* ---------- Карта сайта ---------- */

.sitemap__grid { display: grid; gap: 34px; }
.sitemap__list { display: grid; gap: 9px; }
.sitemap__list a { font-size: 15px; line-height: 25px; }
.sitemap__list a:hover { color: var(--red-ink); text-decoration: underline; }

/* ---------- Модальное окно ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(5, 12, 32, .66);
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
}
.modal[hidden] { display: none; }
.modal__box {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: #fff;
  border-radius: var(--radius-card);
  padding: 30px 26px 26px;
  box-shadow: var(--shadow-sticky);
}
.modal__close {
  position: absolute;
  top: 10px; right: 10px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  color: var(--muted);
  border-radius: var(--radius);
}
.modal__close:hover { color: var(--red-ink); background: var(--bg-alt); }
.modal__title { font-size: 22px; font-weight: 700; line-height: 30px; color: var(--head); margin-bottom: 6px; }
.modal__sub { font-size: 14px; line-height: 22px; color: var(--muted); margin-bottom: 18px; }

.form-note {
  margin-top: 14px;
  padding: 12px 16px;
  background: #EAF7EE;
  border-left: 3px solid var(--green);
  font-size: 14px;
  line-height: 22px;
  color: #14532D;
}
.form-note[hidden] { display: none; }

/* ---------- Появление при скролле ---------- */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ==================================================================
   3C. Мегаменю «Услуги», команда по направлениям, принципы компании
   ================================================================== */

/* Мегаменю. Телефон: аккордеон внутри бургер-панели — раскрывается стрелкой
   или нажатием на «Услуги». Десктоп: панель на ширину контейнера (см. ≥ 900px). */
.mega { display: none; padding: 0 0 14px 14px; }
.mega.is-open { display: block; }
.mega__groups { display: grid; gap: 14px; }
.mega__title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--on-navy-muted);
}
.mega__title .ico { flex: 0 0 auto; color: var(--red); }
.mega__list a { display: block; padding: 7px 0; font-size: 14px; line-height: 22px; color: rgba(255, 255, 255, .82); }
.mega__list a:hover { color: #fff; text-decoration: underline; }
.mega__side { display: none; }
.mega__foot { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 12px; }
.mega__foot a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; font-weight: 700; line-height: 22px; color: #fff; }
.mega__foot a:hover { text-decoration: underline; }

/* Команда по направлениям — карточки без портретов */
.team-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}
.team-card__icon { color: var(--cyan-ink); }
.team-card__title { font-size: 18px; font-weight: 700; line-height: 26px; color: var(--head); }
.team-card__exp { font-size: 12px; font-weight: 700; line-height: 18px; letter-spacing: .05em; text-transform: uppercase; color: var(--red-ink); }
.team-card__text { font-size: 15px; line-height: 25px; }
.team-card .ghost-link { margin-top: 4px; }

/* Принципы компании: тёмная карточка с фактами вместо портрета руководителя */
.director__card {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 32px 28px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-card);
  border-bottom: 3px solid var(--red);
}
.director__card .logo__mark { width: 56px; height: 56px; color: #fff; }
.director__brand { font-size: 20px; font-weight: 800; line-height: 28px; color: #fff; }
.director__facts { display: grid; gap: 14px; padding-top: 18px; border-top: 1px solid var(--navy-line); }
.director__facts li { display: grid; gap: 2px; }
.director__facts b { font-size: 30px; font-weight: 800; line-height: 36px; color: #fff; }
.director__facts span { font-size: 14px; line-height: 22px; color: var(--on-navy-muted); }

/* Страница команды */
.lw-hero__grid.lw-hero__grid--team { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.practice-list { display: grid; margin-bottom: 34px; }
.practice-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 18px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--hdr-h) + 20px);
}
.practice-row:first-child { padding-top: 6px; }
.practice-row__icon { color: var(--cyan-ink); padding-top: 2px; }
.practice-row__title { font-size: 20px; font-weight: 700; line-height: 28px; color: var(--head); }
.practice-row__exp { margin-top: 2px; font-size: 12px; font-weight: 700; line-height: 18px; letter-spacing: .05em; text-transform: uppercase; color: var(--red-ink); }
.practice-row__text { margin-top: 10px; font-size: 16px; line-height: 27px; }
.practice-row__sub { margin: 14px 0 10px; font-size: 13px; font-weight: 700; line-height: 20px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

/* Статья: знак компании вместо фото автора */
.art-author__photo--mark { display: grid; place-items: center; color: #fff; }
.art-author__photo--mark .logo__mark { width: 40px; height: 40px; }

/* ==================================================================
   4. Медиазапросы, доступность, печать
   ================================================================== */

/* ---------- ≥ 560px ---------- */
@media (min-width: 560px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .adv__grid { grid-template-columns: repeat(2, 1fr); }
  .promo__grid { grid-template-columns: repeat(2, 1fr); }
  .docs__grid { grid-template-columns: repeat(2, 1fr); }
  .cinfo__grid { grid-template-columns: repeat(2, 1fr); }
  .team__grid { grid-template-columns: repeat(2, 1fr); }
  .showcase__grid { grid-template-columns: repeat(2, 1fr); }
  .popular__grid { grid-template-columns: repeat(2, 1fr); }
  .facts__grid { grid-template-columns: repeat(2, 1fr); }

  .blog-row { grid-template-columns: 150px 1fr; gap: 20px; align-items: start; }

  .case { grid-template-columns: 190px 1fr; gap: 24px; align-items: start; padding: 26px; }
  .case__side { flex-direction: column; align-items: flex-start; gap: 10px; }
  .case__gerb .ico { width: 76px; height: 76px; }

  .rev-summary { grid-template-columns: auto 1fr; gap: 32px; }

  .blog-filter { grid-template-columns: repeat(2, 1fr); align-items: end; }
  .blog-filter__actions { grid-column: 1 / -1; }

  .nf__num { font-size: 128px; }

  .contacts-main__actions .btn { flex: 0 0 auto; }
}

/* ---------- ≥ 768px ---------- */
@media (min-width: 768px) {
  .art-author { grid-template-columns: 1fr 1px 240px; align-items: center; }
  .art-author__divider { background: var(--line); width: 1px; align-self: stretch; }

  .qr-card { justify-items: start; }
  .map-frame { height: 420px; }
}

/* ---------- ≥ 900px: перестройка шапки ---------- */
@media (min-width: 900px) {
  /* Шапка на десктопе занимает две строки: логотип с инструментами и полоса меню. */
  :root { --section-y: 80px; --hdr-h: 120px; }

  .section { padding: var(--section-y) 0; }
  .section--tight { padding: 48px 0; }

  h1, .h1 { font-size: 36px; line-height: 46px; }
  h2, .h2 { font-size: 32px; line-height: 40px; }
  .sec-head { margin-bottom: 42px; }

  .topbar { display: block; }

  .logo__mark { width: 40px; height: 40px; }
  .logo__name { font-size: 22px; line-height: 26px; }
  .logo__sub { display: block; }

  .burger { display: none; }
  .hdr__social { display: flex; }
  .hdr__sep { display: block; }
  .hdr__search-btn { display: grid; }
  .hdr__cta { display: inline-flex; }
  .nav-backdrop { display: none !important; }

  /* Первая строка — логотип и инструменты, вторая — меню во всю ширину. */
  .hdr__in { flex-wrap: wrap; min-height: 0; }
  .logo, .hdr__tools { min-height: 72px; }

  .nav {
    position: static;
    order: 3;
    flex: 0 0 100%;
    width: auto;
    overflow: visible;
    visibility: visible;
    pointer-events: auto;
    border-top: 1px solid var(--navy-line);
  }
  .nav__panel {
    position: static;
    width: auto;
    background: transparent;
    padding: 0;
    overflow: visible;
    transform: none;
    display: flex;
    justify-content: center;
  }
  .nav__list { flex-direction: row; align-items: center; justify-content: center; flex-wrap: nowrap; }
  .nav__item { border-bottom: 0; display: flex; align-items: center; }
  .nav__item--has-sub { padding-right: 2px; }

  .nav__link {
    padding: 14px 7px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
    position: relative;
  }
  .nav__link::after {
    content: "";
    position: absolute;
    left: 7px; right: 7px; bottom: 8px;
    height: 2px;
    background: var(--red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
  }
  .nav__link:hover, .nav__link.is-active { color: #fff; text-decoration: none; box-shadow: none; }
  .nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }

  .nav__toggle { position: static; width: 20px; height: 20px; }

  .subnav {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 20;
    min-width: 268px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sticky);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  }
  .subnav.is-open { opacity: 1; visibility: visible; transform: none; }
  .subnav a { padding: 9px 18px; color: var(--text); font-size: 14px; }
  .subnav a:hover { color: var(--red-ink); background: var(--bg-alt); }

  /* Мегаменю: панель на ширину контейнера под полосой меню. */
  .hdr__in { position: relative; }
  .nav__item--mega { position: static; }
  .nav__item.is-open > .nav__link::after { transform: scaleX(1); }
  .nav__item.is-open > .nav__toggle { color: #fff; }
  .mega {
    display: block;
    position: absolute;
    top: 100%;
    left: var(--gutter);
    right: var(--gutter);
    z-index: 25;
    padding: 0;
    background: #fff;
    color: var(--text);
    border-top: 3px solid var(--red);
    border-radius: 0 0 var(--radius-card) var(--radius-card);
    box-shadow: 0 18px 40px rgba(11, 26, 67, .18);
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  }
  .mega.is-open { opacity: 1; visibility: visible; transform: none; }
  .mega__in { display: grid; grid-template-columns: minmax(0, 1fr) 240px; }
  .mega__groups { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 28px; padding: 28px 30px; }
  .mega__title { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--head); }
  .mega__list a { padding: 5px 0; font-size: 14px; line-height: 21px; color: var(--text); }
  .mega__list a:hover { color: var(--red-ink); text-decoration: none; }
  .mega__side { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 28px 26px; background: var(--bg-alt); }
  .mega__side .btn { margin-top: 6px; }
  .mega__side-title { font-size: 17px; font-weight: 700; line-height: 25px; color: var(--head); }
  .mega__side-text { font-size: 14px; line-height: 22px; }
  .mega__phone { font-size: 20px; font-weight: 800; line-height: 28px; color: var(--head); }
  .mega__phone:hover { color: var(--red-ink); }
  .mega__hours { font-size: 13px; line-height: 20px; color: var(--muted); }
  .mega__foot { margin: 0; padding: 14px 30px; gap: 8px 30px; border-top: 1px solid var(--line); }
  .mega__foot a { padding: 0; color: var(--red-ink); }

  .nav__mobile-foot { display: none; }

  /* Секции */
  .hero__in { min-height: 520px; padding: 96px 15px 110px; }
  .hero__title { font-size: 44px; line-height: 52px; }
  .hero__lead { font-size: 17px; line-height: 30px; }
  .hero__arrow { display: grid; }

  .page-hero__in { padding: 42px 15px 62px; }
  .page-hero__title { font-size: 44px; line-height: 52px; }
  .page-head { padding: 34px 0 4px; }

  .intro__grid { grid-template-columns: 300px 1fr; gap: 56px; }
  .practice__grid { grid-template-columns: repeat(3, 1fr); }
  .practice__item {
    padding: 8px 30px;
    border-bottom: 0;
    border-left: 1px solid rgba(255, 255, 255, .18);
  }
  .practice__item:nth-child(3n+1) { border-left: 0; padding-left: 0; }
  .practice__grid { row-gap: 34px; }

  .showcase__grid { grid-template-columns: repeat(3, 1fr); gap: 30px; }
  .cb__grid { grid-template-columns: 1fr 1fr; gap: 50px; }
  .adv__grid { grid-template-columns: repeat(4, 1fr); }
  .promo__grid { grid-template-columns: repeat(3, 1fr); }
  .docs__grid { grid-template-columns: repeat(3, 1fr); }
  .cinfo__grid { grid-template-columns: repeat(4, 1fr); }
  .team__grid { grid-template-columns: repeat(4, 1fr); }
  .facts__grid { grid-template-columns: repeat(3, 1fr); }
  .facts--dark .fact { border-bottom: 0; border-left: 1px solid var(--navy-line); }
  .facts--dark .fact:first-child { border-left: 0; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .sitemap__grid { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .popular__grid { grid-template-columns: repeat(4, 1fr); }

  .steps { grid-template-columns: repeat(2, 1fr); column-gap: 44px; }
  .step { border-bottom: 1px solid var(--line); }
  .steps .step:nth-last-child(-n+1) { border-bottom: 0; padding-bottom: 0; }

  .director__grid { grid-template-columns: 320px 1fr; gap: 44px; }
  .lw-hero__grid { grid-template-columns: 320px 1fr; gap: 56px; }
  .scope__grid { grid-template-columns: 1fr 1fr; gap: 48px; }
  .consult__grid { grid-template-columns: 1fr 1fr; gap: 48px; }
  .consult__form { padding: 34px; }
  .form__grid--2 { grid-template-columns: repeat(2, 1fr); }
  .contacts-main__grid { grid-template-columns: 1.1fr 1fr; gap: 48px; }

  .foot__social-in { flex-direction: row; justify-content: center; gap: 26px; }
  .foot__grid { grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 40px; padding-top: 54px; padding-bottom: 54px; }
  .foot__col--nav, .foot__col--contacts { border-left: 1px solid var(--navy-line); padding-left: 40px; }
  .foot__legal-in { grid-template-columns: 1fr auto; gap: 40px; align-items: start; }
  .foot__legal-right { text-align: right; }

  .map-frame { height: 480px; }
  .nf__num { font-size: 160px; }
  .layout { padding: 48px 0 72px; }
}

/* ---------- ≥ 1100px: сайдбар ---------- */
@media (min-width: 1100px) {
  .nav__link { padding: 15px 12px; font-size: 13px; }
  .nav__link::after { left: 12px; right: 12px; bottom: 9px; }
  .layout { grid-template-columns: 1fr 370px; gap: 30px; }
  .layout__aside { position: sticky; top: calc(var(--hdr-h) + 20px); }
  .showcase__grid { gap: 50px; }
  .lead-band p { font-size: 17px; }
}

/* ---------- ≥ 1200px: все группы услуг мегаменю в одну строку ---------- */
@media (min-width: 1200px) {
  .mega__in { grid-template-columns: minmax(0, 1fr) 260px; }
  .mega__groups { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 26px 24px; }
}

/* ---------- ≥ 1300px ---------- */
@media (min-width: 1300px) {
  .nav__link { padding: 15px 16px; font-size: 13px; }
  .nav__link::after { left: 16px; right: 16px; bottom: 9px; }
  .showcase__grid { gap: 85px; }
  .hero__title { font-size: 44px; line-height: 52px; }
}

/* ---------- Доступность и движение ---------- */

@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;
  }
  .reveal { opacity: 1; transform: none; }
  .cat-card:hover .cat-card__media img { transform: none; }
}

@media (forced-colors: active) {
  .btn, .tile, .chip { forced-color-adjust: none; }
  .nav__link::after { background: LinkText; }
}

/* ---------- Печать ---------- */

@media print {
  .topbar, .hdr, .nav, .nav-backdrop, .search-panel,
  .hero__dots, .hero__arrow, .foot__social, .foot__col--nav,
  .consult, .side-card, .layout__aside, .pagination,
  .art-share, .blog-filter, .skip-link { display: none !important; }

  body { background: #fff; color: #000; font-size: 12pt; line-height: 1.5; }
  .section, .layout { padding: 12pt 0; }
  .container { max-width: 100%; padding: 0; }
  .page-hero, .photo-band, .section--navy { background: #fff !important; color: #000 !important; }
  .page-hero__media, .page-hero__veil, .photo-band__media, .photo-band__veil { display: none !important; }
  .page-hero__title, .on-dark, .on-dark h2, .on-dark h3 { color: #000 !important; text-shadow: none !important; }
  .price-table thead th, .price-table caption, .doc-table thead th { background: #ddd !important; color: #000 !important; }
  a { color: #000; text-decoration: underline; }
  .prose a::after, .txt a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  .case, .review, .promo, .legal-card, .adv { border: 1pt solid #999; break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; }
  img { max-width: 100% !important; }
}

/* Белые карточки внутри тёмных полос: возвращаем тёмный текст. */
.on-dark .qr-card,
.on-dark .qr-card p,
.on-dark .qr-card span { color: var(--text); }
.on-dark .qr-card .small { color: var(--muted); }
.on-dark .qr-card a:not(.btn):not(.soc):not(.soc-btn) { color: var(--cyan-ink); }
.on-dark .qr-card b, .on-dark .qr-card b a { color: var(--head); }
/* Мелкие даты в тёмной карточке сайдбара — приглушённый тон для тёмного фона. */
.side-card--navy .blog-mini__date,
.side-card--navy .small,
.side-card--navy .muted { color: var(--on-navy-muted); }
