/* Шрифты лежат у нас, а не на Google Fonts: раньше каждая страница открывала
   два чужих соединения (fonts.googleapis.com и fonts.gstatic.com) и ждала их
   до первой отрисовки текста. Файлы переменные: один на семейство и набор
   символов покрывает все начертания, что раньше заказывались списком.
   unicode-range — браузер скачивает только те наборы, символы которых есть на
   странице; кириллица и латиница основных наборов заранее грузятся через
   <link rel="preload"> в <head> каждой страницы. */
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/public/fonts/inter-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/public/fonts/inter-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/public/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/public/fonts/inter-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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url(/public/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;
}
/* cyrillic */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url(/public/fonts/manrope-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url(/public/fonts/manrope-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url(/public/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 {
  --bg: #F0EDE7;
  --card: #FFFFFF;
  --text: #1C1C1C;
  --muted: #5F5F5F;
  --red: #B7192B;
  --dark: #202020;
  --line: #8a8783;
  --gold: #B89B5E;
  --orange: #E8791E;
  --font-heading: 'Manrope', 'Inter', Arial, sans-serif;
  --font-body: 'Inter', Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Масштаб публичной части. Все размеры в стилях заданы в rem, поэтому от
   корневого шрифта зависит весь сайт сразу. До 1440 px он стандартные 16 px —
   макет, под который сайт свёрстан. Шире он растёт вместе с экраном
   (100vw / 90 = 16 px ровно на 1440), и страница увеличивается целиком:
   на 1920 в 1,33 раза, на 2560 в 1,78. Раньше колонка оставалась 1440 px при
   любом мониторе: на 2560 она занимала половину экрана, а текст выглядел мелким.
   После 2560 рост идёт, только пока экран растёт и в высоту, как у обычного
   16:9: на 4K (3840×2160) сайт заполняет экран, а не стоит колонкой 2560
   посередине. Потолок — высота окна / 50,625 (1440×810 → 16 px). На
   сверхшироком 3440×1440 высота как у 2K, и масштаб остаётся 2560 / 90:
   иначе крупным становилось бы всё, включая сам текст.

   Только страницы с общей шапкой: админка тоже подключает main.css, но у неё
   свои стили в px, и масштабировалась бы только половина её интерфейса.

   Новые размеры пишутся в rem (px / 16), иначе они масштабироваться не будут;
   px остаются только у волосяных линий до 2 px и в условиях @media. */
html:has(#site-header) {
  font-size: clamp(16px, calc(100vw / 90), max(calc(2560px / 90), calc(100vh / 50.625)));
}

/* Подвал на коротких страницах стоит у нижнего края экрана, а не висит
   посередине с пустым фоном под ним: на высоких мониторах под ним оставалось
   до 800 px пустоты. sticky с top: 100vh опускает подвал к низу body, а на
   длинных страницах он и так ниже и не сдвигается. Сетку body при этом не
   трогаем: flex-раскладка схлопнула бы main с margin: auto по ширине. */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  min-height: 100dvh;
}

#site-footer {
  position: sticky;
  top: 100vh;
  top: 100dvh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

/* Фотографии не перетаскиваются на рабочий стол и не выделяются вместе с
   текстом. -webkit-touch-callout отдельно: на iOS долгое нажатие вызывает своё
   меню с пунктом «Сохранить в Фото», и user-select его не отменяет.
   Полной защиты это не даёт и дать не может — браузер скачал файл раньше, чем
   показал его, — но убирает бытовые способы унести снимок. */
img {
  max-width: 100%;
  /* Атрибуты width/height у <img> нужны, чтобы место под картинку было
     зарезервировано до загрузки, но height из атрибута — это пиксели, и
     они не растут вместе с сайтом на больших экранах: ширина карточки в rem
     увеличивалась, а высота фото оставалась 224 px, и портреты команды на
     2560 превращались в широкую полосу с отрезанными лицами. height: auto
     оставляет атрибутам только пропорцию. Где высота нужна, её задаёт CSS. */
  height: auto;
  display: block;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Собственный display в стилях (например у .carousel-nav) перебивает
   браузерное [hidden]{display:none}, и скрытие через свойство hidden молча
   не срабатывало. Атрибут hidden обязан скрывать всегда. */
[hidden] {
  display: none !important;
}

/* Иконки-маски используются и в общих блоках (модалка ТЗ, футер), поэтому
   базовый класс живёт здесь: раньше он дублировался в постраничных стилях, и
   на страницах без своей копии иконки просто не отрисовывались. */
.icon {
  display: inline-block;
  flex-shrink: 0;
  background-color: var(--red);
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

.site-container {
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 1.5625rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--red);
  color: #FFFFFF;
  border-radius: 0.3125rem;
  padding: 0.875rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.btn-primary:hover {
  opacity: 0.9;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 4.5rem;
  background: #F0EDE7;
  backdrop-filter: blur(0.375rem);
}

/* Ширина та же, что у .site-container: при 1600 px шапка была на 80 px шире
   контента с каждой стороны, и логотип с кнопкой не стояли над его краями. */
.site-header__inner {
  height: 100%;
  max-width: 90rem;
  margin: 0 auto;
  padding: 0 1.5625rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__logo {
  flex-shrink: 0;
}

.site-header__logo img {
  height: 3.75rem;
  width: auto;
  max-width: none;
  margin-right: 0.4375rem;
}

.site-header__nav {
  display: contents;
}

.site-header__nav a {
  font-size: 0.9375rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-header__nav a:hover {
  color: var(--red);
}

.site-header__actions {
  display: contents;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--red);
  color: var(--red);
  border-radius: 0.3125rem;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
}

.site-header__nav-item {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0;
}

.header-dropdown {
  position: absolute;
  top: calc(100% + 1rem);
  left: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 60;
}

.site-header__nav-item--has-dropdown:hover .header-dropdown,
.site-header__nav-item--has-dropdown:focus-within .header-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.header-dropdown__inner {
  display: grid;
  grid-template-columns: max-content 1fr 16.25rem;
  gap: 2.5rem;
  /* Блок привязан к левому краю пункта «О компании», а тот стоит на ~18 %
     ширины экрана. При 82vw на 1200–1240 px блок упирался в край экрана, а
     пока не загрузились веб-шрифты (пункт тогда правее на 6 px) — вылезал и
     давал прокрутку вбок. Третье значение оставляет справа поле не уже
     отступа контейнера. На 1440 и шире ширина прежняя. */
  width: min(65rem, 82vw, calc(81.5vw - 2.0625rem));
  background: #F7F4EE;
  border-radius: 1rem;
  box-shadow: 0 1.25rem 2.5rem rgba(28, 28, 28, 0.14);
  padding: 1.75rem;
}

.header-dropdown__menu {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.header-dropdown__menu-link {
  padding: 0.8125rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  font-size: 0.875rem;
  color: var(--text);
  white-space: nowrap;
}

.header-dropdown__menu-link:hover {
  border-color: var(--red);
  color: var(--red);
}

.header-dropdown__menu-link--active {
  color: var(--red);
  font-weight: 600;
}

.header-dropdown__preview {
  display: flex;
  flex-direction: column;
}

.header-dropdown__preview h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.header-dropdown__preview p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.header-dropdown__preview .btn-outline {
  margin-top: auto;
  align-self: flex-start;
}

.header-dropdown__stat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-dropdown__stat strong {
  display: block;
  font-size: 1rem;
}

.header-dropdown__stat span {
  font-size: 0.8125rem;
  color: var(--muted);
}

.header-dropdown__facts h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.header-dropdown__fact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}

.header-dropdown__fact:last-child {
  margin-bottom: 0;
}

.header-dropdown__fact strong {
  display: block;
  font-size: 1rem;
}

.header-dropdown__fact span {
  font-size: 0.8125rem;
  color: var(--muted);
}

.header-dropdown__icon-badge {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(184, 155, 94, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.header-dropdown__icon-badge img {
  width: 1.25rem;
  height: 1.25rem;
}

/* Панель «Поставляемое оборудование»: во всю ширину, от низа шапки до низа
   экрана (или до подвала, если он уже виден — высоту ставит header.js).
   Пункт без position, поэтому панель отсчитывается от самой шапки, а не от
   пункта, и встаёт от края до края. */
.site-header__nav-item--mega {
  position: static;
}

.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: var(--mega-menu-height, calc(100vh - 4.5rem));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  border-top: 1px solid rgba(138, 135, 131, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0s linear 0.18s;
  z-index: 55;
}

/* Открывается с задержкой: панель закрывает весь экран, и без неё она
   мелькала бы каждый раз, когда мышь просто пересекает пункт по пути к
   соседнему. */
.site-header__nav-item--mega:hover .mega-menu,
.site-header__nav-item--mega:focus-within .mega-menu {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.18s ease 0.1s, visibility 0s linear 0.1s;
}

/* Содержимое панели — каскад: категории, справа их позиции, ещё правее
   разновидности, справа от всех — снимок. При открытии содержимое слегка
   съезжает сверху и проявляется. */
.mega-menu__inner {
  max-width: 90rem;
  margin: 0 auto;
  padding-top: 2.5rem;
  padding-bottom: 3rem;
  padding-left: 1.5625rem;
  padding-right: 1.5625rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(16rem, 24vw, 26rem);
  gap: 3rem;
  align-items: start;
  opacity: 0;
  transform: translateY(-1rem);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.site-header__nav-item--mega:hover .mega-menu__inner,
.site-header__nav-item--mega:focus-within .mega-menu__inner {
  opacity: 1;
  transform: none;
  transition-delay: 0.1s;
}

/* Вложенные списки стоят внутри своих пунктов (порядок Tab), а на экран их
   выносит абсолютное позиционирование относительно колонок: 34 % на
   категории, по 33 % на позиции и разновидности. */
.mega-menu__columns {
  position: relative;
}

.mega-menu__list {
  list-style: none;
}

.mega-menu__list--l1 {
  width: 34%;
}

.mega-menu__list--l2 {
  position: absolute;
  top: 0;
  left: calc(34% + 2rem);
  width: calc(33% - 2rem);
}

.mega-menu__list--l3 {
  position: absolute;
  top: 0;
  left: calc(100% + 2rem);
  width: 100%;
}

/* Длинный список без третьего уровня (технологическое оборудование) занимает
   обе правые колонки, иначе он уходил бы далеко под край экрана. */
.mega-menu__list--wide {
  width: calc(66% - 2rem);
  column-count: 2;
  column-gap: 2rem;
}

.mega-menu__list--wide > .mega-menu__item {
  break-inside: avoid;
}

/* Скрытые колонки сразу перестают ловить мышь: пока старая колонка гаснет,
   наведение на неё вернуло бы старую категорию. */
.mega-menu__list--l2,
.mega-menu__list--l3 {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-0.75rem);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 0.3s;
}

.mega-menu__item.is-active > .mega-menu__list {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s;
}

.mega-menu__caption {
  padding-top: 1.5rem;
  padding-bottom: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}

.mega-menu__caption:first-child {
  padding-top: 0;
}

.site-header__nav .mega-menu__link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.4375rem;
  padding-bottom: 0.4375rem;
  font-size: 0.9375rem;
  line-height: 1.35;
  white-space: normal;
  color: var(--text);
  transition: color 0.3s ease;
}

.site-header__nav .mega-menu__list--l1 > .mega-menu__item > .mega-menu__link {
  font-family: var(--font-heading);
  font-weight: 600;
}

.site-header__nav .mega-menu__list--l3 .mega-menu__link {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Подчёркивание вырастает слева направо и тянется по всем строкам
   длинного названия. */
.mega-menu__text {
  background-image: linear-gradient(var(--red), var(--red));
  background-repeat: no-repeat;
  background-position: 100% 100%;
  background-size: 0 2px;
  transition: background-size 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.site-header__nav .mega-menu__link:hover,
.site-header__nav .mega-menu__item.is-active > .mega-menu__link {
  color: var(--red);
}

.mega-menu__link:hover .mega-menu__text,
.mega-menu__item.is-active > .mega-menu__link .mega-menu__text {
  background-position: 0 100%;
  background-size: 100% 2px;
}

/* Стрелка у пунктов, за которыми есть следующая колонка. */
.mega-menu__item--parent > .mega-menu__link::after {
  content: '→';
  flex-shrink: 0;
  opacity: 0;
  transform: translateX(-0.5rem);
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.mega-menu__item--parent.is-active > .mega-menu__link::after,
.mega-menu__item--parent > .mega-menu__link:hover::after {
  opacity: 1;
  transform: none;
}

.mega-menu__all {
  margin-top: 2rem;
}

.mega-menu__visual {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: center;
}

/* Все снимки 4:3 (960×720) и стоят в одной рамке во всю ширину колонки:
   при переходе между пунктами рамка не меняет размер. */
.mega-menu__image {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: 0 1.25rem 2.5rem rgba(28, 28, 28, 0.14);
}

@media (prefers-reduced-motion: reduce) {
  .mega-menu,
  .site-header__nav-item--mega:hover .mega-menu,
  .site-header__nav-item--mega:focus-within .mega-menu,
  .mega-menu__inner,
  .site-header__nav-item--mega:hover .mega-menu__inner,
  .site-header__nav-item--mega:focus-within .mega-menu__inner,
  .mega-menu__list--l2,
  .mega-menu__list--l3,
  .mega-menu__item.is-active > .mega-menu__list,
  .mega-menu__text,
  .mega-menu__item--parent > .mega-menu__link::after {
    transition: none;
  }
}

/* Кнопка меню для узких экранов. На десктопе её нет. */
.site-header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 0.3125rem;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0 0.625rem;
  margin-left: 0.75rem;
  background: none;
  border: 1px solid var(--line);
  border-radius: 0.3125rem;
  cursor: pointer;
  flex-shrink: 0;
}

.site-header__burger span {
  display: block;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header--menu-open .site-header__burger span:nth-child(1) {
  transform: translateY(0.4375rem) rotate(45deg);
}

.site-header--menu-open .site-header__burger span:nth-child(2) {
  opacity: 0;
}

.site-header--menu-open .site-header__burger span:nth-child(3) {
  transform: translateY(-0.4375rem) rotate(-45deg);
}

/* Ниже 1200 px семь пунктов меню в строку не помещаются (на 1024 шапка уже
   вылезала за край), поэтому они уходят в панель под кнопкой. Брейкпоинт с
   запасом: до 1200 зазоры между пунктами сжимались до пары пикселей. */
@media (max-width: 1199px) {
  .site-header__burger {
    display: flex;
  }

  .site-header__actions {
    display: flex;
    align-items: center;
    margin-left: auto;
  }

  .site-header__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    max-height: calc(100vh - 4.5rem);
    max-height: calc(100dvh - 4.5rem);
    overflow-y: auto;
    padding: 0.5rem 1.5625rem 1.5rem;
    background: #F0EDE7;
    border-top: 1px solid var(--line);
    box-shadow: 0 1.25rem 2.5rem rgba(28, 28, 28, 0.14);
  }

  .site-header--menu-open .site-header__nav {
    display: flex;
  }

  .site-header__nav > a,
  .site-header__nav-item > a {
    display: block;
    padding: 0.875rem 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(138, 135, 131, 0.35);
  }

  /* «О компании» в панели — заголовок с подпунктами под ним. Выпадающий
     блок с превью и фактами работает от наведения, которого на тач-экране
     нет, поэтому из него остаются только ссылки. */
  .site-header__nav-item {
    display: block;
    height: auto;
  }

  .header-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
  }

  .header-dropdown__inner {
    display: block;
    width: auto;
    padding: 0.25rem 0 0.5rem;
    background: none;
    border-radius: 0;
    box-shadow: none;
  }

  .header-dropdown__preview,
  .header-dropdown__facts,
  .header-dropdown__menu-link--active {
    display: none;
  }

  /* Полноэкранная панель работает от наведения; в панели под кнопкой
     остаётся ссылка на раздел. */
  .mega-menu {
    display: none;
  }

  .header-dropdown__menu {
    gap: 0;
  }

  .header-dropdown__menu-link {
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 0;
    font-size: 0.9375rem;
    color: var(--muted);
    white-space: normal;
  }
}

/* На телефоне лого и кнопка меньше: рядом с ними должна поместиться кнопка
   меню, а на 360 px полноразмерные не влезали. */
@media (max-width: 560px) {
  .site-header {
    height: 3.75rem;
  }

  .site-header__logo img {
    height: 2.75rem;
  }

  .site-header__actions .btn-primary {
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
  }

  .site-header__nav {
    max-height: calc(100dvh - 3.75rem);
  }
}

/* Общая база: сетка продуктов на главной и виджет «Помощник ННХ». */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 1.25rem;
}

/* Элементы карточки живут здесь, а не в постраничном style.css: иначе на
   странице без своей копии правил карточка отрисовывалась бы без иконки,
   заголовка и стрелки — как это уже случилось с классом .icon. */
.product-card__icon {
  width: 2.75rem;
  height: 2.75rem;
}

.product-card__title {
  display: block;
  min-height: 2.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.product-card__arrow {
  position: absolute;
  top: 0.875rem;
  right: 0.875rem;
  width: 1.25rem;
  height: 1.25rem;
}

.site-footer {
  border-top: 1px solid var(--line);
}

.site-footer__columns {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding-top: 3rem;
  padding-bottom: 2.5rem;
}

.site-footer__logo {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.site-footer__tagline {
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 20rem;
}

.site-footer__links {
  display: flex;
  flex-direction: column;
}

.site-footer__links-title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

.site-footer__links a {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.site-footer__links a:hover {
  color: var(--red);
}

.site-footer__contacts-bar {
  border-top: 1px solid var(--line);
}

.site-footer__contacts {
  display: flex;
  flex-wrap: wrap;
  /* Пять контактов всегда короче 1440px контейнера, а flex по умолчанию
     выравнивает по началу оси — строка прижималась к левому краю, и справа
     оставалась пустота. При переносе центрируется и вторая строка. */
  justify-content: center;
  gap: 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.site-footer__bottom {
  text-align: center;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--muted);
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: var(--text);
}

.footer-contact img {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

/* Адрес — ссылка на карточку компании в 2ГИС. Выглядит как прежний текст
   (цвет и отсутствие подчёркивания даёт общий сброс для a), а что он
   кликабелен, подсказывает подчёркивание при наведении и фокусе. */
.map-link:hover,
.map-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Виджет «Помощник ННХ» — общий для нескольких страниц, стили не дублируем. */
/* Сам виджет — только система координат для маскота: фон, рамку и внутренние
   отступы несёт вложенная карточка, потому что маскот обязан выходить за её
   верхний край. */
.product-card--assistant {
  grid-column: span 1;
  display: block;
  gap: 0;
  padding: 0;
  background: transparent;
  border: none;
}

/* Маскот выведен из потока и лежит поверх карточки: голова видна на фоне
   страницы, а грудь и планшет — уже на белом фоне карточки.
   pointer-events: none — иначе прозрачные поля картинки перехватывали бы клик
   по кнопке «Задать вопрос», которая лежит под ними. */
.assistant-widget__mascot {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 100%;
  height: auto;
  pointer-events: none;
}

/* margin-top оставляет голову над карточкой, padding-top опускает текст ниже
   маскота: вместе они и создают перекрытие с референса.
   Боковые margin делают карточку уже виджета, поэтому уши маскота выходят за её
   края, не вылезая при этом за грид-ячейку на соседнюю карточку. */
.assistant-widget__card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin: 5.25rem 0.5rem 0;
  padding: 9.125rem 1rem 1.125rem;
  background: var(--card);
  border-radius: 1rem;
}

.assistant-widget__title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--text);
}

.assistant-widget__text {
  font-size: 0.75rem;
  color: var(--text);
  line-height: 1.4;
}

/* stretch вместо flex-start: на референсе кнопка занимает всю ширину карточки. */
.assistant-widget__cta {
  align-self: stretch;
  justify-content: center;
  padding: 0.75rem 0.625rem;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.assistant-widget__cta img {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.assistant-widget__status {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.assistant-widget__status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #3CB371;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 28, 28, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-panel {
  position: relative;
  background: var(--card);
  border-radius: 1rem;
  padding: 2rem;
  max-width: 22.5rem;
  text-align: center;
}

.modal-panel__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: none;
  background: none;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}

.modal-panel h3 {
  margin-bottom: 0.75rem;
}

.modal-panel p {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.modal-overlay--blur {
  backdrop-filter: blur(0.25rem);
}

.modal-panel--form {
  width: 35rem;
  max-width: calc(100vw - 3rem);
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  text-align: left;
  padding: 2.25rem 2.5rem;
}

.send-tz__title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.send-tz__subtitle {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.send-tz-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.send-tz-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.send-tz-form__field {
  position: relative;
}

.send-tz-form__field input,
.send-tz-form__field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text);
  background: none;
}

.send-tz-form__field input:focus,
.send-tz-form__field textarea:focus {
  outline: none;
  border-color: var(--red);
}

.send-tz-form__field--textarea textarea {
  min-height: 7.5rem;
  resize: vertical;
}

.send-tz-form__counter {
  position: absolute;
  right: 0.75rem;
  bottom: 0.625rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.send-tz-form__upload {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px dashed var(--line);
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  cursor: pointer;
}

.send-tz-form__upload:hover {
  border-color: var(--red);
}

.send-tz-form__upload-icon {
  width: 1.375rem;
  height: 1.375rem;
  background-color: var(--red);
  flex-shrink: 0;
}

.send-tz-form__upload-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.send-tz-form__upload-text strong {
  font-size: 0.875rem;
}

.send-tz-form__upload-text span {
  font-size: 0.75rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.send-tz-form__files {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin: 0;
  padding: 0;
}

.send-tz-form__file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
}

.send-tz-form__file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.send-tz-form__file-size {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.send-tz-form__consent {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.25rem 0.375rem;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.4;
}

.send-tz-form__consent-label {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.625rem;
  cursor: pointer;
}

.send-tz-form__consent input {
  margin-top: 2px;
  accent-color: var(--red);
  flex-shrink: 0;
}

.send-tz-form__consent-accent {
  color: var(--red);
}

.send-tz-form__consent-accent:hover {
  text-decoration: underline;
}

.send-tz-form__status {
  font-size: 0.8125rem;
  color: var(--muted);
}

.send-tz-form__status--error {
  color: var(--red);
}

.send-tz-form__submit {
  justify-content: center;
  margin-top: 0.25rem;
}

.send-tz-form__submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.send-tz-success {
  text-align: center;
}

.send-tz-success .btn-primary {
  margin-top: 1.25rem;
  justify-content: center;
}

/* Заставку показываем один раз на устройство. Класс ставит site-loader.js,
   подключённый в <head>, то есть до первой отрисовки — поэтому на повторных
   заходах заставка не мелькает, а не «показывается и сразу прячется». */
.loader-skipped .site-loader {
  display: none;
}

.site-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: hidden;
}

.site-loader__plant {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  filter: grayscale(1);
  pointer-events: none;
}

.site-loader__plant svg {
  display: block;
  width: 100%;
  height: 100%;
}

.site-loader__content {
  position: relative;
  text-align: center;
}

.site-loader__icon {
  width: 11.875rem;
  margin: 0 auto 1.75rem;
}

.site-loader__name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 2.625rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 3rem;
}

.site-loader__bar {
  width: 32.5rem;
  height: 0.25rem;
  background: #A9A9A9;
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto 1.5rem;
}

.site-loader__bar-fill {
  display: block;
  height: 100%;
  background: var(--red);
  border-radius: 2px;
  animation: site-loader-bar 1.25s ease-in-out infinite;
}

@keyframes site-loader-bar {
  0% { width: 0; }
  65% { width: 72%; }
  100% { width: 100%; }
}

.site-loader__text {
  font-family: var(--font-body);
  font-size: 1.25rem;
  color: var(--text);
}

.site-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

/* --- Узкие экраны: подвал и форма «Отправить ТЗ» ---------------------------
   Три колонки подвала (2fr 1fr 1fr) на телефоне не помещались: колонка ссылок
   уезжала за край экрана на всех страницах сайта. */
@media (max-width: 860px) {
  .site-footer__columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1.5rem;
    padding-top: 2.5rem;
    padding-bottom: 2rem;
  }

  /* Название с подписью — на всю строку, ссылки двумя колонками под ним. */
  .site-footer__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  /* Пять контактов, отцентрованных переносом, на телефоне рассыпались
     лесенкой разной длины; столбиком по левому краю они читаются списком. */
  .site-footer__contacts {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.875rem;
  }

  .site-footer__bottom {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .modal-panel--form {
    max-width: calc(100vw - 1.5rem);
    max-height: calc(100dvh - 1.5rem);
    padding: 1.75rem 1.25rem 1.5rem;
  }

  /* Имя и телефон рядом на телефоне превращались в два узких поля. */
  .send-tz-form__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .send-tz__title {
    font-size: 1.25rem;
    padding-right: 1.5rem;
  }
}

/* ===== Движение по сайту =====
   Правила в конце файла: при той же специфичности они должны идти после
   базовых стилей кнопок и карточек. При «уменьшить движение» в системе всё
   это выключается (блок в самом конце). */

/* Блок ждёт, пока до него дойдёт прокрутка (js/common/motion.js). Только
   прозрачность: место и размеры настоящие, вёрстка не прыгает. */
.motion-pending {
  opacity: 0;
}

/* Первый экран: заголовок страницы и блок сразу под ним мягко поднимаются.
   При первом заходе сначала идёт заставка (1,2 с) — анимация ждёт её, иначе
   отыграла бы под ней. backwards, а не both: после окончания на элементах не
   остаётся transform, который перебил бы их собственный. */
@keyframes motion-rise {
  from {
    opacity: 0;
    transform: translateY(1.5rem);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

main h1,
main h1 + * {
  animation: motion-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
}

main h1 + * {
  animation-delay: 0.12s;
}

html:not(.loader-skipped) main h1 {
  animation-delay: 1.15s;
}

html:not(.loader-skipped) main h1 + * {
  animation-delay: 1.27s;
}

/* Пункты шапки: подчёркивание вырастает слева направо. Только на десктопе —
   в панели под кнопкой у пунктов свои разделители. Фон, а не border: высота
   ссылки не меняется, и шапка не сдвигается. */
@media (min-width: 1200px) {
  .site-header__nav > a,
  .site-header__nav-item > a {
    background-image: linear-gradient(var(--red), var(--red));
    background-repeat: no-repeat;
    background-position: 100% 100%;
    background-size: 0 2px;
    transition: color 0.2s ease, background-size 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .site-header__nav > a:hover,
  .site-header__nav-item > a:hover,
  .site-header__nav-item:hover > a,
  .site-header__nav-item:focus-within > a {
    color: var(--red);
    background-position: 0 100%;
    background-size: 100% 2px;
  }
}

/* Кнопки: красная приподнимается с мягкой тенью, контурная заливается. */
.btn-primary {
  transition: opacity 0.2s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary:hover {
  transform: translateY(-0.125rem);
  box-shadow: 0 0.5rem 1.25rem rgba(183, 25, 43, 0.28);
}

.btn-outline {
  transition: background-color 0.25s ease, color 0.25s ease;
}

.btn-outline:hover,
.site-header__nav .btn-outline:hover {
  background-color: var(--red);
  color: #FFFFFF;
}

/* Карточки без своего эффекта наведения приподнимаются. Только там, где есть
   мышь: на тач-экране «наведение» залипало бы после касания. */
@media (hover: hover) {
  .product-card:not(.product-card--industry),
  .value-card,
  .stat-card {
    transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s ease;
  }

  .product-card:not(.product-card--industry):hover,
  .value-card:hover,
  .stat-card:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 1rem 2rem rgba(28, 28, 28, 0.1);
  }
}

@media (prefers-reduced-motion: reduce) {
  main h1,
  main h1 + * {
    animation: none;
  }

  .site-header__nav > a,
  .site-header__nav-item > a,
  .btn-primary,
  .btn-outline,
  .product-card,
  .value-card,
  .stat-card {
    transition: none;
  }

  .btn-primary:hover,
  .product-card:not(.product-card--industry):hover,
  .value-card:hover,
  .stat-card:hover {
    transform: none;
  }
}
