/* ==========================================================================
   Rail Mates — корпоративный сайт
   Фирменные цвета: #299876 (основной зелёный), #1F7A5E (hover),
   #EAF5F1 (подложка), #3FC3A0 (светлый акцент), #0E1B17 / #14382E (тёмный фон)
   ========================================================================== */

/* ------------------------------- Шрифты --------------------------------- */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("assets/fonts/manrope-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("assets/fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("assets/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

/* ------------------------------- Токены --------------------------------- */
:root {
  --green: #299876;
  --green-dark: #1f7a5e;
  --green-light: #eaf5f1;
  --accent: #3fc3a0;

  --ink: #1f2933;
  --muted: #5b6770;

  --white: #ffffff;
  --bg-alt: #f4f6f5;

  --dark: #0e1b17;
  --dark-mid: #14382e;

  --line: rgba(31, 41, 51, 0.1);
  --line-dark: rgba(255, 255, 255, 0.14);

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 24px;
  /* Крупный радиус «формы» фотографии в блоке «О компании» */
  --about-radius: clamp(24px, 4vw, 64px);

  --shadow-sm: 0 1px 3px rgba(14, 27, 23, 0.06), 0 6px 18px rgba(14, 27, 23, 0.05);
  --shadow: 0 10px 34px rgba(14, 27, 23, 0.09);
  --shadow-lg: 0 26px 70px rgba(14, 27, 23, 0.16);

  --container: 1280px;
  --gutter: 24px;
  --header-h: 104px;
  --header-h-scrolled: 84px;
  /* Логотип вертикальный (знак — надпись — знак), как в исходном PDF */
  --logo-h: 88px;
  --logo-h-scrolled: 66px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ------------------------------- Сброс ---------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--green);
  text-decoration: none;
}

a:hover {
  color: var(--green-dark);
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--green);
  color: #fff;
}

/* ------------------------------ Утилиты --------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  background: var(--green);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
  color: #fff;
}

.muted {
  color: var(--muted);
}

/* Отступ при переходе по якорю — с учётом фиксированной шапки (ТЗ 3.2) */
[id] {
  scroll-margin-top: calc(var(--header-h-scrolled) + 18px);
}

/* ------------------------------ Кнопки ---------------------------------- */
.btn {
  --btn-bg: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 28px;
  border: 2px solid transparent;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s var(--ease), box-shadow 0.25s var(--ease),
    background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background-image: linear-gradient(135deg, var(--green) 0%, var(--accent) 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(41, 152, 118, 0.28);
}

.btn--primary:hover {
  color: #fff;
  box-shadow: 0 14px 34px rgba(41, 152, 118, 0.36);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #fff;
  color: #fff;
}

.btn--outline {
  background: transparent;
  border-color: var(--green);
  color: var(--green-dark);
}

.btn--outline:hover {
  background: var(--green-light);
  color: var(--green-dark);
}

.btn--sm {
  min-height: 48px;
  padding: 12px 20px;
  font-size: 15px;
}

/* ------------------------------ Шапка ----------------------------------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  /* Плавный кроссфейд шапки: высота, фон и тень меняются одной кривой,
     поэтому переход из «прозрачной» в «белую» читается как единое движение. */
  transition: height 0.45s var(--ease), background-color 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
}

.header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 27, 23, 0.55) 0%, rgba(14, 27, 23, 0) 100%);
  opacity: 1;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
}

.header.is-scrolled {
  height: var(--header-h-scrolled);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 6px 26px rgba(14, 27, 23, 0.08);
}

.header.is-scrolled::before {
  opacity: 0;
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand__logo {
  height: var(--logo-h);
  width: auto;
  transition: height 0.45s var(--ease), opacity 0.45s var(--ease);
}

.header.is-scrolled .brand__logo {
  height: var(--logo-h-scrolled);
}

/* Светлый и тёмный знаки лежат друг на друге и меняются прозрачностью:
   так смена логотипа при скролле идёт в одном темпе с фоном, без «скачка».
   В потоке остаётся светлый — он задаёт размер блока. */
.brand__logo--dark {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
}

.header.is-scrolled .brand__logo--light {
  opacity: 0;
}

.header.is-scrolled .brand__logo--dark {
  opacity: 1;
}

.nav {
  margin-left: auto;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 15.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.45s var(--ease), background-color 0.45s var(--ease);
}

.nav__link:hover,
.nav__link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.header.is-scrolled .nav__link {
  color: var(--ink);
}

.header.is-scrolled .nav__link:hover,
.header.is-scrolled .nav__link.is-active {
  color: var(--green-dark);
  background: var(--green-light);
}

.header__aside {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.lang {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  transition: border-color 0.45s var(--ease);
}

.lang__link {
  display: block;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.45s var(--ease), background-color 0.45s var(--ease);
}

.lang__link:hover {
  color: #fff;
}

.lang__link[aria-current="page"] {
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
}

.header.is-scrolled .lang {
  border-color: var(--line);
}

.header.is-scrolled .lang__link {
  color: var(--muted);
}

.header.is-scrolled .lang__link:hover {
  color: var(--green-dark);
}

.header.is-scrolled .lang__link[aria-current="page"] {
  background: var(--green);
  color: #fff;
}

/* Переключатель языка внутри мобильного меню (скрыт на ПК) */
.nav__lang {
  display: none;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 12px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.45s var(--ease);
}

.nav-toggle__line {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease),
    background-color 0.45s var(--ease);
}

.header.is-scrolled .nav-toggle {
  border-color: var(--line);
}

.header.is-scrolled .nav-toggle__line {
  background: var(--ink);
}

body.nav-open .nav-toggle__line:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

body.nav-open .nav-toggle__line:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle__line:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Внутренние страницы без тёмного первого экрана */
.page-inner .header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 6px 26px rgba(14, 27, 23, 0.08);
}

.page-inner .header::before {
  opacity: 0;
}

.page-inner .brand__logo--light {
  opacity: 0;
}

.page-inner .brand__logo--dark {
  opacity: 1;
}

.page-inner .nav__link {
  color: var(--ink);
}

.page-inner .nav__link:hover,
.page-inner .nav__link.is-active {
  color: var(--green-dark);
  background: var(--green-light);
}

.page-inner .lang {
  border-color: var(--line);
}

.page-inner .lang__link {
  color: var(--muted);
}

.page-inner .lang__link:hover {
  color: var(--green-dark);
}

.page-inner .lang__link[aria-current="page"] {
  background: var(--green);
  color: #fff;
}

.page-inner .nav-toggle {
  border-color: var(--line);
}

.page-inner .nav-toggle__line {
  background: var(--ink);
}

body.nav-open .page-inner .brand__logo--light,
.page-inner body.nav-open .brand__logo--light {
  opacity: 1;
}

body.nav-open .page-inner .brand__logo--dark,
.page-inner body.nav-open .brand__logo--dark {
  opacity: 0;
}

/* ------------------------------- Первый экран --------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 620px;
  height: 100vh;
  max-height: 1000px;
  padding: calc(var(--header-h) + 48px) 0 72px;
  overflow: hidden;
  background: linear-gradient(125deg, #0e1b17 0%, #14382e 46%, var(--green) 100%);
  color: #fff;
  isolation: isolate;
}

.hero__map {
  position: absolute;
  inset: 0;
  z-index: -2;
  /* чуть выше исходного 0.9 — схема в тёмном герое читается заметнее */
  opacity: 1;
}

.hero__map svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Точечная сетка фона — в двух уровнях: частая мелкая и редкие крупные узлы.
   Это даёт глубину: фон не читается как плоская «клетка». */
.hero__map svg .map-dot {
  fill: #ffffff;
}

.hero__map svg .map-dot--small {
  fill-opacity: 0.16;
}

.hero__map svg .map-dot--big {
  fill-opacity: 0.3;
}

.hero__map svg path[fill="url(#land)"] {
  stroke-opacity: 0.2;
}

.hero__map svg .route-pulse {
  stroke-opacity: 0.6;
}

.hero__map svg text {
  fill-opacity: 0.82;
}

.hero__glow {
  position: absolute;
  z-index: -1;
  width: 720px;
  height: 720px;
  right: -180px;
  top: -160px;
  background: radial-gradient(circle, rgba(63, 195, 160, 0.42) 0%, rgba(63, 195, 160, 0) 68%);
  filter: blur(30px);
  pointer-events: none;
}

.hero__glow--left {
  left: -240px;
  right: auto;
  top: 40%;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(41, 152, 118, 0.4) 0%, rgba(41, 152, 118, 0) 70%);
}

.hero__grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.32;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* Затемняющая подложка под текстовым блоком тёмного героя:
   плавно гасит фоновую карту-схему слева, чтобы заголовок и лид не сливались. */
.hero:not(.hero--light)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    rgba(10, 21, 17, 0.92) 0%,
    rgba(10, 21, 17, 0.86) 32%,
    rgba(10, 21, 17, 0.52) 56%,
    rgba(10, 21, 17, 0.14) 70%,
    rgba(10, 21, 17, 0) 82%
  );
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero__title {
  font-size: clamp(2rem, 1.1rem + 3.4vw, 4rem);
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}

/* Название компании — вордмарк в стиле логотипа:
   верхний регистр, широкий трекинг и тонкая акцентная линия под названием. */
.hero__brand {
  display: block;
  width: fit-content;
  position: relative;
  font-size: clamp(1.75rem, 0.9rem + 3.1vw, 3.5rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  line-height: 1.05;
  padding-bottom: 16px;
  background: linear-gradient(120deg, #ffffff 0%, var(--accent) 78%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 18px;
}

.hero__brand::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  /* Линия идёт ровно под буквами — без «хвоста» от межбуквенного трекинга */
  width: calc(100% - 0.16em);
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, rgba(63, 195, 160, 0) 100%);
}

.hero__claim {
  display: block;
  font-size: clamp(1.1rem, 0.8rem + 1.2vw, 1.65rem);
  font-weight: 600;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.94);
  letter-spacing: -0.01em;
}

.hero__lead {
  max-width: 640px;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 34px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  /* Вариант выделения: каждый факт — отдельная пилюля-чип */
  width: fit-content;
  max-width: 100%;
}

.hero__fact {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 17px 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.hero__fact::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(63, 195, 160, 0.9);
  flex-shrink: 0;
}

/* --------------------- Первый экран: светлый вариант (Б) ----------------- */
/* ТЗ 2.7: фон #FFFFFF → #EAF5F1, крупная карта-схема зелёными линиями,
   мягкие градиентные пятна. Контраст текста — не ниже WCAG AA (ТЗ 2.1). */
.hero--light {
  background: linear-gradient(125deg, #ffffff 0%, #f3faf7 44%, #eaf5f1 100%);
  color: var(--ink);
}

/* Лёгкая светлая вуаль: приглушает карту ровно настолько, чтобы текст читался,
   но линии, станции и подписи схемы остаются видны как фоновая графика. */
.hero--light::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.6) 0%,
    rgba(255, 255, 255, 0.54) 46%,
    rgba(255, 255, 255, 0.46) 74%,
    rgba(255, 255, 255, 0.4) 100%
  );
}

/* Карта-схема: белые линии, точки и подписи → фирменный зелёный */
.hero--light .hero__map {
  opacity: 1;
}

.hero--light .hero__map svg .map-dot {
  fill: var(--green);
}

.hero--light .hero__map svg .map-dot--small {
  fill-opacity: 0.22;
}

.hero--light .hero__map svg .map-dot--big {
  fill-opacity: 0.38;
}

.hero--light .hero__map svg path[fill="url(#land)"] {
  fill: rgba(63, 195, 160, 0.12);
  stroke: rgba(41, 152, 118, 0.3);
  stroke-opacity: 1;
}

/* Вуаль гасит крупные плоскости (заливка «суши», сетку), а тонкие элементы
   схемы — маршруты, станции, подписи — оставляем контрастными, чтобы карта
   читалась как графика, но не мешала тексту. */
.hero--light .hero__map .route-pulse {
  stroke: var(--green);
  stroke-opacity: 0.55;
}

.hero--light .hero__map svg circle[fill="#ffffff"] {
  fill: var(--green-dark);
}

.hero--light .hero__map svg circle[stroke="#3FC3A0"] {
  stroke: var(--green);
  stroke-opacity: 0.75;
}

.hero--light .hero__map svg text {
  fill: #14382e;
  fill-opacity: 0.85;
}

.hero--light .hero__map .station-halo {
  opacity: 0.45;
}

/* Мягкие градиентные пятна и деликатная зернистость */
.hero--light .hero__glow {
  background: radial-gradient(circle, rgba(63, 195, 160, 0.22) 0%, rgba(63, 195, 160, 0) 68%);
  filter: blur(40px);
}

.hero--light .hero__glow--left {
  background: radial-gradient(circle, rgba(41, 152, 118, 0.18) 0%, rgba(41, 152, 118, 0) 70%);
}

.hero--light .hero__grain {
  opacity: 0.08;
}

/* Текст светлого героя: чуть темнее базовых цветов, чтобы читался поверх схемы */
.hero--light .hero__brand {
  background: linear-gradient(120deg, #175f47 0%, var(--green-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero--light .hero__brand::after {
  background: linear-gradient(90deg, var(--green) 0%, rgba(41, 152, 118, 0) 100%);
}

.hero--light .hero__claim {
  color: #16202a;
}

.hero--light .hero__lead {
  color: #3d4953;
}

.hero--light .hero__facts {
  color: #3d4953;
}

.hero--light .hero__fact {
  /* Пилюли фактов на светлом герое */
  border-color: rgba(41, 152, 118, 0.24);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-sm);
}

.hero--light .hero__fact::before {
  background: var(--green);
  box-shadow: 0 0 10px rgba(41, 152, 118, 0.45);
}

/* Кнопки на светлом фоне */
.hero--light .btn--ghost {
  border-color: rgba(31, 41, 51, 0.24);
  color: var(--ink);
}

.hero--light .btn--ghost:hover {
  background: rgba(41, 152, 118, 0.08);
  border-color: var(--green);
  color: var(--green-dark);
}

/* Фото поезда в скошенной маске справа — только светлый вариант (ТЗ 2.7, вариант Б).
   Показывается на широких экранах, где текст не перекрывается; на мобильных скрыто,
   поэтому изображение не загружается на телефонах. */
.hero__train {
  display: none;
}

.hero--light .hero__train {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: clamp(24px, 3.2vw, 88px);
  width: clamp(320px, 26vw, 430px);
  aspect-ratio: 3 / 4;
  margin: 0;
  transform: translateY(-50%) rotate(-3deg);
  border-radius: 30px;
  overflow: hidden;
  background: var(--dark);
  box-shadow: 0 36px 90px rgba(14, 27, 23, 0.22), 0 0 0 1px rgba(41, 152, 118, 0.18),
    0 0 60px rgba(63, 195, 160, 0.25);
}

.hero--light .hero__train::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 27, 23, 0) 45%, rgba(14, 27, 23, 0.3) 100%);
  pointer-events: none;
}

.hero--light .hero__train img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* На узких экранах фото поезда скрыто и текст занимает всю ширину, поэтому
   карта-схема идёт прямо под буквами — приглушаем её сильнее. */
@media (max-width: 1099px) {
  .hero--light .hero__map {
    opacity: 0.5;
  }
}

/* На широких экранах колонка текста уже — фото помещается справа без наложения */
@media (min-width: 1100px) {
  .hero--light .hero__inner {
    max-width: 640px;
  }

  .hero--light .hero__train {
    display: block;
  }
}

/* Прозрачная шапка над светлым героем: тёмные логотип, меню и бургер.
   При открытом мобильном меню правила не действуют — панель тёмная. */
body:has(.hero--light):not(.nav-open) .header:not(.is-scrolled)::before {
  opacity: 0;
}

body:has(.hero--light):not(.nav-open) .header:not(.is-scrolled) .brand__logo--light {
  opacity: 0;
}

body:has(.hero--light):not(.nav-open) .header:not(.is-scrolled) .brand__logo--dark {
  opacity: 1;
}

body:has(.hero--light):not(.nav-open) .header:not(.is-scrolled) .nav__link {
  color: rgba(31, 41, 51, 0.8);
}

body:has(.hero--light):not(.nav-open) .header:not(.is-scrolled) .nav__link:hover,
body:has(.hero--light):not(.nav-open) .header:not(.is-scrolled) .nav__link.is-active {
  color: var(--green-dark);
  background: rgba(41, 152, 118, 0.1);
}

body:has(.hero--light):not(.nav-open) .header:not(.is-scrolled) .lang {
  border-color: rgba(31, 41, 51, 0.18);
}

body:has(.hero--light):not(.nav-open) .header:not(.is-scrolled) .lang__link {
  color: var(--muted);
}

body:has(.hero--light):not(.nav-open) .header:not(.is-scrolled) .lang__link:hover {
  color: var(--green-dark);
}

body:has(.hero--light):not(.nav-open) .header:not(.is-scrolled) .lang__link[aria-current="page"] {
  background: var(--green);
  color: #fff;
}

body:has(.hero--light):not(.nav-open) .header:not(.is-scrolled) .nav-toggle {
  border-color: rgba(31, 41, 51, 0.2);
}

body:has(.hero--light):not(.nav-open) .header:not(.is-scrolled) .nav-toggle__line {
  background: var(--ink);
}

/* ------------------------------- Секции --------------------------------- */
.section {
  position: relative;
  /* Высота вертикальных отступов секции вынесена в переменную: её использует
     фото в блоке «О компании», растягиваясь до краёв секции. */
  --section-pad: 96px;
  padding: var(--section-pad) 0;
  overflow: hidden; /* декоративные пятна не создают горизонтальное переполнение */
}

.section--alt {
  background: var(--bg-alt);
}

.section--tight {
  padding: 72px 0;
}

.section__head {
  max-width: 760px;
  margin-bottom: 52px;
}

.section__eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}

.section__title {
  font-size: clamp(1.65rem, 1.2rem + 1.7vw, 2.6rem);
  margin-bottom: 16px;
}

.section__lead {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.6;
}

.section__head--center {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* мягкие пятна в углах светлых секций */
.section__blob {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(90px);
  background: rgba(41, 152, 118, 0.14);
  pointer-events: none;
}

.section__blob--br {
  right: -140px;
  bottom: -160px;
}

.section__blob--tl {
  left: -160px;
  top: -140px;
}

/* тонкий точечный паттерн в светлых секциях (ТЗ 2.7, ≤ 6 %) */
.section--alt::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(41, 152, 118, 0.2) 1.7px, transparent 1.8px);
  background-size: 24px 24px;
}

.section > .container,
.trust > .container,
.request > .container,
.hero > .container {
  position: relative;
  z-index: 1;
}

/* ------------------------------- Карточки ------------------------------- */
.grid {
  display: grid;
  gap: 22px;
}

.cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  position: relative;
  padding: 30px 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, var(--green) 0%, var(--accent) 60%, transparent 90%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: var(--green-light);
  color: var(--green);
}

.card__icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card__title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.card__text {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
  }
  .card:hover::after {
    opacity: 1;
  }
}

.section__cta {
  margin-top: 42px;
  text-align: center;
}

/* ------------------------------- О компании ----------------------------- */
.about {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.prose p + p {
  margin-top: 18px;
}

.prose strong {
  color: var(--ink);
  font-weight: 700;
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.about__stat {
  padding: 20px 22px;
  background: var(--green-light);
  border-radius: var(--radius);
}

.about__stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--green-dark);
  line-height: 1.1;
}

.about__stat-label {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}

.about__media {
  position: relative;
  overflow: hidden;
  background: var(--dark);
  min-height: 380px;
  /* Форма кадра: внутренние углы (со стороны текста) скруглены крупным радиусом */
  border-radius: 0 0 var(--about-radius) var(--about-radius);
}

/* Форма кадра — «скошенный край»: вместо скругления срез по диагонали с той
   стороны, где кадр граничит с текстом. В одноколоночном виде (телефон,
   планшет) текст идёт под фото, поэтому срезан нижний край. */
.about__media--photo {
  border-radius: 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - clamp(40px, 12vw, 72px)));
}

/* «Живая фотография» в блоке «О компании»: реальный кадр как часть фона —
   без карточки и рамки, вплотную к краям секции. */
.about__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  /* Естественный цвет кадра: лишь лёгкая насыщенность и микроконтраст,
     чтобы фото не «выпадало» из мягкой палитры секции */
  filter: saturate(1.06) contrast(1.03);
}

/* Деликатная зернистость поверх цветного кадра — та же «плёночная» фактура,
   что и в остальных секциях. Цвет не искажает. */
.about__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* Десктоп: высота фото равна высоте текстовой колонки слева,
   кадр уходит к правому краю экрана, повторяя правую колонку сетки. */
@media (min-width: 1200px) {
  .about {
    align-items: stretch;
  }
  .about__media--photo {
    align-self: stretch;
    min-height: 0;
    margin-right: calc(-1 * (max(0px, (100vw - var(--container)) / 2) + var(--gutter)));
    /* Текст слева, кадр справа — срез идёт по левому (внутреннему) краю */
    clip-path: polygon(clamp(48px, 7vw, 104px) 0, 100% 0, 100% 100%, 0 100%);
  }
}

/* ------------------------------- Преимущества --------------------------- */
.adv {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.adv-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.adv-card__icon {
  width: 42px;
  height: 42px;
  color: var(--green);
}

.adv-card__icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.adv-card__title {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.35;
}

@media (hover: hover) {
  .adv-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
  }
}

/* ------------------------------- Доверие -------------------------------- */
.trust {
  position: relative;
  padding: 84px 0;
  background:
    radial-gradient(900px 420px at 12% 0%, rgba(41, 152, 118, 0.42), transparent 70%),
    linear-gradient(120deg, #0e1b17 0%, #14382e 55%, var(--green) 100%);
  color: #fff;
  overflow: hidden;
}

.trust__map {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
}

.trust__grid {
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}

.metric {
  padding: 10px 0;
  border-left: 2px solid rgba(255, 255, 255, 0.18);
  padding-left: 24px;
}

.metric__value {
  font-size: clamp(2.2rem, 1.4rem + 2.6vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, #ffffff, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(63, 195, 160, 0.25);
}

.metric__label {
  margin-top: 12px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.76);
}

/* ------------------------------- География ------------------------------ */
.geo {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 44px;
  align-items: start;
}

.geo__map {
  position: relative;
  border-radius: var(--radius-lg);
  background: radial-gradient(125% 125% at 8% 0%, #ffffff 0%, #f3f9f7 48%, #e4f1ed 100%);
  border: 1px solid var(--line);
  overflow: hidden;
  padding: 12px;
}

.geo-svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Страны */
.geo__land {
  fill: url(#geofill);
  stroke: rgba(31, 41, 51, 0.24);
  stroke-width: 1;
  stroke-linejoin: round;
  transition: fill 0.25s var(--ease), stroke 0.25s var(--ease);
}

.geo__land--main {
  fill: url(#geofillMain);
  stroke: rgba(41, 152, 118, 0.5);
  stroke-width: 1.4;
}

.geo__land.is-active {
  fill: url(#geofillActive);
  stroke: var(--green);
}

/* Маршруты */
.geo__routes {
  pointer-events: none;
}

.geo__route {
  fill: none;
  stroke: var(--green);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 8 10;
  opacity: 0.85;
  animation: geoflow 14s linear infinite;
}

.geo__route--ru {
  stroke: var(--green-dark);
}

@keyframes geoflow {
  to {
    stroke-dashoffset: -180;
  }
}

.geo-hub-glow {
  opacity: 0.55;
}

/* Узлы */
.geo-dot {
  fill: var(--green);
  stroke: #fff;
  stroke-width: 3;
  cursor: pointer;
  transition: r 0.25s var(--ease), fill 0.25s var(--ease);
}

.geo-dot__halo {
  fill: var(--accent);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.geo-item.is-active .geo-dot {
  fill: var(--green-dark);
}

.geo-item.is-active .geo-dot__halo {
  opacity: 0.35;
}

.geo-label {
  font-size: 13px;
  font-weight: 700;
  fill: var(--ink);
  opacity: 0.78;
  pointer-events: none;
}

.geo__list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  padding: 10px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.pill:hover,
.pill.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  transform: translateY(-2px);
}

.geo__tip {
  min-height: 92px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 14px;
}

.geo__tip-title {
  font-weight: 700;
  margin-bottom: 6px;
}

.geo__tip-text {
  font-size: 15px;
  color: var(--muted);
}

/* ------------------------------- Заявка --------------------------------- */
.request {
  position: relative;
  padding: 96px 0;
  background:
    radial-gradient(800px 400px at 88% 10%, rgba(41, 152, 118, 0.45), transparent 72%),
    linear-gradient(120deg, #0e1b17 0%, #14382e 60%, var(--green) 100%);
  color: #fff;
  overflow: hidden;
}

.request__map {
  position: absolute;
  inset: 0;
  opacity: 0.14;
  pointer-events: none;
}

.request__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
}

.request__title {
  font-size: clamp(1.65rem, 1.2rem + 1.7vw, 2.5rem);
  margin-bottom: 16px;
}

.request__lead {
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 28px;
}

.request__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.request__list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15.5px;
  color: rgba(255, 255, 255, 0.86);
}

.request__list svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  stroke: var(--accent);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-top: 2px;
}

.form-card {
  padding: 34px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}

.form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field--full {
  grid-column: 1 / -1;
}

.field__label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.field__req {
  color: var(--green);
}

.field__input {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  background: #fff;
  border: 1.5px solid rgba(31, 41, 51, 0.16);
  border-radius: 10px;
  font: inherit;
  font-size: 15.5px;
  color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field__input::placeholder {
  color: #9aa3a9;
}

.field__input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(41, 152, 118, 0.14);
}

.field__textarea {
  min-height: 120px;
  resize: vertical;
}

.field.has-error .field__input {
  border-color: #d9534f;
  box-shadow: 0 0 0 4px rgba(217, 83, 79, 0.12);
}

.field__error {
  font-size: 13px;
  font-weight: 600;
  color: #c9302c;
  min-height: 0;
}

.form__grid [data-consent-error] {
  grid-column: 1 / -1;
}

.checkbox.has-error {
  color: #c9302c;
}

.checkbox {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--muted);
  grid-column: 1 / -1;
}

.checkbox input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--green);
  flex-shrink: 0;
}

.checkbox button.linkish {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.form__actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.form__status {
  font-size: 14.5px;
  font-weight: 600;
}

.form__status.is-ok {
  color: var(--green-dark);
}

.form__status.is-err {
  color: #c9302c;
}

/* ------------------------------- Контакты ------------------------------- */
.contacts {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
  align-items: stretch;
}

.contacts__card {
  padding: 34px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.contacts__company {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 22px;
}

.contacts__row {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  font-size: 15.5px;
}

.contacts__row:first-of-type {
  border-top: 0;
}

.contacts__key {
  color: var(--muted);
  font-weight: 600;
}

.contacts__val a {
  font-weight: 600;
}

.contacts__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.contacts__map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  min-height: 420px;
  position: relative;
}

.contacts__map iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  display: block;
}

/* ------------------------------- Подвал --------------------------------- */
.footer {
  position: relative;
  padding: 64px 0 34px;
  background: var(--dark);
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green), var(--accent), transparent);
}

.footer__top {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 44px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line-dark);
}

.footer__logo {
  height: 38px;
  width: auto;
  margin-bottom: 18px;
}

.footer__about {
  max-width: 360px;
  line-height: 1.6;
}

.footer__title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 18px;
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.footer__list a {
  color: rgba(255, 255, 255, 0.72);
}

.footer__list a:hover {
  color: var(--accent);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  justify-content: space-between;
  padding-top: 26px;
  font-size: 14px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer__legal {
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.footer__links button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.footer__links button:hover,
.footer__links a:hover {
  color: var(--accent);
}

/* --------------------------- Плавающие элементы ------------------------- */
.float-btn {
  position: fixed;
  right: 22px;
  z-index: 90;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(14, 27, 23, 0.25);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.float-btn:hover {
  transform: translateY(-3px) scale(1.03);
}

.whatsapp-float {
  bottom: 22px;
  background: #25d366;
  color: #fff;
}

.whatsapp-float svg {
  width: 30px;
  height: 30px;
  fill: currentColor;
}

.to-top {
  bottom: 90px;
  background: #fff;
  color: var(--green-dark);
  border: 1px solid var(--line);
  opacity: 0;
  visibility: hidden;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.to-top svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------- Cookie-баннер ------------------------------ */
.cookie {
  position: fixed;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 95;
  max-width: 760px;
  margin: 0 auto;
  padding: 20px 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 14.5px;
  transform: translateY(140%);
  transition: transform 0.4s var(--ease);
}

.cookie.is-visible {
  transform: translateY(0);
}

.cookie__text {
  flex: 1 1 320px;
  color: var(--muted);
}

.cookie__text a,
.cookie__text button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.cookie__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ------------------------- Правовые страницы ---------------------------- */
.legal {
  position: relative;
  padding: calc(var(--header-h) + 56px) 0 96px;
}

.legal__inner {
  max-width: 820px;
}

.legal__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 26px;
  font-weight: 700;
  color: var(--green);
}

.legal h1 {
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem);
  margin-bottom: 10px;
}

.legal__updated {
  margin-bottom: 26px;
  font-size: 14px;
  color: var(--muted);
}

.legal h2 {
  font-size: 1.25rem;
  margin: 28px 0 10px;
}

.legal h3 {
  font-size: 1.05rem;
  margin: 22px 0 8px;
}

.legal p,
.legal li {
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.7;
}

.legal ul {
  list-style: disc;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
}

.legal__note {
  margin-top: 28px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--green-light);
  font-size: 13.5px;
  color: var(--muted);
}

/* --------------------------- Анимация появления ------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal--d1 {
  transition-delay: 0.08s;
}

.reveal--d2 {
  transition-delay: 0.16s;
}

.reveal--d3 {
  transition-delay: 0.24s;
}

.reveal--d4 {
  transition-delay: 0.32s;
}

/* --------------------------- Анимация карты ----------------------------- */
.train-light {
  fill: #ffffff;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.95));
}

.hero__map .route-pulse {
  animation: dash 12s linear infinite;
}

/* Мягкое мерцание точек: мелкий и крупный слои «дышат» в противофазе,
   поэтому по фону медленно проходит волна. Анимируем только opacity —
   это дёшево и не вызывает перерисовки геометрии. */
.map-grid {
  animation: dots-breathe 12s ease-in-out infinite;
}

.map-grid--big {
  animation-delay: -6s;
}

@keyframes dots-breathe {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

@keyframes dash {
  to {
    stroke-dashoffset: -400;
  }
}

@keyframes station-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.5);
  }
}

.station-halo {
  transform-box: fill-box;
  transform-origin: center;
  animation: station-pulse 5s ease-in-out infinite;
}

.station-halo:nth-of-type(2n) {
  animation-duration: 6.5s;
  animation-delay: -1.5s;
}

.station-halo:nth-of-type(3n) {
  animation-duration: 7.5s;
  animation-delay: -3s;
}

.route-train {
  offset-rotate: 0deg;
}

.route-train--a {
  animation: move-a 13s linear infinite;
}

.route-train--b {
  animation: move-b 9s linear infinite;
}

.route-train--c {
  animation: move-c 15s linear infinite;
}

@keyframes move-a {
  0% {
    offset-distance: 0%;
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  92% {
    opacity: 1;
  }
  100% {
    offset-distance: 100%;
    opacity: 0;
  }
}

/* --------------------------- 404 ---------------------------------------- */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  background: linear-gradient(125deg, #0e1b17 0%, #14382e 50%, var(--green) 100%);
  color: #fff;
}

.error-page__code {
  font-size: clamp(4rem, 3rem + 8vw, 8rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(120deg, #fff, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-page p {
  margin: 18px 0 30px;
  color: rgba(255, 255, 255, 0.82);
}

/* ------------------- Меню на широких экранах (ПК) ----------------------- */
@media (min-width: 1280px) {
  .header__inner {
    gap: 16px;
  }

  .nav {
    margin-left: auto;
    margin-right: 2px;
  }

  /* Навигация собрана в стеклянную «капсулу» */
  .nav__list {
    gap: 2px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--line-dark);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    backdrop-filter: blur(10px) saturate(150%);
    transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease),
      box-shadow 0.3s var(--ease);
  }

  .nav__link {
    padding: 9px 13px;
    border-radius: 999px;
    font-size: 14.5px;
    letter-spacing: 0;
    /* Пункты меню не переносятся: длинные названия (KK/RU) держатся одной строкой */
    white-space: nowrap;
  }

  /* На тёмном первом экране — мягкая подсветка пунктов */
  .nav__link:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .nav__link.is-active {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }

  /* После прокрутки капсула светлеет, активный пункт — фирменный зелёный */
  .header.is-scrolled .nav__list {
    background: var(--green-light);
    border-color: var(--line);
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .header.is-scrolled .nav__link:hover {
    color: var(--ink);
    background: rgba(14, 27, 23, 0.05);
  }

  .header.is-scrolled .nav__link.is-active {
    color: #fff;
    background: var(--green);
    box-shadow: 0 6px 16px rgba(41, 152, 118, 0.28);
  }
}

/* --------------------------- Адаптивность ------------------------------- */
@media (max-width: 1199px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .adv {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .trust__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px 28px;
  }
  .about,
  .geo,
  .contacts,
  .request__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about__media--photo {
    order: -1;
    min-height: 320px;
    margin-left: calc(-1 * var(--gutter));
    margin-right: calc(-1 * var(--gutter));
  }
  .request__inner {
    gap: 34px;
  }
  .contacts__map {
    min-height: 340px;
  }
  .contacts__map iframe {
    min-height: 340px;
  }
}

/* Горизонтальное меню требует ~1184 px (RU) / ~1247 px (KK),
   поэтому до 1279 px включительно используем бургер */
@media (max-width: 1279px) {
  :root {
    --header-h: 88px;
    --header-h-scrolled: 74px;
    --logo-h: 72px;
    --logo-h-scrolled: 58px;
  }
  .section,
  .request {
    --section-pad: 68px;
    padding: var(--section-pad) 0;
  }
  .nav {
    position: fixed;
    inset: 0;
    margin: 0;
    padding: calc(var(--header-h) + 24px) var(--gutter) 40px;
    background: linear-gradient(160deg, #0e1b17, #14382e);
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    overflow-y: auto;
    z-index: -1;
  }
  body.nav-open .nav {
    transform: translateX(0);
  }
  body.nav-open {
    overflow: hidden;
  }
  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .nav__link {
    padding: 16px 18px;
    font-size: 18px;
    color: #fff;
    border-radius: 12px;
  }
  .header.is-scrolled .nav__link {
    color: #fff;
  }
  .header.is-scrolled .nav__link:hover,
  .header.is-scrolled .nav__link.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
  }
  .header.is-scrolled .nav-toggle__line {
    background: var(--ink);
  }
  body.nav-open .header.is-scrolled .nav-toggle__line,
  body.nav-open .nav-toggle__line {
    background: #fff;
  }
  body.nav-open .header {
    background: transparent;
    box-shadow: none;
    /* backdrop-filter создаёт containing block и обрезает off-canvas меню */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  body.nav-open .header::before {
    opacity: 0;
  }
  body.nav-open .brand__logo--light {
    opacity: 1;
  }
  body.nav-open .brand__logo--dark {
    opacity: 0;
  }
  .nav-toggle {
    display: flex;
    margin-left: auto;
    order: 3;
  }
  .header__aside {
    margin-left: auto;
  }
  .header__aside .btn {
    display: none;
  }
  .nav {
    order: 4;
  }
  .page-inner .nav__link,
  .page-inner .header.is-scrolled .nav__link {
    color: #fff;
  }
  .page-inner .header.is-scrolled .nav__link:hover,
  .page-inner .header.is-scrolled .nav__link.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
  }
  /* Переключатель языка дублируется внутрь мобильного меню (ТЗ 3.2) */
  .nav__lang {
    display: inline-flex;
    gap: 2px;
    margin-top: 22px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 10px;
  }
  .nav__lang .lang__link {
    color: rgba(255, 255, 255, 0.8);
  }
  .nav__lang .lang__link:hover {
    color: #fff;
  }
  .nav__lang .lang__link[aria-current="page"] {
    background: #fff;
    color: var(--ink);
  }

  /* Области нажатия не менее 44×44 px (ТЗ 2.6) */
  .lang__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }
  .pill {
    min-height: 44px;
    padding: 12px 18px;
  }
  .footer__links a,
  .footer__links button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* На узких смартфонах три языковые ссылки не помещаются рядом с логотипом
   и бургером — переключатель остаётся внутри меню */
@media (max-width: 599px) {
  .header__aside .lang {
    display: none;
  }
}

@media (max-width: 767px) {
  body {
    font-size: 16px;
  }
  :root {
    --gutter: 18px;
  }
  .cards,
  .adv,
  .about__stats,
  .form__grid {
    grid-template-columns: 1fr;
  }
  .trust__grid {
    grid-template-columns: 1fr 1fr;
    gap: 26px 18px;
  }
  .metric {
    padding-left: 16px;
  }
  .form-card,
  .contacts__card {
    padding: 24px 20px;
  }
  /* Первый экран на телефонах: компактнее сверху, крупнее название и
     плотнее пилюли фактов — блок читается как цельный «плакат». */
  .hero {
    min-height: auto;
    height: auto;
    padding: calc(var(--header-h) + 30px) 0 52px;
  }
  .hero__brand {
    font-size: clamp(1.9rem, 1.15rem + 4.2vw, 2.4rem);
    letter-spacing: 0.12em;
    padding-bottom: 13px;
    margin-bottom: 15px;
  }
  .hero__title {
    margin-bottom: 16px;
  }
  .hero__claim {
    font-size: 1.175rem;
    line-height: 1.36;
    /* Ограничиваем меру строки, чтобы девиз не «растягивался» на всю ширину */
    max-width: 36ch;
  }
  .hero__lead {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 26px;
  }
  .hero__actions {
    gap: 12px;
    margin-bottom: 26px;
  }
  .hero__actions .btn {
    flex: 1 1 100%;
  }
  .hero__facts {
    gap: 8px;
    font-size: 13px;
  }
  .hero__fact {
    padding: 8px 15px 8px 12px;
  }
  .footer__top {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .cookie {
    left: 14px;
    right: 14px;
    bottom: 14px;
    padding: 18px;
  }
  .float-btn {
    right: 14px;
    width: 52px;
    height: 52px;
  }
  .whatsapp-float {
    bottom: 14px;
  }
  .to-top {
    bottom: 78px;
  }
  .contacts__row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Очень узкие экраны: уменьшаем логотип, чтобы шапка влезала в 320 px */
@media (max-width: 359px) {
  :root {
    --header-h: 76px;
    --header-h-scrolled: 66px;
    --logo-h: 60px;
    --logo-h-scrolled: 52px;
  }
}

/* Слабые устройства: отключаем декоративные анимации карты (ТЗ 2.7) */
.is-low-power .route-train,
.is-low-power .route-pulse,
.is-low-power .geo__route,
.is-low-power .station-halo,
.is-low-power .map-grid {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
