@import url('fonts.css');

/* ==========================================================================
   ООО НПФ «СВАРКА-3» — основная таблица стилей
   Графит + сталь + цвет сварочной дуги
   ========================================================================== */

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

:root {
  /* Поверхности */
  --ink: #0e1115;
  --ink-2: #151a21;
  --ink-3: #1e252e;
  --steel-line: #2a323d;

  --paper: #ffffff;
  --paper-2: #f5f6f8;
  --paper-3: #eceef1;
  --line: #dfe3e8;

  /* Текст */
  --text: #12171d;
  --text-2: #58616d;
  --text-3: #838b96;
  --on-dark: #ffffff;
  --on-dark-2: #a8b1bd;
  --on-dark-3: #6f7987;

  /* Акцент — фирменный синий из логотипа */
  --arc: #14508f;
  --arc-hot: #1d68b8;
  --arc-deep: #0d3a68;
  --arc-tint: #eaf1fa;

  /* Служебные */
  --ok: #1a7f4b;
  --warn: #9a6700;

  /* Метрика */
  --container: 1280px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 4px;
  --radius-lg: 8px;

  /* Тени */
  --shadow-sm: 0 1px 2px rgba(14, 17, 21, 0.06), 0 2px 8px rgba(14, 17, 21, 0.04);
  --shadow-md: 0 4px 12px rgba(14, 17, 21, 0.08), 0 12px 32px rgba(14, 17, 21, 0.08);
  --shadow-lg: 0 12px 28px rgba(14, 17, 21, 0.12), 0 32px 64px rgba(14, 17, 21, 0.12);

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

/* --------------------------------------------------------------- 2. Сброс */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'tnum' 0;
  overflow-x: hidden;
}

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

/* Атрибут hidden обязан скрывать элемент. Правило [hidden]{display:none}
   лежит в собственной таблице стилей браузера, а любое авторское display
   его перебивает — приоритет авторских стилей выше. Именно на этом
   ломался фильтр каталога: скрипт ставил card.hidden = true, но
   .card{display:flex} выигрывал, и карточки оставались на экране.
   Фильтр выглядел нерабочим, хотя JS отрабатывал верно. */
[hidden] {
  display: none !important;
}

img {
  height: auto;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

h1,
h2,
h3,
h4 {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

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

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: 880px;
}

.section {
  padding-block: clamp(64px, 9vw, 120px);
}

.section--tight {
  padding-block: clamp(48px, 6vw, 80px);
}

.section--dark {
  background: var(--ink);
  color: var(--on-dark);
}

.section--dark p {
  color: var(--on-dark-2);
}

.section--muted {
  background: var(--paper-2);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--arc);
  color: #fff;
  padding: 12px 20px;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

/* --------------------------------------------------------- 4. Типографика */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--arc);
  margin-bottom: 18px;
}

.eyebrow::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--arc);
}

.section--dark .eyebrow {
  color: var(--arc-hot);
}

.section--dark .eyebrow::before {
  background: var(--arc-hot);
}

.h-display {
  font-size: clamp(38px, 6.2vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.h1 {
  font-size: clamp(32px, 4.6vw, 56px);
}

.h2 {
  font-size: clamp(27px, 3.4vw, 42px);
}

.h3 {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 700;
}

.h4 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lead {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  color: var(--text-2);
}

.section--dark .lead {
  color: var(--on-dark-2);
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(36px, 5vw, 60px);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--center .eyebrow {
  justify-content: center;
}

.section-head p {
  margin-top: 18px;
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

/* ---------------------------------------------------------------- 5. Кнопки */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.15s var(--ease);
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn svg {
  flex-shrink: 0;
}

.btn--primary {
  background: var(--arc);
  color: #fff;
}

.btn--primary:hover {
  background: var(--arc-hot);
}

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

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

.btn--outline {
  border-color: var(--line);
  color: var(--text);
  background: #fff;
}

.btn--outline:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.btn--dark {
  background: var(--ink);
  color: #fff;
}

.btn--dark:hover {
  background: var(--ink-3);
}

.btn--wide {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.header__bar {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 88px;
  transition: height 0.35s var(--ease);
}

.header.is-solid {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.header.is-solid .header__bar {
  height: 72px;
}

/* Тёмный вариант — над видео */
.header--over .logo__name,
.header--over .nav__link,
.header--over .header__phone {
  color: #fff;
}

.header--over .logo__tag {
  color: rgba(255, 255, 255, 0.6);
}

.header.is-solid .logo__name,
.header.is-solid .nav__link,
.header.is-solid .header__phone {
  color: var(--text);
}

.header.is-solid .logo__tag {
  color: var(--text-3);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Логотип чуть крупнее по просьбе заказчика от 03.09.2026: знак 38 -> 42,
   название 18 -> 20, подпись 10.5 -> 11. Пропорции сохранены, чтобы знак
   не выглядел мелким рядом с более длинным «НПФ СВАРКА-3». */
.logo__mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo__name {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.logo__tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav__link {
  position: relative;
  padding: 9px 13px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius);
  transition: color 0.2s var(--ease);
  white-space: nowrap;
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 2px;
  height: 2px;
  background: var(--arc);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  transform: scaleX(1);
}

.nav__link.is-active {
  font-weight: 600;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.header__phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.header__phone:hover {
  color: var(--arc);
}

.header__cta {
  padding: 11px 20px;
  font-size: 14px;
}

.burger {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  margin-right: -10px;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.is-open span:nth-child(2) {
  opacity: 0;
}

.burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Мобильное меню */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--ink);
  padding: 104px var(--gutter) 40px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
    visibility 0.3s;
}

.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.mobile-nav a {
  display: block;
  padding: 16px 0;
  font-family: 'Manrope', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid var(--steel-line);
}

.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: var(--arc-hot);
}

.mobile-nav__foot {
  margin-top: 32px;
  display: grid;
  gap: 14px;
}

.mobile-nav__foot a {
  border: none;
  padding: 0;
  font-size: 18px;
}

/* ----------------------------------------------------------- 7. Герой-видео */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  /* Кадр из заводского видео — подложка, пока видео не готово к показу */
  background: var(--ink) url('../img/factory/hero-frame-wide.jpg?v=20260910f') center / cover no-repeat;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Видео уже обрезано при кодировании до нужной полосы кадра */
  object-position: center;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}

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

/* Затемнение: снизу плотнее, чтобы текст читался */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
      180deg,
      rgba(14, 17, 21, 0.72) 0%,
      rgba(14, 17, 21, 0.28) 26%,
      rgba(14, 17, 21, 0.52) 62%,
      rgba(14, 17, 21, 0.92) 100%
    ),
    linear-gradient(90deg, rgba(14, 17, 21, 0.62) 0%, rgba(14, 17, 21, 0) 62%);
}

.hero__inner {
  width: 100%;
  padding-block: 150px 56px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  margin-bottom: 26px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.hero__badge b {
  font-weight: 700;
}

.pulse {
  /* Цвет задаётся одной переменной — её же берёт и расходящийся круг,
     поэтому для нового состояния достаточно поменять --pulse-rgb */
  --pulse-rgb: 255, 122, 42;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(var(--pulse-rgb));
  box-shadow: 0 0 0 0 rgba(var(--pulse-rgb), 0.7);
  animation: pulse 2.4s infinite;
  flex-shrink: 0;
  transition: background 0.4s var(--ease);
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 9px rgba(var(--pulse-rgb), 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(var(--pulse-rgb), 0);
  }
}

/* Состояния завода: время московское, считает assets/js/status.js */

.hero__badge.is-open .pulse {
  --pulse-rgb: 46, 204, 113;
}

.hero__badge.is-lunch .pulse {
  --pulse-rgb: 255, 138, 61;
}

.hero__badge.is-closed .pulse {
  --pulse-rgb: 235, 87, 87;
  /* закрыто — точка спокойная, без пульсации */
  animation: none;
  box-shadow: none;
}

.hero h1 {
  max-width: 16ch;
  margin-bottom: 24px;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35);
}

.hero h1 em {
  font-style: normal;
  color: var(--arc-hot);
}

.hero__sub {
  max-width: 52ch;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
  margin-bottom: 34px;
}

.hero__cta {
  margin-bottom: 56px;
}

/* Полоса фактов внизу героя */
.hero__facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* Разделители рисуем границами ячеек. Фон у полосы не заливаем:
     ячейки прозрачные, и заливка перекрыла бы весь блок, а её край
     упирался бы в текст. */
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.hero__fact {
  padding: 22px 26px;
}

/* Первая колонка выравнивается по заголовку — слева отступа нет */
.hero__fact:first-child {
  padding-left: 0;
}

.hero__fact + .hero__fact {
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.hero__fact dt {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 6px;
}

.hero__fact dd {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero__fact dd small {
  font-size: 0.55em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0;
}

.scroll-hint {
  position: absolute;
  right: var(--gutter);
  bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.scroll-hint i {
  display: block;
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent);
  animation: drop 2s var(--ease) infinite;
}

@keyframes drop {
  0%,
  100% {
    transform: scaleY(0.4);
    transform-origin: top;
  }
  50% {
    transform: scaleY(1);
    transform-origin: top;
  }
}

/* Компактный герой для внутренних страниц */
.page-hero {
  position: relative;
  background: var(--ink);
  color: #fff;
  padding-block: 152px clamp(48px, 6vw, 76px);
  overflow: hidden;
  isolation: isolate;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
      110% 130% at 82% 0%,
      rgba(244, 97, 11, 0.24) 0%,
      transparent 58%
    ),
    linear-gradient(180deg, #10151b 0%, #0e1115 100%);
}

.page-hero__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}

.page-hero h1 {
  max-width: 20ch;
}

.page-hero .lead {
  max-width: 62ch;
  margin-top: 20px;
  color: var(--on-dark-2);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--on-dark-3);
  margin-bottom: 22px;
}

.breadcrumbs a:hover {
  color: var(--arc-hot);
}

.breadcrumbs span[aria-current] {
  color: var(--on-dark-2);
}

.breadcrumbs i {
  font-style: normal;
  opacity: 0.5;
}

/* ------------------------------------------------------------ 8. Статистика */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.stat {
  background: var(--paper);
  padding: clamp(24px, 3vw, 38px);
}

.stat__value {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 10px;
}

.stat__value span {
  color: var(--arc);
}

.stat__label {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.45;
}

/* --------------------------------------------------------- 9. Карточки товара */

.grid {
  display: grid;
  gap: 24px;
}

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

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.25s var(--ease), box-shadow 0.3s var(--ease),
    transform 0.3s var(--ease);
}

.card:hover {
  border-color: var(--ink-3);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--paper-3);
  overflow: hidden;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.card:hover .card__media img {
  transform: scale(1.045);
}

.card__gost {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 3px;
  background: rgba(14, 17, 21, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px;
}

.card__title {
  font-family: 'Manrope', sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 14px;
}

.card__specs {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
  font-size: 13.5px;
}

.card__specs div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 7px;
  border-bottom: 1px dashed var(--line);
}

.card__specs dt {
  color: var(--text-3);
}

.card__specs dd {
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.card__price {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.card__price small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-3);
  margin-top: 2px;
}

.card__price--ask {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-2);
}

.card__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--arc);
}

.card__link svg {
  transition: transform 0.25s var(--ease);
}

.card:hover .card__link svg {
  transform: translateX(4px);
}

/* Растянутая ссылка на всю карточку */
.stretch::after {
  content: '';
  position: absolute;
  inset: 0;
}

.card {
  position: relative;
}

/* ------------------------------------------------------- 10. Преимущества */

.feature {
  padding: 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  height: 100%;
}

.section--dark .feature {
  background: var(--ink-2);
  border-color: var(--steel-line);
}

.feature__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  background: var(--arc-tint);
  color: var(--arc);
}

.section--dark .feature__icon {
  background: rgba(244, 97, 11, 0.14);
  color: var(--arc-hot);
}

.feature h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.feature p {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.6;
}

/* В карточке может быть несколько абзацев (about.html, «Отгрузка
   продукции»). Глобальный сброс ставит всем элементам margin:0,
   поэтому без этого правила абзацы слиплись бы в одну простыню. */
.feature p + p {
  margin-top: 10px;
}

.section--dark .feature p {
  color: var(--on-dark-2);
}

/* Нумерованные преимущества */
.numbered {
  display: grid;
  gap: 0;
  counter-reset: n;
}

.numbered__item {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 28px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  counter-increment: n;
}

.section--dark .numbered__item {
  border-color: var(--steel-line);
}

.numbered__item:last-child {
  border-bottom: 1px solid var(--line);
}

.section--dark .numbered__item:last-child {
  border-color: var(--steel-line);
}

.numbered__item::before {
  content: '0' counter(n);
  font-family: 'Manrope', sans-serif;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--line);
  line-height: 1;
}

.section--dark .numbered__item::before {
  color: var(--steel-line);
}

.numbered__item h3 {
  font-size: 20px;
  margin-bottom: 9px;
}

.numbered__item p {
  color: var(--text-2);
  max-width: 68ch;
}

/* ------------------------------------------- 11. Медиа-блок с видео/фото */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.split--wide-media {
  grid-template-columns: 1.15fr 1fr;
}

.media-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ink);
  aspect-ratio: 4 / 3;
}

.media-frame video,
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--tall {
  aspect-ratio: 3 / 4;
}

.media-frame__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 24px 20px;
  background: linear-gradient(180deg, transparent, rgba(14, 17, 21, 0.88));
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
}

/* --------------------------------------------------------- 12. Таблицы цен */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  -webkit-overflow-scrolling: touch;
}

table.price {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 620px;
}

table.price caption {
  text-align: left;
  padding: 20px 22px;
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
  border-bottom: 1px solid var(--line);
}

table.price th,
table.price td {
  padding: 13px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

table.price thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--paper-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-2);
  white-space: nowrap;
}

table.price tbody tr:hover {
  background: var(--arc-tint);
}

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

/* Смена размера ячейки отбивается жирной линией — так же, как в PDF-прайсе.
   Строки одного типоразмера читаются как единый блок. Класс вешает
   price-tables.js (функция breaker). При border-collapse эта граница
   схлопывается с тонкой нижней границей предыдущей строки, побеждает
   более широкая — то есть наша. */
table.price tbody tr.sz td {
  border-top: 2px solid var(--ink);
}

table.price td.n {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

table.price td.price-cell {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

table.price tr.group td {
  background: var(--ink);
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
}

.tag-ask {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 3px;
  background: var(--paper-3);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.price-note {
  display: flex;
  gap: 12px;
  padding: 18px 20px;
  margin-top: 18px;
  border-left: 3px solid var(--arc);
  background: var(--arc-tint);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 14px;
  color: var(--text-2);
}

.price-note strong {
  color: var(--text);
}

/* Фильтр таблиц */
.table-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
}

.chip {
  padding: 9px 17px;
  border: 1.5px solid var(--line);
  border-radius: 100px;
  background: var(--paper);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  transition: all 0.2s var(--ease);
}

.chip:hover {
  border-color: var(--ink);
  color: var(--text);
}

.chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 340px;
  margin-left: auto;
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 11px 14px 11px 42px;
  border: 1.5px solid var(--line);
  border-radius: 100px;
  background: var(--paper);
  font-size: 14px;
  transition: border-color 0.2s var(--ease);
}

.search-box input:focus {
  outline: none;
  border-color: var(--arc);
}

.no-results {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-2);
}

/* ------------------------------------------------------- 13. Калькулятор */

.calc {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow-md);
}

.calc__form {
  padding: clamp(24px, 3.4vw, 40px);
}

.calc__out {
  padding: clamp(24px, 3.4vw, 40px);
  background: var(--ink);
  color: #fff;
  display: flex;
  flex-direction: column;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 7px;
}

.field select,
.field input,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 15px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  appearance: none;
  -webkit-appearance: none;
}

.field select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2358616d' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 42px;
  cursor: pointer;
}

.field select:focus,
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--arc);
  box-shadow: 0 0 0 3px rgba(244, 97, 11, 0.14);
}

.field select:disabled {
  background-color: var(--paper-2);
  color: var(--text-3);
  cursor: not-allowed;
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.field--row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.calc__result {
  margin-top: auto;
}

.calc__lines {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--steel-line);
}

.calc__line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  font-size: 14.5px;
}

.calc__line dt {
  color: var(--on-dark-2);
}

.calc__line dd {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.calc__total dt {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-3);
  margin-bottom: 8px;
}

.calc__total dd {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--arc-hot);
}

.calc__hint {
  margin-top: 14px;
  font-size: 13px;
  color: var(--on-dark-3);
  line-height: 1.5;
}

.calc__empty {
  margin-top: auto;
  color: var(--on-dark-3);
  font-size: 15px;
}

/* ------------------------------------------------------------ 14. Формы */

.form-card {
  padding: clamp(26px, 3.4vw, 44px);
  background: var(--paper);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

.section--dark .form-card {
  background: var(--ink-2);
  border-color: var(--steel-line);
}

.section--dark .field label {
  color: var(--on-dark-2);
}

.section--dark .field input,
.section--dark .field select,
.section--dark .field textarea {
  background: var(--ink);
  border-color: var(--steel-line);
  color: #fff;
}

.section--dark .field input::placeholder,
.section--dark .field textarea::placeholder {
  color: var(--on-dark-3);
}

.form-msg {
  display: none;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 14.5px;
  margin-bottom: 18px;
}

.form-msg.is-shown {
  display: block;
}

.form-msg--ok {
  background: #e8f6ee;
  color: var(--ok);
  border: 1px solid #b9e2cb;
}

.form-msg--err {
  background: #fdeceb;
  color: #b3261e;
  border: 1px solid #f5c4c0;
}

.field-error {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  color: #b3261e;
}

.field input[aria-invalid='true'],
.field textarea[aria-invalid='true'] {
  border-color: #b3261e;
}

.consent {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 20px;
}

.section--dark .consent {
  color: var(--on-dark-2);
}

.consent input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--arc);
}

.consent a {
  color: var(--arc);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn[aria-busy='true'] {
  opacity: 0.65;
  pointer-events: none;
}

/* ------------------------------------------------------- 15. Спец-таблица */

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.spec-table th,
.spec-table td {
  padding: 14px 0;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.section--dark .spec-table th,
.section--dark .spec-table td {
  border-color: var(--steel-line);
}

.spec-table th {
  font-weight: 500;
  color: var(--text-2);
  width: 46%;
}

.section--dark .spec-table th {
  color: var(--on-dark-2);
}

.spec-table td {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------- 16. Текст статьи */

.prose {
  max-width: 72ch;
  font-size: 16.5px;
  line-height: 1.72;
  color: var(--text-2);
}

.prose > * + * {
  margin-top: 20px;
}

.prose h2 {
  font-size: clamp(23px, 2.6vw, 31px);
  color: var(--text);
  margin-top: 46px;
}

.prose h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-top: 34px;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose ul,
.prose ol {
  padding-left: 22px;
}

.prose li + li {
  margin-top: 9px;
}

.prose ul li::marker {
  color: var(--arc);
}

.prose a {
  color: var(--arc);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Предупреждение «БУДЬТЕ ВНИМАТЕЛЬНЫ» */
.alert {
  display: flex;
  gap: 18px;
  padding: 26px 28px;
  border-radius: var(--radius-lg);
  background: var(--arc-tint);
  border: 1px solid #f7d2b8;
  border-left: 4px solid var(--arc);
}

.section--dark .alert {
  background: rgba(244, 97, 11, 0.1);
  border-color: rgba(244, 97, 11, 0.32);
  border-left-color: var(--arc);
}

.alert__icon {
  flex-shrink: 0;
  color: var(--arc);
}

.alert h3 {
  font-size: 17px;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.section--dark .alert h3 {
  color: #fff;
}

.alert p {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.62;
}

.alert p + p {
  margin-top: 10px;
}

.section--dark .alert p {
  color: var(--on-dark-2);
}

/* ---------------------------------------------------- 17. Сертификаты */

.certs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.cert {
  display: block;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
  cursor: zoom-in;
}

.cert:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.cert img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
  border-radius: 2px;
  background: var(--paper-2);
}

.cert figcaption {
  padding-top: 14px;
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  color: var(--text-2);
}

/* Лайтбокс */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(14, 17, 21, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}

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

.lightbox img {
  max-width: min(96vw, 900px);
  max-height: 92vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox__close {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transition: background 0.2s var(--ease);
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.24);
}

/* --------------------------------------------------------- 18. Автопарк */

.fleet {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.truck {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  text-align: center;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.section--dark .truck {
  background: var(--ink-2);
  border-color: var(--steel-line);
}

.truck:hover {
  border-color: var(--arc);
  transform: translateY(-3px);
}

.truck__icon {
  color: var(--arc);
  margin: 0 auto 16px;
}

.truck__cap {
  font-family: 'Manrope', sans-serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}

.truck__name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}

.section--dark .truck__name {
  color: var(--on-dark-2);
}

/* -------------------------------------------------------- 19. Контакты */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.contact-block {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  height: 100%;
}

.contact-block h3 {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 18px;
}

.contact-block h3 svg {
  color: var(--arc);
}

.contact-block a,
.contact-block p {
  display: block;
  font-size: 16px;
  line-height: 1.55;
}

.contact-block a {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: color 0.2s var(--ease);
}

.contact-block a:hover {
  color: var(--arc);
}

.contact-block a + a,
.contact-block p + p,
.contact-block a + p,
.contact-block p + a {
  margin-top: 9px;
}

.contact-block small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-3);
  letter-spacing: 0;
  margin-top: 1px;
}

.map-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--paper-2);
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.req-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.req-table th,
.req-table td {
  padding: 13px 0;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.req-table th {
  font-weight: 500;
  color: var(--text-2);
  width: 34%;
  padding-right: 20px;
}

.req-table td {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------- 20. CTA */

.cta-band {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(36px, 5vw, 66px);
}

.cta-band::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(
    90% 140% at 88% 12%,
    rgba(244, 97, 11, 0.32) 0%,
    transparent 60%
  );
}

.cta-band h2 {
  max-width: 20ch;
  margin-bottom: 16px;
}

.cta-band p {
  max-width: 56ch;
  color: var(--on-dark-2);
  margin-bottom: 30px;
}

/* ---------------------------------------------------------- 21. Подвал */

.footer {
  background: var(--ink);
  color: var(--on-dark-2);
  padding-block: clamp(52px, 6vw, 80px) 32px;
  font-size: 14.5px;
}

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

.footer .logo__name {
  color: #fff;
}

.footer .logo__tag {
  color: var(--on-dark-3);
}

.footer__about {
  margin-top: 20px;
  max-width: 34ch;
  line-height: 1.65;
}

.footer h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-dark-3);
  margin-bottom: 18px;
}

.footer ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 11px;
}

.footer a:hover {
  color: var(--arc-hot);
}

.footer__phone {
  display: block;
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.footer__phone + .footer__phone {
  margin-top: 8px;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  padding-top: 28px;
  font-size: 13.5px;
  color: var(--on-dark-3);
}

.footer__bottom a:hover {
  color: var(--arc-hot);
}

.socials {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.socials a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--steel-line);
  border-radius: 50%;
  color: var(--on-dark-2);
  transition: all 0.2s var(--ease);
}

.socials a:hover {
  border-color: var(--arc);
  background: var(--arc);
  color: #fff;
}

/* -------------------------------------------------- 22. Появление при скролле */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

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

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

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

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

@media (max-width: 1080px) {
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .fleet {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

@media (max-width: 980px) {
  .nav,
  .header__cta {
    display: none;
  }

  .burger {
    display: flex;
  }

  .header__actions {
    margin-left: auto;
  }

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

  .split {
    grid-template-columns: 1fr;
  }

  .split--wide-media {
    grid-template-columns: 1fr;
  }

  .calc {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .certs {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 76px;
  }

  .header__bar,
  .header.is-solid .header__bar {
    height: 68px;
  }

  .header__phone span {
    display: none;
  }

  .hero {
    min-height: 92svh;
  }

  .hero__inner {
    padding-block: 120px 40px;
  }

  .hero h1 {
    max-width: 100%;
  }

  .hero__facts {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero__fact {
    padding: 16px 18px;
  }

  /* В две колонки: левая выравнивается по краю и не получает разделитель,
     а между рядами добавляется горизонтальная линия. */
  .hero__fact:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .hero__fact:nth-child(n + 3) {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
  }

  .scroll-hint {
    display: none;
  }

  .page-hero {
    padding-block: 116px 44px;
  }

  .grid--3,
  .grid--2,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .fleet {
    grid-template-columns: repeat(2, 1fr);
  }

  .certs {
    grid-template-columns: 1fr;
  }

  .numbered__item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .numbered__item::before {
    font-size: 28px;
  }

  .footer__top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .socials {
    margin-left: 0;
  }

  .field--row {
    grid-template-columns: 1fr;
  }

  .search-box {
    margin-left: 0;
    max-width: none;
  }

  .table-filters {
    gap: 8px;
  }

  .chip {
    padding: 8px 14px;
    font-size: 13px;
  }

  .alert {
    flex-direction: column;
    gap: 12px;
    padding: 22px;
  }
}

/* --------------------------------------------- 24. Печать и доступность */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero__video {
    display: none;
  }
}

@media print {
  .header,
  .mobile-nav,
  .scroll-hint,
  .to-top,
  .cookie-note,
  .footer,
  .cta-band,
  .hero__video {
    display: none !important;
  }

  body {
    color: #000;
  }

  .table-wrap {
    overflow: visible;
    border: none;
  }
}

/* ------------------------------------------------- 25. Цвет знака логотипа */

.logo__mark {
  color: var(--ink);
  transition: color 0.35s var(--ease);
}

.header--over .logo__mark {
  color: #fff;
}

.header.is-solid .logo__mark {
  color: var(--ink);
}

.footer .logo__mark,
.mobile-nav .logo__mark {
  color: #fff;
}

/* --------------------------------- 26. Мобильные: не грузим фоновое видео */

@media (max-width: 767px) {
  /* На мобильном интернете видео ни к чему — показываем кадр из него */
  .hero__video,
  .media-frame video {
    display: none;
  }

  /* На узком высоком экране лучше работает вертикальный кадр целиком */
  .hero__media {
    background-image: url('../img/factory/hero-frame.jpg?v=20260910f');
    background-position: center 30%;
  }
}

/* ---------------------------------------------- 27. Фотогалерея завода */

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.shot {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ink);
  border: 1px solid var(--line);
  cursor: zoom-in;
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease),
    border-color 0.3s var(--ease);
}

.section--dark .shot {
  border-color: var(--steel-line);
}

.shot:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--arc);
}

.shot img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.shot:hover img {
  transform: scale(1.04);
}

.shot figcaption {
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  background: var(--paper);
}

.section--dark .shot figcaption {
  background: var(--ink-2);
  color: var(--on-dark-2);
}

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

/* Кадры-фотографии в медиа-рамке открываются в лайтбоксе */
.media-frame[data-zoom] {
  cursor: zoom-in;
}

/* --------------------------------------------------- 9a. Последний ряд карточек

   Восемь карточек в три колонки оставляли последний ряд прижатым влево, и это
   читалось так, будто оттуда что-то удалили. Здесь не грид, а флекс — скрытые
   фильтром карточки в раскладке не участвуют, поэтому последний ряд встаёт по
   центру при любом наборе видимых карточек. На гриде это пришлось бы считать
   через nth-child, а он считает и скрытые. */

.grid--center-last {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.grid--center-last > * {
  flex: 0 1 calc((100% - 48px) / 3);
  min-width: 0;
}

@media (max-width: 980px) {
  .grid--center-last > * {
    flex-basis: calc((100% - 24px) / 2);
  }
}

@media (max-width: 720px) {
  .grid--center-last > * {
    flex-basis: 100%;
  }
}

/* ==========================================================================
   Уведомление о файлах cookie
   ==========================================================================

   Полоса внизу, а не модальное окно: сайт не ставит ни аналитических,
   ни рекламных cookie, поэтому перекрывать содержимое и требовать выбора
   не за что. Кнопка одна — «Хорошо». Ответ хранится в localStorage,
   повторно панель не показывается.

   Если когда-нибудь подключат Яндекс.Метрику или рекламные пиксели,
   текст перестанет быть правдой: тогда нужны две кнопки и запуск
   аналитики ТОЛЬКО после согласия. */

.cookie-note {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: clamp(14px, 3vw, 32px);
  padding: 16px var(--gutter);
  background: var(--paper);
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease);
}

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

.cookie-note__text {
  margin: 0;
  max-width: 76ch;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
}

.cookie-note__text a {
  color: var(--arc);
  text-underline-offset: 2px;
}

.cookie-note__text a:hover {
  color: var(--arc-hot);
}

.cookie-note .btn {
  flex: none;
}

@media (max-width: 560px) {
  .cookie-note {
    padding: 14px 20px;
  }

  .cookie-note .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-note {
    transition: none;
  }
}

/* ---------------------------------------------------- 26. Кнопка «наверх» */

/* Кнопка создаётся в main.js (раздел 9), в разметке её нет — так она
   появляется сразу на всех 16 страницах и не пропадает при пересборке
   генераторами.

   Переменную --cookie-h выставляет раздел 8 main.js: пока внизу висит
   панель cookie, кнопка поднимается ровно на её высоту, а когда панель
   уезжает — опускается обратно. Числом высоту задать нельзя, она
   зависит от переносов текста и ширины окна.

   z-index 90 выбран НЕ случайно: он ниже .mobile-nav (99), .header (100)
   и .lightbox (200), поэтому кнопка уходит под открытое мобильное меню
   и под лайтбокс сертификатов, а не висит поверх них. */

.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: calc(clamp(16px, 3vw, 28px) + var(--cookie-h, 0px));
  z-index: 90;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--arc);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity 0.25s var(--ease),
    transform 0.25s var(--ease),
    visibility 0.25s var(--ease),
    bottom 0.45s var(--ease),
    background-color 0.18s var(--ease),
    border-color 0.18s var(--ease),
    color 0.18s var(--ease);
}

/* Скрываем через visibility, а не display: display:none оборвал бы
   переход появления, но при этом скрытая кнопка не должна ловить Tab —
   visibility:hidden убирает её и из порядка обхода. */
.to-top.is-shown {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  background: var(--arc);
  border-color: var(--arc);
  color: #fff;
}

.to-top:active {
  background: var(--arc-deep);
  border-color: var(--arc-deep);
}

.to-top:focus-visible {
  outline: 2px solid var(--arc);
  outline-offset: 3px;
}

.to-top svg {
  display: block;
  width: 20px;
  height: 20px;
}

@media (max-width: 560px) {
  .to-top {
    width: 44px;
    height: 44px;
  }

  .to-top svg {
    width: 18px;
    height: 18px;
  }
}
