/* ============================================================
   Вмиг — main.css

   1. Токены              6. Карточки, шаги, плитки
   2. Каркас              7. Прайс и вкладки
   3. Фон, дуги, навигация 8. Форма
   4. Шапка               9. Подвал и модальное окно
   5. Первый экран        10. Появление, адаптив, доступность

   Анимируем только transform и opacity.
   ============================================================ */

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

:root {
  /* Монохром холодной дымки: цвет здесь — это свет, а не оттенок. */
  --bg:          #0b1015;
  --bg-deep:     #070a0e;
  --fog-near:    #2b3d4a;
  --ink:         #eef4f8;
  --ink-soft:    #a8bac6;
  --ink-mute:    #6b8291;

  /* Стекло. Светлое стекло не кладём на светлое стекло. */
  --glass:       rgba(210, 232, 245, 0.055);
  --glass-hi:    rgba(210, 232, 245, 0.10);
  --glass-solid: rgba(238, 246, 250, 0.94);
  --edge:        rgba(255, 255, 255, 0.13);
  --edge-soft:   rgba(255, 255, 255, 0.07);

  /* Единственный «цвет» — холодный свет для активных состояний. */
  --beam:        #cfe6f4;
  --alarm:       #f0b8ae;

  --font-display: "Onest", ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
  --font-body:    "Golos Text", ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;

  /* Кривые — из таблицы, не выдуманные */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --pad-x:  clamp(1.25rem, 4vw, 4.5rem);
  --radius: 22px;
  --wrap:   80rem;

  color-scheme: dark;
}

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

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* clip, а не hidden: hidden делает элемент прокручиваемым контейнером,
     из-за чего переход по якорю из шапки перестаёт работать. */
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  line-height: 1.55;
  overflow-x: clip;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  padding-left:  env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

body.is-locked { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--beam);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Якорь не должен уезжать под закреплённую шапку. */
section[id] { scroll-margin-top: clamp(4.5rem, 10vh, 6.5rem); }

.wrap {
  width: min(100%, var(--wrap));
  margin-inline: auto;
}

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

.skip-link {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -120%);
  z-index: 100;
  padding: 0.7rem 1.2rem;
  background: var(--glass-solid);
  color: #0b1015;
  border-radius: 0 0 12px 12px;
  transition: transform 180ms var(--ease-out);
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(207, 230, 244, 0.45);
  cursor: pointer;
  transition: color 180ms var(--ease-out), text-decoration-color 180ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .link:hover { color: var(--beam); text-decoration-color: var(--beam); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 180ms var(--ease-out), border-color 180ms var(--ease-out);
}

.btn--light { background: var(--glass-solid); color: #0b1015; }
.btn--ghost { background: transparent; border-color: var(--edge); color: var(--ink); }

/* Стекло: та же поверхность, что у плашек навигации и карточек. */
.btn--glass {
  background: var(--glass-hi);
  border-color: var(--edge);
  color: var(--ink);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.btn:active { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
  .btn--light:hover { background: #ffffff; }
  .btn--ghost:hover { background: var(--glass-hi); border-color: rgba(255, 255, 255, 0.28); }
  .btn--glass:hover { background: rgba(210, 232, 245, 0.16); border-color: rgba(255, 255, 255, 0.28); }
}

/* ---------- 3. Фон, дуги, боковая навигация ---------- */

.fog {
  position: fixed;
  inset: 0;
  z-index: -2;
  /* Фоновое изображение, если понадобится, ставится первым слоем:
     url("../img/hero-bg.webp") center / cover no-repeat, */
  background:
    radial-gradient(115% 62% at 50% 112%, var(--fog-near) 0%, transparent 68%),
    radial-gradient(70%  55% at 8%  6%,   #223441        0%, transparent 62%),
    radial-gradient(62%  50% at 92% 14%,  #1e2f3b        0%, transparent 62%),
    radial-gradient(140% 90% at 50% 50%,  #101a22        0%, #080c11 100%);
}

/* Зерно: убирает полосы на больших градиентах. */
.fog::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.2;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.glow {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  height: 42vh;
  z-index: -1;
  background: radial-gradient(70% 100% at 50% 128%, rgba(155, 196, 222, 0.2) 0%, transparent 70%);
}

/* Дуга одна, слева. Радиус намеренно огромный — линия пологая
   и не вылезает за свою узкую полосу.
   Концы не обрезаны, а растворены: заливка обоих штрихов идёт
   градиентом с прозрачностью на краях (описан в разметке). */
.arc {
  position: fixed;
  top: 50%;
  z-index: 30;
  width: 64px;
  height: min(82vh, 820px);
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--beam);
}

.arc--left { left: clamp(0.25rem, 1.2vw, 1.2rem); }

.arc__track { stroke: url(#arcTrackFade); }
.arc__fill  { stroke: url(#arcFillFade); stroke-linecap: round; }

.sections-nav {
  position: fixed;
  top: 50%;
  right: clamp(0.9rem, 1.5vw, 2.5rem);
  z-index: 31;
  transform: translateY(-50%);
}

.sections {
  display: grid;
  justify-items: end;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Активный пункт раздвигает соседей: вокруг него появляется воздух,
   и он читается отдельно от списка. */
.sections li {
  transition: margin 320ms var(--ease-out);
}

.sections li:has(> [aria-current="true"]) {
  margin-block: 0.5rem;
}

/* Мелко по умолчанию, активный вырастает.
   Растём через transform: масштаб не пересчитывает раскладку,
   поэтому соседние пункты не дёргаются.
   Прирост уменьшен с 1.32 до 1.16: активный пункт меньше вылезает
   влево, поэтому список можно показывать на более узких экранах. */
/* Под каждой подписью своя плашка: на светлых участках снимка
   список переставал читаться. Затемнение общей областью выглядело
   пятном, поэтому фон идёт по строке, а не по зоне.
   Активный пункт вырастает и выезжает влево — движение через
   transform, поэтому соседние строки не сдвигаются. */
.sections__link {
  display: block;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid transparent;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--ink-soft);
  opacity: 0.6;
  text-shadow: 0 1px 6px rgba(8, 12, 17, 0.9);
  transform: scale(1) translateX(0);
  transform-origin: right center;
  transition:
    transform 460ms var(--ease-out),
    opacity 320ms var(--ease-out),
    background-color 320ms var(--ease-out),
    border-color 320ms var(--ease-out),
    color 320ms var(--ease-out);
}

/* Плашка только под активным пунктом: то же стекло, что у остальных
   поверхностей сайта. */
.sections__link[aria-current="true"] {
  color: var(--ink);
  opacity: 1;
  background: var(--glass-hi);
  border-color: var(--edge);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  transform: scale(1.2) translateX(-0.8rem);
}

@media (prefers-reduced-motion: reduce) {
  .sections__link,
  .sections__link[aria-current="true"] { transition: none; transform: none; }
  .sections li { transition: none; }
}

@media (hover: hover) and (pointer: fine) {
  .sections__link:hover { opacity: 0.8; color: var(--ink-soft); }
  .sections__link[aria-current="true"]:hover { opacity: 1; color: var(--ink); }
}

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

.header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  /* Логотип слева, кнопка входа справа. Боковое меню разделов
     стоит по центру правого края и с кнопкой не пересекается. */
  justify-content: flex-start;
  gap: clamp(1rem, 2.2vw, 2.5rem);
  padding: clamp(0.9rem, 2vw, 1.6rem) var(--pad-x);
  padding-top: calc(clamp(0.9rem, 2vw, 1.6rem) + env(safe-area-inset-top));
}

/* Кнопка прижата к правому краю шапки. Сама шапка событий не ловит
   нигде, кроме своих ссылок, поэтому отступом можно двигать свободно. */
.header__login {
  margin-inline-start: auto;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
}

/* На узких экранах кнопка убрана: шапка там и так тесная. */
@media (max-width: 720px) {
  .header__login { display: none; }
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.logo__mark { flex: none; overflow: visible; }

/* Пульс: обе дуги расходятся от ядра и гаснут, вторая с задержкой.
   Точка внутри чуть сжимается в такт — как удар, а не мигание. */
.logo__wave {
  transform-origin: 13px 13px;
  animation: pulse-wave 1500ms var(--ease-out) infinite;
}
.logo__wave--2 { animation-delay: 300ms; }

.logo__core {
  transform-origin: 13px 13px;
  animation: pulse-core 1500ms var(--ease-out) infinite;
}

@keyframes pulse-wave {
  0%   { transform: scale(0.35); opacity: 0; }
  22%  { opacity: 0.85; }
  100% { transform: scale(1.5); opacity: 0; }
}

@keyframes pulse-core {
  0%, 100% { transform: scale(1); }
  14%      { transform: scale(1.28); }
  34%      { transform: scale(0.94); }
}

/* Меню — стеклянная капсула, контент проезжает под ней.

   Два одинаковых слоя друг на друге. Верхний нарисован в активном
   состоянии целиком и обрезан по текущему пункту. Двигаем обрезку —
   подсветка и цвет текста меняются одновременно, а не вразнобой. */
.nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--nav-pad);
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--edge);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  /* Ноль: подсветка крайних пунктов доходит до краёв капсулы.
     Высоту держит вертикальный отступ у .nav__link, а не этот. */
  --nav-pad: 0;
}

.nav__layer {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav__layer--active {
  position: absolute;
  inset: 0;
  padding: var(--nav-pad);
  background: var(--glass-hi);
  border-radius: 999px;
  pointer-events: none;
  /* До первой установки из скрипта подсветки не видно. */
  clip-path: inset(0 100% 0 0 round 999px);
}

.nav__layer--active.is-ready {
  transition: clip-path 260ms var(--ease-in-out);
}

/* Отступы задаются здесь, а не в слоях: класс общий для обоих,
   поэтому надписи не разъедутся (ловушка 3 в 08-site.md). */
.nav__link {
  padding: 0.62rem 1.15rem;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: color 180ms var(--ease-out);
}

.nav__layer--active .nav__link { color: var(--ink); }

@media (hover: hover) and (pointer: fine) {
  .nav__link:hover { color: var(--ink); }
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.62rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--glass-solid);
  color: #0b1015;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 180ms var(--ease-out);
}

.pill:active { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
  .pill:hover { background: #ffffff; }
}

/* ---------- 5. Первый экран ---------- */
/* Центр намеренно пуст: работают текст слева и дуги по краям. */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: clamp(7rem, 16vh, 10rem) var(--pad-x) clamp(5rem, 12vh, 8rem);
}

/* Фотография первого экрана. Файла в сборке нет — слой просто пуст,
   ничего не ломается и лишнего запроса не делается.
   Положите снимок в assets/img/hero-bg.jpg (тёмный, малоконтрастный,
   до 250 КБ). Верх и низ растворяются, чтобы снимок не имел границы
   и переходил в градиентный фон страницы. */
.hero__photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: url("../img/hero-bg.jpg") center / cover no-repeat;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 26%, #000 62%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 26%, #000 62%, transparent 100%);
}

/* Видео первого экрана. Лежит поверх фотографии и той же маской
   растворяется сверху и снизу. Пока кадры не готовы — прозрачно,
   и виден нижний слой. Файлы: assets/video/hero.mp4 и hero.webm. */
.hero__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 26%, #000 62%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 26%, #000 62%, transparent 100%);
  transition: opacity 900ms var(--ease-out);
}

.hero__video.is-ready { opacity: 0.55; }

/* Затемнение слева: заголовок читается поверх любого снимка. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(to right, rgba(8, 12, 17, 0.92) 0%, rgba(8, 12, 17, 0.45) 42%, transparent 72%);
}

/* Отступ от дуги, чтобы заголовок не лёг прямо на линию.
   На узких экранах clamp даёт ноль — дуга там скрыта. */
.hero__lead {
  position: relative;
  z-index: 1;
  max-width: 58rem;
  /* Совпадает с левым краем центрованного .wrap: на широком экране
     заголовок встаёт в одну колонку с остальными разделами. */
  padding-inline-start: clamp(0rem, 12.5vw, 15rem);
}

.scroll-hint { z-index: 1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 clamp(1.6rem, 3.4vh, 2.6rem);
  padding: 0.4rem 0.95rem 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--edge);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.eyebrow__dots { flex: none; opacity: 0.75; }

/* Крупный кегль → отрицательный трекинг, плотный интерлиньяж. */
.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.6vw, 5.25rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

/* Вторая строка мельче первой и не переносится: подзаголовок
   к утверждению, а не второй заголовок. */
.hero__title span { display: block; }
.hero__title em {
  display: block;
  font-style: normal;
  font-size: 0.6em;
  line-height: 1.15;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--ink-soft);
}

.hero__sub {
  max-width: 46ch;
  margin: clamp(1.5rem, 3.4vh, 2.4rem) 0 0;
  font-size: clamp(1rem, 1.05vw, 1.15rem);
  color: var(--ink-soft);
  line-height: 1.58;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(1.8rem, 4vh, 2.8rem);
}

/* Стрелка вниз. Движение маленькое и редкое: заметно боковым
   зрением, но не тянет внимание на себя. */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: clamp(1.5rem, 5vh, 3rem);
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-left: -1.375rem;
  border-radius: 50%;
  color: var(--ink-mute);
  transition: color 200ms var(--ease-out), background-color 200ms var(--ease-out);
}

.scroll-hint svg { animation: hint 2600ms var(--ease-in-out) infinite; }

.scroll-hint__stem { opacity: 0.5; }
.scroll-hint__tip { opacity: 0.9; }

@keyframes hint {
  0%, 62%, 100% { transform: translateY(0);   opacity: 0.55; }
  22%           { transform: translateY(5px); opacity: 1; }
}

@media (hover: hover) and (pointer: fine) {
  .scroll-hint:hover { color: var(--ink); background: var(--glass-hi); }
}

/* ---------- 6. Секции, карточки, шаги, плитки ---------- */

.section {
  position: relative;
  padding: clamp(6rem, 17vh, 11.5rem) var(--pad-x);
}

.section--last { padding-bottom: clamp(6.5rem, 18vh, 12rem); }

.section__head {
  max-width: 52rem;
  margin-bottom: clamp(2.2rem, 5vh, 3.5rem);
}

.section__eyebrow {
  margin: 0 0 0.9rem;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.section__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.05rem, 4.4vw, 3.4rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.section__sub {
  max-width: 76ch;
  margin: 1rem 0 0;
  color: var(--ink-soft);
}

.note {
  max-width: 52ch;
  margin: clamp(1.4rem, 3.5vh, 2rem) 0 0;
  padding-left: 1rem;
  border-left: 1px solid var(--edge);
  font-size: 0.88rem;
  color: var(--ink-mute);
}

/* В «За что отвечаем» тезис стоит в конце блока у правого края:
   сам блок прижат вправо, линейка переехала на правую сторону. */
.section--care .note {
  margin-left: auto;
  padding-left: 0;
  padding-right: 1rem;
  border-left: 0;
  border-right: 1px solid var(--edge);
  text-align: right;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: clamp(0.85rem, 1.8vw, 1.25rem);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.3rem, 2.4vw, 1.75rem);
  /* Полоса внизу оставлена под метку раздела, чтобы она
     не наезжала на последнюю строку текста. */
  padding-bottom: calc(clamp(1.3rem, 2.4vw, 1.75rem) + 1.5rem);
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--edge);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
  box-shadow: 0 24px 60px -34px rgba(0, 0, 0, 0.75);
  /* Изображение выходит под верхний край карточки, поэтому
     содержимое обрезается по её скруглению. */
  overflow: hidden;
}

/* Снимок занимает верх карточки и растворяется книзу в её фон.
   Отрицательные отступы гасят собственный padding карточки, чтобы
   изображение шло от края до края. Файла нет — слой схлопывается
   до нуля по высоте и вёрстка не ломается. */
.card__media {
  position: relative;
  margin:
    calc(-1 * clamp(1.3rem, 2.4vw, 1.75rem))
    calc(-1 * clamp(1.3rem, 2.4vw, 1.75rem))
    0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  /* Низ снимка уходит в фон карточки, границы нет. */
  /* Растворение начинается рано и идёт долго — жёсткой границы нет,
     как на первом экране. */
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 34%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 34%, transparent 100%);
  transform: scale(1.02);
  transition:
    transform 620ms var(--ease-out),
    opacity 320ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .card:hover .card__media img { transform: scale(1.10); opacity: 0.95; }
}

@media (prefers-reduced-motion: reduce) {
  .card__media img,
  .card:hover .card__media img { transition: none; transform: none; }
}

/* Метка раздела стоит в правом нижнем углу карточки — почти
   растворённая, мелкая. Это подпись, а не второй заголовок,
   поэтому она вынута из потока и не двигает текст. */
.card__index {
  position: absolute;
  right: clamp(1.3rem, 2.4vw, 1.75rem);
  bottom: clamp(0.85rem, 1.4vw, 1.05rem);
  z-index: 1;
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.14;
  pointer-events: none;
}

/* Первая строка текста больше ничем не прижата сверху. */
.card__media + .card__title,
.card__media + .card__index + .card__title,
.card__media + .card__index + .card__text { margin-top: 0.9rem; }

.card__title {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: -0.015em;
}

.card__text { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }

.card__foot {
  margin: auto 0 0;
  padding-top: 1.3rem;
  font-size: 0.8rem;
  color: var(--ink-mute);
}

/* Шаги — настоящая последовательность, поэтому нумерация оправдана. */
.steps {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: clamp(1rem, 2.5vw, 2rem);
  padding: clamp(1.1rem, 2.4vh, 1.6rem) 0;
  border-top: 1px solid var(--edge-soft);
}

.step:first-child { border-top: 0; padding-top: 0; }

.step__num {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  border: 1px solid var(--edge);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

.step__title {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 500;
  letter-spacing: -0.012em;
}

.step__text { max-width: 52ch; margin: 0; color: var(--ink-soft); font-size: 0.94rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: clamp(0.85rem, 1.8vw, 1.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.grid--roles { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }

/* Девять плиток ложатся тремя рядами по три, без хвоста из одной. */
.grid--care { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); }

.tile {
  padding: clamp(1.15rem, 2.2vw, 1.5rem);
  border-radius: 16px;
  border: 1px solid var(--edge-soft);
  background: rgba(255, 255, 255, 0.022);
}

.tile__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.tile__text { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- 7. Прайс и вкладки ---------- */

.tabs { margin-top: 0.5rem; }

/* Устройство то же, что у меню в шапке: слой активного состояния
   обрезается по выбранной вкладке и переезжает вместе с выбором. */
.tabs__bar {
  position: relative;
  padding: var(--tabs-pad);
  margin-bottom: clamp(1.4rem, 3vh, 2rem);
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--edge);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  --tabs-pad: 0.3rem;
}

.tabs__layer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.tabs__layer--active {
  position: absolute;
  inset: 0;
  padding: var(--tabs-pad);
  background: var(--glass-hi);
  border-radius: 999px;
  pointer-events: none;
  clip-path: inset(0 100% 0 0 round 999px);
}

.tabs__layer--active.is-ready {
  transition: clip-path 260ms var(--ease-in-out);
}

.tabs__layer--active .tab { color: var(--ink); }

/* Начертание одинаковое в обоих слоях: разное сделало бы надписи
   разной ширины, и обрезка села бы мимо вкладки. */
.tab {
  flex: 1 1 auto;
  padding: 0.6rem 1.15rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: color 200ms var(--ease-out), transform 160ms var(--ease-out);
}

.tab:active { transform: scale(0.98); }

@media (hover: hover) and (pointer: fine) {
  .tab:hover { color: var(--ink); }
}

/* Панель появляется мягко и всегда сверху вниз — как выдвижной ящик. */
.tabs__panel { animation: panel 380ms var(--ease-out) both; }

@keyframes panel {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tabs__lead {
  max-width: 52ch;
  margin: 0 0 clamp(1.2rem, 2.5vh, 1.6rem);
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: clamp(0.85rem, 1.8vw, 1.25rem);
}

.plans--two  { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.plans--four { grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); }

.plan {
  display: flex;
  flex-direction: column;
  padding: clamp(1.3rem, 2.4vw, 1.85rem);
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--edge);
  backdrop-filter: blur(24px) saturate(155%);
  -webkit-backdrop-filter: blur(24px) saturate(155%);
}

/* Один выделенный тариф — самый светлый край, без цветной заливки. */
.plan--lead {
  border-color: rgba(207, 230, 244, 0.42);
  background: rgba(210, 232, 245, 0.085);
}

.plan__name {
  margin: 0 0 0.9rem;
  font-size: 0.8rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.plan__price {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.plan__price span { font-size: 0.48em; font-weight: 400; color: var(--ink-soft); letter-spacing: 0; }

.plan__term { margin: 0.45rem 0 1.3rem; font-size: 0.86rem; color: var(--ink-mute); }

.plan__list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 1.2rem 0 0;
  border-top: 1px solid var(--edge-soft);
  list-style: none;
  font-size: 0.91rem;
  color: var(--ink-soft);
}

.plan__list li { position: relative; padding-left: 1.1rem; }

.plan__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--beam);
  opacity: 0.7;
}

.table-scroll {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--edge-soft);
}

.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }

.table th,
.table td {
  padding: 0.85rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--edge-soft);
}

.table thead th {
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  background: rgba(255, 255, 255, 0.022);
}

.table tbody tr:last-child td { border-bottom: 0; }

.table td:nth-child(2),
.table td:nth-child(3) {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink-soft);
}

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

.form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.1rem clamp(1rem, 2vw, 1.6rem);
  max-width: 46rem;
}

.field { display: grid; gap: 0.45rem; }
.field--wide { grid-column: 1 / -1; }

.field__label { font-size: 0.88rem; color: var(--ink-soft); }

.field__input {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  font: inherit;
  transition: border-color 180ms var(--ease-out), background-color 180ms var(--ease-out);
}

.field__input::placeholder { color: var(--ink-mute); opacity: 0.8; }

.field__input:focus-visible {
  border-color: var(--beam);
  background: rgba(255, 255, 255, 0.06);
}

.field__input--area { resize: vertical; min-height: 6.5rem; }
.field__input[aria-invalid="true"] { border-color: var(--alarm); }

.field__error { margin: 0; font-size: 0.84rem; color: var(--alarm); }

/* Метка и чекбокс — одна зона нажатия, без мёртвых участков. */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  cursor: pointer;
}

.consent__box {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.2rem 0 0;
  accent-color: var(--beam);
  cursor: pointer;
}

.consent__text { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.5; }

.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 0.4rem;
}

.form__note { margin: 0; font-size: 0.88rem; color: var(--ink-mute); }
.form__note a { text-decoration: underline; text-underline-offset: 3px; }

.form__status {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.92rem;
  color: var(--beam);
}

/* ---------- 9. Подвал и модальное окно ---------- */

/* Подвал узкий: одна строка с правой стороны, ничего больше. */
.footer {
  padding: clamp(0.7rem, 1.6vh, 1rem) var(--pad-x);
  padding-bottom: calc(clamp(0.7rem, 1.6vh, 1rem) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--edge-soft);
}

.footer__inner {
  display: flex;
  justify-content: flex-end;
}

.footer__legal {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink-mute);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2.5rem);
}

/* Правило класса перебивает браузерный атрибут hidden, поэтому
   закрытое окно оставалось на странице: прозрачное, во весь экран
   и поверх всего — и забирало себе все нажатия. */
.modal[hidden] { display: none; }

.modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 10, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 250ms var(--ease-out);
}

.modal__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 38rem);
  max-height: min(80vh, 44rem);
  border-radius: var(--radius);
  border: 1px solid var(--edge);
  background: #121a21;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out);
}

.modal.is-open .modal__scrim { opacity: 1; }
.modal.is-open .modal__panel { opacity: 1; transform: scale(1); }

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid var(--edge-soft);
}

.modal__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
}

.modal__close {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid var(--edge);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 180ms var(--ease-out);
}

.modal__close:active { transform: scale(0.94); }

@media (hover: hover) and (pointer: fine) {
  .modal__close:hover { background: var(--glass-hi); color: var(--ink); }
}

.modal__body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.4rem;
  font-size: 0.94rem;
  color: var(--ink-soft);
}

.modal__body h3 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
}

.modal__body h4 {
  margin: 1.4rem 0 0.4rem;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--ink);
}

.modal__body p { margin: 0 0 0.8rem; }

.doc-draft {
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(240, 184, 174, 0.35);
  color: var(--alarm);
  font-size: 0.86rem;
}

/* ---------- 10. Появление ---------- */

.rise {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 620ms var(--ease-out) forwards;
}

.rise--1 { animation-delay:  40ms; }
.rise--2 { animation-delay: 100ms; }
.rise--3 { animation-delay: 160ms; }
.rise--4 { animation-delay: 220ms; }

@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* Выплывание при прокрутке — один раз, без повтора на обратном ходе. */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}

.reveal.is-visible { opacity: 1; transform: translateY(0); }

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

/* Ниже этой ширины поле справа уже занято содержимым.
   Порог считан по самому широкому пункту в увеличенном состоянии:
   активная подпись вырастает влево и налезала бы на карточки. */
@media (max-width: 1679px) {
  .sections-nav { display: none; }
  /* Экран уже — отодвигать сильно некуда, хватает обхода дуги. */
  .hero__lead { padding-inline-start: clamp(0rem, 6vw, 6rem); }
}

@media (max-width: 980px) {
  .arc { display: none; }
  .scroll-hint { display: none; }
  .hero { min-height: auto; padding-bottom: clamp(3rem, 8vh, 5rem); }
  /* Дуги нет — отодвигать текст не от чего. */
  .hero__lead { padding-inline-start: 0; }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .hero__cta .btn { flex: 1 1 12rem; }
  .step { gap: 1rem; }
  .tabs__bar { border-radius: 20px; }
  .tab { flex: 1 1 45%; }

  /* Вкладки уходят в два ряда: прямоугольная обрезка охватила бы
     оба ряда сразу. Возвращаем обычную заливку выбранной вкладки. */
  .tabs__layer--active { display: none; }

  .tab[aria-selected="true"] {
    background: var(--glass-hi);
    border: 1px solid var(--edge);
    color: var(--ink);
  }
}

/* ---------- 12. Доступность ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .rise { animation: soften 260ms ease forwards; transform: none; }
  @keyframes soften { to { opacity: 1; } }

  .reveal { transform: none; transition: opacity 260ms ease; }
  .tabs__panel { animation: soften 200ms ease both; }
  .scroll-hint svg { animation: none; }

  .sections__link,
  .sections__link[aria-current="true"] { transform: none; }

  /* Подсветка не едет, а появляется на месте: смысл сохраняется,
     движение убрано. */
  .nav__layer--active.is-ready,
  .tabs__layer--active.is-ready { transition: none; }

  .hero__photo { opacity: 0.4; }

  .logo__wave, .logo__core { animation: none; }
  .logo__wave { opacity: 0.6; }

  .btn:active, .pill:active, .tab:active, .modal__close:active { transform: none; }
  .modal__panel, .modal.is-open .modal__panel { transform: none; transition: opacity 200ms ease; }
}

@media (prefers-reduced-transparency: reduce) {
  .nav, .card, .plan, .eyebrow, .tabs__bar {
    background: #131b22;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .nav__layer--active,
  .tabs__layer--active { background: #22303b; }
  .hero__photo, .hero__video { display: none; }
  .modal__scrim { backdrop-filter: none; background: rgba(4, 7, 10, 0.92); }
}

@media (prefers-contrast: more) {
  :root {
    --ink-soft:  #d3e0e8;
    --ink-mute:  #b3c4ce;
    --edge:      rgba(255, 255, 255, 0.4);
    --edge-soft: rgba(255, 255, 255, 0.22);
  }
  .nav, .card, .plan, .eyebrow, .tabs__bar { background: #0f161c; }
  .nav__layer--active,
  .tabs__layer--active { background: #26343f; }
  .hero__photo { opacity: 0.35; }
  .hero__video.is-ready { opacity: 0.35; }
  .sections__link { opacity: 0.75; }
}

/* ============================================================
   12. Блоки, переписанные в сессии 2026-08-15
   ============================================================ */

/* ---------- Сцена: общий механизм для «Как работаем» и «За что отвечаем» ---------- */
/* Снимок лежит фоном на всю секцию, поверх — содержимое.
   Меняется только прозрачность слоёв, раскладка не пересчитывается. */

.section--stage {
  position: relative;
  overflow: hidden;
}

/* Слой целиком растворяется сверху и снизу — вместе с затемнением.
   Раньше маска стояла только на снимке, а заливка ::after доходила
   до края секции и давала видимую горизонтальную границу. */
.stage__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 18%, #000 82%, transparent 100%);
}

.stage__shot {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;      /* по центру высоты */
  justify-content: flex-end; /* прижат вправо */
  opacity: 0;
  transition: opacity 620ms var(--ease-out);
}

.stage__shot.is-active { opacity: 1; }

/* Снимок занимает 2/3 ширины слоя — в 1.5 раза меньше прежнего.
   Меньше растяжения исходника, кадр резче. Левый край растворяется,
   чтобы у уменьшенного снимка не было прямой границы. */
.stage__shot img {
  display: block;
  width: 66.667%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  opacity: 0.7;
  transform: scale(1.04);
  transition: transform 1200ms var(--ease-out);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 22%);
          mask-image: linear-gradient(to right, transparent 0%, #000 22%);
}

.stage__shot.is-active img { transform: scale(1); }

/* Затемнение под текстом: читаемость поверх любого снимка. */
.stage__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(8, 12, 17, 0.9) 0%, rgba(8, 12, 17, 0.5) 55%, rgba(8, 12, 17, 0.82) 100%);
}

.section--stage .stage__wrap { position: relative; z-index: 1; }

/* Область текста: панели лежат в одной ячейке сетки. */
.stage__body {
  display: grid;
  min-height: 15rem;
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
}

.stage__panes { display: grid; }

.stage__pane {
  grid-area: 1 / 1;
  max-width: 34rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out);
  pointer-events: none;
}

.stage__pane.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* «Как работаем»: текст справа. «За что отвечаем»: слева. */
.stage__body .stage__panes { justify-items: end; }
.stage__body--left .stage__panes { justify-items: start; }

.stage__pane-title {
  margin: 0 0 0.8rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.stage__pane-title--big { font-size: clamp(1.7rem, 3.2vw, 2.8rem); }

.stage__pane-text {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.6;
}

/* Лента шагов: слева направо, во всю ширину. */
.stage__rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 0;
}

/* Линейка задаётся каждому пункту отдельно: полоса прохождения
   ложится ровно поверх своего отрезка, а не поверх общей рамки. */
.stage__rail .stage__item {
  border-top: 1px solid var(--edge-soft);
}

.stage__item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: clamp(1rem, 2vh, 1.5rem) clamp(0.6rem, 1.4vw, 1.2rem) clamp(1rem, 2vh, 1.5rem) 0;
  border: 0;
  margin-top: -1px;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  /* Обрезки нет: цифра выходит поверх линейки целиком. */
  overflow: visible;
  transition: opacity 320ms var(--ease-out);
  opacity: 0.55;
}

.stage__item.is-active { opacity: 1; }
.stage__item:focus-visible { outline: 2px solid var(--beam); outline-offset: 4px; }

/* Полоса прохождения поверх верхней линейки. Ширина не анимируется
   скриптом: она едет ключевыми кадрами ровно столько же, сколько
   держится шаг, поэтому не рассинхронизируется с перелистыванием. */
.stage__item::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: var(--beam);
  transform: scaleX(0);
  transform-origin: left center;
}

.stage__item.is-active::after {
  animation: rail-fill var(--rail-step, 4000ms) linear forwards;
}

/* Пока указатель на блоке, перелистывание стоит — полоса тоже. */
[data-stage-root].is-held .stage__item.is-active::after {
  animation-play-state: paused;
}

@keyframes rail-fill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* Цифра — фоновая метка: крупная, почти растворённая. Выходит
   поверх верхней линейки и не срезается. Из потока вынута,
   поэтому подпись стоит там же, где стояла. */
.stage__item-num {
  position: absolute;
  top: -0.3em;
  left: 0;
  /* Выше полосы прохождения: иначе она перечёркивает цифру. */
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(4rem, 7vw, 6.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  opacity: 0.07;
  pointer-events: none;
  transition: opacity 320ms var(--ease-out);
}

.stage__item.is-active .stage__item-num { opacity: 0.16; }

.stage__item-name {
  position: relative;
  z-index: 1;
  margin-top: auto;
  font-size: 0.94rem;
  line-height: 1.35;
  color: var(--ink);
}

@media (hover: hover) and (pointer: fine) {
  .stage__item:hover { opacity: 1; }
}

@media (max-width: 900px) {
  .stage__rail { grid-auto-flow: row; grid-auto-columns: auto; }
  .stage__item { flex-direction: row; align-items: baseline; gap: 1rem; overflow: visible; }
  .stage__item-num {
    position: static;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: var(--beam);
    opacity: 1;
  }
  .stage__item.is-active .stage__item-num { opacity: 1; }
  .stage__item-name { margin-top: 0; }
  .stage__body .stage__panes,
  .stage__body--left .stage__panes { justify-items: start; }
  .stage__bg::after { background: linear-gradient(to bottom, rgba(8, 12, 17, 0.75) 0%, rgba(8, 12, 17, 0.9) 100%); }
  /* На узком экране уменьшенный снимок превратился бы в марку в углу —
     возвращаем его на всю ширину слоя. */
  .stage__shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-mask-image: none;
            mask-image: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stage__shot,
  .stage__shot img,
  .stage__pane { transition: none; }
  .stage__shot img { transform: none; }
  .stage__pane { transform: none; }
  /* Перелистывание выключено — полоса стоит заполненной. */
  .stage__item.is-active::after { animation: none; transform: scaleX(1); }
}

/* Слайдер: лента столбцом слева, содержимое справа. */
.stage__split {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
  margin-bottom: clamp(1.5rem, 4vh, 2.5rem);
}

.stage__rail--column {
  grid-auto-flow: row;
  grid-auto-columns: auto;
  border-top: 0;
}

.stage__rail--column .stage__item {
  flex-direction: row;
  align-items: baseline;
  gap: 1rem;
  padding: clamp(0.8rem, 1.6vh, 1.15rem) 0 clamp(0.8rem, 1.6vh, 1.15rem) 1rem;
  border-top: 0;
  border-left: 2px solid var(--edge-soft);
  margin-top: 0;
  transition: border-color 320ms var(--ease-out), opacity 320ms var(--ease-out);
}

.stage__rail--column .stage__item.is-active { border-left-color: var(--beam); }

.stage__split .stage__body { min-height: 18rem; margin-bottom: 0; }

@media (max-width: 900px) {
  .stage__split { grid-template-columns: 1fr; }
}

/* Разворот карточек убран: плашки стоят ровно, движение осталось
   только на снимке при наведении. */

/* Перечень внутри панели слайдера. */
.care__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.care__list li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.5;
}

.care__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--beam);
  opacity: 0.7;
}

/* ---------- Кто работает: шесть карточек ---------- */

/* Строго три в ряд: шесть карточек ложатся в две ровные строки. */
.cards--six { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1100px) { .cards--six { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px)  { .cards--six { grid-template-columns: 1fr; } }

/* ---------- Прайс: три тарифа ---------- */

.plans--three { grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr)); }

/* Вкладки прайса: крайние доходят до краёв капсулы, как в шапке. */
.tabs__bar { --tabs-pad: 0; }

/* ---------- Связаться: контакты вместо формы ---------- */
/* Форма убрана до подачи уведомления в РКН: пока уведомления нет,
   собирать имена и телефоны нельзя. */

.contacts {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(1.4rem, 3vw, 3rem);
  padding: clamp(1.5rem, 3vw, 2.4rem);
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--edge);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
}

.contacts__label {
  margin: 0 0 0.4rem;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.contacts__mail {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.contacts__mail a { color: var(--ink); }

.contacts__note {
  margin: 0;
  max-width: 42ch;
  color: var(--ink-soft);
  line-height: 1.6;
}

.contacts__requisites {
  margin: 0;
  display: grid;
  gap: 0.75rem;
  align-content: start;
  font-size: 0.9rem;
}

.contacts__requisites div {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.6rem;
}

.contacts__requisites dt { color: var(--ink-mute); }
.contacts__requisites dd { margin: 0; color: var(--ink-soft); }

@media (max-width: 860px) {
  .contacts { grid-template-columns: 1fr; }
  .contacts__requisites div { grid-template-columns: 7rem minmax(0, 1fr); }
}

/* ---------- Аккордеон «За что отвечаем» ---------- */
/* Строки во всю ширину: раздел про полноту, а не про переключение.
   Открыт всегда ровно один пункт — иначе высота блока прыгает
   и страница дёргается под курсором. */

.fold {
  border-top: 1px solid var(--edge-soft);
}

.fold__row {
  border-bottom: 1px solid var(--edge-soft);
}

.fold__head { margin: 0; }

.fold__btn {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 1.6rem);
  width: 100%;
  padding: clamp(1.05rem, 2.2vh, 1.5rem) 0;
  background: none;
  border: 0;
  text-align: left;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 220ms var(--ease-out);
}

.fold__num {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  transition: color 220ms var(--ease-out);
}

.fold__name {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

/* Плюс превращается в минус: вертикальная перекладина исчезает. */
.fold__sign {
  flex: none;
  color: var(--ink-mute);
  transition: transform 320ms var(--ease-out), color 220ms var(--ease-out);
}

.fold__sign-bar {
  transform-origin: 7px 7px;
  transition: opacity 220ms var(--ease-out), transform 320ms var(--ease-out);
}

.fold__row.is-open .fold__btn,
.fold__row.is-open .fold__num,
.fold__row.is-open .fold__sign { color: var(--ink); }

.fold__row.is-open .fold__sign { transform: rotate(180deg); }
.fold__row.is-open .fold__sign-bar { opacity: 0; transform: scaleY(0); }

@media (hover: hover) and (pointer: fine) {
  .fold__btn:hover,
  .fold__btn:hover .fold__sign { color: var(--ink); }
}

.fold__panel {
  overflow: hidden;
}

.fold__list {
  margin: 0;
  padding: 0 0 clamp(1.1rem, 2.4vh, 1.6rem);
  list-style: none;
  display: grid;
  gap: 0.55rem;
  /* Отступ слева равен колонке номера с промежутком: пункты
     встают под названием, а не под цифрой. */
  padding-left: calc(2.2rem + clamp(0.9rem, 2vw, 1.6rem));
}

.fold__list li {
  position: relative;
  padding-left: 1.05rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.fold__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--beam, currentColor);
  opacity: 0.6;
}

/* Раскрытие: высота считается скриптом и кладётся в переменную. */
.fold__panel {
  height: 0;
  opacity: 0;
  transition: height 340ms var(--ease-in-out), opacity 240ms var(--ease-out);
}

.fold__row.is-open .fold__panel {
  height: var(--fold-h, auto);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .fold__panel { transition: none; }
  .fold__sign, .fold__sign-bar { transition: none; }
}

/* ---------- Подложка «За что отвечаем» ---------- */
/* Прозрачный PNG под содержанием, у левого края. Слой декоративный:
   лежит ниже текста, не ловит указатель и растворяется вправо,
   чтобы не спорить с колонкой строк. */

.section--care {
  position: relative;
  overflow: hidden;
}

.section--care > .wrap { position: relative; z-index: 1; }

/* Слой во всю высоту секции: изображение тянется по высоте блока,
   ширина ограничена, чтобы не залезать под колонку строк. */
.care__art {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 0;
  width: clamp(24rem, 45vw, 46rem);
  pointer-events: none;
}

.care__art-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  opacity: 0;
  transform: translateX(-1.2rem);
  transition: opacity 520ms var(--ease-out), transform 620ms var(--ease-out);
  /* Растворяется вправо и по краям: жёсткой границы у подложки нет. */
  -webkit-mask-image:
    linear-gradient(to right, #000 0%, #000 38%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 16%, #000 84%, transparent 100%);
          mask-image:
    linear-gradient(to right, #000 0%, #000 38%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 16%, #000 84%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
}

.care__art-shot.is-active {
  opacity: 0.2;
  transform: none;
}

/* На узких экранах подложка ушла бы под текст сплошным пятном. */
@media (max-width: 900px) {
  .care__art { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .care__art-shot { transition: none; transform: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .care__art { display: none; }
}
