/* ==========================================================================
   Meridyan — Main stylesheet
   Секции идут в порядке появления на главной (см. docs/01-architecture.md)
   ========================================================================== */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* overflow-x: clip (не hidden!) и на html, и на body — режем горизонтальный оверфлоу
   на обоих уровнях (в мобильном Safari резиновая прокрутка по горизонтали иначе не всегда
   гасится только через body). Именно "clip", а не "hidden": в CSS есть правило "парности"
   overflow-x/overflow-y — если одна ось не visible/clip, другая молча становится auto,
   а auto на html/body создаёт "контейнер прокрутки", который ломает position:sticky у
   .site-header (шапка переставала прилипать и просто уезжала вверх при скролле — это была
   регрессия ровно от предыдущей правки на overflow-x:hidden). "clip" — единственное
   значение, которое не запускает это правило парности, поэтому и горизонтальный оверфлоу
   вырезан, и sticky-шапка снова работает. */
html { scroll-behavior: auto; overflow-x: clip; } /* плавность отдаём Lenis, не CSS */
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  /* Убирает стандартную серую/синюю вспышку при тапе на мобильных — она конфликтует
     с собственной анимацией нажатия у .btn (см. :active ниже по файлу). */
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
/* max() с env(safe-area-inset-*) — на случай <meta viewport-fit=cover> (уже стоит в
   inc/header.php) на iPhone с "чёлкой"/Dynamic Island в альбомной ориентации: контент
   не должен уезжать под скруглённые углы/вырез экрана. На устройствах без выемки
   env() равен 0, так что итог совпадает с прежним --gutter — визуально ничего не меняется. */
.container {
  max-width: var(--container-max); margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}
.skip-link {
  position: absolute; left: -999px; top: 0; background: #fff; color: #000; padding: 8px 16px; z-index: 999;
}
.skip-link:focus { left: 8px; top: 8px; }

/* Ледяной фон секций: мягкий радиальный градиент + лёгкий шум через несколько градиентов */
body {
  background-image:
    radial-gradient(circle at 15% 10%, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 40%),
    radial-gradient(circle at 85% 20%, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0) 45%),
    radial-gradient(circle at 30% 80%, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 50%);
  background-attachment: fixed;
}

section { position: relative; }

h1, .h1 { font-family: var(--font-heading); font-weight: 800; font-size: clamp(28px, 4.2vw, 46px); line-height: 1.15; color: var(--color-accent); }
h2, .h2 { font-family: var(--font-heading); font-weight: 700; font-size: clamp(24px, 3vw, 34px); line-height: 1.2; color: var(--color-secondary); }
h3, .h3 { font-family: var(--font-heading); font-weight: 700; font-size: clamp(18px, 2vw, 22px); color: var(--color-text); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; color: var(--color-text-muted); }
.section-heading { text-align: center; margin-bottom: 40px; }
.section-heading__link { display: inline-flex; align-items: center; gap: 6px; color: var(--color-accent); font-weight: 600; font-size: 14px; margin-top: 6px; }
.section-heading__link::after { content: '→'; }
p.lead { color: var(--color-text-muted); font-size: 15px; line-height: 1.6; }

/* ---------- Buttons: soft-UI / neumorphism ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius-pill);
  font-weight: 600; font-size: 15px; white-space: nowrap;
  background: linear-gradient(180deg, #FFFFFF 0%, #F1F3F4 100%);
  color: var(--color-secondary);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft-hover); }
.btn:active {
  transform: translateY(3px) scale(0.97);
  box-shadow: inset 0 3px 8px rgba(30,40,50,0.18), inset 0 1px 3px rgba(30,40,50,0.14);
  transition: transform 0.08s var(--ease-out), box-shadow 0.08s var(--ease-out);
}
.btn--dark { background: linear-gradient(180deg, #2B2F33 0%, #1C1F22 100%); color: #fff; padding: 12px 22px; font-size: 14px; }
.btn--accent { background: linear-gradient(180deg, var(--color-accent) 0%, var(--color-accent-dark) 100%); color: #fff; }
.btn--block { width: 100%; }
.icon-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-soft); color: var(--color-text);
  flex-shrink: 0;
}

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 60; padding-block: 28px; background: rgba(238,241,243,0.75); backdrop-filter: blur(10px); }
/* max-content вместо auto — колонки логотипа и actions никогда не сжимаются под давлением
   средней колонки; если .main-nav скрыт (display:none на мобильной/планшете), явные
   grid-column гарантируют, что actions всё равно останется в 3-й колонке, а не "всплывёт"
   в освободившуюся среднюю после автоматической расстановки грид-элементов. */
.site-header__inner { display: grid; grid-template-columns: max-content 1fr max-content; align-items: center; gap: 32px; }
.site-logo { grid-column: 1; flex-shrink: 0; }
.main-nav { grid-column: 2; min-width: 0; display: flex; justify-content: center; }
.main-nav__list { display: flex; align-items: center; gap: 30px; }
.main-nav__item { position: relative; }
.main-nav__link { display: flex; align-items: center; gap: 4px; font-weight: 600; font-size: 16px; padding: 8px 0; color: var(--color-secondary); }
.main-nav__chevron { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.main-nav__dropdown {
  position: absolute; top: 100%; left: -16px; min-width: 220px; padding: 10px;
  background: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-soft-hover);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .2s var(--ease-out);
}
.main-nav__item.has-dropdown:hover .main-nav__dropdown,
.main-nav__item.has-dropdown:focus-within .main-nav__dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.main-nav__dropdown a { display: block; padding: 8px 12px; border-radius: 8px; font-size: 14px; }
.main-nav__dropdown a:hover { background: var(--color-bg); }
.site-header__actions { grid-column: 3; display: flex; align-items: center; gap: 14px; }
/* Десктоп/планшет: поле поиска удлиняется прямо рядом с иконкой-лупой (inline, ширина анимируется) */
.header-search { position: relative; display: flex; align-items: center; }
.header-search__panel {
  display: flex; align-items: center; gap: 6px;
  width: 0; opacity: 0; overflow: hidden; margin-left: 0; padding: 0;
  background: #fff; border-radius: var(--radius-pill);
  transition: width .32s var(--ease-out), opacity .2s var(--ease-out), margin-left .32s var(--ease-out), padding .32s var(--ease-out);
}
.header-search__panel.is-open {
  width: clamp(160px, 13vw, 210px); opacity: 1; margin-left: 10px; padding: 4px;
  box-shadow: var(--shadow-soft);
}
.header-search__panel input {
  /* 16px, не 14px: на iOS Safari фокус на текстовом поле с font-size < 16px принудительно
     зумит страницу (безопасное значение, при котором Safari не считает нужным увеличивать
     масштаб). Та же логика ниже для .field input в форме обратной связи. */
  flex: 1; min-width: 0; font: inherit; font-size: 16px; color: var(--color-text); outline: none;
  border: 1.5px solid rgba(30, 40, 50, 0.15); background: var(--color-bg);
  border-radius: var(--radius-pill); padding: 8px 14px;
  transition: border-color .2s var(--ease-out);
}
.header-search__panel input:focus { border-color: var(--color-accent); }
.header-search__panel button[type="submit"] {
  width: 30px; height: 30px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--color-bg); color: var(--color-secondary);
}
/* Мобильная версия: поле поиска остаётся отдельной центрированной выпадающей панелью под шапкой (без изменений) */
@media (max-width: 767px) {
  .header-search { position: static; display: block; }
  .header-search__panel {
    position: absolute; top: calc(100% + 12px); left: 50%; right: auto; z-index: 70;
    width: min(320px, 92vw) !important; margin-left: 0 !important; padding: 6px !important;
    overflow: visible;
    box-shadow: var(--shadow-soft-hover);
    visibility: hidden;
    transform: translateX(-50%) translateY(-6px);
    transition: opacity .2s var(--ease-out), transform .2s var(--ease-out), visibility .2s;
  }
  .header-search__panel.is-open {
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
  .header-search__panel input { padding: 10px 16px; }
  .header-search__panel button[type="submit"] { width: 34px; height: 34px; }
}
.lang-switch { position: relative; }
.lang-switch__current { display: flex; align-items: center; gap: 6px; font-weight: 500; font-size: 14px; }
.lang-switch__flag { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.lang-switch__list { position: absolute; right: 0; top: 130%; background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-soft-hover); overflow: hidden; opacity: 0; visibility: hidden; transition: .2s; }
.lang-switch:hover .lang-switch__list, .lang-switch:focus-within .lang-switch__list { opacity: 1; visibility: visible; }
.lang-switch__list a { display: flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: 13px; }
.lang-switch__list a:hover { background: var(--color-bg); }
.lang-switch--mobile { display: flex; gap: 10px; margin: 16px 0; }
.lang-switch--mobile a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--color-bg); font-size: 13px; font-weight: 600; }
.lang-switch--mobile a img { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.lang-switch--mobile a.is-active { background: var(--color-accent); color: #fff; }

.burger { display: none; flex-direction: column; gap: 4px; width: 40px; height: 40px; align-items: center; justify-content: center; flex-shrink: 0; }
.burger span { width: 20px; height: 2px; background: var(--color-text); border-radius: 2px; }

.breadcrumbs { margin-top: 14px; font-size: 13px; color: var(--color-text-muted); display: flex; gap: 8px; }
.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs__sep { opacity: .6; }

/* ---------- Mobile drill-down menu ---------- */
.mobile-menu { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
.mobile-menu.is-open { visibility: visible; }
.mobile-menu__overlay { position: absolute; inset: 0; background: rgba(20,24,28,0.35); opacity: 0; transition: opacity .3s; }
.mobile-menu.is-open .mobile-menu__overlay { opacity: 1; }
.mobile-menu__panels {
  position: absolute; top: 0; right: 0; height: 100%; width: min(360px, 90vw);
  background: var(--color-bg); box-shadow: -10px 0 40px rgba(0,0,0,0.15);
  transform: translateX(100%); transition: transform .35s var(--ease-out); overflow: hidden;
}
.mobile-menu.is-open .mobile-menu__panels { transform: translateX(0); }
.mobile-menu__panel {
  position: absolute; inset: 0; overflow-y: auto;
  /* max() с safe-area-inset — панель выезжает с правого края экрана и растягивается
     на всю высоту, поэтому именно она может упереться в вырез/скруглённые углы или в
     зону домашнего индикатора снизу на iPhone (см. viewport-fit=cover в header.php). */
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right))
           max(24px, env(safe-area-inset-bottom)) 24px;
  transform: translateX(100%); transition: transform .3s var(--ease-out); opacity: 0;
}
.mobile-menu__panel.is-active { transform: translateX(0); opacity: 1; position: relative; }
.mobile-menu__panel.is-prev { transform: translateX(-100%); }
.mobile-menu__panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.back-btn { font-weight: 600; font-size: 14px; }
.mobile-menu__search { position: relative; margin-bottom: 20px; }
.mobile-menu__search input { width: 100%; padding: 12px 40px 12px 16px; border-radius: var(--radius-pill); border: none; background: #fff; box-shadow: var(--shadow-inset); }
.mobile-menu__search svg { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--color-text-muted); }
.mobile-menu__list li { border-bottom: 1px solid rgba(0,0,0,0.06); }
.mobile-menu__list button, .mobile-menu__list a { display: flex; justify-content: space-between; width: 100%; padding: 14px 4px; font-weight: 500; }
.mobile-menu__list--plain a { font-weight: 400; }
.mobile-menu__view-all { color: var(--color-accent); font-weight: 600; }
.mobile-menu__contacts { margin: 18px 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--color-text-muted); }
.mobile-menu__contacts a { color: var(--color-text); font-weight: 600; }

/* ---------- Decorative floating elements (ice/lemon) ---------- */
.decor { position: absolute; pointer-events: none; z-index: 0; opacity: 0.9; will-change: transform; }
.decor--sm { width: 40px; }
.decor--md { width: 64px; }
.decor--lg { width: 96px; }

/* ---------- Hero ---------- */
.hero { padding-block: 60px 80px; text-align: center; overflow: hidden; }
.hero--ice-bg {
  background-image: url('/img/decor/ice-lemon-bg.jpg');
  background-size: cover;
  background-position: center 35%;
}
.hero__inner {
  position: relative; max-width: 760px; margin-inline: auto; z-index: 2;
  padding: 40px clamp(16px, 4vw, 56px);
}
/* aspect-ratio вместо жёсткой высоты: логотип можно заменить через админку на файл
   с другими пропорциями — object-fit:contain впишет его в зарезервированное место
   без сдвига верстки (CLS) и без искажения/обрезки самого лого. */
.hero__logo { margin-inline: auto; margin-bottom: 18px; aspect-ratio: 260 / 113; object-fit: contain; height: auto; }
.hero__subtitle { margin: 16px auto 32px; max-width: 560px; color: var(--color-secondary); font-size: 16px; line-height: 1.6; }

/* ---------- Categories ---------- */
.categories { padding-block: 40px 80px; }
.categories__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.category-card {
  position: relative; background: var(--color-surface); border-radius: var(--radius-lg);
  padding: 26px 22px 130px; box-shadow: var(--shadow-soft); overflow: hidden;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
  min-height: 340px;
}
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft-hover); }
.category-card__title { font-family: var(--font-heading); font-weight: 700; font-size: 17px; margin-bottom: 14px; color: var(--color-text); }
.category-card__list li { font-size: 13px; color: var(--color-text-muted); padding: 4px 0; }
.category-card__view-all { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--color-accent); text-decoration: underline; }
.category-card__media {
  position: absolute; left: 0; right: 0; bottom: 0; height: 140px; background-size: cover; background-position: center;
  transform: translateY(30%) scale(1.05); transition: transform .45s var(--ease-out); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.category-card:hover .category-card__media { transform: translateY(0) scale(1.1); }
@media (hover: none) { .category-card__media { transform: translateY(10%); } }

/* ---------- Stats / mission ---------- */
.stats { padding-block: 70px; text-align: center; }
.stats__mission { max-width: 720px; margin-inline: auto 0; margin-inline: auto; font-family: var(--font-heading); font-weight: 600; font-size: clamp(18px, 2.2vw, 24px); color: var(--color-secondary); line-height: 1.4; }
.stats__grid { display: flex; justify-content: center; gap: clamp(24px, 6vw, 90px); margin: 44px 0 36px; flex-wrap: wrap; }
.stat { text-align: left; }
.stat__value { display: flex; align-items: flex-start; gap: 4px; font-family: var(--font-heading); font-weight: 800; font-size: clamp(36px, 5vw, 56px); color: var(--color-accent); line-height: 1; }
.stat__suffix { font-size: 0.5em; margin-top: 6px; }
.stat__label { font-size: 13px; color: var(--color-text-muted); max-width: 140px; margin-top: 6px; }

/* ---------- Clients marquee ---------- */
.clients { padding-block: 50px; text-align: center; }
.marquee { overflow: hidden; margin-top: 30px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; gap: 48px; width: max-content; animation: marquee-scroll 28s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.clients .marquee__track img { height: 44px; width: auto; filter: grayscale(1); opacity: .8; transition: filter .3s, opacity .3s; }
.clients .marquee__track img:hover { filter: grayscale(0); opacity: 1; }
@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ---------- Features (repeatable cards) ---------- */
.features { padding-block: 50px; }
.features__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 60px; max-width: 980px; margin-inline: auto; }
.feature-card__title { color: var(--color-accent); font-weight: 700; font-size: 17px; margin-bottom: 8px; }
.feature-card__text { font-size: 14px; color: var(--color-text-muted); line-height: 1.6; }

/* ---------- Top products (Swiper) ---------- */
.top-products { padding-block: 60px; }
.top-products .swiper { padding: 10px 4px 40px; }
.product-card { background: var(--color-surface); border-radius: var(--radius-md); box-shadow: var(--shadow-soft); overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.product-card__image { aspect-ratio: 4/3; overflow: hidden; }
.product-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-out); }
.product-card:hover .product-card__image img { transform: scale(1.08); }
.product-card__body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card__title { font-weight: 700; color: var(--color-accent); font-size: 15px; }
.product-card__desc { font-size: 13px; color: var(--color-text-muted); line-height: 1.5; flex: 1; }
.product-card__cta { margin-top: 8px; }
.top-products__nav { display: flex; justify-content: center; gap: 14px; margin-top: 10px; }
.top-products__footer { text-align: center; margin-top: 20px; }

/* ---------- About video ---------- */
.about-video { padding-block: 60px; }
.about-video__media { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft); cursor: pointer; }
/* aspect-ratio резервирует место под картинку ДО её загрузки — без этого высота
   блока "прыгает" при подгрузке обложки видео (source сдвигов верстки, CLS). */
.about-video__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.about-video__play {
  position: absolute; inset: 0; margin: auto; width: max-content; height: max-content;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: var(--radius-pill);
  background: linear-gradient(180deg, #FFFFFF 0%, #F1F3F4 100%);
  color: var(--color-secondary); font-weight: 600; font-size: 15px; white-space: nowrap;
  box-shadow: var(--shadow-soft);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.about-video__media:hover .about-video__play { transform: translateY(-2px) scale(1.03); box-shadow: var(--shadow-soft-hover); }
.about-video__play-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: #fff; box-shadow: var(--shadow-soft); color: var(--color-secondary); font-size: 10px;
}
.about-video__years { margin-top: 46px; }
.about-video__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 20px; }
.about-video__cols p { font-size: 13px; color: var(--color-text-muted); line-height: 1.6; }

/* Video modal (lightbox) */
.video-modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; background: rgba(10,12,14,0.8); }
.video-modal.is-open { display: flex; }
.video-modal__inner { width: min(900px, 92vw); aspect-ratio: 16/9; background: #000; border-radius: var(--radius-md); overflow: hidden; position: relative; }
.video-modal__close { position: absolute; top: -44px; right: 0; color: #fff; font-size: 24px; }

/* ---------- Quality banner ---------- */
.quality-banner { padding-block: 30px 60px; }
.quality-banner__sections { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; margin-bottom: 40px; }
/* aspect-ratio — та же причина, что и у .about-video__media img: без него верстка
   "прыгает" на 16-40px при подгрузке картинки (зависит от реального размера файла). */
.quality-banner__sections img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); margin-top: 16px; }
.quality-banner__banner img { width: 100%; height: 320px; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.quality-banner__banner-cta { display: block; width: max-content; margin: 24px auto 0; }

/* ---------- CTA form ---------- */
.cta-form { padding-block: 70px; text-align: center; position: relative; overflow: hidden; }
.cta-form--ice-bg {
  background-image: url('/img/decor/ice-lemon-bg.jpg');
  background-size: cover;
  background-position: center 65%;
}
.cta-form__inner {
  max-width: 520px; margin-inline: auto; position: relative; z-index: 2;
  padding: 36px clamp(16px, 4vw, 48px); border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
}
.cta-form form { margin-top: 26px; display: flex; flex-direction: column; gap: 22px; }
.field { position: relative; text-align: left; }
.field input { width: 100%; border: none; border-bottom: 1.5px solid rgba(59,64,72,0.2); background: transparent; padding: 10px 4px; font-size: 16px; color: var(--color-text); }
.field input:focus { outline: none; border-color: var(--color-accent); }
.field label { position: absolute; left: 4px; top: 10px; color: var(--color-text-muted); font-size: 15px; transition: all .2s; pointer-events: none; }
.field input:focus + label, .field input:not(:placeholder-shown) + label { top: -14px; font-size: 12px; color: var(--color-accent); }
.cta-form .btn { margin-top: 6px; align-self: center; }

/* ---------- Contacts grid ---------- */
.contacts-grid { padding-block: 30px 70px; }
.contacts-grid__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 30px; }
.contact-item__label { font-weight: 700; color: var(--color-secondary); margin-bottom: 8px; }
.contact-item__value { font-size: 14px; color: var(--color-text-muted); }

/* ---------- History timeline ---------- */
.history-timeline { padding-block: 30px 70px; }
.history-timeline__track {
  display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x proximity; padding: 60px 10px 20px;
  -ms-overflow-style: none; scrollbar-width: thin;
}
.history-timeline__item {
  flex: 0 0 260px; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center;
  position: relative; padding-inline: 20px;
}
.history-timeline__item::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 2px; background: repeating-linear-gradient(90deg, rgba(30,59,44,0.25) 0 8px, transparent 8px 16px); z-index: 0; }
.history-timeline__year {
  position: relative; z-index: 1; width: 96px; height: 96px; border-radius: 50%; background: var(--color-surface);
  box-shadow: var(--shadow-soft); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 800; font-size: 20px; color: var(--color-secondary); order: 2;
}
.history-timeline__text { font-size: 13px; color: var(--color-text-muted); text-align: center; max-width: 220px; order: 1; }
.history-timeline__connector { width: 2px; height: 24px; background: rgba(30,59,44,0.3); order: 1; }
.history-timeline__item.is-top { flex-direction: column; }
.history-timeline__item.is-bottom { flex-direction: column-reverse; }
@media (max-width: 767px) {
  .history-timeline__track { flex-direction: column; overflow-x: visible; padding: 10px; align-items: flex-start; }
  .history-timeline__item { flex-direction: row !important; align-items: center; gap: 16px; padding-block: 18px; text-align: left; }
  .history-timeline__item::before { top: 0; bottom: 0; left: 47px; right: auto; width: 2px; height: auto; background: repeating-linear-gradient(180deg, rgba(30,59,44,0.25) 0 8px, transparent 8px 16px); }
  .history-timeline__year { width: 64px; height: 64px; font-size: 15px; flex-shrink: 0; }
  .history-timeline__connector { display: none; }
  .history-timeline__text { text-align: left; max-width: none; }
}

/* ---------- Footer ---------- */
.site-footer { background: #E4E8EA; padding-top: 50px; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 30px; padding-bottom: 30px; }
.site-footer__brand p { margin-top: 12px; font-size: 13px; color: var(--color-text-muted); max-width: 220px; }
.site-footer__col-title { font-weight: 700; margin-bottom: 14px; display: block; width: 100%; text-align: left; }
.site-footer__links li { margin-bottom: 10px; font-size: 14px; color: var(--color-text-muted); }
.site-footer__social { display: flex; gap: 10px; margin-top: 14px; }
/* Раньше здесь был просто закрашенный кружок без иконки (.social-dot) — ни WhatsApp,
   ни Instagram не были узнаваемы. Теперь белый кружок (тот же язык дизайна, что у
   .icon-btn в шапке) с настоящей иконкой сети внутри — см. inc/social-icons.php. */
.social-icon {
  width: 32px; height: 32px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-soft);
  display: inline-flex; align-items: center; justify-content: center; color: var(--color-secondary);
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.social-icon:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft-hover); }
.social-icon svg { width: 18px; height: 18px; }
.site-footer__bottom { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; padding-block: 22px; border-top: 1px solid rgba(0,0,0,0.08); font-size: 12px; color: var(--color-text-muted); }
.site-footer__bottom a { margin-left: auto; }
.site-footer__bottom a + a { margin-left: 18px; }

/* ---------- Reveal / animation utility hooks (GSAP targets these) ---------- */
[data-reveal] { opacity: 0; transform: translateY(28px); }
.count-up { font-variant-numeric: tabular-nums; }

/* Первая секция на каждой странице (hero на главной, первый блок about/history/contacts,
   основное фото товара на product.php) — это всегда зона LCP ("над сгибом"). Раньше она
   тоже ждала GSAP/ScrollTrigger, из-за чего: (1) LCP-элемент фактически дорисовывался
   позже, чем мог бы, и (2) если скрипты не загрузились (медленная сеть, блокировщик,
   сбой CDN) — контент оставался невидимым (opacity:0) навсегда. Теперь эта зона
   анимируется чистым CSS сразу с отрисовки, без зависимости от JS вообще; в JS
   (js/modules/scroll-fx.js) она явно исключена из GSAP-анимации, чтобы не проигралась дважды.
   Скролл-реакция (появление при прокрутке) для остального контента страницы не меняется. */
#main > :first-child [data-reveal] {
  animation: heroReveal .5s var(--ease-out) both;
}
@keyframes heroReveal {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Responsive — брейкпоинты по docs/01-architecture.md §6
   ========================================================================== */

/* 1024–1439: small desktop / landscape tablet */
@media (max-width: 1439px) {
  .categories__grid { grid-template-columns: repeat(3, 1fr); }
  .contacts-grid__grid { grid-template-columns: repeat(3, 1fr); }
}

/* 768–1023: tablet portrait */
@media (max-width: 1023px) {
  .main-nav, .site-header__actions .btn--dark, .site-header__actions .lang-switch { display: none; }
  .burger { display: flex; }
  .site-header { padding-block: 18px; }
  .site-header__inner { gap: 16px; }
  .site-logo img { width: auto; height: 44px; }
  .site-header__actions { gap: 10px; }
  .categories__grid { grid-template-columns: repeat(2, 1fr); }
  .features__grid { grid-template-columns: repeat(2, 1fr); }
  .about-video__cols { grid-template-columns: 1fr; }
  .quality-banner__sections { grid-template-columns: 1fr; }
  .contacts-grid__grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .top-products__nav { display: none; } /* остаётся touch-свайп */
}

/* <=767: mobile */
@media (max-width: 767px) {
  .container { padding-inline: 18px; }
  .site-header__inner { gap: 10px; }
  .site-header__actions { gap: 8px; }
  .site-logo img { width: auto; height: 34px; }
  .site-header__actions .btn { padding: 8px 14px; font-size: 12.5px; }
  .categories__grid { grid-template-columns: 1fr; }
  .category-card { min-height: 0; padding-bottom: 150px; }
  .stats__grid { flex-direction: column; align-items: center; gap: 28px; }
  .stat { text-align: center; }
  .stat__value { justify-content: center; }
  .stat__label { margin-inline: auto; }
  .features__grid { grid-template-columns: 1fr; }
  .contacts-grid__grid { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .site-footer__col[data-accordion] .site-footer__links { display: none; }
  .site-footer__col[data-accordion].is-open .site-footer__links { display: block; }
  .site-footer__col-title::after { content: '+'; float: right; }
  .site-footer__col.is-open .site-footer__col-title::after { content: '−'; }
  .cta-form .decor, .hero .decor { transform: scale(0.6); }
  .decor:nth-child(n+4) { display: none; } /* прячем часть декора ради читаемости/производительности */
  .hero { padding-block: 40px 50px; }
  .btn--block-mobile { width: 100%; }

  /* background-attachment:fixed на мобильном Safari/Chrome Android поддерживается
     нестабильно (в старых версиях iOS Safari вообще игнорируется, в части случаев даёт
     подёргивание при скролле, так как требует лишнего перерисовывания фона на каждый
     кадр) — на мобильных ширинах просто скроллим фон вместе с содержимым. Разница
     на глазок практически не заметна (это лёгкий шумовой градиент, не параллакс). */
  body { background-attachment: scroll; }
}
