/* E-Mobil: токены, сброс, сетка, общие классы и шапка. Поток 0.
   Шрифт Montserrat подключён в head.html (Google Fonts 400-800). */

/* Запасной шрифт под метрики Montserrat (05.10.2026): пока Montserrat грузится (display=swap),
   текст набран Arial, растянутым до ширины Montserrat, - после загрузки строки не перестраиваются
   и первый экран не прыгает (CLS). size-adjust подобран замером ширины текстов сайта
   (Montserrat / Arial) по весам; ascent = 968/1000 : size-adjust, descent = 251/1000 : size-adjust
   (вертикальные метрики Montserrat). 400-500 - Arial, 600-800 - Arial Bold. */
@font-face { font-family: "Montserrat Fallback"; font-weight: 400; src: local("Arial"), local("ArialMT");
  size-adjust: 112%; ascent-override: 86.4%; descent-override: 22.4%; line-gap-override: 0%; }
@font-face { font-family: "Montserrat Fallback"; font-weight: 500; src: local("Arial"), local("ArialMT");
  size-adjust: 113.8%; ascent-override: 85.1%; descent-override: 22.1%; line-gap-override: 0%; }
@font-face { font-family: "Montserrat Fallback"; font-weight: 600; src: local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 108%; ascent-override: 89.6%; descent-override: 23.2%; line-gap-override: 0%; }
@font-face { font-family: "Montserrat Fallback"; font-weight: 700 800; src: local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 110%; ascent-override: 88%; descent-override: 22.8%; line-gap-override: 0%; }

:root {
  --c-primary: #03525F;
  --c-dark: #03373D;
  --c-accent: #68ADAD;
  --c-text: #464646;
  --c-white: #FFFFFF;
  --c-light: #EEF5F5;
  --c-line: rgba(3, 82, 95, .15);

  --c-line-dark: rgba(255, 255, 255, .14);   /* рамки на тёмном фоне */
  --c-card-dark: rgba(255, 255, 255, .05);   /* фон карточки на тёмном */
  --c-muted-dark: rgba(255, 255, 255, .78);  /* второстепенный текст на тёмном */

  --font: "Montserrat", "Montserrat Fallback", Arial, sans-serif;
  --radius-card: 12px;
  --radius-btn: 10px;
  --shadow: 0 6px 24px rgba(3, 55, 61, .08);
  --shadow-hover: 0 10px 32px rgba(3, 55, 61, .14);
  --header-h: 64px;
  --gutter: 16px;
  --container: 1200px;
}
@media (min-width: 1024px) {
  :root { --header-h: 76px; --gutter: 24px; }
}

/* Сброс */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: var(--fs-lead);     /* 16/25, от 768 - 17/27 (шкала ниже) */
  line-height: var(--lh-lead);
  color: var(--c-text);
  background: var(--c-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[id] { scroll-margin-top: calc(var(--header-h) + 8px); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Заголовки */
h1, .h1 {
  font-weight: 800;
  font-size: 30px;
  line-height: 36px;
  text-transform: uppercase;
}
@media (min-width: 1024px) { h1, .h1 { font-size: 48px; line-height: 56px; } }
h3 { font-weight: 700; font-size: var(--fs-subtitle); line-height: var(--lh-subtitle); }
.accent { color: var(--c-accent); }
strong, b { font-weight: 600; }

/* Контейнер и секции */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: 64px 0; }
@media (min-width: 1024px) { .section { padding: 96px 0; } }
.section--dark  { background: var(--c-dark);  color: var(--c-white); }
.section--light { background: var(--c-light); color: var(--c-text); }
.section--white { background: var(--c-white); color: var(--c-text); }

.section__title {
  font-weight: 800;
  font-size: 26px;
  line-height: 32px;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: 16px;
}
@media (min-width: 1024px) { .section__title { font-size: 36px; line-height: 44px; } }
.section--dark .section__title { color: var(--c-white); }
.section__lead {
  font-weight: 500;
  max-width: 760px;
  margin-bottom: 32px;
}
@media (min-width: 1024px) { .section__lead { margin-bottom: 48px; } }
.section--dark .section__lead { color: var(--c-muted-dark); }

/* Кнопки. На светлом фоне главная - #03525F/белый, на тёмном - #68ADAD/#03373D */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 14px 28px;
  border: 2px solid transparent;
  border-radius: var(--radius-btn);
  font-family: var(--font);
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .6; cursor: default; transform: none; }

.btn--primary { background: var(--c-primary); color: var(--c-white); box-shadow: 0 4px 14px rgba(3, 82, 95, .25); }
.btn--primary:hover { background: var(--c-dark); }
.btn--secondary { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn--secondary:hover { background: var(--c-primary); color: var(--c-white); }
.btn--ghost { background: transparent; color: var(--c-primary); padding-left: 8px; padding-right: 8px; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.btn--ghost:hover { text-decoration-thickness: 2px; }

.section--dark .btn--primary, .header .btn--primary, .footer .btn--primary {
  background: var(--c-accent); color: var(--c-dark); box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
}
.section--dark .btn--primary:hover, .header .btn--primary:hover, .footer .btn--primary:hover {
  background: var(--c-white); color: var(--c-dark);
}
.section--dark .btn--secondary { color: var(--c-white); border-color: var(--c-accent); }
.section--dark .btn--secondary:hover { background: var(--c-accent); color: var(--c-dark); }
.section--dark .btn--ghost { color: var(--c-white); }

/* Ссылка со стрелкой (стрелка «→» пишется в тексте) */
.link-arrow {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  color: var(--c-primary);
  text-decoration: none;
  border-bottom: 0;
  transition: color .2s, letter-spacing .2s;
}
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }
.section--dark .link-arrow { color: var(--c-accent); }
/* Низ карточки: ссылка прижата к низу, над ней тонкая линия - во всех карточках на одной высоте */
.card__foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--c-line); }
.card__foot .link-arrow { min-height: 44px; text-wrap: pretty; }

/* Шкала текста (читабельность 04.10.2026; единая типографика 05.10.2026). Одна на весь сайт:
   lead     17/27 (телефон 16/25) - подзаголовки секций, лид первого экрана (наследуют body);
   body     15/24 - текст карточек, ответы FAQ, текст полос-призывов, ячейки сравнения, пункты списков;
   small    14/20 - подписи, метки, подписи фото и цифр, подписи полей;
   micro    13/18 600-700 - теги, шапка таблицы, плашки (прописные с разрядкой - теги и шапка таблицы);
   subtitle 20/28 700 (телефон 18/26) - заголовки полос-призывов и блока FAQ;
   заголовок карточки 16/22 800 прописные +0.03em. Кнопки - 16/20 700 (в шапке 15, в нижней панели 15).
   Отступ карточки 20 px телефон / 24 px от 768. Абзац секции не шире ~65 знаков. */
:root {
  --fs-lead: 16px; --lh-lead: 25px;
  --fs-body: 15px; --lh-body: 24px;
  --fs-small: 14px; --lh-small: 20px;
  --fs-micro: 13px; --lh-micro: 18px;
  --fs-subtitle: 18px; --lh-subtitle: 26px;
  --fs-card-title: 16px; --lh-card-title: 22px;
  /* прежние имена (секции 02-10) - те же ступени */
  --fs-card: var(--fs-body); --lh-card: var(--lh-body);
  --fs-meta: var(--fs-micro); --lh-meta: var(--lh-micro);
  --card-pad: 20px;
  --measure: 640px;
}
@media (min-width: 768px) {
  :root { --card-pad: 24px; --fs-lead: 17px; --lh-lead: 27px; --fs-subtitle: 20px; --lh-subtitle: 28px; }
}
:is(#audience, #why, #how, #docs, #cases, #process, #faq) .section__lead { max-width: var(--measure); }

/* Карточка */
.card {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: var(--card-pad);
  font-size: var(--fs-card);
  line-height: var(--lh-card);
}
.section--dark .card { background: var(--c-card-dark); border-color: var(--c-line-dark); box-shadow: none; color: var(--c-white); }
.card h3 {
  color: var(--c-primary); text-transform: uppercase; margin-bottom: 10px;
  font-weight: 800; font-size: var(--fs-card-title); line-height: var(--lh-card-title); letter-spacing: .03em;
  text-wrap: balance;
}
.section--dark .card h3 { color: var(--c-white); }

/* Тег */
.tag {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--c-light);
  color: var(--c-primary);
  font-weight: 700;
  font-size: var(--fs-micro);   /* micro 13/18; разрядка .03em, как у заголовков карточек: */
  line-height: var(--lh-micro); /* «ДВУХУРОВНЕВЫЙ ПАРКИНГ» остаётся в одну строку на 1440 и 375 */
  letter-spacing: .03em;
  text-transform: uppercase;
}
.section--light .tag { background: var(--c-white); }
.section--dark .tag { background: rgba(104, 173, 173, .18); color: var(--c-accent); }

/* Сетки: на телефоне в столбик, 768+ по 2, 1024+ полная */
.grid-2, .grid-3, .grid-4 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .grid-2, .grid-3, .grid-4 { gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Поля форм (общие для формы #form и модалок) */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-weight: 600; font-size: var(--fs-small); line-height: var(--lh-small); }
.input, .select {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-btn);
  background: var(--c-white);
  color: var(--c-text);
  font-size: 16px;
  line-height: 24px;
}
.input::placeholder { color: rgba(70, 70, 70, .55); }
.input:focus, .select:focus { border-color: var(--c-primary); outline: none; box-shadow: 0 0 0 3px rgba(104, 173, 173, .35); }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: #B3261E; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-small); line-height: var(--lh-small); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--c-primary); }
.check a { text-decoration: underline; }
.form-error { color: #B3261E; font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 500; }
.section--dark .form-error { color: #FFB4AB; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Доступность */
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; border-radius: 4px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ===== Шапка (липкая, тёмная) ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-dark);
  color: var(--c-white);
  box-shadow: 0 1px 0 var(--c-line-dark);
}
.header__inner { display: flex; align-items: center; gap: 12px; height: var(--header-h); }
.header__logo { flex: none; display: flex; align-items: center; min-height: 44px; }
.header__logo img { height: 30px; width: auto; }
@media (min-width: 1024px) { .header__logo img { height: 40px; } }

.header__nav { margin-left: auto; }
.header__menu { display: flex; align-items: center; }
.header__menu li { display: flex; align-items: center; }
.header__menu li + li::before { content: "//"; color: var(--c-accent); font-weight: 600; margin: 0 12px; }
.header__menu a {
  font-weight: 600; font-size: 15px; line-height: 20px; text-decoration: none; color: var(--c-white);
  padding: 12px 0; transition: color .2s;
}
.header__menu a:hover { color: var(--c-accent); }

.header__actions { display: flex; align-items: center; gap: 8px; margin-left: 24px; }
.header__phone { font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap; margin-right: 12px; }
.header__phone:hover { color: var(--c-accent); }
.header__phone-icon { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--c-accent); }
.header__cta { min-height: 44px; padding: 10px 20px; font-size: 15px; }

.header__burger {
  display: none; width: 44px; height: 44px; padding: 11px 10px; border: 0; background: transparent;
  flex-direction: column; justify-content: space-between;
}
.header__burger span { display: block; height: 2px; background: var(--c-white); border-radius: 2px; transition: transform .2s, opacity .2s; }
.header.is-open .header__burger span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.header.is-open .header__burger span:nth-child(2) { opacity: 0; }
.header.is-open .header__burger span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Правка 3 (05.10.2026): в меню 6 пунктов (добавлены «Станции») - на 1024-1199 px меню плотнее, чтобы шапка
   оставалась в одну строку */
.header__menu a, .header__cta { white-space: nowrap; }
@media (min-width: 1024px) and (max-width: 1199px) {
  .header__menu li + li::before { margin: 0 7px; }
  .header__menu a { font-size: 14px; }
  .header__actions { margin-left: 16px; }
}
@media (max-width: 1023px) {
  .header__actions { margin-left: auto; gap: 4px; }
  .header__phone { display: none; }
  .header__phone-icon { display: inline-flex; }
  .header__burger { display: flex; }
  .header__nav {
    display: none;
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--c-dark);
    border-top: 1px solid var(--c-line-dark);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .25);
    padding: 8px var(--gutter) 16px;
  }
  .header.is-open .header__nav { display: block; }
  .header__menu { flex-direction: column; align-items: stretch; }
  .header__menu li + li::before { content: none; }
  .header__menu li { border-bottom: 1px solid var(--c-line-dark); }
  .header__menu li:last-child { border-bottom: 0; }
  .header__menu a { display: block; width: 100%; padding: 14px 0; font-size: 16px; }
}
@media (max-width: 400px) {
  .header__inner { gap: 6px; }
  .header__cta { padding: 8px 12px; font-size: 14px; }
  .header__logo img { height: 26px; }
}
/* Телефон в шапке (12.10.2026, номер появился): номер текстом не помещается рядом с 6 пунктами меню до 1279 px -
   на 1024-1279 вместо него иконка-трубка (ссылка tel: та же). До 479 px шапка чуть компактнее,
   чтобы логотип, трубка, «Перезвоните мне» и бургер помещались в 360 px без горизонтальной прокрутки. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .header__phone { display: none; }
  .header__phone-icon { display: inline-flex; }
  .header__actions { gap: 4px; }
}
@media (min-width: 1024px) and (max-width: 1199px) {
  .header__actions { margin-left: 6px; }
}
@media (max-width: 479px) {
  .header__inner { gap: 6px; }
  .header__actions { gap: 2px; }
  .header__logo img { height: 24px; }
  .header__phone-icon, .header__burger { width: 40px; }
  .header__burger { padding-left: 8px; padding-right: 8px; }
  .header__cta { padding: 8px 10px; font-size: 13px; }
}

/* ===== Типографика выравнивания (05.10.2026) =====
   Абзацы - по ширине, но с переносами слов: без переносов выравнивание по ширине даёт «дыры»
   между словами, особенно в узких колонках. Последняя строка абзаца остаётся слева.
   Заголовки по ширине не растягиваем (3-5 крупных слов прописными дают огромные промежутки) -
   вместо этого балансируем длину строк: блок заголовка выглядит ровным и без дыр. */
/* По ширине - только от 768 px. На телефоне строка 35-40 знаков: по ширине без промежутков невозможно,
   поэтому там текст по левому краю (как в мобильных версиях СМИ и книжных приложениях). */
/* Белый список: по ширине - только настоящие абзацы текста (абзацы без класса в карточках, этапах, ответах,
   на страницах ПДн) и явно перечисленные длинные тексты. Всё прочее с классом (заголовки-абзацы полос,
   «Не нашли свой вопрос?», подписи документов, цены, теги, ошибки форм) - по левому краю. */
@media (min-width: 768px) {
  main p:not([class]),
  main .section__lead, main .hero__lead, main .cta-band__lead, main .faq__cta-lead,
  main ul:not([class]) li, main ol:not([class]) li,
  .docs__onsite li {
    text-align: justify;
    -webkit-hyphens: auto;
    hyphens: auto;
    hyphenate-limit-chars: 5 2 2;   /* переносить слова от 5 букв: больше точек деления строки - меньше промежутков */
    text-wrap: wrap;                /* pretty мешает ровному разбиению строк по ширине */
  }
}
/* Исключения: короткие подписи и метки, центрированные блоки, таблица - выравнивание как у контейнера */
main .cases__meta, main .hero__note, main .lead__head p, main .why__compare-table p,
main .cases__body p, main .docs__list li,   /* узкие колонки ~30-35 знаков: по ширине без дыр невозможно - слева */
main .cta-sticky p, main .modal p {
  text-align: inherit;
  -webkit-hyphens: manual;
  hyphens: manual;
}
/* Заголовки: ровные строки без растягивания и без переносов слов */
h1, h2, h3, .section__title, .faq__q, .cta-band__title, .faq__cta-title {
  text-wrap: balance;
  -webkit-hyphens: manual;
  hyphens: manual;
}
