/* ============================================================================
   foida.tj — стили публичного сайта (лендинг, возможности, тарифы, демо).
   Источник версионируется в git, публикуется `php artisan uikit:install`
   в public/uikit/marketing/, подключается через uikit_asset() с версией.

   ⚠️ Это НЕ тема админки. Публичные страницы — единственное, что видит
   поисковик и незалогиненный посетитель, и именно их меряет PageSpeed:
   тема MaterialM весит 665 КБ и блокирует первый рендер. Здесь — только то,
   что реально применяется на этих страницах.

   Дизайн-направление — «Экран за экраном» (docs/saas/14-landing-design.md),
   структура раздела «Возможности» — docs/saas/16-features-pages.md.
   Бренд-токены совпадают с mockups/assets/foida-saas.css.
   ============================================================================ */

:root {
  --primary: #00A1FF;
  --primary-dark: #0074BA;
  /* Акцент для ТЕКСТА и иконок. Отдельно от --primary-dark: тот работает
     фоном кнопки, и осветлить его — значит убить контраст белых надписей.
     ⚠️ В тёмной теме --primary-dark не переопределялся, и все надзаголовки
     уходили в неразличимый тёмно-синий на тёмно-синем. */
  --accent-ink: #0074BA;
  --gradient: linear-gradient(135deg, #00A1FF 0%, #0074BA 100%);
  --ink: #111C2D;
  --accent: #FB682A;          /* тангерин: редкий акцент, максимум два места на странице */
  --success: #13DEB9;

  --bg: #FFFFFF;
  --soft: #F6F9FC;
  --card: #FFFFFF;
  --line: #E8EEF5;
  --text: #2A3547;
  --muted: #5A6A85;
  --head: #111C2D;
  --primary-soft: #E6F5FF;

  --shadow: 0 8px 24px rgba(17, 28, 45, .08);
  --shadow-lg: 0 20px 50px rgba(17, 28, 45, .14);
  --radius: 14px;
  --radius-sm: 8px;
}

/* Тёмная тема: системная настройка + явный выбор посетителя (data-bs-theme —
   та же конвенция, что в админке, чтобы тумблер был один на весь продукт). */
@media (prefers-color-scheme: dark) {
  :root:not([data-bs-theme="light"]) {
    --bg: #15263A; --soft: #111C2D; --card: #1B3049; --line: #2A3F58;
    --text: #D7E1EC; --muted: #8FA3BC; --head: #FFFFFF;
    --primary: #4FC1FF; --primary-soft: rgba(0, 161, 255, .14); --accent-ink: #6FCBFF;
    --shadow: 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, .5);
  }
}
:root[data-bs-theme="dark"] {
  --bg: #15263A; --soft: #111C2D; --card: #1B3049; --line: #2A3F58;
  --text: #D7E1EC; --muted: #8FA3BC; --head: #FFFFFF;
  --primary: #4FC1FF; --primary-soft: rgba(0, 161, 255, .14); --accent-ink: #6FCBFF;
  --shadow: 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .5);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }
p { margin: 0; }

h1, h2, h3, h4, .brand {
  font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
  font-weight: 700;
  color: var(--head);
  line-height: 1.2;
  letter-spacing: -.015em;
  margin: 0;
}
h1 { font-size: clamp(28px, 4vw, 44px); text-wrap: balance; }
h2 { font-size: clamp(23px, 3vw, 33px); text-wrap: balance; }
h3 { font-size: 18px; }

/* Колонки сумм не должны «плясать»: числа табличные по всему сайту. */
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.doc { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-variant-numeric: tabular-nums; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-soft { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 12px; }
.lead { color: var(--muted); font-size: 17.5px; line-height: 1.6; }

/* ---------- Кнопки ----------
   Форма — как в админке (MaterialM): скруглённая «пилюля» 30px, а не почти
   квадрат. Сайт и рабочее место — один продукт, и человек, пришедший с
   лендинга внутрь, не должен видеть двух разных наборов кнопок. Цифры взяты
   из самой темы: `--bs-btn-border-radius: 30px`, тень у кнопок отключена.

   ⚠️ Обводка у второстепенной кнопки — АКЦЕНТНАЯ, а не серая линия интерфейса
   (--line). Раньше стояла именно она, и кнопка «Позвонить» читалась как
   выключенная: обводка почти сливалась с фоном (замечание владельца 09.08).
   В теме то же решение: `.btn-outline-primary` держит border цвета акцента. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 30px;
  font-weight: 600; font-size: 15px; line-height: 1.2;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.btn-primary { background: var(--primary-dark); color: #fff; }
.btn-primary:hover { background: var(--primary); }
.btn-outline { border-color: var(--primary); color: var(--accent-ink); background: transparent; }
/* Наведение заливает кнопку акцентом — как `.btn-outline-primary` в теме:
   так видно, что элемент нажимаемый, а не просто рамка с текстом. */
.btn-outline:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-white { background: #fff; color: var(--primary-dark); }
.btn-white:hover { background: #EAF6FF; }
/* Вторая кнопка на цветной плашке: обводка по белому, а не серая — иначе
   на градиенте она читается как выключенная. */
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .75); }
.btn-ghost:hover { background: rgba(255, 255, 255, .16); border-color: #fff; }
.btn-lg { padding: 14px 30px; font-size: 16.5px; border-radius: 30px; }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
/* На цветной плашке обводка — белая: синяя по синему невидима. */
.cta .btn:focus-visible, .ace .btn:focus-visible { outline-color: #fff; }

/* ---------- Шапка ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 26px; height: 66px; }
.nav-logo { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.nav-logo .brand { font-size: 19px; }
.nav-links { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; flex: 1; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--head); }
.nav-cta { display: flex; gap: 10px; align-items: center; }

/* Переключатель темы: ссылки, а не кнопки — состояние хранит cookie, а не
   скрипт. Активное положение подсвечено, чтобы было видно, что выбор принят
   (иначе после перезагрузки непонятно, сработало ли). */
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 100px; }
.theme-switch a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  color: var(--muted); font-size: 16px; text-decoration: none;
  transition: background .18s ease, color .18s ease;
}
.theme-switch a:hover { color: var(--head); background: var(--soft); }
.theme-switch a.on { background: var(--primary-soft); color: var(--accent-ink); }
.theme-switch a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (max-width: 940px) { .theme-switch { display: none; } }

/* Смена темы на узком экране: одиночная кнопка в ШАПКЕ. Тройной .theme-switch
   в 940px не помещается, но и убирать смену темы в бургер нельзя — спрятанная
   в меню, она не находится вовсе: за оформлением навигацию не открывают.
   Размер и рамка — как у соседней «Позвонить», чтобы шапка читалась рядом. */
.nav-theme-mini { display: none; }
@media (max-width: 940px) {
  .nav-theme-mini {
    display: inline-flex; align-items: center; justify-content: center;
    flex: none; width: 42px; height: 42px;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    color: var(--muted); font-size: 18px; text-decoration: none;
    transition: color .18s ease, border-color .18s ease;
  }
  .nav-theme-mini:hover { color: var(--head); border-color: var(--primary); }
  .nav-theme-mini:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
}
/* На телефоне в шапке уже три элемента (звонок, тема, меню) — просвет между
   ними ужимаем, иначе на 360px строка не сходится. */
@media (max-width: 560px) { .nav-in { gap: 12px; } }

/* Список разделов в шапке. Без скриптов: раскрывается наведением И фокусом
   с клавиатуры (:focus-within), поэтому доступен и без мыши.
   ⚠️ padding-top на .nav-menu — «мостик»: без него курсор, идущий вниз,
   пересекает зазор, наведение теряется и меню закрывается под рукой. */
.nav-drop { position: relative; }
.nav-menu {
  position: absolute; left: -12px; top: 100%; z-index: 60;
  display: none; padding: 6px; margin-top: 10px;
  /* ⚠️ Ширина — ПО СОДЕРЖИМОМУ, а не фиксированная. Жёсткий max-width не
     сжимал подписи (у них white-space: nowrap), а выпускал текст наружу:
     «Приложение на телефоне» вылезало за правый край панели. Теперь колонки
     берут ширину самой длинной подписи, панель растёт под них, а окно
     остаётся потолком — на узком экране подпись переносится по словам. */
  width: max-content;
  max-width: calc(100vw - 40px);
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  /* Подвал панели заходит под её скруглённые углы — обрезаем по форме. */
  overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.nav-drop::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
.nav-drop:hover .nav-menu, .nav-drop:focus-within .nav-menu { display: grid; }
/* ⚠️ Не nowrap: при упоре в край окна подпись обязана переноситься, а не
   вылезать за панель. Ширину панели держит width: max-content выше. */
.nav-menu a { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); font-size: 14px; }
.nav-menu a:hover, .nav-menu a:focus-visible { background: var(--primary-soft); color: var(--accent-ink); }
/* Текущий раздел: открыв меню внутри раздела, посетитель должен видеть, где он. */
.nav-menu a[aria-current] { background: var(--primary-soft); color: var(--accent-ink); font-weight: 600; }
/* Ссылка на хаб — такой же пункт меню, как остальные (padding, скругление и
   подсветка приходят из `.nav-menu a`), отделённый тонкой линией.
   ⚠️ Отрицательные поля у линии гасят внутренний отступ панели: иначе она
   обрывается за 6px до боковых границ и выглядит недоделанной. */
.nav-menu-hr { grid-column: 1 / -1; margin: 5px -6px; border: 0; border-top: 1px solid var(--line); }
.nav-menu-all { grid-column: 1 / -1; color: var(--accent-ink); font-weight: 600; }
.nav-menu-ic { flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--primary-soft); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-size: 14px; }
@media (max-width: 940px) { .nav-links { display: none; } }

/* ---------- Крошки ---------- */
/* ⚠️ Горизонтальные 24px ОБЯЗАТЕЛЬНЫ и повторяют .container: крошки лежат в
   `<div class="container crumbs">`, и сокращённая запись `padding: 18px 0 0`
   обнуляла контейнерные отступы — строка вставала на 24px левее остального
   текста страницы и упиралась в край окна на всём, что уже 1248px. */
.crumbs { padding: 18px 24px 0; font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-ink); }
.crumbs span { color: var(--head); }

/* ---------- Экраны продукта ---------- */
.frame { position: relative; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow-lg); overflow: hidden; background: var(--soft); }
.frame img { width: 100%; height: auto; }
.frame-phone { max-width: 240px; margin: 0 auto; background: var(--ink); border-radius: 26px; padding: 8px; border: 1px solid rgba(255, 255, 255, .16); }
.frame-phone img { border-radius: 19px; }
.shot-cap { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }

/* ---------- Лупа: снимок крупным планом ----------
   Кадр на странице всегда мельче натурального (рабочий стол 1200 px виден
   примерно в 600), и как раз то, ради чего снимок стоит — цифры, суммы,
   названия колонок — на нём не читается. Поэтому кадр кликабелен: наведение
   показывает знак лупы, нажатие открывает снимок поверх страницы. Разметку
   лупы создаёт скрипт при первом нажатии (layout.blade.php) — до него на
   странице нет ни лишнего узла, ни второй копии картинки.
   ⚠️ z-коридор сайта: шапка 50, выпадающие меню 60 — лупа выше всего, 100. */
.shot-zoom { display: block; cursor: zoom-in; }
.shot-zoom-sign {
  position: absolute; right: 12px; bottom: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: #fff;
  background: rgba(17, 28, 45, .62); border: 1px solid rgba(255, 255, 255, .22);
  opacity: 0; transform: translateY(4px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;                 /* знак — подсказка, нажимают по кадру */
}
.frame:hover .shot-zoom-sign,
.shot-zoom:focus-visible .shot-zoom-sign { opacity: 1; transform: none; }
/* ⚠️ На тач-экранах наведения не бывает: там знак виден всегда, иначе о
   возможности увеличить снимок посетитель телефона просто не узнает. */
@media (hover: none) { .shot-zoom-sign { opacity: .9; transform: none; } }
/* Телефон первого экрана шириной 128px — кружок закрыл бы четверть кадра. */
.hero-phone .shot-zoom-sign { display: none; }
.frame-phone .shot-zoom-sign { width: 30px; height: 30px; right: 8px; bottom: 8px; font-size: 15px; }

.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 52px 12px 56px;
  --lb-gap: 108px;                      /* поля сверху и снизу: их вычитает расчёт ширины */
  background: rgba(8, 15, 26, .93);
  opacity: 0; transition: opacity .18s ease;
}
.lightbox.on { opacity: 1; }
.lightbox[hidden] { display: none; }    /* ⚠️ display:flex перебивает hidden */

/* ⚠️ Снимок разворачивается во ВЕСЬ экран, а не до натуральной ширины файла
   (решение владельца 27.08): вторая ступень «приблизить ещё вдвое» снята,
   действие одно. Апскейл сверх 1200 px даёт мягкую картинку — резкость
   вернёт только пересъёмка экранов в двойном разрешении. */
.lightbox-stage { position: relative; display: flex; max-width: 100%; max-height: 100%; border-radius: 10px; }
.lightbox-stage img {
  /* ⚠️ Ширину назначает скрипт: `max-width` только ОГРАНИЧИВАЕТ картинку, а не
     растягивает её — с ним снимок так и оставался в натуральные 1200 px
     посреди пустого экрана. Скрипт ставит width = min(98vw, высота × пропорции
     снимка), поэтому кадр занимает всё окно и не искажается при его изменении. */
  display: block; height: auto;
  max-width: 98vw; max-height: calc(100vh - var(--lb-gap));
  background: var(--bg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}

.lightbox button {
  position: absolute; width: 44px; height: 44px; border-radius: 50%; padding: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .24); cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.lightbox button:hover { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .45); }
.lightbox button:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.lightbox-x { top: 14px; right: 16px; }
/* Крестик нарисован, а не набран символом: в фирменном наборе иконок его нет,
   а «x» с клавиатуры выглядит самоделкой (то же решение, что у знака вопроса
   в разделе «Частые вопросы»). */
.lightbox-x::before, .lightbox-x::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 17px; height: 2px;
  margin: -1px 0 0 -8.5px; border-radius: 2px; background: currentColor;
  transform: rotate(45deg);
}
.lightbox-x::after { transform: rotate(-45deg); }
.lightbox-cap {
  position: absolute; left: 0; right: 0; bottom: 18px; padding: 0 24px;
  text-align: center; font-size: 13.5px; line-height: 1.45; color: rgba(255, 255, 255, .78);
}
@media (max-width: 700px) {
  .lightbox { padding: 50px 6px 52px; --lb-gap: 102px; }
  .lightbox button { width: 38px; height: 38px; }
  .lightbox-stage img { max-width: 99vw; }
  .lightbox-cap { padding: 0 16px; font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox, .shot-zoom-sign { transition: none; }
}

/* Первый экран: телефон поверх угла рабочего стола. ⚠️ Отрицательные отступы
   заставили бы страницу ехать вбок, поэтому запас даёт padding контейнера,
   а сам телефон уходит внутрь кадра. Ниже 760px убираем совсем: он закрывает
   собой то, ради чего снимок и стоит. */
.hero-shot { position: relative; margin-bottom: 36px; }
.hero-phone { position: absolute; right: -6px; bottom: -46px; width: 128px; }
.hero-phone .frame-phone { max-width: none; padding: 5px; border-radius: 18px; box-shadow: var(--shadow-lg); }
.hero-phone .frame-phone img { border-radius: 13px; }
@media (max-width: 760px) { .hero-phone { display: none; } }
/* Строка цены под первым экраном — не подпись к картинке: это самая
   коммерчески важная строка страницы, и 12.5px серым она терялась. */
.price-note { font-size: 15px; color: var(--text); margin-top: 18px; max-width: 46ch; }
.price-note .num { font-weight: 700; color: var(--head); }

/* ---------- Врезка «простыми словами» ---------- */
.terms { position: relative; background: var(--soft); border: 1px solid var(--line); border-radius: 16px; padding: 22px 26px 24px; overflow: hidden; }
.terms::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary); }
.terms-h { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--accent-ink); margin-bottom: 18px; }
.terms-g { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); }
.term { padding: 0 24px; border-left: 1px solid var(--line); }
.term:first-child { padding-left: 0; border-left: 0; }
.term b { display: block; font-size: 15px; color: var(--head); margin-bottom: 5px; }
.term span { display: block; color: var(--muted); font-size: 14px; line-height: 1.55; }
@media (max-width: 860px) {
  .terms-g { grid-template-columns: 1fr; }
  .term { padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--line); margin-top: 16px; }
  .term:first-child { padding-top: 0; border-top: 0; margin-top: 0; }
}

/* ---------- Выгоды: одна панель, разделённая волосяными линиями ----------
   Не четыре отдельные карточки: на белом фоне они читаются как незаконченная
   вёрстка — проверено на макете. */
.bens { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); }
.bens-3 { grid-template-columns: repeat(3, 1fr); }
.ben { padding: 28px 26px 30px; border-right: 1px solid var(--line); transition: background .18s ease; }
.ben:last-child { border-right: 0; }
.ben:hover { background: var(--soft); }
.ben h3 { margin-bottom: 8px; font-size: 17px; }
.ben p { color: var(--muted); font-size: 14.5px; }
.ben-ic { width: 46px; height: 46px; border-radius: 13px; background: var(--primary-soft); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 16px; transition: background .18s ease, color .18s ease; }
.ben:hover .ben-ic { background: var(--primary-dark); color: #fff; }
@media (max-width: 1000px) {
  .bens { grid-template-columns: repeat(2, 1fr); }
  .ben:nth-child(2n) { border-right: 0; }
  .ben:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .bens { grid-template-columns: 1fr; }
  .ben { border-right: 0; border-bottom: 1px solid var(--line); }
  .ben:last-child { border-bottom: 0; }
}

/* ---------- «Как это работает»: шаги переключают свой экран ---------- */
.how { display: grid; grid-template-columns: .82fr 1.18fr; gap: 40px; align-items: start; }
.steps { display: flex; flex-direction: column; gap: 4px; }
.step { display: flex; gap: 14px; align-items: flex-start; text-align: left; border: 0; background: transparent; cursor: pointer; padding: 14px 16px; border-radius: 11px; color: inherit; width: 100%; }
.step:hover { background: var(--soft); }
.step-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--line); color: var(--muted); font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.step-t b { display: block; font-size: 15.5px; color: var(--head); font-weight: 600; }
.step-t i { display: block; font-style: normal; font-size: 14px; color: var(--muted); margin-top: 3px; }

/* Выбранный шаг и его экран — от состояния radio, без скриптов. Шагов у всех
   разделов ровно четыре (это правило блока), поэтому пар ровно четыре. */
.pane { display: none; }
#step-0:checked ~ .steps label[for="step-0"],
#step-1:checked ~ .steps label[for="step-1"],
#step-2:checked ~ .steps label[for="step-2"],
#step-3:checked ~ .steps label[for="step-3"] { background: var(--primary-soft); }
#step-0:checked ~ .steps label[for="step-0"] .step-n,
#step-1:checked ~ .steps label[for="step-1"] .step-n,
#step-2:checked ~ .steps label[for="step-2"] .step-n,
#step-3:checked ~ .steps label[for="step-3"] .step-n { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
#step-0:checked ~ .panes .pane-0,
#step-1:checked ~ .panes .pane-1,
#step-2:checked ~ .panes .pane-2,
#step-3:checked ~ .panes .pane-3 { display: block; }
/* Клавиатура: обводка рисуется на своей подписи — сам radio скрыт. */
#step-0:focus-visible ~ .steps label[for="step-0"],
#step-1:focus-visible ~ .steps label[for="step-1"],
#step-2:focus-visible ~ .steps label[for="step-2"],
#step-3:focus-visible ~ .steps label[for="step-3"] { outline: 2px solid var(--primary); outline-offset: -2px; }
@media (max-width: 940px) { .how { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- Роли ---------- */
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.role { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.role h3 { font-size: 16px; padding: 16px 24px; background: var(--soft); border-bottom: 1px solid var(--line); }
.role ul { list-style: none; margin: 0; padding: 20px 24px 22px; display: flex; flex-direction: column; gap: 13px; }
.role li { position: relative; padding-left: 28px; font-size: 14.5px; line-height: 1.5; }
.role li::before {
  content: '✓'; position: absolute; left: 0; top: 1px;
  width: 19px; height: 19px; border-radius: 50%;
  background: rgba(19, 222, 185, .16); color: #0BA783;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
@media (max-width: 860px) { .roles { grid-template-columns: 1fr; } }

/* ---------- Козырь модуля ---------- */
.ace { background: var(--ink); border-radius: 18px; padding: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: center; }
.ace-l { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: rgba(215, 225, 236, .55); }
.ace-b { display: inline-block; margin-left: 10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 11px; border-radius: 100px; }
.ace h2 { color: #fff; margin: 12px 0 0; }
.ace p { color: rgba(215, 225, 236, .8); font-size: 16.5px; }
@media (max-width: 860px) { .ace { grid-template-columns: 1fr; gap: 18px; } }
@media (max-width: 700px) { .ace { padding: 28px 22px; } }

/* ---------- Вопросы ---------- */
.faq { max-width: 860px; display: flex; flex-direction: column; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0 22px; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.faq details:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
.faq details[open] { border-color: var(--primary); background: var(--soft); box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 600; color: var(--head); padding: 19px 0; list-style: none; display: flex; align-items: center; gap: 14px; font-size: 16px; line-height: 1.4; }
.faq summary::-webkit-details-marker { display: none; }
.faq .q-ic { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--primary-soft); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-size: 14px; }
/* «+» ПОВОРАЧИВАЕТСЯ в «×», а не подменяется символом: так знак не прыгает.
   ⚠️ Сам знак РИСУЕТСЯ двумя полосками, а не пишется символом шрифта. Глиф «+»
   стоит на математической оси — выше середины строки, — поэтому даже во
   flex-центрированном круге он сидел чуть выше центра, а после поворота уезжал
   по диагонали и «×» получался явно не в центре. Полоски центрируются по самой
   коробке, поэтому знак стоит ровно в обоих состояниях и не зависит от шрифта. */
.faq .q-mark { flex: none; margin-left: auto; position: relative; width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--accent-ink); transition: transform .2s ease, background .18s ease, color .18s ease; }
.faq .q-mark::before,
.faq .q-mark::after { content: ""; position: absolute; top: 50%; left: 50%; width: 12px; height: 2px; border-radius: 1px; background: currentColor; transform: translate(-50%, -50%); }
.faq .q-mark::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq details[open] .q-mark { transform: rotate(45deg); background: var(--primary-dark); color: #fff; }
.faq p { color: var(--muted); font-size: 15.5px; line-height: 1.6; padding: 0 44px 20px 40px; margin-top: -4px; }
.faq summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 8px; }
@media (max-width: 620px) { .faq p { padding: 0 0 18px; } }

/* ---------- «Работает вместе с» ---------- */
.rels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rel { position: relative; display: flex; flex-direction: column; gap: 7px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; text-decoration: none; color: inherit; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.rel:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); }
.rel-ic { width: 40px; height: 40px; border-radius: 11px; background: var(--primary-soft); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 4px; transition: background .18s ease, color .18s ease; }
.rel:hover .rel-ic { background: var(--primary-dark); color: #fff; }
.rel b { font-family: 'Montserrat', sans-serif; font-size: 16.5px; color: var(--head); }
.rel span { color: var(--muted); font-size: 14px; line-height: 1.5; }
.rel::after { content: '→'; position: absolute; top: 24px; right: 24px; color: var(--muted); font-size: 17px; transition: transform .18s ease, color .18s ease; }
.rel:hover::after { color: var(--accent-ink); transform: translateX(4px); }
.rel:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
@media (max-width: 860px) { .rels { grid-template-columns: 1fr; } }

/* ---------- Хаб «Возможности» ---------- */
.hub-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.hub-card { display: flex; flex-direction: column; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-decoration: none; color: inherit; transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
.hub-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--primary); }
.hub-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 6px; }
.hub-t { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 18px; color: var(--head); }
.hub-p { color: var(--muted); font-size: 14.5px; flex: 1; }
.hub-go { color: var(--accent-ink); font-size: 14px; font-weight: 600; margin-top: 6px; }
@media (max-width: 980px) { .hub-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .hub-grid { grid-template-columns: 1fr; } }

/* ---------- Тарифы ----------
   Переключатель периода без единой строки скрипта: два radio-соседа и
   селектор `~`. Поэтому input'ы обязаны лежать рядом с .plans, а не внутри
   .switch — иначе переключение молча перестанет работать. */
.switch { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 26px; background: var(--soft); border: 1px solid var(--line); border-radius: 100px; }
.switch label { cursor: pointer; padding: 8px 20px; border-radius: 100px; font-size: 14.5px; font-weight: 600; color: var(--muted); user-select: none; }
.switch label b { color: var(--success); font-weight: 700; }
#per-month:checked ~ .switch label[for="per-month"],
#per-year:checked ~ .switch label[for="per-year"] { background: var(--card); color: var(--head); box-shadow: var(--shadow); }
#per-month:focus-visible ~ .switch, #per-year:focus-visible ~ .switch { outline: 2px solid var(--primary); outline-offset: 3px; }
/* ⚠️ Прятать через `.p-y {display:none}` нельзя: у .plan-price та же
   специфичность, и правило ниже по файлу побеждает — светились ОБЕ цены.
   Поэтому базовое правило с запасом по специфичности (.plans .p-y), а
   годовое состояние перебивает его через id переключателя. Так карточка
   верна и БЕЗ переключателя — его не выводят, когда годовой скидки нет. */
.plans .p-y { display: none; }
#per-year:checked ~ .plans .p-y { display: block; }
#per-year:checked ~ .plans .p-m { display: none; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; position: relative; display: flex; flex-direction: column; }
.plan-popular { border: 2px solid var(--primary); box-shadow: var(--shadow-lg); }
/* Тангерин — место 1 из 2 на странице. */
.plan-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 14px; border-radius: 100px; white-space: nowrap; }
.plan-name { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 19px; color: var(--head); }
.plan-for { color: var(--muted); font-size: 13.5px; margin: 5px 0 18px; min-height: 40px; }
.plan-price { display: flex; align-items: baseline; gap: 6px; }
.plan-price .val { font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 38px; color: var(--head); font-variant-numeric: tabular-nums; }
.plan-price .cur { font-size: 15px; color: var(--muted); }
.plan-period { color: var(--muted); font-size: 13px; margin: 4px 0 20px; }
.plan ul { list-style: none; margin: 0 0 24px; padding: 0; flex: 1; }
.plan li { position: relative; padding: 8px 0 8px 22px; font-size: 14.5px; border-bottom: 1px dashed var(--line); }
.plan li:last-child { border-bottom: 0; }
.plan li::before { content: '✓'; position: absolute; left: 0; top: 8px; color: var(--success); font-weight: 700; }
.plan li.no { color: var(--muted); }
.plan li.no::before { content: '—'; color: var(--line); }
.plan .btn { width: 100%; }
@media (max-width: 1000px) { .plans { grid-template-columns: 1fr; } }

.band { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 30px; display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 26px; align-items: center; margin-top: 22px; }
.band ul { list-style: none; margin: 0; padding: 0; columns: 2; font-size: 14.5px; color: var(--muted); }
.band li { padding: 4px 0; break-inside: avoid; }
.band li::before { content: '✓ '; color: var(--success); font-weight: 700; }
.free-band { background: var(--primary-soft); border: 1px dashed var(--primary); border-radius: var(--radius); padding: 22px 28px; display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 20px; }
@media (max-width: 900px) { .band { grid-template-columns: 1fr; } .band ul { columns: 1; } }

/* ---------- Форма заявки ---------- */
.lead-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 14px; color: var(--head); margin-bottom: 6px; }
.field input, .field textarea {
  /* Радиус — как у полей админки (--bs-border-radius: 9px): формы сайта и
     рабочего места должны выглядеть одним набором. */
  width: 100%; padding: 12px 14px; font-size: 15px; font-family: inherit;
  color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: 9px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.field .err { font-size: 13px; color: #E05B3B; margin-top: 5px; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #E05B3B; }
/* Приманка для ботов: человек её не видит и не заполняет. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 13px; color: var(--muted); margin-top: 14px; }

.alert-error { background: rgba(250, 137, 107, .12); border: 1px solid rgba(250, 137, 107, .4); color: #E05B3B; border-radius: var(--radius-sm); padding: 14px 18px; font-size: 14.5px; margin-bottom: 20px; }

/* ---------- Финальный призыв и подвал ---------- */
.cta { background: var(--gradient); border-radius: 20px; padding: 56px 44px; text-align: center; color: #fff; }
.cta h2 { color: #fff; margin-bottom: 12px; }
.cta p { color: rgba(255, 255, 255, .88); font-size: 17px; max-width: 56ch; margin: 0 auto 26px; }
/* Нижний отступ обнуляем: иначе к 26px от общего правила .cta p прибавляется
   padding панели, и под последней строкой зияет пустая полоса. */
.cta .tail { margin: 18px 0 0; font-size: 15px; }
.cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.footer { background: var(--ink); color: #A9B7C9; padding: 50px 0 26px; font-size: 14px; margin-top: 70px; }
.footer a { color: #A9B7C9; text-decoration: none; }
.footer a:hover { color: #fff; }
.footer h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 14px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer ul { list-style: none; margin: 0; padding: 0; columns: 2; }
.footer li { margin-bottom: 8px; break-inside: avoid; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; }
@media (max-width: 1000px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .footer ul { columns: 1; } }

/* ---------- Общие сетки страниц ---------- */
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; }
.split.flip > :first-child { order: 2; }
@media (max-width: 1000px) { .split, .split.flip { grid-template-columns: 1fr; gap: 32px; } .split.flip > :first-child { order: initial; } }
.narrow { max-width: 760px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- Шрифт бренда ----------
   Montserrat 700 только для заголовков: остальной текст — системным стеком,
   чтобы не тянуть лишние начертания (публичная страница блокируется шрифтом
   так же, как CSS). Файл лежит рядом и публикуется тем же uikit:install. */
@font-face {
  font-family: 'Montserrat';
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url('montserrat-700.woff2') format('woff2');
}

/* ---------- Меню на телефоне ----------
   ⚠️ До 940px десктопные ссылки прятались, а замены не было — с телефона
   сайт превращался в одну страницу без выхода. Раскрывает <details>:
   публичные страницы обязаны работать без JS. */
.nav-burger { display: none; margin-left: auto; position: relative; }
.nav-burger > summary {
  list-style: none; cursor: pointer; width: 42px; height: 42px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.nav-burger > summary::-webkit-details-marker { display: none; }
.nav-burger > summary span { width: 18px; height: 2px; background: var(--head); border-radius: 2px; transition: transform .18s ease, opacity .18s ease; }
.nav-burger[open] > summary span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[open] > summary span:nth-child(2) { opacity: 0; }
.nav-burger[open] > summary span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-burger > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.nav-burger ul {
  position: absolute; right: 0; top: 50px; z-index: 60;
  min-width: 240px; margin: 0; padding: 8px; list-style: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.nav-burger li a { display: block; padding: 12px 14px; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); font-size: 15.5px; }
.nav-burger li a:hover, .nav-burger li a[aria-current] { background: var(--primary-soft); color: var(--accent-ink); }
/* Кнопка звонка на телефоне. Стоит ПОСЛЕ .nav-burger намеренно: у бургера
   margin-left:auto, и правило ниже по файлу побеждает при равной
   специфичности — иначе отступ достаётся не тому элементу и они разъезжаются
   по разным краям шапки. На этом рынке звонят, а не заполняют формы, поэтому
   звонок виден всегда, а не прячется в меню. */
.nav-call { display: none; }

@media (max-width: 940px) {
  .nav-burger { display: block; margin-left: 10px; }
  /* Кнопку заявки на узком экране убираем: она есть первой строкой в меню. */
  .nav-cta { display: none; }
  .nav-call {
    display: inline-flex; align-items: center; justify-content: center;
    height: 42px; padding: 0 16px; margin-left: auto;
    border: 1px solid var(--line); border-radius: var(--radius-sm);
    color: var(--accent-ink); font-size: 15px; font-weight: 600;
    text-decoration: none; white-space: nowrap;
  }
  .nav-call:hover { border-color: var(--primary); }
  .nav-call:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
}

/* ---------- Функции с пояснением ----------
   Плоская россыпь одинаковых пилюль — самый слабый блок страницы модуля:
   десять серых овалов не читаются. Где есть пояснение, показываем строкой. */
.fn-rows { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); }
.fn-row { display: flex; gap: 12px; padding: 16px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fn-row:nth-child(2n) { border-right: 0; }
.fn-row .fi { flex: none; font-size: 16px; color: var(--success); margin-top: 3px; }
.fn-row b { display: block; font-size: 15px; color: var(--head); font-weight: 600; }
.fn-row span { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
@media (max-width: 700px) { .fn-rows { grid-template-columns: 1fr; } .fn-row { border-right: 0; } }

/* ---------- Отраслевые страницы ---------- */
.case { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.case-c { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.case-c h3 { font-size: 17px; margin-bottom: 8px; }
.case-c p { color: var(--muted); font-size: 14.5px; }
.case-c .tag { display: inline-block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); background: var(--primary-soft); padding: 4px 10px; border-radius: 100px; margin-bottom: 12px; }
@media (max-width: 900px) { .case { grid-template-columns: 1fr; } }

/* Было / стало — разворот отраслевой страницы */
.beforeafter { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.beforeafter > div { padding: 26px 28px; }
.beforeafter > div:first-child { border-right: 1px solid var(--line); }
.beforeafter h3 { font-size: 15px; margin-bottom: 14px; }
.beforeafter ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.beforeafter li { position: relative; padding-left: 26px; font-size: 14.5px; line-height: 1.5; }
/* Маркер задаёт КЛАСС колонки, а не её порядок: в «было/стало» отрицательная
   колонка первая, в «работает / пока нет» — наоборот, а стили те же. */
.ba-no { background: var(--soft); }
.ba-no li { color: var(--muted); }
.ba-no li::before { content: '—'; position: absolute; left: 0; color: var(--muted); }
.ba-yes li::before {
  content: '✓'; position: absolute; left: 0; top: 1px;
  width: 19px; height: 19px; border-radius: 50%;
  background: rgba(19, 222, 185, .16); color: #0BA783;
  font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
@media (max-width: 800px) {
  .beforeafter { grid-template-columns: 1fr; }
  .beforeafter > div:first-child { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Подсветка блоков при наведении ----------
   Тот же приём, что у карточек «Возможности»: лёгкий подъём, тень и
   фирменная рамка. Держим в ОДНОМ месте — иначе часть блоков останется
   мёртвой, и страница будет реагировать выборочно.
   ⚠️ Отключаем при prefers-reduced-motion: движение — не украшение. */
.plan, .case-c, .role, .ben, .terms, .fn-row, .beforeafter > div {
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease, background .18s ease;
}
.plan:hover, .case-c:hover, .role:hover {
  box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--primary);
}
.fn-row:hover { background: var(--soft); }
@media (prefers-reduced-motion: reduce) {
  .plan:hover, .case-c:hover, .role:hover, .hub-card:hover, .rel:hover { transform: none; }
}
