/* ==================================================================
   GroupInfo / i-groups.ru — таблица стилей
   1. Токены и сброс      2. Типографика      3. Контейнер и секции
   4. Кнопки и ссылки     5. Формы            6. Шапка и футер
   7. Секции              8. Медиазапросы и доступность
   ================================================================== */

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

:root {
  /* Основа */
  --white:      #FFFFFF;
  --tile:       #F5F3F1;
  --hairline:   #E8E4E0;
  --hairline-2: #D6D1CB;
  --hairline-3: #EDEAE6;

  /* Текст */
  --ink:        #262626;
  --body:       #696969;
  --muted:      #6B6E70;   /* 5.1:1 на белом и 4.6:1 на --tile: даты, сроки, роли, крошки */
  --lead:       #484A4C;

  /* Акценты */
  --coral:      #E4694F;   /* только заливки и иконки: с белым даёт 3.2:1 */
  --coral-ink:  #A44A16;   /* тот же оттенок для ТЕКСТА: 5.9:1 на белом, 5.3:1 на --tile */
  --rust:       #B2561B;
  --brown:      #562E20;
  --graphite:   #283236;

  /* Футер */
  --ftr-top:    #514F4D;
  --ftr-bot:    #383633;
  --ftr-head:   #F7EEE3;
  --ftr-link:   #C9C3BB;
  --ftr-meta:   #A9A49E;
  --ftr-border: #7A7874;

  /* Тёплые кнопки */
  --sand:       #EADDC5;
  --sand-ink:   #3A2A1E;
  --cream:      #F7EEE3;

  /* Шрифты */
  --f-sans: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  /* Метрика */
  --wrap:    1360px;
  --pad:     40px;
  --gap:     32px;
  --radius:  3px;
  --sec-y:   96px;
  --head-gap: 40px;
  --ease:    180ms ease;
}

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

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

body {
  margin: 0;
  background: var(--white);
  color: var(--body);
  font-family: var(--f-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

ul, ol { margin: 0; padding: 0; list-style: none; }
figure, blockquote { margin: 0; }

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

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

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

.visually-hidden {
  position: absolute !important;
  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: 8px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--white);
  padding: 10px 18px; font-size: 14px; font-weight: 600;
  transition: top var(--ease);
}
.skip-link:focus { top: 8px; }

/* ---------- 2. Типографика ---------- */
h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1, .h1 { font-size: clamp(34px, 4.4vw, 58px); line-height: 1.06; font-weight: 800; }
h2, .h2 { font-size: clamp(26px, 3vw, 40px);  line-height: 1.12; }
h3, .h3 { font-size: 20px; line-height: 1.25; }
h4       { font-size: 17px; line-height: 1.3; }

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

.lead {
  font-size: 18px;
  line-height: 1.5;
  color: var(--lead);
  font-weight: 400;
}

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}
.eyebrow--light { color: var(--white); }
.eyebrow--muted { color: var(--muted); }

.num, .price, .metric__v { font-variant-numeric: tabular-nums; }

.accent { color: var(--coral); }

/* ---------- 3. Контейнер и секции ---------- */
.container {
  width: 100%;
  max-width: calc(var(--wrap) + var(--pad) * 2);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: var(--sec-y); }
.section--white    { background: var(--white); }
.section--tile     { background: var(--tile); }
.section--brown    { background: var(--brown);    color: var(--cream); }
.section--graphite { background: var(--graphite); color: #D8DCDE; }
.section--brown h2, .section--brown h3,
.section--graphite h2, .section--graphite h3 { color: var(--white); }
.section--tight { padding-block: 64px; }

.section__head { margin-bottom: var(--head-gap); max-width: 780px; }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head p.lead { margin-top: 16px; }

.grid { display: grid; gap: var(--gap); }
.grid--3    { grid-template-columns: repeat(3, 1fr); }
.grid--4    { grid-template-columns: repeat(4, 1fr); }
.grid--2    { grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid--tight{ grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid--split{ grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }

.hr { border: 0; border-top: 1px solid var(--hairline); margin: 0; }

/* ---------- 4. Кнопки и ссылки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-align: center;
  white-space: nowrap;
  transition: background-color var(--ease), color var(--ease), border-color var(--ease);
}
.btn--sm { height: 40px; padding: 0 20px; font-size: 14px; }
.btn--wide { width: 100%; }

.btn--primary { background: var(--ink);  color: var(--white); }
.btn--primary:hover { background: var(--coral); }

.btn--onphoto { background: var(--white); color: var(--ink); }
.btn--onphoto:hover { background: var(--coral); color: var(--white); }

.btn--warm { background: var(--sand); color: var(--sand-ink); }
.btn--warm:hover { background: var(--cream); }

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

.btn:active { transform: translateY(1px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  transition: color var(--ease);
}
.link-arrow:hover { color: var(--coral); }
/* Внутри кликабельной карточки стрелка — не ссылка (вложенный <a> ломает вёрстку),
   поэтому подсветку ей даёт наведение на саму карточку. */
a.card:hover .link-arrow { color: var(--coral); }
.link-arrow .ic { flex: 0 0 auto; }
.section--brown .link-arrow,
.section--graphite .link-arrow { color: var(--white); }

/* Круглые стрелки каруселей */
.car-nav { display: flex; gap: 8px; }
.car-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--hairline-2);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  transition: border-color var(--ease), color var(--ease);
}
.car-btn:hover:not(:disabled) { border-color: var(--ink); color: var(--coral); }
.car-btn:disabled { border-color: var(--hairline-3); color: var(--hairline-2); cursor: default; }

/* Бейджи и чипы */
.badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: var(--radius);
  background: var(--rust);
  color: var(--white);
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
}
.badge--float { position: absolute; top: 12px; left: 12px; z-index: 2; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 40px;
  display: inline-flex; align-items: center;
  padding: 0 18px;
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 14px; font-weight: 500;
  color: var(--ink);
  transition: background-color var(--ease), color var(--ease), border-color var(--ease);
}
.chip:hover { border-color: var(--ink); }
.chip.is-active, .chip[aria-pressed="true"] {
  background: var(--rust); border-color: var(--rust); color: var(--white);
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  background: var(--tile);
  border-radius: var(--radius);
  font-size: 12px;
  font-family: var(--f-mono);
  letter-spacing: 0.06em;
  color: var(--body);
  transition: background-color var(--ease), color var(--ease);
}
a.tag:hover { background: var(--ink); color: var(--white); }

/* Звёзды */
.stars { display: inline-flex; gap: 2px; color: var(--muted); }
.stars__i--on { color: var(--coral); }

/* ---------- 5. Формы ---------- */
.field { display: block; margin-bottom: 16px; }
.field__label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.input, .textarea, .select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  background: var(--white);
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 15px;
  transition: border-color var(--ease);
}
.textarea { height: auto; min-height: 118px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:hover, .textarea:hover { border-color: var(--hairline); }
.input:focus, .textarea:focus { outline: none; border-color: var(--ink); }

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--body);
  cursor: pointer;
}
.check input {
  flex: 0 0 auto;
  width: 17px; height: 17px;
  margin: 2px 0 0;
  accent-color: var(--rust);
}
.check a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.check a:hover { color: var(--coral); }

.form-note { font-size: 12px; color: var(--muted); line-height: 1.45; }

/* ================= 6. Шапка ================= */
.hdr { position: sticky; top: 0; z-index: 100; background: var(--white); }

/* Верхняя полоса-анонс */
.hdr-top {
  height: 44px;
  background: var(--rust);
  color: var(--white);
  font-size: 13px;
  overflow: hidden;
}
.hdr-top__in {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.hdr-top p { margin: 0; }
.hdr-top__left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.hdr-top__dashes { letter-spacing: 0.1em; opacity: .75; flex: 0 0 auto; }
.hdr-top__promo {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
  transition: opacity var(--ease);
  white-space: nowrap;
}
.hdr-top__promo:hover { opacity: .82; }
.hdr-top__right { display: flex; gap: 24px; flex: 0 0 auto; }
.hdr-top__right a { opacity: .9; transition: opacity var(--ease); white-space: nowrap; }
.hdr-top__right a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }

/* Основная полоса */
.hdr-main { background: var(--white); border-bottom: 1px solid var(--hairline); }
.hdr-main__in {
  height: 60px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.wordmark {
  flex: 0 0 auto;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.04em;
  color: var(--ink);
  transition: color var(--ease);
}
.wordmark:hover { color: var(--coral); }
.wordmark--sm { font-size: 17px; }

/* Навигация */
.nav { flex: 1 1 auto; min-width: 0; }
.nav__list { display: flex; align-items: center; gap: 16px; }
.nav__li { position: static; }
.nav__a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 60px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}
.nav__a:hover { color: var(--coral); }
.nav__a--sale { color: var(--rust); font-weight: 600; }
.nav__a--sale:hover { color: var(--coral); }
.nav__a.is-active { border-bottom-color: var(--coral); }
.nav__caret { transition: transform var(--ease); }
.nav__a[aria-expanded="true"] .nav__caret { transform: rotate(180deg); }

/* Мега-меню */
.mega {
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  background: var(--white);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  z-index: 90;
}
.mega__in {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
  padding-block: 34px 38px;
}
.mega__list { display: grid; gap: 4px; }
.mega__list a {
  display: block;
  padding: 9px 0;
  border-top: 1px solid var(--hairline);
  transition: color var(--ease);
}
.mega__list li:first-child a { border-top: 0; }
.mega__list a:hover .mega__t { color: var(--coral); }
.mega__t { display: block; font-size: 16px; font-weight: 700; color: var(--ink); transition: color var(--ease); }
.mega__d { display: block; font-size: 13px; color: var(--body); margin-top: 2px; }

/* Правый блок */
/* Телефон в шапке появляется только на очень широких экранах: при восьми
   русских пунктах меню он иначе наезжает на последний пункт (замерено). */
.hdr-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; }
.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  color: var(--ink);
  border-radius: var(--radius);
  transition: color var(--ease), background-color var(--ease);
}
.icon-btn:hover { color: var(--coral); background: var(--tile); }
.hdr-phone {
  display: none;
  font-size: 15px; font-weight: 700;
  color: var(--ink); white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: color var(--ease);
}
.hdr-phone:hover { color: var(--coral); }

/* Поиск */
.search-panel { border-bottom: 1px solid var(--hairline); background: var(--tile); }
.search-form { display: flex; gap: 10px; padding-block: 16px; }
.search-form input {
  flex: 1 1 auto;
  height: 44px; padding: 0 14px;
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 15px;
}
.search-form input:focus { outline: none; border-color: var(--ink); }

/* Бургер и drawer */
.burger { display: none; width: 40px; height: 40px; place-items: center; color: var(--ink); }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(340px, 88vw);
  height: 100vh;
  height: 100dvh;
  z-index: 130;
  background: var(--white);
  border-left: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 260ms ease;
}
.drawer.is-open { transform: translateX(0); }
.drawer__head {
  flex: 0 0 auto;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: 20px;
  border-bottom: 1px solid var(--hairline);
}
.drawer__nav { flex: 1 1 auto; overflow-y: auto; padding: 8px 20px; }
.drawer__a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 17px; font-weight: 600; color: var(--ink);
  transition: color var(--ease);
}
.drawer__a:hover { color: var(--coral); }
.drawer__a--sale { color: var(--rust); }
.drawer__a.is-active { color: var(--coral); }
.drawer__foot {
  flex: 0 0 auto;
  padding: 20px;
  border-top: 1px solid var(--hairline);
  background: var(--tile);
}
.drawer__phone { display: block; font-size: 20px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.drawer__hours { margin: 4px 0 14px; font-size: 13px; color: var(--body); }
.drawer__cta { width: 100%; }

.drawer-scrim {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(38, 38, 38, .45);
  opacity: 0;
  transition: opacity 260ms ease;
}
.drawer-scrim.is-open { opacity: 1; }
body.is-locked { overflow: hidden; }

/* ================= Футер ================= */
.ftr { margin-top: 0; }

.ftr-top { background: var(--ftr-top); padding-block: 48px; }
.ftr-top__in {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
}
.ftr-sub { flex: 0 1 600px; max-width: 600px; }
.ftr-sub__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ftr-sub__form input {
  height: 46px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid var(--ftr-border);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 15px;
  transition: border-color var(--ease);
}
.ftr-sub__form input::placeholder { color: var(--ftr-link); }
.ftr-sub__form input:hover { border-color: var(--ftr-link); }
.ftr-sub__form input:focus { outline: none; border-color: var(--cream); }
.ftr-sub__btn {
  width: 100%;
  height: 48px;
  margin-top: 12px;
  background: var(--ftr-head);
  color: var(--ftr-bot);
}
.ftr-sub__btn:hover { background: var(--white); }
/* Подтверждение отправки в подвале: .form-note набран цветом --muted, который
   рассчитан на светлый фон, — на тёмном ярусе берём светлый токен. */
.ftr-sub__done { margin: 12px 0 0; color: var(--ftr-head); font-size: 13px; }
.ftr-sub__note {
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.5;
  /* --ftr-meta на светло-сером --ftr-top даёт 3.3:1 — берём более светлый --ftr-link (4.7:1) */
  color: var(--ftr-link);
}
.ftr-sub__note a { color: var(--ftr-head); text-decoration: underline; text-underline-offset: 3px; }
.ftr-sub__note a:hover { color: var(--white); }

.ftr-social { display: flex; gap: 12px; flex: 0 0 auto; }
.ftr-social a {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--ftr-border);
  border-radius: var(--radius);
  color: var(--ftr-link);
  transition: color var(--ease), border-color var(--ease);
}
.ftr-social a:hover { color: var(--white); border-color: var(--ftr-link); }

.ftr-bottom { background: var(--ftr-bot); padding: 40px 0 32px; color: var(--ftr-link); }
.ftr-cols {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--gap);
}
.ftr-col__head {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ftr-head);
  cursor: default;
  pointer-events: none;   /* на десктопе колонка не сворачивается по клику */
}
.ftr-col__head::-webkit-details-marker { display: none; }
.ftr-col__caret { display: none; }
.ftr-col__list { display: grid; gap: 9px; }
.ftr-col__list a {
  font-size: 14px;
  color: var(--ftr-link);
  transition: color var(--ease);
}
.ftr-col__list a:hover { color: var(--white); }

.ftr-legal {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid #4A4844;
  font-size: 13px;
  color: var(--ftr-meta);
  line-height: 1.6;
}
.ftr-legal p { margin: 0; }
.ftr-legal__left a { margin-left: 18px; text-decoration: underline; text-underline-offset: 3px; }
.ftr-legal__left a:hover { color: var(--white); }
.ftr-legal__right { text-align: right; font-variant-numeric: tabular-nums; }

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

/* --- Хлебные крошки --- */
.crumbs { padding-block: 18px; background: var(--white); }
.crumbs__list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.crumbs__i { display: inline-flex; align-items: center; gap: 6px; }
.crumbs__i a { transition: color var(--ease); }
.crumbs__i a:hover { color: var(--coral); }
.crumbs__sep { color: var(--hairline-2); }
.crumbs__i [aria-current] { color: var(--ink); }

/* --- Шапка внутренней страницы --- */
.page-hero {
  position: relative;
  padding-block: 72px 76px;
  background: var(--tile);
  overflow: hidden;
  text-align: center;
}
.page-hero__in { position: relative; z-index: 2; max-width: 780px; margin-inline: auto; }
.page-hero__sub { margin-top: 16px; font-size: 18px; line-height: 1.5; color: var(--lead); }
.page-hero__web {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  color: var(--hairline-2);
  opacity: .7;
  z-index: 1;
  pointer-events: none;
}
.page-hero__web--l { left: -60px; }
.page-hero__web--r { right: -60px; }

/* --- Полноширинный герой главной --- */
.hero {
  position: relative;
  min-height: 620px;
  display: grid;
  align-items: center;
  isolation: isolate;
  background: var(--graphite);
}
.hero__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(24, 22, 20, .52);
  z-index: -1;
}
.hero__in {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
  color: var(--white);
  padding-block: 88px;
}
.hero__in h1 { color: var(--white); }
.hero__lead {
  margin: 20px auto 30px;
  max-width: 560px;
  font-size: 18px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .88);
}

/* --- Фото-полоса --- */
.photo-band {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
  isolation: isolate;
  background: var(--brown);
  text-align: center;
}
.photo-band__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
}
.photo-band::after {
  content: "";
  position: absolute; inset: 0;
  background: rgba(26, 22, 19, .55);
  z-index: -1;
}
.photo-band__in { max-width: 660px; color: var(--white); padding-block: 80px; }
.photo-band__in h2 { color: var(--white); }
.photo-band__lead { margin: 18px 0 28px; font-size: 18px; line-height: 1.5; color: rgba(255,255,255,.9); }

/* --- Полоса-акцент с фото слева --- */
.band-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.band-split__media { aspect-ratio: 4 / 3; overflow: hidden; background: rgba(255,255,255,.06); }
.band-split__media img { width: 100%; height: 100%; object-fit: cover; }
.band-split__body p { color: rgba(255,255,255,.82); }
.section--brown .band-split__body p { color: #E4D8CF; }
.section--graphite .band-split__body p { color: #C3CACD; }
.band-split__body h2 { margin-bottom: 18px; }
.band-split__list { display: grid; gap: 0; margin-top: 24px; }
.band-split__list li {
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.86);
  font-size: 15px;
}
.band-split__list li strong { display: block; color: var(--white); font-size: 16px; margin-bottom: 2px; }

/* --- Ценностная полоса --- */
.value-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); text-align: center; }
.value-strip__i { display: flex; flex-direction: column; align-items: center; }
.value-strip__ic { color: var(--ink); margin-bottom: 16px; }
.value-strip__i .eyebrow { margin-bottom: 10px; }
.value-strip__t { font-size: 15px; line-height: 1.5; color: var(--body); max-width: 260px; margin: 0; }

/* --- Универсальная карточка-плитка --- */
.card { display: flex; flex-direction: column; }
.card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--tile);
  overflow: hidden;
}
.card__media--wide { aspect-ratio: 16 / 9; }
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}
.card:hover .card__media img { transform: scale(1.03); }
.card__body { padding-top: 16px; }
.card__meta {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}
.card__title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
  transition: color var(--ease);
  margin: 0;
}
.card:hover .card__title, a.card:hover .card__title { color: var(--coral); }
.card__text { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--body); }
.card__price { margin-top: 10px; font-size: 16px; font-weight: 700; color: var(--coral-ink); }
.card__price s { margin-left: 8px; font-weight: 500; color: var(--muted); }
.card__note { margin-top: 4px; font-size: 13px; color: var(--muted); }
.card__more {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}

/* --- Карточка услуги / пакета с комплектацией --- */
.pack {
  display: flex; flex-direction: column;
  position: relative;
  padding-top: 4px;
}
.pack__head { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; }
.pack__title { font-size: 20px; font-weight: 700; line-height: 1.25; color: var(--ink); }
.pack__lead { margin: 10px 0 18px; font-size: 15px; line-height: 1.5; color: var(--body); }
.pack__list { margin: 0 0 auto; }
.pack__list li {
  padding: 11px 0;
  border-top: 1px solid var(--hairline);
  font-size: 15px;
  line-height: 1.45;
  color: var(--body);
  display: flex; gap: 10px;
}
.pack__list li .ic { flex: 0 0 auto; color: var(--coral); margin-top: 3px; }
.pack__term { margin-top: 16px; font-size: 13px; color: var(--muted); }
.pack__price {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
  font-size: 18px; font-weight: 700; color: var(--ink);
}
.pack__price b { color: var(--coral-ink); }
.pack__price s { margin-left: 8px; font-size: 15px; font-weight: 500; color: var(--muted); }
.pack__actions { display: flex; align-items: center; gap: 20px; margin-top: 16px; flex-wrap: wrap; }

/* --- Плитка направления --- */
.dir { display: block; }
.dir__media { aspect-ratio: 4 / 3; background: var(--tile); overflow: hidden; }
.dir__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
.dir:hover .dir__media img { transform: scale(1.03); }
.dir__t { margin-top: 12px; font-size: 17px; font-weight: 700; color: var(--ink); transition: color var(--ease); }
.dir:hover .dir__t { color: var(--coral); }
.dir__n { margin-top: 2px; font-size: 13px; color: var(--muted); }

/* --- Тезисы-плитки --- */
.thesis { padding: 32px; background: var(--tile); }
/* margin: 0 — иначе глобальный p{margin-bottom:1em} даёт 44 px и перебивает
   задуманный margin-top:10px у подписи. */
.thesis__num { margin: 0; font-size: clamp(32px, 3.4vw, 44px); font-weight: 800; color: var(--ink); line-height: 1; letter-spacing: -0.03em; }
.thesis__label { margin-top: 10px; font-size: 15px; font-weight: 700; color: var(--ink); }
.thesis__text { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: var(--body); }

/* --- Витрина двух веток --- */
.branch__media { aspect-ratio: 4 / 3; background: var(--tile); overflow: hidden; }
.branch__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
.branch:hover .branch__media img { transform: scale(1.03); }
.branch__body { padding-top: 20px; }
.branch__body h3 { margin-bottom: 14px; }
.branch__list { margin-bottom: 22px; }
.branch__list li {
  padding: 11px 0;
  border-top: 1px solid var(--hairline);
  font-size: 15px;
  color: var(--body);
}

/* --- Карточки преимуществ с номером --- */
.adv { display: flex; flex-direction: column; }
.adv__n {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--rust);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 17px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-bottom: 16px;
}
.adv__t { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.adv__x { margin: 0; font-size: 15px; line-height: 1.55; color: var(--body); }

/* --- Панель ниш --- */
.niches { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.niches__list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.niches__list a {
  display: block;
  padding: 13px 0;
  border-top: 1px solid var(--hairline);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  transition: color var(--ease);
}
.niches__list a:hover { color: var(--coral); }

/* --- Карусель (общая механика) --- */
.carousel { position: relative; }
.carousel__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: var(--head-gap);
}
.carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * var(--gap)) / 3);
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * { scroll-snap-align: start; }
.carousel--2 .carousel__track { grid-auto-columns: calc((100% - var(--gap)) / 2); }
.carousel--4 .carousel__track { grid-auto-columns: calc((100% - 3 * var(--gap)) / 4); }

/* --- Карточка кейса --- */
.case__media { position: relative; aspect-ratio: 16 / 10; background: var(--tile); overflow: hidden; }
.case__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms ease; }
.case:hover .case__media img { transform: scale(1.03); }
.case__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 10px 14px;
  background: rgba(38, 38, 38, .78);
  color: var(--white);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.case__title { margin: 16px 0 14px; font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.case:hover .case__title { color: var(--coral); }
.metrics { margin-bottom: 16px; }
.metric {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
}
.metric__k { color: var(--body); }
.metric__v { color: var(--ink); font-weight: 700; text-align: right; }

/* --- Карточка отзыва --- */
.review { padding: 28px; background: var(--tile); display: flex; flex-direction: column; height: 100%; }
.review__top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.review__name { font-size: 16px; font-weight: 700; color: var(--ink); }
.review__co { margin-top: 2px; font-size: 13px; color: var(--muted); }
.review__head { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.review__text { margin: 0 0 16px; font-size: 15px; line-height: 1.6; color: var(--body); }
.review__text--clamp {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.review__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.review__date { font-size: 13px; color: var(--muted); }

.rating-badge {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 20px 26px;
  background: var(--tile);
  border-radius: var(--radius);
  margin-top: 24px;
}
.rating-badge__v { font-size: 40px; font-weight: 800; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.rating-badge__n { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* --- FAQ --- */
.faq { border-top: 1px solid var(--hairline); }
.faq__group { margin-top: 34px; }
.faq__group:first-child { margin-top: 0; }
.faq__gtitle {
  margin: 0 0 4px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.faq__i { border-bottom: 1px solid var(--hairline); }
.faq__q {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px 0;
  cursor: pointer;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__qt { font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.faq__i:hover .faq__qt { color: var(--coral); }
.faq__btn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  color: var(--ink);
  transition: background-color var(--ease), color var(--ease);
}
.faq__i:hover .faq__btn { background: var(--ink); color: var(--white); }
.faq__i[open] .faq__btn-t::after { content: "\00a0"; }
.faq__a { padding: 0 0 24px; max-width: 860px; font-size: 16px; line-height: 1.6; color: var(--body); }

/* --- Сертификаты --- */
.cert__media { aspect-ratio: 4 / 3; background: var(--tile); overflow: hidden; display: grid; place-items: center; border: 1px solid var(--hairline); }
.cert__media img { width: 100%; height: 100%; object-fit: cover; }
.cert__ic { display: grid; place-items: center; color: var(--rust); }
.section--tile .cert__media { background: var(--white); }
.cert__t { margin-top: 14px; text-align: center; font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.4; }
.cert__y { margin-top: 4px; text-align: center; font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--muted); }

/* --- Квиз --- */
.quiz { display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: start; }
.quiz__box { padding: 36px; background: var(--tile); }
/* На плиточной полосе коробка совпадала с фоном — padding читался как случайный сдвиг. */
.section--tile .quiz__box { background: var(--white); }
.quiz__count { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.18em; color: var(--muted); }
.quiz__q { margin: 12px 0 6px; font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.25; }
.quiz__hint { margin: 0 0 18px; font-size: 14px; color: var(--muted); }
.quiz__bar { display: flex; gap: 6px; margin-bottom: 24px; }
.quiz__seg { flex: 1 1 0; height: 4px; background: var(--hairline-2); border-radius: 2px; transition: background-color var(--ease); }
.quiz__seg.is-on { background: var(--rust); }
.quiz__actions { display: flex; align-items: center; gap: 16px; margin-top: 18px; flex-wrap: wrap; }
.quiz__done { margin-top: 18px; font-size: 15px; color: var(--ink); font-weight: 600; }

.expert { border: 1px solid var(--hairline); padding: 30px; }
.expert__ava { width: 88px; height: 88px; border-radius: 50%; overflow: hidden; background: var(--tile); }
.expert__ava img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.expert__name { margin-top: 16px; font-size: 18px; font-weight: 700; color: var(--ink); }
.expert__role { margin-top: 2px; font-size: 14px; color: var(--muted); }
.expert__phone {
  display: block; margin-top: 18px;
  font-size: 26px; font-weight: 800; color: var(--ink);
  font-variant-numeric: tabular-nums;
  transition: color var(--ease);
}
.expert__phone:hover { color: var(--coral); }
.expert__hours { margin-top: 4px; font-size: 13px; color: var(--muted); }
.expert__msgs { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.expert__msgs .btn { flex: 1 1 auto; }

/* --- Карточка контактной формы --- */
.contact-card { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.contact-card__side h2 { margin-bottom: 18px; }
.contact-card__phone {
  display: block; margin-top: 10px;
  font-size: clamp(26px, 2.6vw, 34px); font-weight: 800; color: var(--ink);
  font-variant-numeric: tabular-nums;
  transition: color var(--ease);
}
.contact-card__phone:hover { color: var(--coral); }
.contact-card__hours { margin-top: 6px; font-size: 14px; color: var(--muted); }
.contact-card__form { padding: 34px; background: var(--tile); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* --- Полоса подписки --- */
.subscribe { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.subscribe__media { aspect-ratio: 4 / 3; background: var(--tile); overflow: hidden; }
.subscribe__media img { width: 100%; height: 100%; object-fit: cover; }
.subscribe__body h3 { margin-bottom: 8px; font-size: clamp(22px, 2.4vw, 30px); }
.subscribe__n { margin: 0 0 20px; font-size: 15px; color: var(--body); }
.subscribe__actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 6px; }
.subscribe__what { font-size: 14px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.subscribe__what:hover { color: var(--coral); }

/* --- Строка CTA под сеткой --- */
.cta-row {
  display: flex; align-items: center; justify-content: center;
  gap: 28px; flex-wrap: wrap;
  margin-top: 44px;
}
.cta-row--tight { margin-top: 32px; }

/* --- Таблицы --- */
.table-wrap { overflow-x: auto; border: 1px solid var(--hairline); }
.tbl { min-width: 720px; font-size: 15px; }
.tbl th, .tbl td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.tbl thead th {
  position: sticky; top: 0; z-index: 3;
  background: var(--white);
  border-bottom: 1px solid var(--hairline-2);
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink);
}
.tbl tbody th { font-weight: 500; color: var(--body); width: 40%; }
.tbl td { color: var(--ink); }
.tbl .yes { color: var(--coral); }
.tbl .no  { color: var(--hairline-2); }
.tbl__price { font-weight: 700; color: var(--coral-ink); font-variant-numeric: tabular-nums; }
.tbl tbody tr:last-child th, .tbl tbody tr:last-child td { border-bottom: 0; }

/* --- Нумерованные этапы --- */
.steps { border-top: 1px solid var(--hairline); }
.steps__i {
  display: grid;
  grid-template-columns: 64px 1fr 180px;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--hairline);
  align-items: start;
}
.steps__n { font-size: 26px; font-weight: 800; color: var(--coral-ink); line-height: 1; font-variant-numeric: tabular-nums; }
.steps__t { font-size: 18px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.steps__x { margin: 0; font-size: 15px; line-height: 1.55; color: var(--body); }
.steps__term { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); text-align: right; }

/* --- Врезка --- */
.callout {
  padding: 26px 30px;
  background: var(--tile);
  border-left: 3px solid var(--coral);
  font-size: 16px;
  line-height: 1.6;
  color: var(--lead);
}
.callout__t { display: block; font-weight: 700; color: var(--ink); margin-bottom: 8px; }

/* --- Текстовая колонка статьи и документа --- */
.prose { max-width: 760px; }
.prose h2 { margin: 42px 0 14px; font-size: clamp(24px, 2.4vw, 30px); }
.prose h3 { margin: 30px 0 10px; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 18px; font-size: 17px; line-height: 1.65; color: var(--body); }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 0; }
.prose ul li, .prose ol li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--body);
}
.prose ul li::before {
  content: ""; position: absolute; left: 2px; top: 11px;
  width: 6px; height: 6px; background: var(--coral); border-radius: 1px;
}
.prose ol { counter-reset: pr; }
.prose ol li { counter-increment: pr; }
.prose ol li::before {
  content: counter(pr) ".";
  position: absolute; left: 0; top: 0;
  font-weight: 700; color: var(--coral-ink);
  font-variant-numeric: tabular-nums;
}
.prose figure { margin: 28px 0; }
.prose figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--coral); }

/* --- Оглавление документа --- */
.legal { display: grid; grid-template-columns: 280px 1fr; gap: 56px; align-items: start; }
.legal__toc { padding: 26px; background: var(--tile); position: sticky; top: 120px; }
.legal__toc li a {
  display: block;
  padding: 9px 0;
  border-top: 1px solid var(--hairline-2);
  font-size: 14px;
  color: var(--body);
  transition: color var(--ease);
}
.legal__toc li:first-child a { border-top: 0; }
.legal__toc li a:hover { color: var(--coral); }

/* --- Пагинация --- */
.pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 48px; }
.pager a, .pager span {
  min-width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--hairline-2);
  border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  transition: background-color var(--ease), color var(--ease), border-color var(--ease);
}
.pager a:hover { border-color: var(--ink); color: var(--coral); }
.pager .is-current { background: var(--ink); border-color: var(--ink); color: var(--white); }
.pager .is-off { color: var(--hairline-2); border-color: var(--hairline-3); }

/* --- Карта --- */
.map-wrap { position: relative; aspect-ratio: 16 / 9; background: var(--tile); overflow: hidden; }
.map-wrap iframe { width: 100%; height: 100%; border: 0; }
.map-note { margin-top: 14px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--body); }

/* --- Контактные плитки --- */
.ctile { padding: 30px; background: var(--tile); display: flex; flex-direction: column; height: 100%; }
.ctile__ic { color: var(--ink); margin-bottom: 16px; }
.ctile__v { font-size: clamp(20px, 2vw, 26px); font-weight: 800; color: var(--ink); line-height: 1.2; word-break: break-word; }
a.ctile__v:hover { color: var(--coral); }
.ctile__n { margin-top: 8px; font-size: 14px; color: var(--body); }
.ctile__btns { display: flex; gap: 10px; margin-top: auto; padding-top: 18px; flex-wrap: wrap; }

/* --- Команда --- */
.person__media { aspect-ratio: 4 / 3; background: var(--tile); overflow: hidden; }
.person__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter 300ms ease, transform 300ms ease; }
.person:hover .person__media img { filter: grayscale(0); transform: scale(1.03); }
.person__name {
  margin-top: 14px; font-size: 17px; font-weight: 700; color: var(--ink);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
}
.person__role { margin-top: 4px; font-size: 14px; color: var(--muted); }
.person__mail { display: inline-block; margin-top: 8px; font-size: 14px; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.person__mail:hover { color: var(--coral); }

/* --- Плитки-цифры --- */
.numtile { padding: 28px; background: var(--tile); }
.numtile__v { font-size: clamp(28px, 3vw, 38px); font-weight: 800; color: var(--ink); line-height: 1; letter-spacing: -0.03em; }
.numtile__l { margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--body); }

/* --- Реквизиты --- */
.req { border-top: 1px solid var(--hairline); max-width: 860px; }
.req__i { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--hairline); font-size: 15px; }
.req__k { color: var(--muted); }
.req__v { color: var(--ink); font-variant-numeric: tabular-nums; }

/* --- 404 --- */
.err { text-align: center; padding-block: 110px; }
/* margin в px, а не глобальные p{margin-bottom:1em}: при кегле 168px «единица em»
   отрывает цифру от заголовка на 168 px. */
.err__code { margin: 0 0 24px; font-size: clamp(80px, 14vw, 168px); font-weight: 800; line-height: .9; letter-spacing: -0.04em; color: var(--ink); }
.err__x { margin: 20px auto 30px; max-width: 520px; font-size: 18px; color: var(--lead); }
.err__btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 44px; }
.err__links { display: flex; gap: 10px 28px; justify-content: center; flex-wrap: wrap; }
.err__links a { font-size: 15px; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.err__links a:hover { color: var(--coral); }

/* --- Карта сайта --- */
.smap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px var(--gap); }
.smap__list a {
  display: block;
  padding: 10px 0;
  border-top: 1px solid var(--hairline);
  font-size: 15px;
  color: var(--ink);
  transition: color var(--ease);
}
.smap__list a:hover { color: var(--coral); }

/* --- Цитата клиента --- */
.bigquote { padding: 44px; background: var(--tile); }
.bigquote__ic { color: var(--coral); margin-bottom: 18px; }
.bigquote__t { font-size: clamp(20px, 2.2vw, 27px); line-height: 1.4; font-weight: 700; color: var(--ink); letter-spacing: -0.015em; }
.bigquote__n { margin-top: 22px; font-size: 15px; font-weight: 700; color: var(--ink); }
.bigquote__r { margin-top: 2px; font-size: 14px; color: var(--muted); }

/* --- Появление при скролле --- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 500ms ease, transform 500ms ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* --- Модалка --- */
.modal {
  position: fixed; inset: 0; z-index: 140;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(38, 38, 38, .5);
}
.modal[hidden] { display: none; }
.modal__box {
  width: min(560px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--white);
  padding: 34px;
  border-radius: var(--radius);
}
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }

/* ================= 8. Медиазапросы ================= */

/* ----------------------------------------------------------------
   Шапка: восемь русских пунктов меню в один ряд требуют ~910px.
   Ширины замерены в браузере, поэтому правый блок разбирается
   по частям, а не меню сжимается до нечитаемого.
   ---------------------------------------------------------------- */

/* Контейнер упирается в max-width 1360px, поэтому шире 1440px строка шапки
   уже не растёт — телефон возвращаем ровно там, где он помещается. */
@media (min-width: 1440px) {
  .nav__list { gap: 14px; }
  .hdr-phone { display: block; }
}

/* Ниже 1280px убираем ещё и лупу */
@media (max-width: 1280px) {
  :root { --wrap: 1200px; }
  .nav__list { gap: 13px; }
  .nav__a { font-size: 13.5px; }
  #search-toggle { display: none; }
}

/* ---- до 1024px: две колонки ---- */
@media (max-width: 1024px) {
  :root { --sec-y: 72px; --head-gap: 32px; }
  .grid--3, .grid--4, .grid--tight { grid-template-columns: repeat(2, 1fr); }
  .value-strip { grid-template-columns: repeat(2, 1fr); gap: 36px 24px; }
  .grid--split, .band-split, .niches, .quiz, .contact-card, .subscribe {
    grid-template-columns: 1fr; gap: 32px;
  }
  .mega__in { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .ftr-cols { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .legal { grid-template-columns: 1fr; gap: 32px; }
  .legal__toc { position: static; }
  .smap { grid-template-columns: repeat(2, 1fr); }
  .carousel__track { grid-auto-columns: calc((100% - var(--gap)) / 2); }
  .carousel--4 .carousel__track { grid-auto-columns: calc((100% - var(--gap)) / 2); }
  .steps__i { grid-template-columns: 48px 1fr; }
  .steps__term { grid-column: 2; text-align: left; }
  .hero { min-height: 520px; }
  .photo-band { min-height: 440px; }
}

/* ---- до 1220px: бургер (ниже этой ширины ряд из 8 пунктов не помещается) ---- */
@media (max-width: 1220px) {
  .nav { display: none; }
  .hdr-phone, .hdr-cta { display: none; }
  #search-toggle { display: grid; }
  .burger { display: grid; }
  .hdr-main__in { justify-content: space-between; }
}

/* ---- до 900px ---- */
@media (max-width: 900px) {
  .contact-card__form, .quiz__box, .review, .thesis, .ctile, .bigquote { padding: 24px; }
}

/* ---- до 768px: полоса-анонс сжимается до одной строки ---- */
@media (max-width: 768px) {
  .hdr-top__right { display: none; }
  .hdr-top__in { justify-content: flex-start; }
  .hdr-top__left { overflow: hidden; }
  .hdr-top__promo { overflow: hidden; text-overflow: ellipsis; }
}

/* ---- до 640px: одна колонка ---- */
@media (max-width: 640px) {
  :root { --pad: 20px; --sec-y: 56px; --gap: 20px; --head-gap: 28px; }

  body { font-size: 16px; }

  .grid--2, .grid--3, .grid--4, .grid--tight, .smap { grid-template-columns: 1fr; }
  .value-strip { grid-template-columns: 1fr; gap: 32px; }
  .niches__list { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .carousel__track, .carousel--2 .carousel__track, .carousel--4 .carousel__track {
    grid-auto-columns: 86%;
  }

  .hdr-top { font-size: 12px; }
  .hdr-top__dashes { display: none; }

  .hero { min-height: 480px; }
  .hero__in { padding-block: 64px; }
  .photo-band { min-height: 400px; }
  .photo-band__in { padding-block: 56px; }
  .page-hero { padding-block: 44px 48px; }
  .page-hero__web { display: none; }

  .section__head { margin-bottom: var(--head-gap); }
  .carousel__head { flex-direction: column; align-items: flex-start; gap: 18px; }

  .faq__q { flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px 0; }
  .faq__btn { height: 34px; font-size: 13px; }

  .steps__i { grid-template-columns: 40px 1fr; gap: 14px; padding: 20px 0; }
  .req__i { grid-template-columns: 1fr; gap: 4px; }
  .req__k { font-size: 13px; }

  .cta-row { flex-direction: column; gap: 18px; }
  .cta-row .btn { width: 100%; }
  .btn { width: auto; }
  .err__btns .btn { width: 100%; }

  /* Футер: подписка первой, колонки — аккордеон */
  .ftr-top { padding-block: 32px; }
  .ftr-top__in { flex-direction: column; align-items: stretch; gap: 26px; }
  /* flex-basis 600px в колоночной раскладке работает как ВЫСОТА блока —
     сбрасываем основу вместе с max-width, иначе под подпиской зияет пустота. */
  .ftr-sub { flex: 0 1 auto; max-width: none; }
  .ftr-sub__row { grid-template-columns: 1fr; }
  .ftr-social { justify-content: center; }

  .ftr-cols { grid-template-columns: 1fr; gap: 0; }
  .ftr-col { border-bottom: 1px solid #4A4844; }
  .ftr-col__head { margin: 0; padding: 16px 0; cursor: pointer; pointer-events: auto; }
  .ftr-col__caret { display: block; transition: transform var(--ease); }
  .ftr-col[open] .ftr-col__caret { transform: rotate(180deg); }
  .ftr-col__list { padding-bottom: 18px; }

  .ftr-legal { flex-direction: column; gap: 16px; margin-top: 28px; }
  .ftr-legal__left a { display: block; margin: 6px 0 0; }
  .ftr-legal__right { text-align: left; }

  .modal__box { padding: 24px; }
  .expert { padding: 24px; }
  .legal__toc { padding: 20px; }
}

/* ---- очень узкие экраны (360px) ---- */
@media (max-width: 380px) {
  :root { --pad: 16px; }
  .wordmark { font-size: 17px; }
  .expert__phone { font-size: 22px; }
  .rating-badge { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ================= Доступность ================= */
:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 2px;
}
.hdr-top :focus-visible,
.photo-band :focus-visible,
.hero :focus-visible,
.ftr :focus-visible,
.section--brown :focus-visible,
.section--graphite :focus-visible {
  outline-color: var(--cream);
}
a:focus-visible, button:focus-visible { border-radius: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .carousel__track { scroll-behavior: auto; }
  .card:hover .card__media img,
  .dir:hover .dir__media img,
  .case:hover .case__media img,
  .branch:hover .branch__media img,
  .person:hover .person__media img { transform: none; }
}

/* ================= Печать ================= */
@media print {
  .hdr, .ftr, .drawer, .drawer-scrim, .search-panel,
  .quiz, .subscribe, .cta-row, .car-nav, .contact-card__form,
  .skip-link, .pager { display: none !important; }

  body { background: #fff; color: #000; font-size: 12pt; }
  .section { padding-block: 12pt; background: #fff !important; color: #000 !important; }
  .section--brown, .section--graphite, .photo-band, .hero { background: #fff !important; color: #000 !important; min-height: 0; }
  .section--brown h2, .section--graphite h2, .photo-band__in h2, .hero__in h1 { color: #000 !important; }
  .hero::after, .photo-band::after { display: none; }
  .hero__bg, .photo-band__bg { display: none; }

  h1, h2, h3 { page-break-after: avoid; }
  .card, .pack, .review, .faq__i, .steps__i { page-break-inside: avoid; }
  .prose { max-width: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
  .reveal { opacity: 1; transform: none; }
  details { display: block; }
  details > summary { list-style: none; }
  .faq__a { display: block !important; }
}
