/* ==========================================================================
   МГКА «Бюро адвокатов «Де-юре» — дизайн-система
   Светлый институциональный: бумажный фон, графитовый текст, тонкие линейки,
   фирменный красный #B5161E только на акцентах. Без скруглений и теней.
   ========================================================================== */

/* --- 1. Токены ----------------------------------------------------------- */

:root {
  /* Поверхности */
  --paper:      #ffffff;
  --paper-2:    #f5f3f0;   /* бумажный off-white — подложка секций */
  --paper-3:    #eae6e0;   /* плашки, hover */

  /* Текст */
  --ink:        #15171a;   /* заголовки */
  --ink-2:      #454a52;   /* основной текст */
  --ink-3:      #7c828a;   /* подписи, мета */

  /* Линии */
  --line:       #d6d2cb;   /* основная линейка */
  --line-2:     #e7e3dd;   /* вторичная */
  --line-dark:  #2c3036;   /* линейка на тёмном */

  /* Акцент */
  --accent:     #b5161e;
  --accent-700: #8d1017;
  --accent-100: #f7e8e9;

  /* Метрика */
  --wrap:       1320px;
  --gutter:     clamp(16px, 4vw, 56px);
  --rule:       1px;

  /* Типографика */
  --font-display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-text:    "Inter", "Helvetica Neue", Arial, sans-serif;

  --step-label: 0.75rem;                        /* 12px  */
  --step-small: 0.875rem;                       /* 14px  */
  --step-body:  1.0312rem;                      /* 16.5  */
  --step-lead:  clamp(1.0625rem, 0.55vw + 0.9rem, 1.3125rem);
  --step-h3:    clamp(1.1875rem, 0.5vw + 1.05rem, 1.4375rem);
  --step-h2:    clamp(1.625rem, 1.7vw + 1.1rem, 2.625rem);
  --step-h1:    clamp(2.125rem, 3.2vw + 1.2rem, 3.75rem);
  --step-hero:  clamp(2.5rem, 5.6vw + 0.9rem, 5.75rem);
}

/* --- 2. Сброс и база ----------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--font-text);
  font-size: var(--step-body);
  line-height: 1.72;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }
* { border-radius: 0 !important; box-shadow: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--ink); text-decoration-color: var(--line); text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

:target, [id] { scroll-margin-top: 110px; }

::selection { background: var(--accent); color: #fff; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 12px 20px;
  font-size: var(--step-small);
}
.skip-link:focus { left: 0; color: #fff; }

/* --- 3. Каркас ----------------------------------------------------------- */

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

.section        { padding-block: clamp(56px, 7vw, 112px); }
.section--tight { padding-block: clamp(40px, 4.5vw, 72px); }
.section--paper { background: var(--paper-2); }
.section--ink   { background: var(--ink); color: #b9bec6; }
.section--ink h2, .section--ink h3 { color: #fff; }

.rule-top    { border-top: var(--rule) solid var(--line); }
.rule-bottom { border-bottom: var(--rule) solid var(--line); }

/* --- 4. Типографические утилиты ------------------------------------------ */

.label {
  font-family: var(--font-display);
  font-size: var(--step-label);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
}
.label::before {
  content: "";
  width: 22px; height: 3px;
  background: var(--accent);
  flex: none;
}
.label--plain::before { display: none; }
.section--ink .label { color: #8b9098; }

.display {
  font-family: var(--font-display);
  font-size: var(--step-hero);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.035em;
  word-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

h1, .h1 { font-size: var(--step-h1); }
h2, .h2 { font-size: var(--step-h2); }
h3, .h3 { font-size: var(--step-h3); letter-spacing: -0.015em; }

.lead {
  font-size: var(--step-lead);
  line-height: 1.58;
  color: var(--ink-2);
}
.muted  { color: var(--ink-3); }
.small  { font-size: var(--step-small); line-height: 1.6; }
.nums   { font-variant-numeric: tabular-nums; }
/* Защита от переноса по дефису внутри «Де-юре» и подобных сочетаний */
.nb     { white-space: nowrap; }

h1, h2, h3, h4, .display { hyphens: manual; }

.accent-rule {
  width: 72px; height: 4px;
  background: var(--accent);
  border: 0;
  margin: 28px 0;
}

/* Длинный юридический текст — комфортная мера строки */
.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.2em; margin-bottom: 0.7em; }
.prose h3 { margin-top: 1.9em; margin-bottom: 0.55em; }
.prose > :first-child { margin-top: 0; }
.prose ul { margin: 0 0 1.3em; padding: 0; list-style: none; }
.prose ul li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 0.65em;
}
.prose ul li::before {
  content: "";
  position: absolute; left: 0; top: 0.72em;
  width: 10px; height: 2px; background: var(--accent);
}
.prose ol { margin: 0 0 1.3em; padding-left: 1.3em; }
.prose ol li { margin-bottom: 0.65em; padding-left: 0.3em; }
.prose ol li::marker { color: var(--accent); font-weight: 600; }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border: var(--rule) solid transparent;
  cursor: pointer;
  transition: background-color .16s, color .16s, border-color .16s;
}
.btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn--primary:hover { background: var(--accent-700); border-color: var(--accent-700); color: #fff; }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }

.btn--light { background: transparent; color: #fff; border-color: #4a505a; }
.btn--light:hover { background: #fff; color: var(--ink); border-color: #fff; }

.btn--sm { padding: 11px 20px; font-size: var(--step-label); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* Текстовая ссылка со стрелкой */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 5px;
}
.arrow-link::after { content: "→"; transition: transform .16s; }
.arrow-link:hover { color: var(--accent); }
.arrow-link:hover::after { transform: translateX(4px); }

/* --- 6. Шапка ------------------------------------------------------------ */

.utility {
  background: var(--paper-2);
  border-bottom: var(--rule) solid var(--line);
  font-size: var(--step-label);
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.utility__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 40px;
}
.utility__cities { display: flex; gap: 8px; text-transform: uppercase; letter-spacing: 0.12em; }
.utility__cities span:not(:last-child)::after { content: " ·"; color: var(--line); }
.utility__right { display: flex; align-items: center; gap: 22px; }
.utility a { text-decoration: none; color: var(--ink-2); }
.utility a:hover { color: var(--accent); }
.utility__lang { font-weight: 600; letter-spacing: 0.1em; }

.masthead {
  position: sticky; top: 0; z-index: 96;
  background: var(--paper);
  border-bottom: var(--rule) solid var(--line);
}
.masthead__row {
  display: flex; align-items: center; gap: clamp(20px, 3vw, 48px);
  min-height: 86px;
}
.brand { flex: none; display: block; line-height: 0; }
.brand img { width: clamp(118px, 11vw, 152px); height: auto; }

.nav { margin-left: auto; }
.nav__list {
  display: flex; align-items: center; gap: clamp(18px, 2vw, 34px);
  list-style: none; margin: 0; padding: 0;
}
.nav__link {
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
  padding: 8px 0;
  display: inline-block;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav__link:hover { color: var(--accent); }
.nav__link[aria-current="page"] { border-bottom-color: var(--accent); }

.masthead__cta { flex: none; }

.burger {
  display: none;
  margin-left: auto;
  width: 46px; height: 46px;
  border: var(--rule) solid var(--line);
  background: var(--paper);
  cursor: pointer;
  padding: 0;
  position: relative;
}
.burger span, .burger::before, .burger::after {
  content: ""; position: absolute; left: 12px; right: 12px; height: 2px;
  background: var(--ink); transition: transform .18s, opacity .18s;
}
.burger::before { top: 15px; }
.burger span   { top: 22px; }
.burger::after { top: 29px; }
.burger[aria-expanded="true"]::before { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span    { opacity: 0; }
.burger[aria-expanded="true"]::after  { transform: translateY(-7px) rotate(-45deg); }

/* --- 7. Герой ------------------------------------------------------------ */

.hero { border-bottom: var(--rule) solid var(--line); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  padding-block: clamp(56px, 8vw, 116px);
  align-items: end;
}
.hero__title { margin-bottom: 0; }
.hero__title em {
  font-style: normal;
  color: var(--accent);
}
.hero__lead { margin-top: 32px; max-width: 46ch; }
.hero__actions { margin-top: 38px; }

.hero__aside {
  border-left: var(--rule) solid var(--line);
  padding-left: clamp(24px, 3vw, 44px);
}
.hero__aside dl { margin: 0; display: grid; gap: 26px; }
.hero__aside dt {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.hero__aside dd {
  margin: 8px 0 0;
  font-size: var(--step-small);
  color: var(--ink-3);
  line-height: 1.45;
  max-width: 24ch;
}

/* --- 8. Полоса показателей ----------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: var(--rule) solid var(--line);
  border-left: var(--rule) solid var(--line);
}
.stats__item {
  border-right: var(--rule) solid var(--line);
  border-bottom: var(--rule) solid var(--line);
  padding: clamp(24px, 3vw, 40px);
}
.stats__num {
  font-family: var(--font-display);
  font-size: clamp(2.125rem, 3.4vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  display: block;
}
.stats__num sup { font-size: 0.45em; color: var(--accent); top: -0.9em; }
.stats__cap {
  margin-top: 14px;
  font-size: var(--step-small);
  color: var(--ink-3);
  line-height: 1.45;
}

/* Варианты полосы показателей для страниц с тремя и двумя числами */
.stats--3 { grid-template-columns: repeat(3, 1fr); }
.stats--2 { grid-template-columns: repeat(2, 1fr); }

/* Заглушка: раздел, материал для которого ещё готовится */
.stub {
  border: var(--rule) solid var(--line);
  border-left: 4px solid var(--accent);
  background: var(--paper-2);
  padding: clamp(26px, 3vw, 44px);
}
.stub h2 { margin: 0 0 14px; }
.stub p  { color: var(--ink-2); max-width: 62ch; }
.stub .btn-row { margin-top: 28px; }

/* --- 9. Рейтинги (типографикой, без «золотых венков») -------------------- */

.ratings {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-left: var(--rule) solid var(--line);
}
.ratings__item {
  border-right: var(--rule) solid var(--line);
  padding: 26px clamp(14px, 1.6vw, 24px);
  display: flex; flex-direction: column; gap: 8px;
  min-height: 132px;
  text-decoration: none;
}
.ratings__item:hover { background: var(--paper); }
.section--paper .ratings__item:hover { background: var(--paper); }
.ratings__name {
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.ratings__rank {
  margin-top: auto;
  font-size: var(--step-label);
  line-height: 1.4;
  color: var(--ink-3);
  letter-spacing: 0.01em;
}
.ratings__item:hover .ratings__name { color: var(--accent); }

/* --- 10. Указатель практик ----------------------------------------------- */

.index-list { border-top: var(--rule) solid var(--line); }
.index-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) minmax(0, 1.05fr) 44px;
  gap: clamp(16px, 2.5vw, 40px);
  align-items: baseline;
  padding: clamp(22px, 2.4vw, 32px) 0;
  border-bottom: var(--rule) solid var(--line);
  text-decoration: none;
  transition: background-color .15s;
}
.index-item:hover { background: var(--paper-2); }
.section--paper .index-item:hover { background: var(--paper); }
.index-item__num {
  font-family: var(--font-display);
  font-size: var(--step-label);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.index-item__title {
  font-family: var(--font-display);
  font-size: var(--step-h3);
  font-weight: 700;
  letter-spacing: -0.018em;
  color: var(--ink);
  line-height: 1.22;
}
.index-item:hover .index-item__title { color: var(--accent); }
.index-item__desc { font-size: var(--step-small); color: var(--ink-3); line-height: 1.55; }
.index-item__go {
  justify-self: end;
  font-size: 1.125rem;
  color: var(--ink-3);
  transition: transform .16s, color .16s;
}
.index-item:hover .index-item__go { color: var(--accent); transform: translateX(5px); }

/* --- 11. Лента событий --------------------------------------------------- */

.filters {
  display: flex; flex-wrap: wrap; gap: 0;
  border: var(--rule) solid var(--line);
  margin-bottom: 8px;
}
.filters__btn {
  appearance: none;
  background: transparent;
  border: 0;
  border-right: var(--rule) solid var(--line);
  padding: 13px 22px;
  font-family: var(--font-display);
  font-size: var(--step-label);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
.filters__btn:last-child { border-right: 0; }
.filters__btn:hover { color: var(--ink); background: var(--paper-2); }
.filters__btn[aria-pressed="true"] { background: var(--ink); color: #fff; }

.feed { border-top: var(--rule) solid var(--line); }
.feed__item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: clamp(16px, 3vw, 48px);
  padding: clamp(24px, 2.6vw, 36px) 0;
  border-bottom: var(--rule) solid var(--line);
  text-decoration: none;
}
.feed__item:hover { background: var(--paper-2); }
.feed__meta { display: flex; flex-direction: column; gap: 10px; }
.feed__date {
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  border: var(--rule) solid var(--accent);
  padding: 4px 9px;
  line-height: 1.2;
}
.tag--ink { color: var(--ink-3); border-color: var(--line); }
.feed__title {
  font-family: var(--font-display);
  font-size: var(--step-h3);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.26;
  color: var(--ink);
  margin: 0 0 12px;
}
.feed__item:hover .feed__title { color: var(--accent); }
.feed__excerpt { font-size: var(--step-small); color: var(--ink-3); line-height: 1.6; margin: 0; }

/* --- 12. Команда --------------------------------------------------------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 2.4vw, 34px) clamp(18px, 2vw, 28px);
}
.person { text-decoration: none; display: block; }
.person__photo {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--paper-3);
  border-bottom: 3px solid transparent;
  transition: border-color .18s;
}
.person__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.04);
  transition: filter .25s, transform .4s;
}
.person:hover .person__photo { border-bottom-color: var(--accent); }
.person:hover .person__photo img { filter: grayscale(0); transform: scale(1.03); }
.person__name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 18px 0 6px;
  line-height: 1.25;
}
.person:hover .person__name { color: var(--accent); }
.person__role { font-size: var(--step-small); color: var(--ink-3); line-height: 1.45; margin: 0; }

/* --- 13. Карточка адвоката ----------------------------------------------- */

.profile {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: start;
}
.profile__media { position: sticky; top: 112px; }
.profile__media img { width: 100%; filter: grayscale(1) contrast(1.04); }
.profile__facts {
  margin: 28px 0 0;
  border-top: var(--rule) solid var(--line);
}
.profile__facts div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 13px 0;
  border-bottom: var(--rule) solid var(--line-2);
  font-size: var(--step-small);
}
.profile__facts dt { color: var(--ink-3); }
.profile__facts dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; }

/* Награды / регалии — плотный список */
.awards { border-top: var(--rule) solid var(--line); margin-top: 8px; }
.awards li {
  list-style: none;
  padding: 15px 0 15px 26px;
  border-bottom: var(--rule) solid var(--line-2);
  font-size: var(--step-small);
  color: var(--ink-2);
  position: relative;
  line-height: 1.55;
}
.awards li::before {
  content: "";
  position: absolute; left: 0; top: 1.5em;
  width: 12px; height: 2px; background: var(--accent);
}
.awards { padding: 0; margin-bottom: 0; }
.awards li strong { color: var(--ink); font-weight: 600; }

/* --- 14. Шапка внутренней страницы --------------------------------------- */

.pagehead {
  background: var(--paper-2);
  border-bottom: var(--rule) solid var(--line);
  padding-block: clamp(32px, 4vw, 64px) clamp(36px, 4.5vw, 72px);
}
.crumbs {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-size: var(--step-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 28px;
}
.crumbs a { text-decoration: none; color: var(--ink-3); }
.crumbs a:hover { color: var(--accent); }
.crumbs span::before { content: "/"; margin-right: 10px; color: var(--line); }
.pagehead__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: end;
}
.pagehead__lead { font-size: var(--step-lead); line-height: 1.55; color: var(--ink-2); }

/* --- 15. Таблицы (стоимость) --------------------------------------------- */

.table-scroll { overflow-x: auto; }
table.rates {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step-small);
  min-width: 620px;
}
table.rates caption {
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--step-h3);
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
  padding-bottom: 20px;
}
table.rates th, table.rates td {
  text-align: left;
  padding: 16px 20px 16px 0;
  border-bottom: var(--rule) solid var(--line-2);
  vertical-align: top;
}
table.rates thead th {
  font-family: var(--font-display);
  font-size: var(--step-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 12px;
}
table.rates td:last-child, table.rates th:last-child {
  text-align: right;
  padding-right: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
table.rates tbody td:last-child { color: var(--ink); font-weight: 600; }
table.rates tbody tr:hover { background: var(--paper-2); }
table.rates .rates__group td {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  background: var(--paper-2);
  padding: 14px 20px 14px 16px;
  border-bottom: var(--rule) solid var(--line);
}

.note-list {
  counter-reset: n;
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: var(--rule) solid var(--line);
}
.note-list li {
  counter-increment: n;
  position: relative;
  padding: 16px 0 16px 46px;
  border-bottom: var(--rule) solid var(--line-2);
  font-size: var(--step-small);
  color: var(--ink-2);
  line-height: 1.6;
}
.note-list li::before {
  content: counter(n);
  position: absolute; left: 0; top: 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-label);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* --- 16. Карточки-плитки (пакеты, офисы, документы) ---------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  border-top: var(--rule) solid var(--line);
  border-left: var(--rule) solid var(--line);
}
.card {
  border-right: var(--rule) solid var(--line);
  border-bottom: var(--rule) solid var(--line);
  padding: clamp(26px, 3vw, 40px);
  display: flex; flex-direction: column;
  background: var(--paper);
}
.card__title {
  font-family: var(--font-display);
  font-size: var(--step-h3);
  font-weight: 700;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0 0 14px;
}
.card__body { font-size: var(--step-small); color: var(--ink-2); line-height: 1.6; }
.card__foot { margin-top: auto; padding-top: 24px; }
.card__price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* --- 17. Обращение заведующего ------------------------------------------- */

.letter {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 68px);
  align-items: start;
}
.letter__photo img { width: 100%; filter: grayscale(1) contrast(1.05); }
.letter__quote {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 2.1vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.22;
  color: var(--ink);
  margin: 0 0 30px;
}
.letter__sign {
  margin-top: 32px;
  padding-top: 24px;
  border-top: var(--rule) solid var(--line);
}
.letter__sign strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.letter__sign span { font-size: var(--step-small); color: var(--ink-3); }

/* --- 18. Принципы (три колонки с линейками) ------------------------------ */

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 2px solid var(--ink);
}
.principle {
  padding: clamp(26px, 3vw, 40px) clamp(24px, 2.6vw, 40px);
  border-right: var(--rule) solid var(--line);
}
.principle:first-child { padding-left: 0; }
.principle:last-child  { border-right: 0; padding-right: 0; }
.principle__num {
  font-family: var(--font-display);
  font-size: var(--step-label);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--accent);
  display: block;
  margin-bottom: 18px;
}
.principle h3 { margin-bottom: 12px; }
.principle p { font-size: var(--step-small); color: var(--ink-3); line-height: 1.6; }

/* --- 19. Форма ----------------------------------------------------------- */

.form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field label {
  font-family: var(--font-display);
  font-size: var(--step-label);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field input, .field textarea {
  font-family: var(--font-text);
  font-size: var(--step-body);
  color: var(--ink);
  background: var(--paper);
  border: var(--rule) solid var(--line);
  padding: 14px 16px;
  width: 100%;
}
.field input:focus, .field textarea:focus { border-color: var(--ink); outline-offset: 0; }
.field textarea { min-height: 148px; resize: vertical; }

.consent {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: var(--step-small);
  color: var(--ink-3);
  line-height: 1.5;
}
.consent input { margin-top: 4px; flex: none; width: 18px; height: 18px; accent-color: var(--accent); }

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

.offices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 2px solid var(--ink);
}
.office {
  border-right: var(--rule) solid var(--line);
  border-bottom: var(--rule) solid var(--line);
  padding: clamp(24px, 2.8vw, 36px) clamp(24px, 2.6vw, 36px);
}
.office:first-child { padding-left: 0; }
.office:last-child  { border-right: 0; padding-right: 0; }
.office__city {
  font-family: var(--font-display);
  font-size: var(--step-h3);
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
  letter-spacing: -0.018em;
}
.office__kind {
  font-size: var(--step-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.office p { font-size: var(--step-small); color: var(--ink-2); line-height: 1.6; }
.office a { text-decoration: none; }

.contact-lines { border-top: var(--rule) solid var(--line); margin-top: 0; }
.contact-lines div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  padding: 15px 0;
  border-bottom: var(--rule) solid var(--line-2);
  font-size: var(--step-small);
}
.contact-lines dt { color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.08em; font-size: var(--step-label); padding-top: 2px; }
.contact-lines dd { margin: 0; color: var(--ink); }
.contact-lines a { text-decoration: none; font-weight: 600; }

/* --- 21. Клиенты --------------------------------------------------------- */

.clients {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  border-top: var(--rule) solid var(--line);
  border-left: var(--rule) solid var(--line);
}
.clients__cell {
  border-right: var(--rule) solid var(--line);
  border-bottom: var(--rule) solid var(--line);
  min-height: 132px;
  display: grid; place-items: center;
  padding: 26px;
  background: var(--paper);
}
.clients__cell img {
  max-height: 54px; width: auto;
  filter: grayscale(1);
  opacity: 0.62;
  transition: filter .2s, opacity .2s;
}
.clients__cell:hover img { filter: grayscale(0); opacity: 1; }
.clients__cell span {
  font-family: var(--font-display);
  font-size: var(--step-small);
  font-weight: 600;
  color: var(--ink-3);
  text-align: center;
  line-height: 1.35;
}

/* --- 22. Призыв к действию ----------------------------------------------- */

.cta-band {
  background: var(--ink);
  color: #b9bec6;
  padding-block: clamp(48px, 6vw, 88px);
}
.cta-band__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { margin-top: 18px; max-width: 52ch; color: #9aa0a8; }
.cta-band .btn-row { justify-content: flex-end; }

/* --- 23. Подвал ---------------------------------------------------------- */

.footer { background: var(--ink); color: #8b9098; font-size: var(--step-small); }
.footer a { color: #b9bec6; text-decoration: none; }
.footer a:hover { color: #fff; }
.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 56px);
  padding-block: clamp(44px, 5vw, 76px);
}
.footer__brand img { width: 150px; margin-bottom: 24px; }
.footer__brand p { color: #8b9098; line-height: 1.6; max-width: 34ch; }
.footer__col h4 {
  font-size: var(--step-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 20px;
  font-weight: 600;
}
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer__bottom {
  border-top: var(--rule) solid var(--line-dark);
  padding-block: 26px;
  display: flex; flex-wrap: wrap; gap: 16px 32px;
  align-items: center; justify-content: space-between;
  font-size: var(--step-label);
  letter-spacing: 0.02em;
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 24px; }

/* --- 24. Адаптив --------------------------------------------------------- */

@media (max-width: 1080px) {
  .hero__grid,
  .pagehead__grid,
  .cta-band__grid { grid-template-columns: 1fr; }
  .hero__aside { border-left: 0; border-top: var(--rule) solid var(--line); padding-left: 0; padding-top: 34px; }
  .hero__aside dl { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .cta-band .btn-row { justify-content: flex-start; }
  .stats, .stats--3 { grid-template-columns: repeat(2, 1fr); }
  .ratings { grid-template-columns: repeat(3, 1fr); }
  .ratings__item { border-bottom: var(--rule) solid var(--line); }
  .team-grid { grid-template-columns: repeat(3, 1fr); }
  .profile { grid-template-columns: 1fr; }
  .profile__media { position: static; max-width: 340px; }
  .footer__top { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav { position: fixed; inset: 0 0 0 auto; width: min(360px, 88vw);
         background: var(--paper); border-left: var(--rule) solid var(--line);
         transform: translateX(100%); transition: transform .22s ease;
         padding: 112px 28px 40px; overflow-y: auto; overscroll-behavior: contain;
         z-index: 95; }
  .nav[data-open="true"] { transform: translateX(0); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link { font-size: 1.125rem; padding: 16px 0; border-bottom: var(--rule) solid var(--line-2); width: 100%; }
  .nav__link[aria-current="page"] { color: var(--accent); border-bottom-color: var(--line-2); }
  /* Выше выезжающей панели — иначе крестик оказывается под ней */
  .burger { display: block; position: relative; z-index: 97; }
  .masthead__cta { display: none; }
  .masthead__row { min-height: 72px; }
  .index-item { grid-template-columns: 44px minmax(0, 1fr) 28px; }
  .index-item__desc { grid-column: 2 / 3; }
  .letter { grid-template-columns: 1fr; }
  .letter__photo { max-width: 260px; }
  .principles { grid-template-columns: 1fr; }
  .principle { border-right: 0; border-bottom: var(--rule) solid var(--line);
               padding-left: 0; padding-right: 0; }
  .principle:last-child { border-bottom: 0; }
  .offices { grid-template-columns: 1fr; }
  .office { border-right: 0; padding-left: 0; padding-right: 0; }
}

@media (max-width: 680px) {
  .utility__cities { display: none; }
  .utility__row { justify-content: flex-end; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .ratings { grid-template-columns: repeat(2, 1fr); }
  .hero__aside dl { grid-template-columns: 1fr; gap: 20px; }
  .feed__item { grid-template-columns: 1fr; gap: 14px; }
  .feed__meta { flex-direction: row; align-items: center; gap: 14px; }
  .footer__top { grid-template-columns: 1fr; }
  .contact-lines div { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 430px) {
  .stats, .stats--3, .stats--2 { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .btn { width: 100%; }
}

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