/* ==========================================================================
   Стили сайта «Автоматизация бизнес-процессов»

   Принцип: редакционная вёрстка. Крупные лёгкие заголовки, одна гарнитура,
   строгая 12-колоночная сетка, тонкие линии вместо рамок и теней, много воздуха.

   Как устроен файл:
     1. Шрифты            7. Проблема и самопроверка   13. Подвал
     2. Переменные        8. Кто я                     14. Панель с формой
     3. База                                           15. Поля формы
     4. Сетка и секции   10. Услуги                    16. Баннер cookie
     5. Кнопки, ссылки   11. Как проходит работа       17. Юридические страницы
     6. Шапка, 1-й экран 12. Вопросы,                  18. Появление при прокрутке
                             финальный блок
   Сначала мобильная версия, ниже в каждом блоке — правки для 720px и 1024px.
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. Шрифт Onest — локальные файлы из /fonts
   Одна гарнитура на весь сайт: заголовки — обычное начертание с плотной разрядкой,
   текст — обычное, подписи и кнопки — среднее.
   -------------------------------------------------------------------------- */

@font-face { font-family: "Onest"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/onest-cyrillic-400.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/onest-cyrillic-500.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/onest-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/onest-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Расширенная латиница — в ней знак рубля ₽ */
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/onest-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/onest-latin-ext-500.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }


/* --------------------------------------------------------------------------
   2. Переменные
   Размеры шрифтов «резиновые»: плавно растут от телефона к большому монитору.
   -------------------------------------------------------------------------- */
:root {
  /* Палитра */
  --ink:      #101820;  /* графит — тёмные секции, основной текст */
  --ink-soft: #1C2733;  /* поверхность внутри тёмных секций */
  --paper:    #FAFAF8;  /* фон светлых секций */
  --paper-2:  #F1F0EC;  /* фон секций-чередований */
  --line:     #D6D4CE;  /* тонкие линии на светлом */
  --muted:    #5F6B77;  /* вторичный текст на светлом */
  --accent:   #8A6A3E;  /* латунь — акцент */

  /* Те же цвета с прозрачностью — для тёмных секций */
  --ink-92:    rgba(16, 24, 32, 0.92);
  --ink-60:    rgba(16, 24, 32, 0.6);
  --paper-80:  rgba(250, 250, 248, 0.8);
  --paper-60:  rgba(250, 250, 248, 0.6);   /* вторичный текст на тёмном, контраст 6.8:1 */
  --line-dark: rgba(214, 212, 206, 0.18);  /* линии на тёмном */

  /* Гарнитуры */
  --sans:    "Onest", Inter, -apple-system, "Segoe UI", sans-serif;
  --display: var(--sans);  /* гарнитура крупных заголовков и цифр */

  /* Размеры шрифтов */
  --fs-display: clamp(1.75rem, 0.7rem + 2.8vw, 3.15rem);   /* H1: 28 → 50px */
  --fs-h2:      clamp(1.5rem, 0.84rem + 2.17vw, 2.8rem);    /* H2: 24 → 45px */
  --fs-h2-rail: clamp(1.5rem, 0.98rem + 1.4vw, 2.275rem);   /* H2 в левой колонке: 24 → 36px */
  --fs-h3:      clamp(1.1875rem, 0.84rem + 0.77vw, 1.4875rem); /* H3 крупный: 19 → 24px */
  --fs-num:     clamp(1.25rem, 0.7rem + 1.54vw, 2.275rem);  /* крупные цифры: 20 → 36px */
  --fs-lead:    clamp(1.1875rem, 1.05rem + 0.55vw, 1.5rem); /* вводный текст: 19 → 24px */
  --fs-body:    clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);  /* текст: 17 → 19px */
  --fs-small:   0.9375rem;                                  /* 15px */
  --fs-meta:    0.8125rem;                                  /* 13px — подписи */

  /* Сетка и ритм */
  --container: 1320px;
  --gutter:    clamp(20px, 4.5vw, 72px);    /* поля по бокам */
  --gap:       clamp(16px, 2.2vw, 32px);    /* расстояние между колонками */
  --section-y: clamp(88px, 11vw, 176px);    /* отступы секций */
  --header-row: 72px;                       /* верхняя строка шапки: логотип и кнопка */
  --nav-h:     44px;                        /* строка разделов под шапкой (только на телефоне) */
  --header-h:  calc(var(--header-row) + var(--nav-h));

  /* Движение */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t: 200ms var(--ease);
}

/* Системная настройка «уменьшить движение» — все переходы мгновенные */
@media (prefers-reduced-motion: reduce) {
  :root { --t: 0ms; }
  *, *::before, *::after {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
    scroll-behavior: auto !important;
  }
}


/* --------------------------------------------------------------------------
   3. База
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

/* Атрибут hidden всегда скрывает элемент */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern", "liga";
}
body.is-locked { overflow: hidden; }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

/* Крупные заголовки: обычное начертание, плотная разрядка */
h1, h2 {
  font-family: var(--display);
  font-weight: 400;
  font-synthesis: none;
  text-wrap: balance;
}
h3 { font-weight: 500; }

p { text-wrap: pretty; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }

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

button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--ink); color: var(--paper); }
.section--ink ::selection { background: var(--paper); color: var(--ink); }

/* Видимый фокус для клавиатуры. На тёмном фоне — светлая рамка */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}
.section--ink :focus-visible,
.header :focus-visible,
.footer :focus-visible { outline-color: var(--paper); }

.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: var(--gutter);
  top: -100px;
  z-index: 200;
  padding: 12px 18px;
  font-size: var(--fs-small);
  background: var(--paper);
  color: var(--ink);
}
.skip-link:focus { top: 12px; }

/* Слово или фраза без переноса (например, «бизнес-процессы») */
.nowrap { white-space: nowrap; }

/* Вводный текст — крупнее основного */
.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  letter-spacing: -0.005em;
}


/* --------------------------------------------------------------------------
   4. Сетка и секции
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--ink     { background: var(--ink); color: var(--paper); }
.section--paper   { background: var(--paper); }
.section--paper-2 { background: var(--paper-2); }

/* Заголовок секции */
.sec-title {
  font-size: var(--fs-h2);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 14em;
}
.sec-title--wide { max-width: 17em; }

/* «Поле и текст»: левая колонка (4 из 12) — для подзаголовков,
   правая (8 из 12) — для содержания. На телефоне — одна колонка. */
.split {
  display: grid;
  gap: 32px var(--gap);
}
@media (min-width: 1024px) {
  .split { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .split__rail { grid-column: 1 / span 4; }
  .split__body { grid-column: 5 / -1; }
  /* заголовок в левой колонке — поменьше, чтобы уместился */
  .split--head .sec-title { font-size: var(--fs-h2-rail); }
}


/* --------------------------------------------------------------------------
   5. Кнопки и ссылки
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 32px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
  transition: background-color var(--t), color var(--t), border-color var(--t);
}
/* При наведении кнопка «выворачивается»: заливка уходит, остаётся контур */
.btn:hover { color: var(--ink); background: transparent; }
.btn:disabled,
.btn:disabled:hover {
  cursor: not-allowed;
  color: var(--paper);
  background: var(--muted);
  border-color: var(--muted);
}

/* Светлая кнопка — для тёмных секций */
.btn--light {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--paper);
}
.btn--light:hover { color: var(--paper); background: transparent; }

/* Кнопка с графитовым контуром — в списке услуг; при наведении заливается */
.btn--outline {
  color: var(--ink);
  background: transparent;
  border-color: var(--ink);
}
.btn--outline:hover { color: var(--paper); background: var(--ink); }

/* Контурная кнопка */
.btn--ghost {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--ink); }

.btn--sm {
  min-height: 44px;
  padding: 0 20px;
  font-size: 0.875rem;
}

/* Кнопка, похожая на ссылку: текст с латунной линией снизу */
.link-btn {
  display: inline-flex;
  align-items: center;
  padding: 0 0 4px;
  font-size: var(--fs-small);
  font-weight: 500;
  color: inherit;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--accent);
  cursor: pointer;
  transition: border-color var(--t);
}
.link-btn:hover { border-bottom-color: currentColor; }
.link-btn--quiet {
  font-weight: 400;
  border-bottom-color: var(--line-dark);
}


/* --------------------------------------------------------------------------
   6. Шапка и первый экран
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  flex-direction: column;
  color: var(--paper);
  background: var(--ink-92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-dark);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-row);
  flex-shrink: 0;
}

/* Строка разделов под шапкой — только на телефоне и планшете.
   Едет вместе с шапкой, потому что лежит внутри неё. Прокручивается пальцем вбок. */
.mobile-nav {
  height: var(--nav-h);
  border-top: 1px solid var(--line-dark);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mobile-nav::-webkit-scrollbar { display: none; }
.mobile-nav__list {
  display: flex;
  align-items: stretch;
  gap: 20px;
  min-width: max-content;
  height: 100%;
  padding-inline: var(--gutter);
}
.mobile-nav__link {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  white-space: nowrap;
  color: var(--paper-60);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--t), border-color var(--t);
}
.mobile-nav__link:hover,
.mobile-nav__link.is-active {
  color: var(--paper);
  border-bottom-color: var(--accent);
}
.header__brand {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  line-height: 1.25;
  text-decoration: none;
}
/* Логотип: надпись с подстрочником KIRILL, поля обрезаны, фон прозрачный.
   align-self нужен, иначе картинка растянется по ширине подписи и потеряет пропорции. */
.header__logo {
  align-self: flex-start;
  width: auto;
  height: 22px;
}
@media (min-width: 560px) {
  .header__logo { height: 26px; }
}
/* На светлой шапке юридических страниц логотип остаётся белым — шапка там тёмная */
.header__tagline {
  display: none;
  font-size: var(--fs-meta);
  color: var(--paper-60);
  white-space: nowrap;
}
.header__nav { display: none; }
.header .btn--sm { flex-shrink: 0; padding: 0 14px; font-size: 0.8125rem; }

@media (min-width: 560px) {
  .header__tagline { display: block; }
}
/* на ноутбуках с узким экраном подпись под именем не помещается рядом с меню */
@media (min-width: 1024px) and (max-width: 1279px) {
  .header__tagline { display: none; }
}
@media (min-width: 1024px) {
  :root { --nav-h: 0px; }
  .mobile-nav { display: none; }
  .header__inner { height: 100%; }
  .header .btn--sm { padding: 0 20px; font-size: 0.875rem; }
  .header__nav { display: block; margin-left: auto; }
  .header__nav-list { display: flex; gap: clamp(20px, 2.2vw, 36px); }
  .header__nav-link {
    position: relative;
    display: block;
    padding-block: 8px;
    font-size: 0.875rem;
    color: var(--paper-60);
    text-decoration: none;
    transition: color var(--t);
  }
  /* линия под пунктом: появляется при наведении и у раздела, который сейчас на экране */
  .header__nav-link::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--t);
  }
  .header__nav-link:hover,
  .header__nav-link.is-active { color: var(--paper); }
  .header__nav-link:hover::after,
  .header__nav-link.is-active::after { transform: scaleX(1); }
}

/* Первый экран */
.hero {
  /* на невысоких экранах ноутбуков отступ меньше, чтобы кнопка была видна сразу */
  padding-top: calc(var(--header-h) + clamp(40px, min(7vw, 9vh), 112px));
  padding-bottom: clamp(56px, 7vw, 112px);
}
.hero__title {
  font-size: var(--fs-display);
  line-height: 1.06;
  letter-spacing: -0.035em;
  max-width: 24em;
}
.hero__bottom {
  display: grid;
  gap: 48px var(--gap);
  margin-top: clamp(40px, 5vw, 72px);
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid var(--line-dark);
}
.hero__lead {
  max-width: 30em;
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--paper-80);
}
/* Блок «Чем я отличаюсь» — мельче подзаголовка, с латунной линией слева */
.hero__speed {
  max-width: 44em;
  margin-top: clamp(20px, 2.4vw, 28px);
  padding-left: 16px;
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--paper-60);
  border-left: 1px solid var(--accent);
}
.hero__speed-title {
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--paper);
}
.hero__intro .btn { margin-top: clamp(28px, 3vw, 40px); }

.hero__fact {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-block: 14px;
  font-size: var(--fs-small);
  color: var(--paper-80);
  border-bottom: 1px solid var(--line-dark);
}
.hero__fact:first-child { padding-top: 0; }
/* короткая латунная черта перед фактом */
.hero__fact::before {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 1px;
  margin-top: 0.8em; /* черта напротив первой строки, даже если факт в две строки */
  background: var(--accent);
}

@media (min-width: 1024px) {
  .hero__bottom {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
  }
  .hero__intro { grid-column: 1 / span 7; }
  .hero__facts { grid-column: 9 / -1; }
}


/* --------------------------------------------------------------------------
   7. Проблема и самопроверка
   -------------------------------------------------------------------------- */
#problem .split { margin-top: clamp(40px, 5vw, 72px); }

/* Два абзаца в две колонки */
.prose-2 {
  display: grid;
  gap: 24px var(--gap);
}
.prose-2 p { max-width: 34em; }
@media (min-width: 720px) {
  .prose-2 { grid-template-columns: 1fr 1fr; }
}

/* Строка с личной цифрой (включить, когда будет цифра) */
.figure-line {
  margin-top: 48px;
  letter-spacing: -0.02em;
  font-family: var(--display);
  font-size: var(--fs-h3);
  line-height: 1.3;
}
.figure {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.diag {
  display: grid;
  gap: 32px var(--gap);
  margin-top: clamp(80px, 10vw, 152px);
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--ink);
}
.diag__title {
  font-family: var(--display);
  font-size: var(--fs-h3);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.diag__hint {
  margin-top: 12px;
  font-size: var(--fs-small);
  color: var(--muted);
}
.diag__count {
  margin-top: 24px;
  font-size: var(--fs-small);
  font-variant-numeric: tabular-nums;
}
.diag__count span { font-weight: 500; }

.diag__list {
  display: grid;
  border-top: 1px solid var(--line);
}
@media (min-width: 720px) {
  .diag__list {
    grid-template-columns: 1fr 1fr;
    column-gap: var(--gap);
    border-top: 0;
  }
  .diag__list li:nth-child(-n+2) { border-top: 1px solid var(--line); }
}
.diag__list li { border-bottom: 1px solid var(--line); }

/* Пункт-переключатель */
.check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 16px;
  align-items: start;
  height: 100%;
  padding: 18px 0;
  cursor: pointer;
}
.check__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.check__box {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: transparent;
  border: 1px solid var(--muted);
  border-radius: 2px;
  transition: background-color var(--t), border-color var(--t), color var(--t);
}
.check__box svg { width: 14px; height: 14px; }
.check:hover .check__box { border-color: var(--ink); }
.check__input:checked + .check__box {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}
.check__input:focus-visible + .check__box {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.check__text { line-height: 1.5; }

.diag__result {
  display: grid;
  gap: 24px;
  align-items: center;
  margin-top: 40px;
  padding-left: 0;
  transition: padding-left var(--t);
}
.diag__outro {
  font-size: var(--fs-lead);
  line-height: 1.4;
  color: var(--muted);
  transition: color var(--t);
}
/* Отмечено два пункта и больше — вывод становится ярче */
.diag--solved .diag__outro { color: var(--ink); }
.diag--solved .diag__result {
  padding-left: 20px;
  border-left: 2px solid var(--accent);
}

@media (min-width: 720px) {
  .diag__result { grid-template-columns: 1fr auto; }
}
@media (min-width: 1024px) {
  .diag { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .diag__head { grid-column: 1 / span 4; }
  .diag__body { grid-column: 5 / -1; }
}


/* --------------------------------------------------------------------------
   8. Кто я
   -------------------------------------------------------------------------- */
/* Заголовок слева (4 колонки), текст справа (8 колонок) — как в «Вопросах» */
.about__body > * + * { margin-top: 24px; }
.about__body .sec-title { margin-bottom: clamp(32px, 4vw, 48px); }
.about__body p { max-width: 36em; }

@media (min-width: 1024px) {
  .about__body {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
    align-items: start;
  }
  .about__body > * + * { margin-top: 0; }
  .about__body .sec-title {
    grid-column: 1 / span 4;
    grid-row: 1 / span 20;
    margin-bottom: 0;
    font-size: var(--fs-h2-rail);
    position: sticky;
    top: calc(var(--header-h) + 40px);
  }
  .about__body p { grid-column: 5 / -1; }
  .about__body p + p { margin-top: 24px; }
}


/* --------------------------------------------------------------------------
   10. Услуги — строки, которые удобно сравнивать
   -------------------------------------------------------------------------- */
.services { margin-top: clamp(48px, 6vw, 88px); }

.service {
  display: grid;
  gap: 24px var(--gap);
  padding-block: clamp(32px, 4vw, 56px);
  border-top: 1px solid var(--line);
}
.service:last-child { border-bottom: 1px solid var(--line); }

.service__title {
  font-family: var(--display);
  font-size: var(--fs-h3);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.025em;
  max-width: 12em;
}

.service__desc {
  display: grid;
  gap: 20px;
}
.service__item dt {
  margin-bottom: 4px;
  font-size: var(--fs-meta);
  color: var(--muted);
}
.service__desc dd { max-width: 34em; }

.service__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px var(--gap);
}
.service__meta dd {
  font-size: var(--fs-lead);
  line-height: 1.3;
}
.service__note {
  margin-top: 12px;
  font-size: var(--fs-meta);
  line-height: 1.5;
  color: var(--muted);
}
.service__side .link-btn,
.service__side .btn { margin-top: 0; }

/* Вся строка услуги кликается и ведёт на страницу услуги.
   Ссылка — название, её область растянута на всю строку; кнопка остаётся поверх. */
.service { position: relative; }
.service__link {
  color: inherit;
  text-decoration: none;
}
.service__link::after {
  content: "";
  position: absolute;
  inset: 0;
}
.service__link:focus-visible { outline: none; }
.service__link:focus-visible::after {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}
.service__side .btn { position: relative; z-index: 1; }
.service__side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}
.service__more {
  order: 2;
  padding-bottom: 3px;
  font-size: var(--fs-small);
  font-weight: 500;
  border-bottom: 1px solid var(--accent);
  transition: border-color var(--t);
}
.service__title { transition: color var(--t); }
.service:hover .service__more { border-bottom-color: var(--ink); }
.service:hover .service__title { color: var(--muted); }
@media (min-width: 1024px) {
  .service__side { flex-direction: column; align-items: flex-start; }
}

/* Главная услуга — латунная линия сверху */
.service--main { border-top: 2px solid var(--accent); }

@media (min-width: 720px) and (max-width: 1023px) {
  .service { grid-template-columns: 1fr 1fr; }
  .service__title { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
  .service {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
  }
  .service__title { grid-column: 1 / span 4; }
  .service__desc  { grid-column: 5 / span 5; }
  .service__side  { grid-column: 10 / -1; }
  .service__meta  { grid-template-columns: 1fr; }
}

.services__footnote p + p { margin-top: 8px; }
.services__footnote {
  margin-top: 32px;
  font-size: var(--fs-small);
  color: var(--muted);
  max-width: 40em;
}
@media (min-width: 1024px) {
  .services__footnote { margin-left: calc((100% + var(--gap)) * 4 / 12); }
}


/* --------------------------------------------------------------------------
   11. Как проходит работа — пять шагов
   -------------------------------------------------------------------------- */
.steps {
  display: grid;
  margin-top: clamp(48px, 6vw, 88px);
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: 16px;
  padding-bottom: 32px;
}
/* вертикальная линия шагов на телефоне */
.step::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 44px;
  bottom: 8px;
  width: 1px;
  background: var(--line);
}
.step:last-child::before { display: none; }
.step__num {
  grid-row: 1 / span 3;
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1.35;
  color: var(--accent);
  font-variant-numeric: lining-nums;
}
.step__title {
  font-size: 1.1875rem;
  line-height: 1.3;
}
.step__text {
  margin-top: 6px;
  color: var(--ink);
}
.step__time {
  margin-top: 10px;
  font-size: var(--fs-meta);
  color: var(--muted);
}

@media (min-width: 1024px) {
  .steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    column-gap: var(--gap);
  }
  .step {
    display: flex;
    flex-direction: column;
    padding-top: 28px;
    padding-bottom: 0;
    border-top: 1px solid var(--line);
  }
  .step::before { display: none; }
  .step:first-child { border-top: 2px solid var(--accent); padding-top: 27px; }
  .step__num {
    font-size: var(--fs-num);
    line-height: 1;
    margin-bottom: clamp(40px, 5vw, 72px);
  }
  .step__text { font-size: 1rem; flex-grow: 1; }
  .step__time {
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }
}


/* --------------------------------------------------------------------------
   12. Вопросы · Финальный блок
   -------------------------------------------------------------------------- */
/* Отдельные страницы (вопросы, контакты): сверху отступ под фиксированную шапку */
.faq-page,
.page-top { padding-top: calc(var(--header-h) + clamp(56px, 8vw, 120px)); }

/* Страница услуги */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: clamp(24px, 3vw, 40px);
  font-size: var(--fs-small);
  color: var(--muted);
}
.crumbs a { color: var(--ink); text-decoration-color: var(--accent); }
.service-page__intro { margin-top: clamp(28px, 4vw, 48px); }
.service-page__lead {
  max-width: 34em;
  font-size: var(--fs-lead);
  line-height: 1.5;
}
.service-page__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: clamp(28px, 3vw, 40px);
}
.service-page__hint { font-size: var(--fs-small); color: var(--muted); }

.detail {
  margin-top: clamp(56px, 7vw, 96px);
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid var(--line);
}
.detail__title {
  font-size: var(--fs-h3);
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.detail__list { display: grid; }
.detail__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}
.detail__item:first-child { padding-top: 0; }
.detail__item::before {
  content: "";
  flex-shrink: 0;
  width: 14px;
  height: 1px;
  margin-top: 0.8em;
  background: var(--accent);
}
/* результат — с галочкой вместо черты */
.detail__list--result .detail__item::before {
  width: 16px;
  height: 16px;
  margin-top: 0.25em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8.5l3 3 7-7' stroke='%238A6A3E' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat center / contain;
}
.detail__note {
  max-width: 34em;
  font-size: var(--fs-lead);
  line-height: 1.5;
}
.detail__process {
  margin-top: clamp(48px, 6vw, 72px);
  font-size: var(--fs-small);
  color: var(--muted);
}
.detail__process a { color: var(--ink); text-decoration-color: var(--accent); }
@media (min-width: 1024px) {
  .detail__process { margin-left: calc((100% + var(--gap)) * 4 / 12); }
}

/* Другие услуги — список ссылок */
.others { border-top: 1px solid var(--line); }
.others__list {
  display: grid;
  border-top: 1px solid var(--line);
}
.others__list li { border-bottom: 1px solid var(--line); }
.others__link {
  display: block;
  padding-block: 14px;
  text-decoration: none;
  transition: color var(--t);
}
.others__link:hover { color: var(--muted); }
@media (min-width: 720px) {
  .others__list {
    grid-template-columns: 1fr 1fr;
    column-gap: var(--gap);
    border-top: 0;
  }
  .others__list li:nth-child(-n+2) { border-top: 1px solid var(--line); }
}

/* Контакты под размытием: видно, что контакт есть, но прочитать можно только после нажатия «Показать».
   Нужно, чтобы считать в Метрике, сколько людей реально берут контакт. */
.reveal-contact {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.reveal-contact > a {
  user-select: none;
  pointer-events: none;
}
/* размыта только часть контакта: начало видно, поэтому понятно, что это телефон, ник или почта */
.reveal-contact__hidden {
  filter: blur(4px);
  transition: filter var(--t);
}
.reveal-contact.is-revealed > a {
  user-select: auto;
  pointer-events: auto;
}
.reveal-contact.is-revealed .reveal-contact__hidden { filter: none; }
.reveal-contact__btn {
  padding: 0 0 2px;
  font-size: var(--fs-meta);
  font-weight: 500;
  color: inherit;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--accent);
  cursor: pointer;
  transition: border-color var(--t), color var(--t);
}
.reveal-contact__btn:hover { border-bottom-color: currentColor; }
.reveal-contact.is-revealed .reveal-contact__btn { display: none; }
/* крупные контакты на странице «Контакты» размываем чуть сильнее */
.reveal-contact > .contacts__value .reveal-contact__hidden { filter: blur(6px); }
.reveal-contact.is-revealed > .contacts__value .reveal-contact__hidden { filter: none; }

/* Уведомление «Скопировано» */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 120;
  padding: 12px 20px;
  font-size: var(--fs-small);
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--accent);
  border-radius: 2px;
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity var(--t), transform var(--t);
}
.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Страница кейсов */
.cases__lead {
  max-width: 34em;
  margin-top: clamp(20px, 2.5vw, 28px);
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--muted);
}
.cases { margin-top: clamp(40px, 5vw, 72px); }
.case {
  display: grid;
  gap: 24px var(--gap);
  padding-block: clamp(36px, 4.5vw, 64px);
  border-top: 1px solid var(--line);
}
.case:last-child { border-bottom: 1px solid var(--line); }
.case__area {
  margin-bottom: 10px;
  font-size: var(--fs-meta);
  color: var(--accent);
}
.case__title {
  font-size: var(--fs-h3);
  line-height: 1.15;
  letter-spacing: -0.025em;
  max-width: 14em;
}
.case__body { display: grid; gap: clamp(24px, 3vw, 36px); }
.case__label {
  margin-bottom: 8px;
  font-size: var(--fs-meta);
  color: var(--muted);
}
.case__text { max-width: 36em; }
.case__note {
  max-width: 36em;
  padding-left: 14px;
  font-size: var(--fs-small);
  color: var(--muted);
  border-left: 2px solid var(--accent);
}
.case__numbers { margin-top: 18px; }
.case__number {
  font-size: var(--fs-h3);
  letter-spacing: -0.02em;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
@media (min-width: 1024px) {
  .case { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .case__head { grid-column: 1 / span 4; position: sticky; top: calc(var(--header-h) + 40px); }
  .case__body { grid-column: 5 / -1; }
}

/* Страница контактов */
.contacts { margin-top: clamp(40px, 5vw, 72px); }
.contacts--details {
  margin-top: clamp(64px, 8vw, 112px);
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--line);
}
.contacts__lead {
  max-width: 24em;
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--muted);
}
.contacts__cta { margin-top: 28px; }
.contacts__subtitle {
  font-size: var(--fs-h3);
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.contacts__list { border-top: 1px solid var(--ink); }
.contacts__list--plain { border-top-color: var(--line); }
.contacts__item {
  display: grid;
  gap: 4px;
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
}
.contacts__label {
  font-size: var(--fs-meta);
  color: var(--muted);
}
.contacts__value {
  justify-self: start;
  font-family: var(--display);
  font-size: var(--fs-h3);
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--t);
}
.contacts__value:hover { border-bottom-color: var(--accent); }
.contacts__text { font-size: var(--fs-body); }
@media (min-width: 720px) {
  .contacts__item {
    grid-template-columns: 200px 1fr;
    align-items: baseline;
    gap: 24px;
  }
}

/* Вопросы: заголовок слева остаётся на месте при прокрутке списка */
@media (min-width: 1024px) {
  .faq__title {
    position: sticky;
    top: calc(var(--header-h) + 40px);
  }
}
.faq { border-top: 1px solid var(--ink); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__question {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-block: 26px;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.3125rem);
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
  transition: color var(--t);
}
.faq__question::-webkit-details-marker { display: none; }
.faq__question::marker { content: ""; }
.faq__question:hover { color: var(--muted); }

/* плюс, который при раскрытии поворачивается в крестик */
.faq__icon {
  position: relative;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 0.3em;
  transition: transform 300ms var(--ease);
}
.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background: var(--ink);
}
.faq__icon::after { transform: rotate(90deg); }
.faq__item[open] .faq__icon { transform: rotate(45deg); }

.faq__answer {
  padding-bottom: 28px;
  padding-right: 40px;
  color: var(--muted);
}
.faq__answer p { max-width: 36em; }
.faq__answer > * + * { margin-top: 12px; }

/* Финальный блок */
.final {
  padding-block: clamp(96px, 12vw, 192px);
  border-top: 1px solid var(--line);
}
.final__inner {
  display: grid;
  gap: 40px var(--gap);
}
.final__text {
  font-family: var(--display);
  font-size: var(--fs-h2);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 15em;
  text-wrap: balance;
}
@media (min-width: 1024px) {
  .final__inner {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
  }
  .final__text   { grid-column: 1 / span 9; }
  .final__action { grid-column: 10 / -1; justify-self: end; }
}


/* --------------------------------------------------------------------------
   13. Подвал
   -------------------------------------------------------------------------- */
.footer {
  padding-block: clamp(72px, 9vw, 128px) 32px;
  font-size: var(--fs-small);
  color: var(--paper-60);
  background: var(--ink);
}
.footer__brand {
  font-family: var(--display);
  font-size: clamp(1.5rem, 0.98rem + 1.68vw, 2.45rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--paper);
}
/* Осталась только подпись — набираем её крупнее, чтобы верх подвала не выглядел пустым */
.footer__tagline {
  font-size: var(--fs-h3);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.footer__grid {
  display: grid;
  gap: 40px var(--gap);
  margin-top: clamp(56px, 7vw, 96px);
  padding-top: 32px;
  border-top: 1px solid var(--line-dark);
}
.footer__title {
  margin-bottom: 14px;
  font-size: var(--fs-meta);
  color: var(--paper-60);
}
.footer__list { color: var(--paper-80); }
.footer__list > li + li { margin-top: 8px; }
.footer a {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size var(--t), color var(--t);
}
.footer a:hover { color: var(--paper); background-size: 100% 1px; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-top: clamp(56px, 7vw, 96px);
  padding-top: 24px;
  font-size: var(--fs-meta);
  border-top: 1px solid var(--line-dark);
}
.footer__bottom .link-btn { font-size: var(--fs-meta); color: var(--paper-60); }
.footer__bottom .link-btn:hover { color: var(--paper); }

@media (min-width: 720px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .footer__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .footer__col:nth-child(1) { grid-column: 1 / span 4; }
  .footer__col:nth-child(2) { grid-column: 5 / span 5; }
}


/* --------------------------------------------------------------------------
   14. Панель с формой — выезжает справа (на телефоне — на весь экран)
   -------------------------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(600px, 100%);
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-left: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.modal::backdrop {
  background: var(--ink-60);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.modal[open] { animation: drawer-in 420ms var(--ease); }
.modal[open]::backdrop { animation: fade-in 300ms ease; }
@keyframes drawer-in {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal__inner {
  position: relative;
  min-height: 100%;
  padding: clamp(28px, 5vw, 56px);
  padding-top: clamp(72px, 9vw, 96px);
}
.modal__title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 1.05rem + 1.4vw, 1.925rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.03em;
  padding-right: 32px;
}
.modal__close {
  position: absolute;
  top: clamp(16px, 3vw, 28px);
  right: clamp(16px, 3vw, 28px);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color var(--t), transform var(--t);
}
.modal__close:hover { border-color: var(--ink); transform: rotate(90deg); }
.modal__close svg { width: 14px; height: 14px; }


/* --------------------------------------------------------------------------
   15. Поля формы — линия снизу, без рамок
   -------------------------------------------------------------------------- */
.form { margin-top: clamp(32px, 4vw, 48px); }
.form__fields > * + * { margin-top: 28px; }

.field__label {
  display: block;
  font-size: var(--fs-meta);
  font-weight: 500;
  color: var(--ink);
}
.field__req { color: var(--muted); font-weight: 400; }

.field__control {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 0;
  font-size: 1.0625rem; /* 17px — iOS не увеличивает страницу при фокусе */
  line-height: 1.4;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--muted);
  border-radius: 0;
  transition: border-color var(--t), box-shadow var(--t);
}
.field__control:hover { border-bottom-color: var(--ink); }
.field__control:focus-visible {
  outline: none;
  border-bottom-color: var(--ink);
  box-shadow: 0 1px 0 0 var(--ink); /* линия становится толще: 2px */
}
textarea.field__control { min-height: 80px; resize: vertical; }

select.field__control {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23101820'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  text-overflow: ellipsis;
}

/* Ошибка у поля */
.field__control[aria-invalid="true"] {
  border-bottom-color: var(--ink);
  box-shadow: 0 1px 0 0 var(--ink);
}
.field__error {
  display: block;
  margin-top: 8px;
  padding-left: 12px;
  font-size: var(--fs-meta);
  font-weight: 500;
  border-left: 2px solid var(--accent);
}
.field__error:empty { display: none; }

.form__trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 14px;
  align-items: start;
  margin-top: 36px;
  font-size: var(--fs-meta);
  line-height: 1.55;
  color: var(--muted);
}
.consent__box {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--ink);
  cursor: pointer;
}
.consent a { color: var(--ink); text-decoration-color: var(--accent); }

.form__submit {
  width: 100%;
  margin-top: 28px;
}
.form__status {
  margin-top: 20px;
  padding-left: 14px;
  font-size: var(--fs-small);
  border-left: 2px solid var(--accent);
}
.form__status a { text-decoration-color: var(--accent); }

.form-success__text {
  margin-top: 20px;
  font-size: var(--fs-lead);
  color: var(--muted);
}
.form-success .btn { margin-top: 40px; }


/* --------------------------------------------------------------------------
   16. Баннер cookie — небольшая панель в углу, страницу не закрывает
   -------------------------------------------------------------------------- */
.cookie {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 90;
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 24px;
  font-size: var(--fs-small);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
}
@media (min-width: 720px) and (max-width: 1023px) {
  .cookie {
    left: 24px;
    right: auto;
    bottom: 24px;
    width: 440px;
  }
}
/* На широком экране — тонкая полоса внизу: текст слева, кнопки справа */
@media (min-width: 1024px) {
  .cookie {
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px var(--gutter);
    border-width: 1px 0 0;
  }
  .cookie__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 48px;
    align-items: center;
    max-width: var(--container);
    margin-inline: auto;
  }
  /* заголовок и текст — одной строкой, чтобы полоса была низкой */
  .cookie .cookie__title,
  .cookie .cookie__text { display: inline; }
  .cookie .cookie__title {
    margin-right: 8px;
    font-family: var(--sans);
    font-size: var(--fs-small);
    font-weight: 500;
  }
  .cookie .cookie__text { margin-top: 0; }
  .cookie__actions { flex-wrap: nowrap; }
  .cookie__settings {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr auto;
    column-gap: 48px;
    align-items: center;
  }
}
.cookie__inner {
  display: grid;
  gap: 18px;
}
.cookie__title {
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.cookie__text {
  margin-top: 8px;
  font-size: var(--fs-meta);
  line-height: 1.55;
  color: var(--muted);
}
.cookie__text a { color: var(--ink); text-decoration-color: var(--accent); }
.cookie__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}
.cookie__actions .btn { flex: 1 1 auto; }
.cookie__actions .link-btn { font-size: var(--fs-meta); }

.cookie__settings {
  display: grid;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.cookie__option {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
}
.cookie__option-name { font-weight: 500; font-size: var(--fs-small); }
.cookie__option-desc { font-size: var(--fs-meta); line-height: 1.5; color: var(--muted); }

/* Переключатель */
.switch {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 22px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid var(--muted);
  border-radius: 11px;
  cursor: pointer;
  transition: background-color var(--t), border-color var(--t);
}
.switch::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: var(--muted);
  border-radius: 50%;
  transition: transform var(--t), background-color var(--t);
}
.switch:checked { background: var(--ink); border-color: var(--ink); }
.switch:checked::before { transform: translateX(18px); background: var(--paper); }
.switch:disabled { cursor: not-allowed; opacity: 0.5; }


/* --------------------------------------------------------------------------
   17. Юридические страницы
   -------------------------------------------------------------------------- */
.legal {
  max-width: calc(46rem + 2 * var(--gutter));
  padding-block: calc(var(--header-h) + clamp(40px, 6vw, 88px)) var(--section-y);
}
.legal__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.legal__meta {
  margin-top: 16px;
  font-size: var(--fs-small);
  color: var(--muted);
}
.legal__body {
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--ink);
}
.legal__body h2 {
  margin-top: 56px;
  margin-bottom: 16px;
  font-family: var(--sans);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0;
}
.legal__body h2:first-child { margin-top: 0; }
.legal__body p + p,
.legal__body p + ul,
.legal__body ul + p { margin-top: 14px; }
.legal__body ul { display: grid; gap: 8px; margin-top: 14px; }
.legal__body li {
  position: relative;
  padding-left: 26px;
}
.legal__body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 12px;
  height: 1px;
  background: var(--accent);
}
.legal__body a { text-decoration-color: var(--accent); }


/* --------------------------------------------------------------------------
   18. Появление блоков при прокрутке
   Включается, только если работают скрипты (класс js у <html>),
   и выключается системной настройкой «уменьшить движение».
   -------------------------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 1000ms var(--ease), transform 1000ms var(--ease);
  transition-delay: var(--d, 0ms);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
