/* =========================================================================
   ТЕХСТРОЙ СПб — assets/css/style.css
   1. Переменные, сброс, типографика, контейнер, кнопки, формы
   2. Шапка, навигация, бургер, мобильное меню, футер
   3. Секции
   4. Медиазапросы, доступность, печать
   ========================================================================= */

/* -------------------------------------------------------------------------
   1.1 ПЕРЕМЕННЫЕ
   ------------------------------------------------------------------------- */

:root {
  /* Палитра — ахроматическая рама, один акцент */
  --ink: #252422;
  --paper: #F1F0EE;
  --surface: #FFFFFF;
  --hairline: #D6D5D2;
  --muted: #6B6A67;
  --ink-inv: #F1F0EE;
  --accent: #E8A317;
  /* Текстовый вариант акцента: жёлтый по бумажному фону даёт 1,9:1,
     этот тон — 5,2:1, поэтому цены набираются им, а не --accent. */
  --accent-ink: #8A5A00;

  --hairline-inv: rgba(241, 240, 238, .14);
  --muted-inv: rgba(241, 240, 238, .56);

  /* Гарнитуры */
  --font-display: 'Golos Text', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Сетка */
  --container: 1280px;
  --pad: 20px;
  --gutter: 24px;

  /* Вертикальный ритм */
  --section-gap: 56px;
  --block-gap: 32px;

  /* Прочее */
  --header-h: 72px;
  --topbar-h: 36px;
  /* Полная высота шапки: на мобильных служебная полоса скрыта */
  --header-total: 72px;
  --tr: .18s ease;
}

/* -------------------------------------------------------------------------
   1.2 СБРОС
   ------------------------------------------------------------------------- */

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

/* Ключевое правило: атрибут hidden всегда сильнее любого класса */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Лёгкий шум поверх бумаги — как на референсе */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

body > * { position: relative; z-index: 1; }

h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--tr);
}

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

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

table { border-collapse: collapse; width: 100%; }

::selection { background: var(--accent); color: var(--ink); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--ink);
  color: var(--ink-inv);
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.skip-link:focus { left: 0; }

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

/* -------------------------------------------------------------------------
   1.3 ТИПОГРАФИКА
   ------------------------------------------------------------------------- */

.h1, h1 {
  font-family: var(--font-display);
  font-weight: 800;
  /* Нижняя граница подобрана так, чтобы «СТРОИТЕЛЬНОЙ» — самое длинное слово
     заголовков — влезало в 360px без горизонтальной прокрутки. */
  font-size: clamp(34px, 7vw, 96px);
  line-height: .92;
  letter-spacing: -.02em;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: break-word;
}

.h2, h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 3.4vw, 48px);
  line-height: 1;
  letter-spacing: -.015em;
  text-transform: uppercase;
}

.h3, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: uppercase;
}

.h4 {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  text-transform: uppercase;
}

.lead {
  font-size: 18px;
  line-height: 1.5;
  font-weight: 400;
}

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.mono--12 { font-size: 12px; letter-spacing: .08em; }
.mono--13 { font-size: 13px; letter-spacing: .06em; }

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

.text a:not([class]) {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.text a:not([class]):hover { color: var(--accent); }

.text p + p { margin-top: 16px; }

.text-list {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}
.text-list li {
  position: relative;
  padding-left: 22px;
  font-size: 16px;
  line-height: 1.5;
}
.text-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .62em;
  width: 6px;
  height: 6px;
  background: var(--accent);
}

/* Гигантская нумерация — фирменный приём референса */
.bignum {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 4vw, 56px);
  line-height: .9;
  letter-spacing: -.02em;
}

/* -------------------------------------------------------------------------
   1.4 КОНТЕЙНЕР И СЕТКА
   ------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--pad) * 2);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section {
  padding-block: var(--section-gap);
}
.section--tight { padding-block: calc(var(--section-gap) * .6); }
.section--dark {
  background: var(--ink);
  color: var(--ink-inv);
}

.hairline {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 0;
}
.section--dark .hairline { border-top-color: var(--hairline-inv); }

/* Фирменный асимметричный сплит: текстовая рельса + сетка медиа */
.split {
  display: grid;
  gap: var(--block-gap);
}

.full-bleed {
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
}

/* -------------------------------------------------------------------------
   1.5 КНОПКИ
   ------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--tr), color var(--tr), border-color var(--tr);
}

.btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn--primary {
  background: var(--ink);
  color: var(--paper);
}
.btn--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}

/* На тёмном фоне цвета инвертируются */
.section--dark .btn,
.site-footer .btn,
.is-inverse .btn {
  border-color: var(--ink-inv);
  color: var(--ink-inv);
}
.section--dark .btn:hover,
.site-footer .btn:hover,
.is-inverse .btn:hover {
  background: var(--ink-inv);
  color: var(--ink);
}
.section--dark .btn--primary,
.site-footer .btn--primary,
.is-inverse .btn--primary {
  background: var(--ink-inv);
  color: var(--ink);
}
.section--dark .btn--primary:hover,
.site-footer .btn--primary:hover,
.is-inverse .btn--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}

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

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

/* Круглые стрелки каруселей */
.round-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  transition: background-color var(--tr), color var(--tr);
}
.round-btn:hover { background: var(--ink); color: var(--paper); }
.round-btn[disabled] { opacity: .3; cursor: default; }
.round-btn[disabled]:hover { background: transparent; color: var(--ink); }

.round-btn--light {
  /* Подложка обязательна: белая стрелка на светлом небе давала 2,45:1
     при норме 3:1 для элементов управления. */
  background: rgba(37, 36, 34, .55);
  border-color: rgba(255, 255, 255, .8);
  color: #fff;
}
.round-btn--light:hover { background: #fff; color: var(--ink); }

/* Круглая кнопка-медальон на первом экране */
.medallion {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .08em;
  text-align: center;
  transition: background-color var(--tr), color var(--tr);
}
.medallion:hover { background: var(--accent); }

/* Чипы */
.chip {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 18px;
  border: 1px solid var(--hairline);
  border-radius: 0;
  font-size: 13px;
  white-space: nowrap;
  transition: background-color var(--tr), color var(--tr), border-color var(--tr);
}
.chip:hover,
.chip.is-current {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* -------------------------------------------------------------------------
   1.6 ФОРМЫ
   ------------------------------------------------------------------------- */

.form {
  display: grid;
  gap: 22px;
}

.form__grid {
  display: grid;
  gap: 22px;
}

.field { display: grid; gap: 6px; }

.field__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}

.field__input,
.field__area {
  width: 100%;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  background: transparent;
  font-size: 16px;
  line-height: 1.4;
  transition: border-color var(--tr);
}

.field__area {
  min-height: 84px;
  resize: vertical;
}

.field__input:hover,
.field__area:hover { border-bottom-color: var(--muted); }

.field__input:focus,
.field__area:focus {
  outline: none;
  border-bottom-color: var(--accent);
  border-bottom-width: 2px;
  padding-bottom: 7px;
}

select.field__input {
  appearance: none;
  padding-right: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B6A67' stroke-width='1.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  cursor: pointer;
}

.field__input::placeholder { color: var(--muted); opacity: .7; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.check__input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  accent-color: var(--ink);
}

.check__text {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}
.check__text a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.check__text a:hover { color: var(--accent); }

.form__done {
  padding: 14px 0 0;
  border-top: 1px solid var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
}

/* Формы на тёмном фоне */
.section--dark .field__input,
.section--dark .field__area {
  border-bottom-color: var(--hairline-inv);
  color: var(--ink-inv);
}
.section--dark .field__label,
.section--dark .check__text { color: var(--muted-inv); }

/* =========================================================================
   2. ШАПКА, НАВИГАЦИЯ, БУРГЕР, МОБИЛЬНОЕ МЕНЮ, ФУТЕР
   ========================================================================= */

/* -------------------------------------------------------------------------
   2.1 SITE HEADER
   ------------------------------------------------------------------------- */

/* Ни один предок мега-меню не получает overflow, кроме visible */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  overflow: visible;
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
  transition: background-color var(--tr), border-color var(--tr), color var(--tr);
}

/* Ярус 1 — служебная полоса */
.topbar {
  display: none;
  background: var(--ink);
  color: var(--muted-inv);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--topbar-h);
}

.topbar__hours,
.topbar__link {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
  white-space: nowrap;
}

.topbar__nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.topbar__soc {
  display: inline-flex;
  color: var(--muted-inv);
}
.topbar__soc:hover { color: var(--accent); }

/* Ярус 2 — основная панель */
.mainbar__inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--header-h);
}

.logo {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: flex-start;
  gap: 2px;
  white-space: nowrap;
}

.logo__text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  line-height: 1;
  letter-spacing: -.01em;
  text-transform: uppercase;
}

.logo__mark {
  font-size: 9px;
  line-height: 1;
  margin-top: 1px;
}

/* -------------------------------------------------------------------------
   2.2 ГОРИЗОНТАЛЬНОЕ МЕНЮ И МЕГА-ПАНЕЛЬ
   ------------------------------------------------------------------------- */

.nav {
  display: none;
  flex: 1 1 auto;
  justify-content: center;
}

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

.nav__item { position: static; }

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
  padding: 6px 0;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .045em;
  white-space: nowrap;
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--tr);
}
.nav__link:hover::after,
.nav__link.is-current::after { transform: scaleX(1); }

.nav__chevron { transition: transform var(--tr); }
.nav__item--has-mega[data-open] .nav__chevron { transform: rotate(180deg); }

.mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--paper);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  box-shadow: none;
}

.mega__inner { padding-block: 32px 24px; }

.mega__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 var(--gutter);
}

.mega__col { display: grid; align-content: start; }

.mega__link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline);
}
.mega__col li:last-child .mega__link { border-bottom: 0; }

.mega__thumb {
  flex: 0 0 auto;
  width: 40px;
  height: 30px;
  object-fit: cover;
  background: var(--hairline);
  filter: grayscale(0);
}

.mega__name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}
.mega__link:hover .mega__name {
  color: var(--accent);
}

.mega__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
}

.mega__all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink);
}
.mega__all:hover { color: var(--accent); }

/* -------------------------------------------------------------------------
   2.3 ПРАВАЯ ЧАСТЬ ШАПКИ И БУРГЕР
   ------------------------------------------------------------------------- */

.mainbar__side {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.mainbar__phone {
  display: none;
  font-weight: 700;
  font-size: 16px;
  white-space: nowrap;
}
.mainbar__phone:hover { color: var(--accent); }

.mainbar__cta { display: none; }

.burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  color: inherit;
}

/* -------------------------------------------------------------------------
   2.4 ПОВЕДЕНИЕ НА HERO — прозрачная шапка поверх фото
   ------------------------------------------------------------------------- */

.has-hero .site-header {
  background: transparent;
  border-bottom-color: transparent;
  color: #fff;
}
.has-hero .site-header .topbar {
  background: transparent;
  color: rgba(255, 255, 255, .72);
}
.has-hero .site-header .btn--primary {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}
.has-hero .site-header .btn--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.has-hero.is-scrolled .site-header {
  background: var(--paper);
  border-bottom-color: var(--hairline);
  color: var(--ink);
}
.has-hero.is-scrolled .site-header .topbar {
  background: var(--ink);
  color: var(--muted-inv);
}
.has-hero.is-scrolled .site-header .btn--primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* Открытое мобильное меню всегда на бумаге */
.is-menu-open .site-header,
.has-hero.is-menu-open .site-header {
  background: var(--paper);
  color: var(--ink);
  border-bottom-color: var(--hairline);
}
.has-hero.is-menu-open .site-header .topbar { background: var(--ink); }
.is-menu-open { overflow: hidden; }

/* -------------------------------------------------------------------------
   2.5 МОБИЛЬНОЕ МЕНЮ
   ------------------------------------------------------------------------- */

.mobile-menu {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--header-h);
  bottom: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--paper);
  border-top: 1px solid var(--hairline);
}

.mobile-menu__scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px var(--pad) 24px;
}

.mobile-menu__item { border-bottom: 1px solid var(--hairline); }

.mobile-menu__link,
.mobile-menu__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 16px 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: left;
}

.mobile-menu__link.is-current { color: var(--accent); }

.mobile-menu__sub {
  display: grid;
  gap: 2px;
  padding: 0 0 16px 0;
}
.mobile-menu__sub a {
  display: block;
  padding: 9px 0 9px 16px;
  border-left: 1px solid var(--hairline);
  font-size: 15px;
  color: var(--muted);
}
.mobile-menu__sub a:hover { color: var(--ink); }

.mobile-menu__foot {
  flex: 0 0 auto;
  display: grid;
  gap: 10px;
  padding: 20px var(--pad) calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--hairline);
  background: var(--paper);
}

.mobile-menu__phone {
  font-weight: 700;
  font-size: 22px;
}

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

/* -------------------------------------------------------------------------
   2.6 ФУТЕР
   ------------------------------------------------------------------------- */

.site-footer {
  background: var(--ink);
  color: var(--ink-inv);
}

.footer-top { padding: 48px 0 40px; }

.footer-top__grid {
  display: grid;
  gap: 32px;
}

.footer-brand { display: grid; gap: 10px; align-content: start; }

.footer-brand__logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -.01em;
}

.footer-brand__tagline {
  color: var(--muted-inv);
  max-width: 260px;
  letter-spacing: .08em;
}

.footer-col { display: grid; gap: 10px; align-content: start; }
.footer-col--action { align-content: start; }
.footer-col--action .btn { width: 100%; max-width: 240px; }

.footer-address { font-size: 16px; line-height: 1.45; }
.footer-hours { color: var(--muted-inv); }

.footer-phone {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.1;
}
.footer-phone:hover { color: var(--accent); }

.footer-mail {
  font-size: 15px;
  color: var(--muted-inv);
}
.footer-mail:hover { color: var(--accent); }

.footer-soc {
  display: flex;
  gap: 14px;
  margin-top: 4px;
}
.footer-soc a { color: var(--muted-inv); }
.footer-soc a:hover { color: var(--accent); }

/* Ярус 2 */
.footer-nav {
  padding: 32px 0;
  border-top: 1px solid var(--hairline-inv);
}

.footer-nav__grid {
  display: grid;
  gap: 0;
}

.footer-nav__col { border-bottom: 1px solid var(--hairline-inv); }

.footer-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted-inv);
  text-align: left;
}

.footer-nav__head::after {
  content: '+';
  font-size: 16px;
  line-height: 1;
}
.footer-nav__head[aria-expanded="true"]::after { content: '−'; }

.footer-nav__list {
  display: grid;
  gap: 9px;
  padding-bottom: 18px;
}

.footer-nav__list a {
  font-size: 14px;
  color: var(--ink-inv);
}
.footer-nav__list a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Ярус 3 */
.footer-legal {
  padding: 20px 0;
  border-top: 1px solid var(--hairline-inv);
}

.footer-legal__inner {
  display: grid;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted-inv);
  text-align: center;
}
.footer-legal__inner a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================================================================
   3. СЕКЦИИ
   ========================================================================= */

/* -------------------------------------------------------------------------
   3.1 МЕТА-ПОЛОСА СЕКЦИИ И ХЛЕБНЫЕ КРОШКИ
   ------------------------------------------------------------------------- */

.meta-strip {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  margin-bottom: 28px;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .12em;
}

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

.meta-strip__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.section--dark .meta-strip { border-top-color: var(--hairline-inv); }
.section--dark .meta-strip__count { color: var(--muted-inv); }

.crumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}

.crumbs__item + .crumbs__item::before {
  content: '/';
  margin-right: 8px;
  color: var(--hairline);
}

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

.article-cover .crumbs__list { color: rgba(255, 255, 255, .7); }

/* -------------------------------------------------------------------------
   3.2 ШАПКА ВНУТРЕННЕЙ СТРАНИЦЫ
   ------------------------------------------------------------------------- */

.page-head {
  padding: 32px 0 28px;
  border-bottom: 1px solid var(--hairline);
}

.page-head__grid {
  display: grid;
  gap: 24px;
  margin-top: 20px;
}

.page-head__title { max-width: 14ch; }
.page-head__lead {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
  max-width: 46ch;
}

/* -------------------------------------------------------------------------
   3.3 HERO ГЛАВНОЙ
   ------------------------------------------------------------------------- */

.hero {
  position: relative;
  height: 68vh;
  min-height: 420px;
  margin-top: calc(-1 * var(--header-total));
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}

.hero__slide {
  position: absolute;
  inset: 0;
}

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

/* Скрим под прозрачной шапкой: белое меню и служебная полоса ложатся
   на светлое небо, и без него контраст не добирает до 4,5:1.
   Затемняет только полосу высотой шапки, остальное фото не трогает. */
.hero::before,
.article-cover::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  height: calc(var(--header-total) + 64px);
  background: linear-gradient(to bottom,
    rgba(37, 36, 34, .62) 0%,
    rgba(37, 36, 34, .52) 55%,
    rgba(37, 36, 34, 0) 100%);
  pointer-events: none;
}

.hero__slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(37, 36, 34, .48) 0%, rgba(37, 36, 34, .12) 38%, rgba(37, 36, 34, .55) 100%);
}

.hero__center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.hero__medallion-wrap {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.hero__medallion-note {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255, 255, 255, .82);
}

.hero__arrows {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--pad);
  pointer-events: none;
}
.hero__arrows .round-btn { pointer-events: auto; }

.hero__bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255, 255, 255, .88);
}

/* -------------------------------------------------------------------------
   3.4 БЛОК H1 НА ГЛАВНОЙ
   ------------------------------------------------------------------------- */

.intro {
  padding: 40px 0 var(--section-gap);
}

.intro__title { max-width: 16ch; }

.intro__bottom {
  display: grid;
  gap: 20px;
  margin-top: 36px;
}

.intro__links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.intro__links a { border-bottom: 1px solid var(--hairline); padding-bottom: 2px; }
.intro__links a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.intro__lead {
  font-size: 16px;
  line-height: 1.5;
  max-width: 46ch;
}

/* -------------------------------------------------------------------------
   3.5 КАРТОЧКИ ТЕХНИКИ
   ------------------------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px var(--gutter);
}

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

/* min-width:0 обязателен: у grid- и flex-элементов минимум по умолчанию равен
   min-content, поэтому длинное слово заголовка вместе с nowrap-ценой раздувало
   колонку и выносило карточку за край окна на 900px и 320px. */
.card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

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

.card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.card:hover .card__img { transform: scale(1.04); }

.card__body {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  min-width: 0;
}

.card__title {
  min-width: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
  overflow-wrap: break-word;
}
.card:hover .card__title {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.card__price {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent-ink);
  white-space: nowrap;
}

.card__text {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Группа карточек с подзаголовком-рядом */
.card-group + .card-group {
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--hairline);
}

.card-group__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.card-group__title {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.card-group__count {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--muted);
}

/* -------------------------------------------------------------------------
   3.6 ПЛИТКИ-ПРОМО
   ------------------------------------------------------------------------- */

.tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--hairline);
  border-block: 1px solid var(--hairline);
}

.tile {
  display: grid;
  align-content: space-between;
  gap: 24px;
  min-height: 210px;
  padding: 24px 0;
  background: var(--paper);
}

.tiles .tile { padding-inline: 0; }

.tile__num {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--muted);
}

.tile__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -.01em;
  max-width: 14ch;
}

.tile__text {
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 34ch;
}

.tile:hover .tile__title { color: var(--accent); }

/* -------------------------------------------------------------------------
   3.7 ПРЕИМУЩЕСТВА
   ------------------------------------------------------------------------- */

.advantages {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.advantage {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 20px 0;
  border-top: 1px solid var(--hairline);
}
.advantage:first-child { border-top: 0; }

.advantage__title {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.advantage__text {
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

/* -------------------------------------------------------------------------
   3.8 SEO-БЛОК
   ------------------------------------------------------------------------- */

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

.seo__title { max-width: 18ch; }

.seo__body p {
  font-size: 17px;
  line-height: 1.55;
}
.seo__body p + p { margin-top: 16px; }

/* -------------------------------------------------------------------------
   3.9 АККОРДЕОН FAQ
   ------------------------------------------------------------------------- */

.accordion { border-top: 1px solid var(--hairline); }

.accordion__item { border-bottom: 1px solid var(--hairline); }

.accordion__btn {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 18px 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: .01em;
  text-align: left;
}
.accordion__btn:hover { color: var(--accent); }

.accordion__sign {
  flex: 0 0 auto;
  margin-top: 1px;
  transition: transform var(--tr);
}
.accordion__btn[aria-expanded="true"] .accordion__sign { transform: rotate(45deg); }

.accordion__panel {
  padding: 0 0 20px;
  max-width: 68ch;
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
}

.section--dark .accordion,
.section--dark .accordion__item { border-color: var(--hairline-inv); }
.section--dark .accordion__panel { color: var(--muted-inv); }

/* -------------------------------------------------------------------------
   3.10 НОВОСТИ
   ------------------------------------------------------------------------- */

.strip-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 24px;
}

.strip-head__link {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
}
/* Короткая ссылка «Все новости →» не ломается, а длинная сноска-примечание
   переносится: на 375px строчка в nowrap уезжала за край окна. */
.strip-head__link:not(.muted) { white-space: nowrap; }
.strip-head__link:hover { color: var(--accent); }

.news-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 74%;
  gap: var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.news-strip > * { scroll-snap-align: start; }

.news-card { display: grid; gap: 10px; align-content: start; }

.news-card__media {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--hairline);
}
.news-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.news-card:hover .news-card__media img { transform: scale(1.04); }

.news-card__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}
.news-card:hover .news-card__title { text-decoration: underline; text-underline-offset: 4px; }

.news-card__date {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Плотная лента новостей */
.feed { border-top: 1px solid var(--hairline); }

.feed__row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
}

.feed__thumb {
  width: 120px;
  height: 90px;
  object-fit: cover;
  background: var(--hairline);
}

.feed__title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
}
.feed__row:hover .feed__title { color: var(--accent); }

.feed__meta {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.feed__lead {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
}

/* -------------------------------------------------------------------------
   3.11 КАРУСЕЛЬ ЧИПОВ
   ------------------------------------------------------------------------- */

/* Стрелки вынесены под ленту отдельной строкой: пока они стояли по бокам
   от .chips__track, прокрученные чипы геометрически ложились ровно на них. */
.chips {
  position: relative;
}

.chips__nav {
  display: none;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.chips__track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  cursor: grab;
  padding: 2px 0;
}
.chips__track::-webkit-scrollbar { display: none; }
.chips__track.is-dragging { cursor: grabbing; user-select: none; }


/* -------------------------------------------------------------------------
   3.12 РЕЛЬСА ВИДОВ ТЕХНИКИ
   ------------------------------------------------------------------------- */

.rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 6px;
}
.rail::-webkit-scrollbar { display: none; }

.rail__link {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.rail__link:hover { border-color: var(--ink); }
.rail__link.is-current {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

/* -------------------------------------------------------------------------
   3.13 ПОСАДОЧНАЯ ВИДА ТЕХНИКИ
   ------------------------------------------------------------------------- */

.eq-hero__grid {
  display: grid;
  gap: 28px;
}

.eq-hero__num {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--muted);
}
.eq-hero__num strong {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 6vw, 72px);
  line-height: .9;
  letter-spacing: -.02em;
  color: var(--ink);
}
.eq-hero__num span {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
}

.eq-hero__lead {
  margin-top: 18px;
  font-size: 17px;
  line-height: 1.5;
  max-width: 46ch;
}

.eq-hero__price {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.eq-hero__actions { margin-top: 22px; }

.eq-hero__media {
  aspect-ratio: 3 / 4;
  background: var(--hairline);
  overflow: hidden;
}
.eq-hero__media img { width: 100%; height: 100%; object-fit: cover; }

/* Список моделей */
.models { border-top: 1px solid var(--hairline); }

.model {
  display: grid;
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline);
}

.model__name {
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.2;
}

.model__specs {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

.model__price {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.model__action { margin-top: 14px; }

/* Таблицы */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  min-width: 640px;
  font-size: 15px;
}

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

.table thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom-color: var(--ink);
  white-space: nowrap;
}

.table td.num,
.table .table__val {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .02em;
  white-space: nowrap;
}

.table__price { color: var(--accent-ink); font-weight: 600; }

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

.table--specs { min-width: 480px; }
.table--specs th {
  width: 44%;
  font-weight: 600;
  font-size: 15px;
  font-family: var(--font-display);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  border-bottom-color: var(--hairline);
}

/* Нумерованные списки работ и условий */
.numlist {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--hairline);
}

.numlist__item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
}

.numlist__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--muted);
}

.numlist__title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.2;
}

.numlist__text {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

.section--dark .numlist,
.section--dark .numlist__item { border-color: var(--hairline-inv); }
.section--dark .numlist__text { color: var(--muted-inv); }

/* -------------------------------------------------------------------------
   3.14 АКЦИЯ
   ------------------------------------------------------------------------- */

.promo-hero {
  position: relative;
  min-height: 380px;
  display: grid;
  align-items: end;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}

.promo-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(37, 36, 34, .45);
}

.promo-hero__inner {
  position: relative;
  z-index: 2;
  padding-block: 48px;
}

/* Крошки внутри тёмного героя акции — по образцу .article-cover */
.promo-hero .crumbs__list { color: rgba(255, 255, 255, .7); }
.promo-hero .crumbs__item + .crumbs__item::before { color: rgba(255, 255, 255, .4); }
.promo-hero .crumbs__link:hover { color: #fff; }

.promo-hero__cond {
  margin-top: 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 2.4vw, 26px);
  line-height: 1.15;
  max-width: 22ch;
}

.promo-hero__term {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .8);
}

.promo-hero__actions { margin-top: 24px; }

.note {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  max-width: 70ch;
}

/* -------------------------------------------------------------------------
   3.15 КОНТАКТЫ
   ------------------------------------------------------------------------- */

.contacts-cols {
  display: grid;
  gap: 0;
}

.contacts-col {
  padding: 22px 0;
  border-top: 1px solid var(--hairline);
}
.contacts-col:first-child { border-top: 0; padding-top: 0; }

.contacts-col__rows { display: grid; gap: 12px; }

.contacts-col__phone {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.1;
}
.contacts-col__phone:hover { color: var(--accent); }

.contacts-col__mail { font-size: 15px; }
.contacts-col__mail:hover { color: var(--accent); }

.contacts-col__text { font-size: 15px; color: var(--muted); line-height: 1.45; }

.person { display: grid; gap: 4px; }
.person__name { font-size: 16px; font-weight: 700; }
.person__role {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.person__link { font-size: 15px; }
.person__link:hover { color: var(--accent); }
.person__wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: 2px;
}
.person__wa:hover { color: var(--accent); }

.map-wrap {
  aspect-ratio: 4 / 3;
  background: var(--hairline);
}
.map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.map-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.map-foot a { color: var(--ink); border-bottom: 1px solid var(--hairline); }
.map-foot a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* -------------------------------------------------------------------------
   3.16 ФОРМА ЗАЯВКИ И КОНТАКТНАЯ ПОЛОСА
   ------------------------------------------------------------------------- */

.callback__grid {
  display: grid;
  gap: 28px;
}

.callback__title { max-width: 16ch; }
.callback__note {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 40ch;
}

.contact-band__grid {
  display: grid;
  gap: 28px;
}

.contact-band__title { max-width: 14ch; }

.contact-band__rows { display: grid; gap: 12px; align-content: start; }

.contact-band__phone {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 28px);
  line-height: 1.05;
}
.contact-band__phone:hover { color: var(--accent); }

.contact-band__mail { font-size: 16px; color: var(--muted-inv); }
.contact-band__mail:hover { color: var(--accent); }

.contact-band__soc { display: flex; gap: 14px; }
.contact-band__soc a { color: var(--muted-inv); }
.contact-band__soc a:hover { color: var(--accent); }

.contact-band__action { margin-top: 6px; }

/* -------------------------------------------------------------------------
   3.17 СТАТЬЯ
   ------------------------------------------------------------------------- */

.article-cover {
  position: relative;
  min-height: 52vh;
  display: grid;
  align-items: end;
  background: var(--ink);
  color: #fff;
  margin-top: calc(-1 * var(--header-total));
  overflow: hidden;
}

.article-cover__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(37,36,34,.5) 0%, rgba(37,36,34,.2) 45%, rgba(37,36,34,.75) 100%);
}

.article-cover__inner {
  position: relative;
  z-index: 2;
  /* padding-block, а не шорткат: горизонтальные отступы приходят от .container */
  padding-block: calc(var(--header-total) + 32px) 36px;
  display: grid;
  gap: 16px;
}

.article-meta {
  padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.article-body {
  max-width: 720px;
  padding-block: 36px;
  font-size: 18px;
  line-height: 1.6;
}
.article-body > * + * { margin-top: 20px; }
.article-body h2 {
  margin-top: 40px;
  font-size: clamp(22px, 2.6vw, 30px);
}
.article-body h3 { margin-top: 32px; font-size: 18px; }
.article-body ul { display: grid; gap: 8px; }
.article-body ul li {
  position: relative;
  padding-left: 22px;
}
.article-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .62em;
  width: 6px;
  height: 6px;
  background: var(--accent);
}

.article-body blockquote {
  padding-left: 22px;
  border-left: 2px solid var(--accent);
  font-size: 20px;
  line-height: 1.4;
  font-weight: 600;
}

.article-figure { margin-top: 28px; }
.article-figure img { width: 100%; }
.article-figure figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.prevnext {
  display: grid;
  gap: 0;
  border-block: 1px solid var(--hairline);
}

.prevnext__item {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
}
.prevnext__item + .prevnext__item { border-top: 1px solid var(--hairline); }

.prevnext__thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  background: var(--hairline);
}

.prevnext__dir {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.prevnext__title {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}
.prevnext__item:hover .prevnext__title { color: var(--accent); }

/* -------------------------------------------------------------------------
   3.18 ПАГИНАЦИЯ, 404, КАРТА САЙТА
   ------------------------------------------------------------------------- */

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 8px;
}

.pagination__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .04em;
}
.pagination__num:hover { border-color: var(--ink); }
.pagination__num.is-current {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.pagination__spacer { flex: 1 1 auto; }

.notfound {
  padding-block: 48px 64px;
  text-align: left;
}

.notfound__code {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(96px, 26vw, 320px);
  line-height: .82;
  letter-spacing: -.04em;
}

.notfound__text {
  margin-top: 12px;
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 700;
  text-transform: uppercase;
}

.notfound__actions { margin-top: 28px; }

.sitemap {
  display: grid;
  gap: 32px;
}

.sitemap__col { display: grid; gap: 10px; align-content: start; }
.sitemap__list { display: grid; gap: 8px; }
.sitemap__list a { font-size: 15px; }
.sitemap__list a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* -------------------------------------------------------------------------
   3.19 МОДАЛКА
   ------------------------------------------------------------------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(37, 36, 34, .6);
}

.modal__box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 28px var(--pad) calc(28px + env(safe-area-inset-bottom));
  background: var(--paper);
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}
.modal__close:hover { color: var(--accent); }

.modal__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -.01em;
}

.modal__lead {
  margin: 12px 0 24px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

/* =========================================================================
   4. МЕДИАЗАПРОСЫ, ДОСТУПНОСТЬ, ПЕЧАТЬ
   ========================================================================= */

/* -------------------------------------------------------------------------
   4.1 ≥600px
   ------------------------------------------------------------------------- */

@media (min-width: 600px) {
  :root {
    --section-gap: 72px;
  }

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

  /* Лента видов переносится, а не уезжает за край контейнера со скрытым
     скроллбаром: 15 чипов ложатся в несколько строк. Свайп-лента остаётся
     только на телефонах, где горизонтальная прокрутка ожидаема. */
  .rail {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile { padding: 28px 24px; }

  .advantages { grid-template-columns: repeat(2, 1fr); gap: 0 var(--gutter); }
  .advantage { border-top: 1px solid var(--hairline); }
  .advantage:first-child { border-top: 1px solid var(--hairline); }

  .news-strip {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, 1fr);
    overflow: visible;
  }

  .feed__row { grid-template-columns: 120px 1fr; gap: 24px; }

  .model {
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: start;
  }
  .model__action { margin-top: 0; align-self: center; }

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

  .contacts-cols { grid-template-columns: repeat(2, 1fr); gap: 0 var(--gutter); }
  .contacts-col { border-top: 1px solid var(--hairline); }
  .contacts-col:first-child { padding-top: 22px; }

  .prevnext { grid-template-columns: repeat(2, 1fr); gap: var(--gutter); }
  .prevnext__item + .prevnext__item {
    border-top: 0;
    border-left: 1px solid var(--hairline);
    padding-left: var(--gutter);
  }

  .footer-legal__inner {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    text-align: left;
  }
  .footer-legal__inner > :last-child { text-align: right; }

  .modal { align-items: center; }
  .modal__box { padding: 36px 32px; }

  .map-wrap { aspect-ratio: 16 / 9; }
}

/* -------------------------------------------------------------------------
   4.2 ≥900px — десктопная навигация
   ------------------------------------------------------------------------- */

@media (min-width: 900px) {
  :root {
    --pad: 40px;
    --section-gap: 104px;
    --block-gap: 40px;
    --header-total: 108px; /* служебная полоса 36px + основная панель 72px */
  }

  .topbar { display: block; }

  html { scroll-padding-top: 140px; }

  /* Асимметричный сплит: 4 колонки текста + линейка + 8 колонок медиа */
  .split {
    grid-template-columns: 4fr 8fr;
    gap: 0 var(--gutter);
  }
  .split > :last-child {
    padding-left: var(--gutter);
    border-left: 1px solid var(--hairline);
  }
  .section--dark .split > :last-child { border-left-color: var(--hairline-inv); }

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

  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile { min-height: 260px; padding: 32px 28px; }

  .advantages {
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    border-top: 1px solid var(--hairline);
  }
  .advantage {
    padding: 24px var(--gutter) 8px 0;
    border-top: 0;
  }
  .advantage:first-child { border-top: 0; }
  .advantage + .advantage {
    padding-left: var(--gutter);
    border-left: 1px solid var(--hairline);
  }

  .seo__grid {
    grid-template-columns: 4fr 7fr;
    gap: 0 var(--gutter);
  }
  .seo__body {
    padding-left: var(--gutter);
    border-left: 1px solid var(--hairline);
  }

  .page-head { padding: 40px 0 32px; }
  .page-head__grid {
    grid-template-columns: 8fr 4fr;
    align-items: end;
    gap: var(--gutter);
  }

  .intro { padding: 64px 0 var(--section-gap); }
  .intro__bottom {
    grid-template-columns: 5fr 7fr;
    align-items: end;
    gap: var(--gutter);
  }
  .intro__lead { justify-self: end; }

  .hero { height: 78vh; }
  .hero__arrows { padding-inline: 40px; }

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

  .feed__row { grid-template-columns: 120px 1fr 220px; align-items: center; }
  .feed__lead { margin-top: 0; }

  .eq-hero__grid {
    grid-template-columns: 5fr 7fr;
    gap: 0 var(--gutter);
    align-items: start;
  }
  .eq-hero__media {
    margin-left: var(--gutter);
    border-left: 1px solid var(--hairline);
  }

  .eq-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 0 var(--gutter);
    align-items: start;
  }
  .eq-layout__rail {
    position: sticky;
    top: 128px;
    display: grid;
    gap: 2px;
    overflow: visible;
  }
  .eq-layout__rail .rail {
    display: grid;
    gap: 2px;
    overflow: visible;
  }
  .eq-layout__rail .rail__link { border: 0; border-bottom: 1px solid var(--hairline); height: auto; padding: 9px 10px; }
  .eq-layout__body {
    padding-left: var(--gutter);
    border-left: 1px solid var(--hairline);
    min-width: 0;
  }

  .cols-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 var(--gutter);
  }
  .cols-2 > :last-child {
    padding-left: var(--gutter);
    border-left: 1px solid var(--hairline);
  }

  .callback__grid {
    grid-template-columns: 4fr 8fr;
    gap: 0 var(--gutter);
  }
  .callback__form {
    padding-left: var(--gutter);
    border-left: 1px solid var(--hairline);
  }
  .form__grid { grid-template-columns: repeat(2, 1fr); }
  .form__grid > .field--wide { grid-column: 1 / -1; }

  .contact-band__grid {
    grid-template-columns: 5fr 7fr;
    gap: 0 var(--gutter);
    align-items: start;
  }
  .contact-band__side {
    padding-left: var(--gutter);
    border-left: 1px solid var(--hairline-inv);
  }

  .contacts-cols {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--hairline);
  }
  .contacts-col {
    padding: 24px var(--gutter) 24px 0;
    border-top: 0;
  }
  .contacts-col:first-child { padding-top: 24px; }
  .contacts-col + .contacts-col {
    padding-left: var(--gutter);
    border-left: 1px solid var(--hairline);
  }

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

  .article-cover { min-height: 60vh; }
  .article-body { padding-block: 56px; }

  .chips__nav { display: flex; }

  .promo-hero { min-height: 460px; }
  .promo-hero__inner { padding-block: 72px; }

  /* Футер — колонки вместо аккордеона */
  .footer-top { padding: 64px 0 48px; }
  .footer-top__grid {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: var(--gutter);
  }
  .footer-nav { padding: 48px 0; }
  .footer-nav__grid { grid-template-columns: repeat(4, 1fr); gap: var(--gutter); }
  .footer-nav__col { border-bottom: 0; }
  .footer-nav__head { padding: 0 0 16px; cursor: default; pointer-events: none; }
  .footer-nav__head::after { content: none; }
  .footer-nav__list { display: grid !important; padding-bottom: 0; }
  .footer-legal { padding: 24px 0; }
}

/* -------------------------------------------------------------------------
   4.3 ≥1200px — горизонтальное меню появляется только тогда, когда семь его
   пунктов физически помещаются между логотипом и правой частью шапки.
   До этой ширины работает бургер: раньше меню включалось с 900px и уезжало
   за край окна, давая горизонтальную прокрутку на 1024/1280/1440.
   ------------------------------------------------------------------------- */

@media (min-width: 1200px) {
  :root {
    --pad: 48px;
    --section-gap: 128px;
  }

  .nav { display: flex; }
  .mainbar__cta { display: inline-flex; }
  .burger { display: none; }
  .mobile-menu { display: none !important; }

  .nav__list { gap: 20px; }
  .hero__arrows { padding-inline: 48px; }
  .cards--4 { grid-template-columns: repeat(4, 1fr); }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .eq-layout { grid-template-columns: 240px 1fr; }
}

@media (min-width: 1400px) {
  :root { --pad: 80px; }

  .nav__list { gap: 22px; }
  .hero__arrows { padding-inline: 80px; }
}

/* Очень широкие экраны: контейнер не расползается, в шапке появляется телефон */
@media (min-width: 1600px) {
  .container { max-width: calc(var(--container) + 160px); }
  .mainbar__phone { display: inline-block; }
}

/* -------------------------------------------------------------------------
   4.4 УЗКИЕ ЭКРАНЫ (360px)
   ------------------------------------------------------------------------- */

@media (max-width: 380px) {
  .logo__text { font-size: 17px; }
  .mainbar__inner { gap: 12px; }
  .feed__row { grid-template-columns: 92px 1fr; gap: 12px; }
  .feed__thumb { width: 92px; height: 70px; }
  .medallion { width: 104px; height: 104px; font-size: 10px; }
}

/* -------------------------------------------------------------------------
   4.5 ДОСТУПНОСТЬ
   ------------------------------------------------------------------------- */

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.section--dark :focus-visible,
.site-footer :focus-visible,
.hero :focus-visible,
.article-cover :focus-visible {
  outline-color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .card:hover .card__img,
  .news-card:hover .news-card__media img { transform: none; }

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

/* Появление при скролле */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Пока JS не загрузился — контент виден */
.no-js .reveal { opacity: 1; transform: none; }

/* =========================================================================
   5. ДОБАВЛЕНИЯ СЕКЦИЙ И СТРАНИЦ
   (классы, появившиеся вместе с includes/sections/*.php)
   ========================================================================= */

/* Заголовок блока внутри секции */
.block-title { margin-bottom: 24px; }
.mt-24 { margin-top: 24px; }

/* Ссылочные элементы карточек: <a> с внутренними <span> */
.card__text .card__spec,
.feed__main,
.feed__title,
.prevnext__dir,
.prevnext__title,
.news-card__title,
.news-card__date,
.card__title,
.card__price,
.tile__title,
.tile__text { display: block; }

.card__text .card__spec + .card__spec { margin-top: 2px; }

.tile .btn { justify-self: start; }

/* Фильтры каталога */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-bottom: 24px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--hairline);
}

.filters__link {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.filters__link:hover { color: var(--ink); }
.filters__link.is-current {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.catalog__groups .card-group:first-child { margin-top: 4px; }

/* Рельса: заголовок над списком видов */
.rail__head {
  display: none;
  color: var(--muted);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline);
}

/* Посадочная техники */
.eq-hero__text { min-width: 0; }
.model__info { min-width: 0; }

.cols-numlist { display: grid; }

/* Владельцам техники */
.owners-offer__img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--hairline);
}
.owners-offer__list { margin-top: 40px; }
.owners-req__col + .owners-req__col { margin-top: 32px; }

/* Лента новостей */
.feed__pageinfo {
  margin: -12px 0 20px;
  color: var(--muted);
}

/* Группы вопросов */
.faq-group + .faq-group { margin-top: 52px; }

/* Контакты */
.contacts-map__addr {
  margin-bottom: 20px;
  font-size: 16px;
  color: var(--muted);
}
.contacts-col .meta-strip { margin-bottom: 18px; }

/* Тёмная полоса контактов */
.contact-band__hours {
  margin-top: 14px;
  color: var(--muted-inv);
}

/* Статья */
.article-body .lead {
  font-size: 20px;
  line-height: 1.45;
  font-weight: 500;
}
.article-body .text-after {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  font-size: 16px;
  color: var(--muted);
}
.article-body .text-after a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-body .text-after a:hover { color: var(--accent); }

.article .prevnext { margin-bottom: 8px; }

/* Карта сайта */
.sitemap__col .meta-strip { margin-bottom: 16px; }
.sitemap__col .mono.muted { padding-bottom: 4px; }

@media (min-width: 600px) {
  .owners-req__col + .owners-req__col { margin-top: 0; }
}

@media (min-width: 900px) {
  .cols-numlist {
    grid-template-columns: repeat(2, 1fr);
    gap: 0 var(--gutter);
  }
  .cols-numlist .numlist__item:nth-child(2n) {
    padding-left: var(--gutter);
    border-left: 1px solid var(--hairline);
  }
  .rail__head { display: block; }
  .owners-offer__list { margin-top: 56px; }
  .filters { gap: 8px 28px; }
}

/* -------------------------------------------------------------------------
   4.6 ПЕЧАТЬ
   ------------------------------------------------------------------------- */

@media print {
  body { background: #fff; color: #000; font-size: 12pt; }
  body::before { display: none; }

  .site-header,
  .mobile-menu,
  .modal,
  .hero,
  .contact-band,
  .callback,
  .chips,
  .site-footer .footer-nav,
  .skip-link,
  .btn,
  .round-btn,
  .pagination { display: none !important; }

  .site-footer { background: #fff; color: #000; }
  .footer-phone, .footer-mail, .footer-legal__inner { color: #000; }

  a { color: #000; text-decoration: none; }
  .article-body a::after { content: ' (' attr(href) ')'; font-size: 10pt; }

  /* На печати ответы раскрываем принудительно — единственное место,
     где допустимо перебить [hidden], и сделано это осознанно. */
  .accordion__panel[hidden] { display: block !important; }

  .section { padding-block: 12pt; page-break-inside: avoid; }
  h1, h2, h3 { page-break-after: avoid; }
  img { max-width: 100% !important; page-break-inside: avoid; }
  .table { min-width: 0; }
}
