/* ==========================================================================
   faina.co.il — визитка ипотечного/финансового консультанта.
   Регистр: адвокатская контора (референс структуры — lawoffices.co.il):
   строго, дорого, мало текста. Бренд — navy #174290 + латунный акцент.
   Логические свойства везде: одна таблица стилей на LTR (ru) и RTL (he).
   ========================================================================== */

:root {
  /* фирменный navy + производная шкала */
  --navy-900: #0b2350;
  --navy-800: #0e2a5c;
  --navy-700: #174290; /* brand */
  --navy-500: #2b5cb8;
  --navy-100: #e7edf8;

  /* латунь — единственный второй акцент. 600 затемнён до 5.36:1 на светлом фоне (WCAG AA). */
  --brass-600: #856428;
  --brass-500: #b3914f;
  --brass-200: #e6d9bd;

  --ink: #131720;
  --ink-muted: #5b6472;
  --surface: #fdfdfc;
  --surface-2: #f4f6fa;
  --surface-3: #ecf0f7;
  --line: #dfe4ee;
  --line-strong: #c8d1e2;
  --white: #fff;
  /* зелёный WhatsApp затемнён: белый текст на нём даёт 5.4:1 вместо 3.1:1 у #25d366 */
  --wa: #0f7a3d;

  /* модульная шкала 1.25 */
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.25rem;
  --fs-3xl: 2.875rem;
  --fs-4xl: 3.5rem;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(11, 35, 80, 0.06), 0 2px 8px rgba(11, 35, 80, 0.04);
  --shadow-md: 0 8px 24px rgba(11, 35, 80, 0.08), 0 2px 6px rgba(11, 35, 80, 0.05);
  --shadow-lg: 0 24px 60px rgba(11, 35, 80, 0.16), 0 4px 12px rgba(11, 35, 80, 0.08);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 76px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: var(--fs-base);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: var(--font-display, Georgia, serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--brass-500);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 48px);
  min-width: 0;
}

/* ------------------------------------------------------------------ типографика */

.eyebrow {
  font-family: var(--font-body, sans-serif);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-600);
  margin-bottom: 16px;
}

.section {
  padding-block: clamp(56px, 8vw, 104px);
}

.section__head {
  max-width: 620px;
  margin-bottom: 48px;
}

.section__head--center {
  margin-inline: auto;
  text-align: center;
}

.section__title {
  font-size: clamp(var(--fs-xl), 3.4vw, var(--fs-2xl));
}

.prose p + p {
  margin-top: 16px;
}

.prose p {
  color: var(--ink-muted);
  font-size: var(--fs-md);
}

/* плейсхолдер под ненаписанный контент — заметен, но не ломает вёрстку */
.todo {
  display: inline;
  background: repeating-linear-gradient(135deg, #fff6e2, #fff6e2 8px, #fdf0d3 8px, #fdf0d3 16px);
  box-shadow: inset 0 0 0 1px var(--brass-200);
  border-radius: 4px;
  padding: 0 6px;
  color: #6b551f;
  font-family: var(--font-body, sans-serif);
  font-size: 0.9em;
  font-weight: 500;
  letter-spacing: 0;
}

/* ------------------------------------------------------------------ кнопки */

.btn {
  --btn-y: 12px;
  --btn-x: 22px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: var(--btn-y) var(--btn-x);
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: var(--font-body, sans-serif);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  transform: translateZ(0);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s var(--ease),
    border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.btn--lg {
  --btn-y: 15px;
  --btn-x: 28px;
  font-size: var(--fs-base);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.985);
}

.btn--primary {
  background: linear-gradient(180deg, var(--navy-700), var(--navy-800));
  color: var(--white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), var(--shadow-md);
}

.btn--primary:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), var(--shadow-lg);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--line-strong);
  color: var(--navy-800);
  backdrop-filter: blur(6px);
}

.btn--ghost:hover {
  border-color: var(--navy-500);
  background: var(--white);
}

.btn--light {
  background: var(--white);
  color: var(--navy-800);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), var(--shadow-md);
}

.btn--ghost-light {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
}

.btn--ghost-light:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn--wa {
  background: var(--wa);
  color: var(--white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 2px 10px rgba(15, 122, 61, 0.28);
}

.btn--wa:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26), 0 8px 22px rgba(15, 122, 61, 0.32);
}

.btn.is-disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}

.btn .icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex: none;
}

/* ------------------------------------------------- телефон со значком WhatsApp */

/* Одна связка на весь сайт: где показан номер — там же зелёный значок,
   ведущий в переписку. Размер значка задаётся местом (полоска, первый
   экран, подвал, правовая страница), поведение — общее. */
.phone-wa {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.wa-mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--wa);
  flex: none;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.wa-mini .icon {
  width: 15px;
  height: 15px;
  fill: var(--white);
}

.wa-mini:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 14px rgba(15, 122, 61, 0.45);
}

/* ------------------------------------------------------------------ топбар */

.topbar {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--fs-xs);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
}

.topbar__contacts {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar__link {
  letter-spacing: 0.02em;
  transition: color 0.2s var(--ease);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__link:hover {
  color: var(--white);
}

.topbar__contacts .wa-mini {
  width: 20px;
  height: 20px;
}

.topbar__contacts .wa-mini .icon {
  width: 13px;
  height: 13px;
}

.topbar__sep {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.24);
  flex: none;
}

/* ------------------------------------------------------------------ хедер */

.siteheader {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 253, 252, 0.82);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s var(--ease);
}

.siteheader.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(11, 35, 80, 0.07);
}

.siteheader__inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 40px);
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* в шапке — только графический знак логотипа: слоган на иврите в 50px нечитаем,
   имя и профессия стоят рядом текстом */
.brand__mark {
  width: auto;
  height: 52px;
  flex: none;
}

.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand__name {
  font-family: var(--font-display, serif);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--navy-800);
  white-space: nowrap;
}

.brand__role {
  font-size: var(--fs-xs);
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  line-height: 1.3;
}

@media (max-width: 1180px) {
  .brand__name {
    font-size: var(--fs-md);
  }
}

.nav {
  margin-inline-start: auto;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.6vw, 26px);
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Пункт меню не рвётся посреди себя: без этого «Зачем нужен консультант»
   и «Обо мне» складывались пополам и вся строка меню уезжала в два этажа,
   как только в шапке становилось чуть теснее. Когда пунктам перестаёт
   хватать места целиком, меню и так уходит под кнопку-бургер. */
.nav__link {
  position: relative;
  display: inline-block;
  padding: 8px 2px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}

.nav__link::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 2px;
  height: 2px;
  background: var(--brass-500);
  transform: scaleX(0);
  transform-origin: inline-start;
  transition: transform 0.28s var(--ease);
}

.nav__link:hover {
  color: var(--navy-700);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  transform: scaleX(1);
}

.nav__link.is-active {
  color: var(--navy-700);
}

.siteheader__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

/* Переключатель языка живёт в шапке, а не в топбаре: шапка липкая, и выбор
   языка остаётся под рукой на любой глубине прокрутки. Фон здесь светлый,
   поэтому цвета свои, а не унаследованные от тёмной полоски.

   Он идёт ПЕРЕД кнопкой призыва, а не после: крайнее место в строке — самое
   заметное, и оно принадлежит главному действию, а не служебной мелочи.
   Начало и конец — логические, поэтому на иврите порядок зеркалится сам.
   От кнопки призыва язык отделяет собственная обводка и промежуток. */
.lang-switcher {
  display: flex;
  align-items: center;
  flex: none;
  padding-inline-end: 4px;
}

/* Обводка латунью, чтобы кнопка не читалась ещё одним пунктом меню. Латунь —
   второй фирменный цвет и единственный акцент помимо navy, поэтому язык не
   спорит с зелёной кнопкой призыва. Буквы берём затемнённый оттенок (AA на
   светлом), под наведением меняемся местами: заливка латунью, буквы navy. */
.lang-switch {
  padding: 4px 10px;
  border: 1px solid var(--brass-500);
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brass-600);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.lang-switch:hover {
  background: var(--brass-500);
  border-color: var(--brass-500);
  color: var(--navy-900);
}

.burger {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  background: linear-gradient(180deg, var(--navy-700), var(--navy-800));
  border: 1px solid transparent;
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.burger:active {
  transform: scale(0.96);
}

.burger span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.burger[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.burger[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.burger[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ------------------------------------------------------------------ hero */

/* ==========================================================================
   Первый экран: слева блок с именем и обещанием, справа портрет карточкой.
   Кадр вертикальный и лежит в файле целиком — под пропорцию карточки его
   подрезает object-fit, поэтому один файл годится на любую ширину экрана.
   ========================================================================== */

.hero {
  position: relative;
  padding-block: clamp(48px, 7vw, 96px) clamp(56px, 8vw, 112px);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 100% 0%, var(--navy-100) 0%, rgba(231, 237, 248, 0) 58%),
    radial-gradient(80% 70% at 0% 100%, rgba(230, 217, 189, 0.35) 0%, rgba(230, 217, 189, 0) 60%),
    var(--surface);
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset-inline-start: 50%;
  top: -12%;
  width: 46vw;
  height: 46vw;
  max-width: 620px;
  max-height: 620px;
  background: radial-gradient(circle, rgba(23, 66, 144, 0.07) 0%, rgba(23, 66, 144, 0) 70%);
  transform: translateX(-50%);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
}

.hero__copy {
  min-width: 0;
}

.hero__title {
  font-size: clamp(var(--fs-2xl), 6vw, var(--fs-4xl));
  letter-spacing: -0.03em;
  color: var(--navy-800);
}

.hero__title::after {
  content: '';
  display: block;
  width: 64px;
  height: 3px;
  margin-top: 24px;
  background: linear-gradient(90deg, var(--brass-500), rgba(179, 145, 79, 0));
  border-radius: 2px;
}

.hero__subtitle {
  margin-top: 24px;
  max-width: 46ch;
  font-size: var(--fs-md);
  color: var(--ink-muted);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* телефон стоит в одном ряду с кнопкой записи — вторая кнопка вотсапа убрана,
   она дублировала и шапку, и плавающую кнопку в углу */
.hero__cta .phone-wa {
  margin-inline-start: 6px;
}

.hero__phone {
  display: inline-block;
  font-family: var(--font-display, serif);
  font-size: var(--fs-lg);
  font-weight: 500;
  color: var(--navy-700);
  letter-spacing: 0.01em;
  transition: color 0.2s var(--ease);
}

.hero__phone:hover {
  color: var(--brass-600);
}

/* портрет */

.hero__media {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 520px;
  min-width: 0;
  /* на узком экране карточка лежит поперёк — так первый экран не растёт
     на два роста и кнопки остаются близко к тексту */
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(150deg, var(--navy-800), var(--navy-700) 55%, var(--navy-500));
  box-shadow: var(--shadow-lg);
}

.hero__media::after {
  /* 1px внутренняя кромка — стекло, а не плоский прямоугольник */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.hero__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* кадр обрезается сверху и снизу — держим лицо в верхней трети,
     иначе на широкой карточке остаётся один пиджак */
  object-position: 50% 24%;
}

/* ------------------------------------------------------------------ услуги */

.services {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border-block: 1px solid var(--line);
}

.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.card {
  position: relative;
  padding: clamp(24px, 3vw, 36px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transform: translateZ(0);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}

.card::before {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--brass-500), rgba(179, 145, 79, 0));
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.card:hover::before {
  opacity: 1;
}

.card__num {
  display: block;
  font-family: var(--font-display, serif);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--brass-600);
  margin-bottom: 14px;
}

.card__title {
  font-size: var(--fs-lg);
  color: var(--navy-800);
}

.card__text {
  margin-top: 14px;
  color: var(--ink-muted);
}

.card__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--navy-100);
  box-shadow: inset 0 0 0 1px rgba(23, 66, 144, 0.12);
  color: var(--navy-700);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

/* плашка — живая ссылка в WhatsApp, поэтому у неё есть состояние наведения */
.card__badge .icon {
  width: 16px;
  height: 16px;
  fill: var(--wa);
  flex: none;
}

.card__badge:hover,
.card__badge:focus-visible {
  background: var(--wa);
  box-shadow: inset 0 0 0 1px var(--wa);
  color: var(--white);
}

.card__badge:hover .icon,
.card__badge:focus-visible .icon {
  fill: currentColor;
}

/* ------------------------------------------------------------------ обо мне */

/* Тёмный блок. Секции чередуются по светлоте — светлый первый экран и услуги,
   тёмное «обо мне», светлые вопросы, тёмные отзывы, светлая запись, тёмный
   подвал. Два тёмных блока подряд слипаются в одну полосу, поэтому очередь
   держим строго. */
.about {
  position: relative;
  overflow: hidden;
  background: var(--navy-900);
  background-image: radial-gradient(80% 70% at 15% 0%, rgba(43, 92, 184, 0.32) 0%, rgba(43, 92, 184, 0) 60%);
  color: rgba(255, 255, 255, 0.86);
}

/* фирменный знак крупным водяным знаком: даёт блоку глубину и слой,
   без него тёмный прямоугольник читается как пустая заливка */
.about::after {
  content: '';
  position: absolute;
  inset-inline-end: -4%;
  bottom: -22%;
  width: min(44vw, 440px);
  aspect-ratio: 61 / 52;
  background: url('/assets/logo-mark.svg') no-repeat center / contain;
  filter: brightness(0) invert(1);
  opacity: 0.055;
  pointer-events: none;
}

.about > .container {
  position: relative;
  z-index: 1;
}

/* первый абзац — лид: крупнее и светлее остального рассказа */
.about__copy p:first-child {
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(var(--fs-md), 2.2vw, var(--fs-lg));
  line-height: 1.55;
}

.about .section__title {
  color: var(--white);
}

.about .eyebrow {
  color: var(--brass-200);
}

.about .prose p {
  color: rgba(255, 255, 255, 0.82);
}

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(32px, 4vw, 56px);
  align-items: start;
}

.about .section__head {
  margin-bottom: 40px;
}

/* Направления работы — не голые строки в пустоте, а панель со стеклянной
   гранью: на тёмном фоне ей нужна собственная плоскость, иначе перечень
   висит в воздухе и спорит с текстом за внимание. */
.about__points-title {
  margin-bottom: 18px;
  color: var(--brass-200);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.about__points {
  position: relative;
  display: grid;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: clamp(20px, 2.4vw, 26px);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.035) 55%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 18px 40px rgba(4, 14, 36, 0.35);
  backdrop-filter: blur(6px);
  overflow: hidden;
}

/* латунный блик по верхней грани — та же деталь, что у карточек услуг */
.about__points::before {
  content: '';
  position: absolute;
  inset-inline: 12%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(230, 217, 189, 0) 0%, rgba(230, 217, 189, 0.6) 50%, rgba(230, 217, 189, 0) 100%);
}

.about__point {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 14px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.86);
  font-size: var(--fs-sm);
  line-height: 1.5;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}

.about__point + .about__point {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.about__point::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brass-500);
  flex: none;
  transform: translateY(-2px);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.about__point:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--white);
  transform: translateX(2px);
}

[dir='rtl'] .about__point:hover {
  transform: translateX(-2px);
}

.about__point:hover::before {
  transform: translateY(-2px) scale(1.25);
  box-shadow: 0 0 0 5px rgba(179, 145, 79, 0.18);
}

/* ------------------------------------------------------------------ отзывы */

.reviews {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.86);
  background-image: radial-gradient(90% 70% at 50% 0%, rgba(43, 92, 184, 0.35) 0%, rgba(43, 92, 184, 0) 60%);
}

.reviews .section__title {
  color: var(--white);
}

.reviews .eyebrow {
  color: var(--brass-200);
}

/* RTL в виджете отзывов включается штатным классом Trustindex — его вешает
   initReviewsRtl() в main.js. Карточки, отступы и иконка платформы уезжают
   на нужную сторону их же правилами. Здесь остаётся только шапка виджета:
   свой разворот они для неё не предусмотрели. */
[dir='rtl'] .reviews__widget .ti-header-content {
  flex-direction: row-reverse;
}

/* кнопка прижата к краю через margin-left:auto — в развёрнутом ряду это уводит
   её на середину, зеркалим сторону */
[dir='rtl'] .reviews__widget .ti-header-write-btn-container {
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* Кнопка «написать отзыв» в шапке виджета. Пресет Trustindex рисует её чёрным
   по прозрачному — на нашей тёмной секции это нечитаемо, а цвет из их кабинета
   к кнопке не применяется. Их собственное правило стоит с !important, поэтому
   перебиваем тем же; длина селектора тоже их — иначе не хватает веса. */
.reviews__widget .ti-widget[data-layout-id][data-set-id] .ti-widget-header .ti-header-content .ti-header-write-btn-container .ti-header-write-btn {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--white) !important;
  border-color: rgba(255, 255, 255, 0.38) !important;
}

.reviews__widget .ti-widget[data-layout-id][data-set-id] .ti-widget-header .ti-header-content .ti-header-write-btn-container a.ti-header-write-btn:hover,
.reviews__widget .ti-widget[data-layout-id][data-set-id] .ti-widget-header .ti-header-content .ti-header-write-btn-container a.ti-header-write-btn:focus-visible {
  background-color: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.65) !important;
  color: var(--white) !important;
}

/* слот под сторонний embed (EmbedSocial / Jotform) */
.embed-slot {
  position: relative;
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: clamp(28px, 5vw, 56px);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  text-align: center;
  color: var(--ink-muted);
  font-size: var(--fs-sm);
}

.embed-slot--dark,
.reviews .embed-slot {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
}

/* на тёмных секциях штриховая плашка нечитаема — даём светлый вариант */
.embed-slot--dark .todo,
.reviews .todo,
.about .todo {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(230, 217, 189, 0.38);
  color: #f2e7cd;
}

.embed-slot__badge {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--brass-500);
  color: var(--navy-900);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.embed-slot p {
  max-width: 52ch;
}

.embed-slot__btn {
  margin-top: 8px;
}

/* ------------------------------------------------------------------ FAQ */

.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.faq .section__head {
  margin-bottom: 0;
}

.qa-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.qa {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.qa[open] {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.qa__q {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px clamp(18px, 2.5vw, 28px);
  font-family: var(--font-display, serif);
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--navy-800);
  cursor: pointer;
  list-style: none;
}

.qa__q::-webkit-details-marker {
  display: none;
}

.qa__icon {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  margin-inline-start: auto;
  border-radius: 50%;
  background: var(--navy-100);
  transition: background-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.qa__icon::before,
.qa__icon::after {
  content: '';
  position: absolute;
  inset: 50% 5px auto;
  height: 1.5px;
  background: var(--navy-700);
  transform: translateY(-50%);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.qa__icon::after {
  transform: translateY(-50%) rotate(90deg);
}

.qa[open] .qa__icon {
  background: var(--brass-200);
}

.qa[open] .qa__icon::after {
  opacity: 0;
  transform: translateY(-50%) rotate(0deg);
}

.qa__a {
  padding: 0 clamp(18px, 2.5vw, 28px) 22px;
  color: var(--ink-muted);
  animation: qa-open 0.35s var(--ease);
}

@keyframes qa-open {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* ------------------------------------------------------------------ CTA-баннер */

/* Светлый блок — между тёмными отзывами и тёмным подвалом. Вес призыва
   держится не фоном, а поднятой белой карточкой записи и латунной чертой
   сверху: на светлом фоне синяя кнопка бьёт заметнее, чем на тёмном. */
.cta {
  position: relative;
  padding-block: clamp(56px, 8vw, 104px);
  background: linear-gradient(180deg, var(--surface-3) 0%, var(--surface-2) 100%);
  border-block: 1px solid var(--line);
  border-top-width: 3px;
  border-top-color: var(--brass-500);
  color: var(--ink);
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  inset-inline-end: -10%;
  top: -30%;
  width: 60vw;
  height: 60vw;
  max-width: 720px;
  max-height: 720px;
  background: radial-gradient(circle, rgba(43, 92, 184, 0.1) 0%, rgba(43, 92, 184, 0) 65%);
  pointer-events: none;
}

.cta__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.cta__title {
  font-size: clamp(var(--fs-xl), 3.4vw, var(--fs-2xl));
}

.cta__text {
  margin-top: 16px;
  max-width: 42ch;
  color: var(--ink-muted);
  font-size: var(--fs-md);
}

.cta__row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* на широком экране настройки доступности живут в плавающей кнопке */
.nav__a11y-item {
  display: none;
}

.cta__book {
  display: grid;
  gap: 18px;
  justify-items: start;
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-lg);
}

.cta__booknote {
  color: var(--ink);
  font-size: var(--fs-md);
}

/* согласие на обработку данных: мелко, но читаемо — 4.6:1 на светлом фоне */
.consent {
  max-width: 46ch;
  color: var(--ink-muted);
  font-size: var(--fs-xs);
  line-height: 1.5;
}

.consent a {
  color: var(--navy-700);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent a:hover {
  color: var(--brass-600);
}

.modal__foot {
  padding: 12px clamp(16px, 3vw, 24px) 16px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

/* ------------------------------------------------- окно с формой записи */

/* пока окно открыто, страница под ним не прокручивается */
.is-locked,
.is-locked body {
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 32px);
}

/* display у .modal перебивает hidden — без этого закрытое окно невидимо,
   но лежит поверх страницы и съедает все клики */
.modal[hidden] {
  display: none;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 18, 44, 0.72);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.modal.is-open .modal__backdrop {
  opacity: 1;
}

.modal__window {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  /* Высоту кадра сообщает сама форма (см. initBooking), поэтому окно растёт
     по содержимому и упирается в потолок — если форма влезает, прокрутки нет.
     До первого сообщения работает запасная высота из --booking-h. */
  height: auto;
  /* потолок только по экрану: жёсткий предел в пикселях включал прокрутку
     даже там, где форма спокойно помещалась */
  max-height: 92vh;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.25s var(--ease), transform 0.3s var(--ease);
}

.modal.is-open .modal__window {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 3vw, 24px);
  background: linear-gradient(180deg, var(--navy-700), var(--navy-800));
  color: var(--white);
}

.modal__title {
  font-family: var(--font-display, serif);
  font-size: var(--fs-lg);
  font-weight: 500;
}

.modal__close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.modal__close:hover {
  background: rgba(255, 255, 255, 0.26);
}

.modal__body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  /* прокрутка появляется только когда форма выше потолка окна */
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface-2);
}

.modal__body iframe {
  display: block;
  width: 100%;
  height: var(--booking-h, 620px);
  border: 0;
}

.modal__loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ink-muted);
  font-size: var(--fs-sm);
}

/* подпись убираем, когда форма отрисовалась */
.modal.is-loaded .modal__loading {
  display: none;
}

@media (max-width: 640px) {
  .modal {
    padding: 0;
  }

  .modal__window {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }
}

/* ------------------------------------------------------------------ футер */

.sitefooter {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.72);
  font-size: var(--fs-sm);
  padding-top: clamp(40px, 5vw, 64px);
}

.sitefooter__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  padding-bottom: 40px;
}

/* знак один и тот же на всём сайте; в тёмном футере перекрашиваем его в белый */
.sitefooter__mark {
  width: auto;
  height: 64px;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.sitefooter__name {
  margin-top: 14px;
  font-family: var(--font-display, serif);
  font-size: var(--fs-md);
  color: var(--white);
}

.sitefooter__role {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--fs-xs);
}

.sitefooter__title {
  margin-bottom: 14px;
  color: var(--brass-200);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sitefooter ul {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sitefooter a {
  transition: color 0.2s var(--ease);
}

.sitefooter__contacts .wa-mini {
  width: 26px;
  height: 26px;
}

.sitefooter__contacts .wa-mini .icon {
  width: 16px;
  height: 16px;
}

.sitefooter a:hover {
  color: var(--white);
}

.sitefooter__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.62);
  font-size: var(--fs-xs);
}

.sitefooter__legal {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.35);
}

/* кредит агентства — в самом углу экрана, ВНЕ контентной области:
   прижат к краю вьюпорта, отступ от края равен отступу снизу */
.foot-credit {
  display: flex;
  justify-content: flex-end;
  padding-inline: 14px;
  padding-block: 0 14px;
}

.kha-credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 0;
  transition: opacity 0.25s var(--ease);
}

/* подпись «Разработка сайта —»: без неё знак читается как подпись владелицы */
.kha-credit__label {
  color: rgba(255, 255, 255, 0.52);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  line-height: 1.2;
  transition: color 0.25s var(--ease);
}

.kha-credit:hover .kha-credit__label {
  color: rgba(255, 255, 255, 0.9);
}

.kha-credit img {
  width: 35px;
  height: auto;
  filter: brightness(0) invert(0.68);
  transition: filter 0.25s var(--ease);
}

.kha-credit:hover {
  opacity: 0.82;
}

.kha-credit:hover img {
  filter: brightness(0) invert(1);
}

/* ------------------------------------------------------------------ правовая страница */

.legal {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
}

.legal-page {
  max-width: 820px;
}

.legal__h1 {
  font-size: clamp(var(--fs-xl), 4.2vw, var(--fs-3xl));
  color: var(--navy-800);
}

.legal__intro {
  margin-top: 20px;
  color: var(--ink-muted);
  font-size: var(--fs-md);
}

.legal-toc {
  margin-block: 36px 8px;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.legal-toc__h {
  margin-bottom: 14px;
  color: var(--brass-600);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-toc ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.legal-toc li {
  counter-increment: toc;
}

.legal-toc a {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink-muted);
  transition: color 0.2s var(--ease);
}

.legal-toc a::before {
  content: counter(toc) '.';
  color: var(--brass-600);
  font-weight: 700;
}

.legal-toc a:hover {
  color: var(--navy-700);
}

.legal-section {
  margin-top: 56px;
  scroll-margin-top: calc(var(--header-h) + 56px);
}

.legal-section h2 {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  font-size: clamp(var(--fs-lg), 2.6vw, var(--fs-xl));
  color: var(--navy-800);
}

.legal-section h3 {
  margin-top: 28px;
  margin-bottom: 10px;
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--navy-700);
}

.legal-section p {
  margin-bottom: 14px;
  color: var(--ink-muted);
  line-height: 1.75;
}

.legal-section ul {
  display: grid;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.legal-section li {
  display: flex;
  gap: 12px;
  color: var(--ink-muted);
  line-height: 1.65;
}

.legal-section li::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 11px;
  border-radius: 50%;
  background: var(--brass-500);
}

.legal-contact {
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.legal-contact__name {
  font-family: var(--font-display, serif);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--navy-800);
  margin-bottom: 2px !important;
}

.legal-contact__role {
  font-size: var(--fs-sm);
  color: var(--ink-muted);
  margin-bottom: 14px !important;
}

.legal-contact ul {
  margin-bottom: 0;
}

.legal-contact li {
  display: block;
}

.legal-contact li::before {
  display: none;
}

.legal-contact a {
  color: var(--navy-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-updated {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: var(--fs-sm);
  line-height: 1.7;
}

.legal-back {
  margin-top: 32px;
}

/* ------------------------------------------------------------------ 404 */

.notfound {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 100% 0%, var(--navy-100) 0%, rgba(231, 237, 248, 0) 58%),
    radial-gradient(80% 70% at 0% 100%, rgba(230, 217, 189, 0.32) 0%, rgba(230, 217, 189, 0) 60%), var(--surface);
}

.notfound__inner {
  max-width: 640px;
  padding-block: clamp(24px, 6vw, 64px);
}

.notfound__code {
  font-family: var(--font-display, serif);
  font-size: clamp(5rem, 18vw, 10rem);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--navy-700);
  opacity: 0.14;
  margin-bottom: 8px;
}

.notfound__title {
  font-size: clamp(var(--fs-xl), 5vw, var(--fs-3xl));
  color: var(--navy-800);
}

.notfound__text {
  margin-top: 20px;
  color: var(--ink-muted);
  font-size: var(--fs-md);
}

.notfound__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.notfound__links {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.notfound__links-title {
  margin-bottom: 14px;
  color: var(--brass-600);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.notfound__links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.notfound__links a {
  color: var(--navy-700);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
  transition: text-decoration-color 0.2s var(--ease);
}

.notfound__links a:hover {
  text-decoration-color: var(--navy-700);
}

/* ------------------------------------------------------------------ WhatsApp FAB */

.wa-fab {
  /* кнопка висит в том же углу, что и кредит агентства: над кредитом она
     приподнимается, а не исчезает — величину подъёма считает main.js */
  --fab-lift: 0px;
  position: fixed;
  inset-inline-end: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  transform: translateY(calc(var(--fab-lift) * -1));
  z-index: 60;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--wa);
  color: var(--white);
  box-shadow: 0 10px 28px rgba(15, 122, 61, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.wa-fab svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.wa-fab::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(15, 122, 61, 0.45);
  animation: wa-pulse 3.6s var(--ease) infinite;
}

@keyframes wa-pulse {
  0%,
  70%,
  100% {
    box-shadow: 0 0 0 0 rgba(15, 122, 61, 0.4);
  }
  35% {
    box-shadow: 0 0 0 14px rgba(15, 122, 61, 0);
  }
}

.wa-fab:hover {
  transform: translateY(calc(var(--fab-lift) * -1 - 3px)) scale(1.04);
  box-shadow: 0 16px 34px rgba(15, 122, 61, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ------------------------------------------------------------------ появление при скролле */

/* Без JS секции обязаны быть видны — поэтому скрываем только при .js на <html>. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------------ адаптив */

@media (min-width: 768px) {
  .cards {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }

  /* три услуги в один ряд, поровну */
  .card {
    grid-column: span 4;
  }

  .about__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  }

  /* панель и рассказ начинаются с одной высоты — шапка раздела теперь общая */
  .about__aside {
    margin-block-start: 0;
  }

  .faq__grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  }

  .cta__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .sitefooter__grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
  }
}

@media (min-width: 1024px) {
  .hero__inner {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  }

  /* рядом с текстом карточка встаёт вертикально — по кадру, тогда портрет
     виден почти целиком и колонка не выше текста */
  .hero__media {
    max-width: 460px;
    aspect-ratio: 4 / 5;
  }
}

/* Мобильное меню. Порог 1180, а не 1023: с пятью пунктами и длинным
   «Зачем нужен консультант» горизонтальное меню переставало помещаться
   в строку уже на 1170 и разъезжалось на две — между 1024 и 1170 шапка
   выглядела сломанной. Меняешь пункты меню — перепроверь порог. */
@media (max-width: 1180px) {
  .burger {
    display: block;
  }

  /* сама плавающая кнопка прячется в a11y.css — он подключается позже */
  .nav__a11y-item {
    display: block;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }

  .nav__a11y {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 0;
    background: none;
    font: inherit;
    text-align: start;
    cursor: pointer;
  }

  .nav__a11y-icon {
    display: inline-flex;
    width: 22px;
    height: 22px;
  }

  .nav__a11y-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
  }

  /* меню выпало из потока (position: absolute) — вправо кнопки прижимает
     уже сам блок действий, иначе бургер прилипает к имени */
  .siteheader__actions {
    margin-inline-start: auto;
  }

  /* выпадающее меню привязано к самой шапке — не зависит от того,
     уехал ли топбар при скролле */
  .nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    margin: 0;
    padding: 8px clamp(16px, 4vw, 48px) 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
  }

  .nav.is-open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav__list li + li {
    border-top: 1px solid var(--line);
  }

  .nav__link {
    display: block;
    padding: 16px 2px;
    font-size: var(--fs-md);
  }
}

@media (max-width: 700px) {
  :root {
    --header-h: 64px;
  }

  .brand__role {
    display: none;
  }

  .brand__mark {
    height: 38px;
  }

  .brand__name {
    font-size: var(--fs-base);
    letter-spacing: -0.01em;
  }

  .brand {
    gap: 10px;
    min-width: 0;
  }

  /* длинное имя ужимается многоточием, а не наезжает на бургер */
  .brand__name {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* WhatsApp продублирован плавающей кнопкой — в узкой шапке он только
     отжимает имя и наезжает на бургер */
  .siteheader .btn--wa {
    display: none;
  }

  .siteheader__inner {
    gap: 12px;
  }

  /* на узком экране в полоске остаётся только телефон: почта и адрес
     в неё не помещаются и повторены в подвале */
  .topbar__contacts .topbar__link:not(:first-child),
  .topbar__sep {
    display: none;
  }
}

@media (max-width: 560px) {

  .hero__cta .btn {
    flex: 1 1 100%;
  }
}

/* ------------------------------------------------------------------ доступность */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .topbar,
  .siteheader,
  .wa-fab {
    display: none;
  }
}
