/* =========================================================================
   IRON SHARK INDUSTRIES — СТИЛИ САЙТА
   Файл разбит на разделы. Найти нужный можно поиском (Ctrl+F) по заголовку
   раздела, например «КАРУСЕЛЬ» или «ФОРМА».

   ГЛАВНОЕ: все цвета и шрифты собраны в переменных ниже (:root).
   Хотите другой оттенок синего — поменяйте его здесь один раз,
   и он изменится на всём сайте.
   ========================================================================= */


/* ============================== 1. ПЕРЕМЕННЫЕ ============================ */
/* Концепция: стальная синяя гамма, тёмно-синие «ленты» сверху и у формы,
   светлые разделы с каталогом между ними. */
:root {
  /* — Цвета — */
  --navy:        #0b1d3a;   /* тёмно-синий: шапка, первый экран, форма */
  --navy-2:      #133166;   /* второй тёмно-синий для градиентов */
  --blue:        #1f5fd6;   /* основной синий: кнопки, акценты */
  --blue-bright: #3d86ff;   /* яркий синий: наведение, подсветка */
  --blue-soft:   #8db8ff;   /* светло-синий текст на тёмном фоне */
  --sky:         #e8f0fd;   /* бледно-голубой фон разделов */
  --paper:       #f6f9fe;   /* основной фон страницы */
  --line:        #d5e0f1;   /* линии и рамки */
  --ink:         #0e1c31;   /* основной цвет текста */
  --muted:       #55667f;   /* второстепенный текст */
  --white:       #ffffff;
  --error:       #d23b3b;   /* текст ошибок в форме */

  /* — Шрифты — */
  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif; /* заголовки */
  --font-body:    "Manrope", "Segoe UI", system-ui, sans-serif;      /* основной текст */
  --font-mono:    "JetBrains Mono", ui-monospace, Consolas, monospace; /* цифры, метки */

  /* — Размеры — */
  --container: 1200px;   /* максимальная ширина содержимого */
  --radius: 12px;        /* скругление карточек */
  --header-h: 68px;      /* высота шапки */

  /* — Анимация — */
  --reveal-time: .7s;    /* как долго раздел проявляется при прокрутке (больше — медленнее) */
  --fx-step: 90ms;       /* пауза между карточками, когда они появляются «волной» */
  --fx-glow: rgba(61, 134, 255, .22);       /* свечение за курсором на первом экране */
  --fx-shine: rgba(255, 255, 255, .45);     /* блик на карточках товаров и кнопках */

  /* — Стекло (эксперимент «Liquid Glass», раздел 15б; включается в js/main.js → SETTINGS.glass) — */
  --glass-blur:  18px;                       /* сила размытия под стеклом (больше — мутнее) */
  --glass-dark:  rgba(11, 29, 58, .88);      /* тёмное стекло: шапка (последнее число — плотность 0…1) */
  --glass-light: rgba(255, 255, 255, .9);    /* светлое стекло: стрелки, окно товара */
  --glass-blue:  rgba(45, 120, 245, .86);    /* синее стекло: кнопка Telegram, нижняя кнопка */
  --glass-edge:  rgba(255, 255, 255, .38);   /* светлая кромка по краю стекла */
  --glass-sheen: rgba(255, 255, 255, .22);   /* блик сверху на кнопках, как на настоящем стекле */
  --glass-sheen-soft: rgba(255, 255, 255, .07); /* мягкий блик на больших панелях: шапка, окно товара */
  --glass-shade: rgba(6, 18, 38, .28);       /* тень под стеклом */

  /* — Дизайн 2 (раздел 15в; включается ссылкой ?design=2 или SETTINGS.design) — */
  --accent-warm: #f0b43c;                    /* строительный жёлтый: бегущее слово, круглая кнопка, гайка на схеме */

  /* — Схема «Как работает стойка» (раздел 10б) — */
  --wood:        #e2b04e;                    /* балки и фанера */
  --wood-dark:   #b8862d;                    /* обводка дерева */
  --steel:       #cfdcf3;                    /* внутренняя труба */
  --story-text:  #b9c9e4;                    /* описание шага */
  --hero-shade:  rgba(8, 22, 49, .94);       /* затемнение фона первого экрана слева, под текстом */
  --hero-shade-light: rgba(8, 22, 49, .15);  /* затемнение справа (там видна картинка) */

  /* «only light» — просим браузеры телефонов НЕ перекрашивать сайт в тёмную тему сами
     (иначе, например, белые полоски кнопки меню становятся тёмными и не видны) */
  color-scheme: only light;
}


/* ============================== 2. ОСНОВА ================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Полоса под «чёлкой» телефона в цвет шапки */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--navy);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
[hidden] { display: none !important; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 800; }

/* Контейнер: ограничивает ширину и даёт поля по бокам */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Маленькая надпись над заголовком раздела */
.eyebrow {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}
.eyebrow--light { color: var(--blue-soft); }

/* Видимая рамка при управлении с клавиатуры */
:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 3px; }


/* ============================== 3. КНОПКИ ================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border: 0;
  border-radius: 8px;
  font: 700 1rem var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, box-shadow .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--blue-bright); color: var(--white); }
.btn--primary:hover { background: var(--blue); }

.btn--ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--white); }

.btn--small { padding: 10px 16px; font-size: .9rem; background: var(--sky); color: var(--blue); }
.btn--small:hover { background: var(--blue); color: var(--white); }

.btn--wide { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }


/* ============================== 4. ШАПКА ================================= */
.header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: var(--navy);
  color: var(--white);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
/* Акула-логотип в шапке: высота задаётся здесь, ширина подстраивается сама */
.logo__mark { height: 46px; width: auto; display: block; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35)); transition: transform .3s ease; }
.logo:hover .logo__mark { transform: rotate(-4deg) scale(1.06); }
@media (max-width: 600px) { .logo__mark { height: 38px; } }
.logo__text { font: 800 1.08rem/1.05 var(--font-display); letter-spacing: .03em; }
.logo__text b { color: var(--blue-bright); font-weight: 800; }
/* мелкая вторая строка «INDUSTRIES» под названием */
.logo__text small { display: block; margin-top: 3px; font: 500 .62rem var(--font-mono); letter-spacing: .42em; color: var(--blue-soft); }

.nav { display: flex; gap: 28px; margin-left: auto; font-weight: 600; font-size: .95rem; }
.nav a { text-decoration: none; opacity: .78; transition: opacity .2s; white-space: nowrap; }
@media (max-width: 1280px) { .nav { gap: 20px; } }
.nav a:hover { opacity: 1; }

/* Переключатель языка RU | UZ (стоит в конце меню) */
.lang { display: flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: .88rem; }
.lang__btn {
  padding: 4px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--white);
  font: inherit;
  opacity: .55;
  cursor: pointer;
  transition: opacity .2s, background-color .2s;
}
.lang__btn:hover { opacity: 1; }
.lang__btn.is-active { opacity: 1; background: var(--blue); }
.lang__sep { opacity: .35; }

.header__phone {
  font-family: var(--font-mono);
  font-size: .95rem;
  text-decoration: none;
  white-space: nowrap;
}

/* Кнопка-бургер (только на телефонах) */
.burger {
  display: none;
  width: 44px; height: 44px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,.1);   /* лёгкая подложка — кнопку видно на любом фоне */
  color: var(--white);
  -webkit-appearance: none;           /* убираем оформление кнопок телефона, оно перебивает цвет */
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.burger span {
  display: block;
  width: 22px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--white) !important; /* белые полоски всегда, даже если телефон пытается перекрасить */
  transition: transform .25s, opacity .25s;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Меню прячется в кнопку-бургер на ширине до 1120 px:
   на узбекском пункты меню длиннее, и в одну строку они уже не помещаются */
@media (max-width: 1120px) {
  .header__phone { display: none; }
  .burger { display: flex; }
  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    background: var(--navy-2);           /* чуть светлее страницы — меню не сливается с фоном */
    border-top: 1px solid rgba(255,255,255,.12);
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    padding-block: 8px 16px;
    display: flex;
    /* Меню закрыто: «свёрнуто» вверх и невидимо. Открывается плавно (класс is-open ставит скрипт).
       Скорость — .35s в строках transition ниже. */
    visibility: hidden;
    opacity: 0;
    clip-path: inset(0 0 100% 0);      /* видна 0 % высоты — меню как бы свёрнуто */
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(6,18,38,.35);
    transition: clip-path .35s cubic-bezier(.4, 0, .2, 1), opacity .25s ease,
                transform .35s cubic-bezier(.4, 0, .2, 1), visibility 0s linear .35s;
  }
  .nav.is-open {
    visibility: visible;
    opacity: 1;
    clip-path: inset(0 0 0 0);         /* раскрыто полностью */
    transform: none;
    transition: clip-path .35s cubic-bezier(.4, 0, .2, 1), opacity .2s ease,
                transform .35s cubic-bezier(.4, 0, .2, 1), visibility 0s;
  }
  /* пункты меню появляются по очереди, сверху вниз */
  .nav.is-open > * { animation: nav-item .35s cubic-bezier(.2, .7, .2, 1) both; }
  .nav.is-open > :nth-child(2) { animation-delay: .04s; }
  .nav.is-open > :nth-child(3) { animation-delay: .08s; }
  .nav.is-open > :nth-child(4) { animation-delay: .12s; }
  .nav.is-open > :nth-child(5) { animation-delay: .16s; }
  .nav.is-open > :nth-child(6) { animation-delay: .2s; }
  .nav a { padding-block: 12px; font-size: 1.05rem; opacity: 1; border-bottom: 1px solid rgba(255,255,255,.07); }
  .lang { padding-top: 14px; font-size: 1rem; }        /* в раскрывающемся меню — отдельной строкой */
  .lang__btn { padding: 8px 14px; }
}
@keyframes nav-item { from { opacity: 0; transform: translateY(-8px); } }


/* ============================== 5. ПЕРВЫЙ ЭКРАН ========================== */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: radial-gradient(1100px 520px at 85% -10%, var(--navy-2), var(--navy) 62%);
}
/* Сетка «как на чертеже» на фоне */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(61,134,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61,134,255,.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
}
.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
  padding-block: 72px 64px;
}
.hero__text { min-width: 0; }
.hero h1 { font-size: clamp(2rem, 5.2vw, 3.9rem); font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--blue-bright); }
.hero__lead { margin: 22px 0 32px; max-width: 34em; font-size: 1.12rem; color: #c3d2ea; }
.hero__buttons { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__facts {
  list-style: none;
  margin: 48px 0 0;
  padding: 26px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.hero__facts b { display: block; font: 800 clamp(1.3rem, 2.4vw, 1.8rem) var(--font-display); }
.hero__facts span { font-size: .88rem; color: #9db1d3; }

.hero__media { min-width: 0; }
.hero__media img { width: 100%; max-width: 560px; margin-left: auto; border-radius: var(--radius); }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 36px; padding-block: 48px 44px; }
  .hero__media img { margin: 0 auto; max-width: 440px; }
}
@media (max-width: 420px) {
  .hero__facts { gap: 12px; }
  .hero__buttons .btn { flex: 1 1 100%; }
}


/* ============================== 6. ПОЛОСА ПРЕИМУЩЕСТВ ==================== */
.perks { background: var(--white); border-bottom: 1px solid var(--line); }
.perks__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.perk {
  display: grid;
  gap: 2px;
  padding: 22px 20px;
  border-left: 1px solid var(--line);
}
.perk:first-child { border-left: 0; padding-left: 0; }
.perk b { font-size: 1rem; }
.perk span { color: var(--muted); font-size: .9rem; }

@media (max-width: 900px) {
  .perks__grid { grid-template-columns: 1fr 1fr; }
  .perk { padding: 18px 16px; }
  .perk:nth-child(odd) { border-left: 0; padding-left: 0; }
  .perk:nth-child(n+3) { border-top: 1px solid var(--line); }
}


/* ============================== 7. РАЗДЕЛЫ ================================ */
.section { padding-block: 88px; }
.section--tint { background: var(--sky); }
.section--dark { background: var(--navy); color: var(--white); }

.section__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 32px;
  margin-bottom: 36px;
}
.section__note { margin: 0; max-width: 30em; color: var(--muted); }

/* Правая часть заголовка раздела: пояснение + кнопка (например, «Реальные фото» в каталоге) */
.section__aside { display: grid; gap: 14px; justify-items: start; max-width: 30em; }
.btn--photos svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 600px) { .section { padding-block: 60px; } }


/* ============================== 8. ФИЛЬТРЫ КАТАЛОГА ====================== */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.chip {
  padding: 9px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: 600 .92rem var(--font-body);
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}
.chip:hover { border-color: var(--blue); }
.chip.is-active { background: var(--blue); border-color: var(--blue); color: var(--white); }


/* ============================== 9. КАРУСЕЛЬ ============================== */
/* Сколько карточек видно сразу задаётся переменной --per-view:
   3 на компьютере, 2 на планшете, ~1.15 на телефоне (видно край следующей). */
.carousel { position: relative; --per-view: 3; --gap: 20px; }

.carousel__track {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 6px;
  scrollbar-width: none;           /* прячем полосу прокрутки (Firefox) */
}
.carousel__track::-webkit-scrollbar { display: none; } /* (Chrome, Safari) */

.carousel__track > .product {
  flex: 0 0 calc((100% - var(--gap) * (var(--per-view) - 1)) / var(--per-view));
  scroll-snap-align: start;
}

/* Стрелки */
.carousel__arrow {
  position: absolute;
  top: 34%;
  z-index: 2;
  width: 48px; height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 6px 20px rgba(11,29,58,.14);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background-color .2s, opacity .2s;
}
.carousel__arrow svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* Подсветка при наведении — только там, где есть мышь: на телефоне «наведение» залипает после нажатия */
@media (hover: hover) {
  .carousel__arrow:hover { background: var(--blue); }
  .carousel__arrow:hover svg { stroke: var(--white); }
}
.carousel__arrow[disabled] { opacity: 0; pointer-events: none; }
.carousel__arrow--prev { left: -22px; }
.carousel__arrow--next { right: -22px; }

/* Полоска прогресса под каруселью */
.carousel__progress { height: 3px; margin-top: 22px; background: var(--line); border-radius: 3px; overflow: hidden; }
.carousel__progress span { display: block; height: 100%; width: 30%; background: var(--blue); border-radius: 3px; transition: transform .2s, width .2s; }

@media (max-width: 1260px) {
  .carousel__arrow--prev { left: 6px; }
  .carousel__arrow--next { right: 6px; }
}
@media (max-width: 900px) { .carousel { --per-view: 2; } }
@media (max-width: 600px) {
  .carousel { --per-view: 1.15; --gap: 14px; }
  .carousel__arrow { display: none; } /* на телефоне листают пальцем */
}


/* ============================== 10. КАРТОЧКА ТОВАРА ====================== */
.product {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
}
.product:hover { box-shadow: 0 14px 34px rgba(11,29,58,.12); transform: translateY(-3px); }

.product__photo { position: relative; aspect-ratio: 4 / 3; background: var(--sky); max-width: 100%; }
.product__photo img { width: 100%; height: 100%; object-fit: cover; } /* фото обрежется по рамке 4:3 */

.product__badge {
  position: absolute;
  top: 14px; left: 14px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-size: .78rem;
  font-weight: 700;
}

.product__body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 20px 22px 22px; }
.product__type { margin: 0; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); }
.product__title { font-size: 1.12rem; font-weight: 600; }

.product__specs { margin: 4px 0 0; display: grid; }
.product__specs div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.product__specs div:last-child { border-bottom: 0; }
.product__specs dt { color: var(--muted); }
.product__specs dd { margin: 0; text-align: right; font-family: var(--font-mono); font-size: .84rem; font-variant-numeric: tabular-nums; }

.product__footer { margin-top: auto; padding-top: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; border-top: 1px solid var(--line); }
.product__footer .btn { white-space: nowrap; }
.product__price { font-weight: 800; font-size: 1rem; }


/* Фото и название в карточке открывают окно товара */
.product__photo { cursor: pointer; }
.product__link { color: inherit; text-decoration: none; }
.product__link:hover { color: var(--blue); }
.product__link::after { content: " →"; color: var(--blue); opacity: 0; transition: opacity .2s; }
.product:hover .product__link::after { opacity: 1; }


/* ============================== 10а. ОКНО ТОВАРА ========================= */
/* На компьютере — окно по центру: слева галерея, справа описание (прокручивается).
   На телефоне — на весь экран, всё листается вниз. */
.pmodal {
  position: fixed;
  inset: 0;
  z-index: 90;                        /* под окном фото на весь экран (у него 100) */
  display: grid;
  place-items: center;
  padding: calc(24px + env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px))
           calc(24px + env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
  background: rgba(6,18,38,.72);
  animation: lightbox-in .2s ease;
}
.pmodal__window {
  position: relative;
  width: min(1120px, 100%);
  max-height: min(880px, calc(100vh - 48px));
  max-height: min(880px, calc(100dvh - 48px));
  display: flex;                      /* слева галерея, справа описание */
  overflow: hidden;
  border-radius: 16px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(6,18,38,.4);
}

.pmodal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--sky);
  cursor: pointer;
  transition: background-color .2s;
}
.pmodal__close:hover { background: var(--line); }
.pmodal__close svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }

/* — галерея — */
.pmodal__gallery { flex: 1.05 1 0; min-width: 0; padding: 28px; background: var(--paper); display: grid; gap: 14px; align-content: start; }
.pmodal__stage { position: relative; }
.pmodal__photo-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--sky);
  cursor: zoom-in;
}
.pmodal__photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pmodal__arrow {
  position: absolute;
  top: 50%;
  width: 44px; height: 44px;
  margin-top: -22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 6px 20px rgba(11,29,58,.14);
  cursor: pointer;
  transition: background-color .2s;
}
.pmodal__arrow svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) {   /* подсветка только при наведении мышью (см. стрелки карусели) */
  .pmodal__arrow:hover { background: var(--blue); }
  .pmodal__arrow:hover svg { stroke: var(--white); }
}
.pmodal__prev { left: 12px; }
.pmodal__next { right: 12px; }

.pmodal__thumbs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 2px; }
.pmodal__thumb {
  flex: 0 0 auto;
  width: 84px;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--sky);
  cursor: pointer;
  opacity: .7;
  transition: border-color .2s, opacity .2s;
}
.pmodal__thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pmodal__thumb:hover { opacity: 1; }
.pmodal__thumb.is-active { border-color: var(--blue); opacity: 1; }

/* — описание — */
.pmodal__info { flex: 1 1 0; min-width: 0; overflow-y: auto; padding: 32px 32px 32px 28px; display: grid; gap: 14px; align-content: start; }
.pmodal__type { margin: 0; padding-right: 48px; }
.pmodal__title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; padding-right: 48px; }
.pmodal__badge {
  justify-self: start;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-size: .8rem;
  font-weight: 700;
}
.pmodal__text { display: grid; gap: 10px; color: var(--muted); }
.pmodal__text p { margin: 0; }
.pmodal__buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-block: 4px 8px; }

/* Ссылка «Реальные фото в Telegram-канале» в окне товара — скромная, под основными кнопками */
.pmodal__photos {
  flex-basis: 100%;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-block: 4px;
  color: var(--blue);
  font-weight: 600;
  font-size: .93rem;
  text-decoration: none;
}
.pmodal__photos:hover { text-decoration: underline; }
.pmodal__photos svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn--tg { background: var(--sky); color: var(--blue); }
.btn--tg:hover { background: var(--blue); color: var(--white); }
.pmodal__h { margin-top: 10px; font-size: 1.1rem; font-weight: 600; }

/* таблица характеристик */
.pmodal__specs table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.pmodal__specs th, .pmodal__specs td { padding: 10px 0; border-bottom: 1px dashed var(--line); text-align: left; vertical-align: top; }
.pmodal__specs th { width: 44%; padding-right: 16px; color: var(--muted); font-weight: 500; }
.pmodal__specs td { font-weight: 600; }
.pmodal__specs tr:last-child th, .pmodal__specs tr:last-child td { border-bottom: 0; }

/* «С этим товаром берут» */
.pmodal__related { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.pmodal__mini {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 0 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}
.pmodal__mini:hover { border-color: var(--blue); box-shadow: 0 8px 20px rgba(11,29,58,.1); }
.pmodal__mini img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--sky); margin-bottom: 4px; }
.pmodal__mini small { padding-inline: 10px; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); }
.pmodal__mini b { padding-inline: 10px; font-size: .88rem; line-height: 1.3; }

/* Телефон: окно на весь экран и листается целиком */
@media (max-width: 760px) {
  .pmodal { padding: 0; place-items: stretch; }
  .pmodal__window {
    width: 100%;
    max-height: none;
    height: 100%;
    flex-direction: column;
    overflow-y: auto;
    border-radius: 0;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .pmodal__close {
    position: fixed;
    top: calc(10px + env(safe-area-inset-top, 0px));
    right: 10px;
    background: var(--white);
    box-shadow: 0 4px 14px rgba(11,29,58,.2);
  }
  .pmodal__gallery { flex: none; padding: 16px 16px 12px; }
  .pmodal__info { flex: none; overflow: visible; padding: 8px 16px 28px; }
  .pmodal__type, .pmodal__title { padding-right: 0; }
  .pmodal__thumb { width: 72px; }
  .pmodal__buttons .btn { flex: 1 1 100%; }
}


/* ============================== 10б. КАК РАБОТАЕТ СТОЙКА ================= */
/* История при прокрутке. Два вида:
   • обычный (без класса story--live): собранная стойка и все пять шагов списком —
     так раздел выглядит без скрипта, при SETTINGS.animations: false и «уменьшить движение»;
   • живой (класс story--live ставит js/main.js, раздел 19): раздел высотой 420vh,
     внутри «прилипший» экран; скрипт пишет в переменные --ext (выдвижение трубы 0…1),
     --fine (подкрутка гайкой 0…1), --pin (штырь вынут), --p (сколько пролистано)
     и номер шага в data-step. */
.story {
  --ext: 1; --fine: 1; --pin: 0; --p: 1;
  position: relative;
  color: var(--white);
  background: radial-gradient(900px 560px at 18% 10%, var(--navy-2), var(--navy) 65%);
}
.story__sticky { position: relative; padding-block: 80px; }
.story__grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 48px; align-items: center; width: 100%; }
.story__visual { min-width: 0; display: grid; place-items: center; }
.story__svg { width: auto; max-width: 100%; height: min(72vh, 640px); overflow: visible; }
.story__text { min-width: 0; }

.story__steps { list-style: none; margin: 26px 0 28px; padding: 0; counter-reset: story; }
.story__step {
  counter-increment: story;
  position: relative;
  padding: 14px 0 14px 54px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.story__step::before {
  content: counter(story, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 17px;
  font: 500 .85rem var(--font-mono);
  color: var(--blue-soft);
}
.story__step b { display: block; font: 600 1.08rem var(--font-display); }
.story__step p { margin: 6px 0 0; max-width: 36em; color: var(--story-text); }

.story__progress { display: none; }

/* — цвета и линии схемы — */
.st-ground  { stroke: var(--blue-bright); stroke-opacity: .45; stroke-width: 2; fill: none; }
.st-tube-in { fill: var(--steel); }
.st-hole    { fill: var(--muted); }
.st-plate   { fill: var(--blue-soft); }
.st-tube-out { fill: var(--blue-bright); }
.st-thread  { stroke: var(--navy); stroke-opacity: .35; stroke-width: 2; fill: none; }
.st-nut     { fill: var(--accent-warm); }
.st-pin     { fill: var(--white); }
.st-fork    { stroke: var(--blue-soft); stroke-width: 6; stroke-linecap: round; fill: none; }
.st-wood    { fill: var(--wood); stroke: var(--wood-dark); stroke-width: 1.5; }
.st-ply     { fill: var(--wood-dark); }
.st-slab    { fill: var(--blue); }
.st-arrow   { stroke: var(--accent-warm); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.st-tripod  { stroke: var(--blue-soft); stroke-width: 7; stroke-linecap: round; fill: none; }
.st-hub     { fill: var(--navy); stroke: var(--blue-soft); stroke-width: 2; }
.st-dim     { stroke: var(--blue-soft); stroke-opacity: .7; stroke-width: 1.5; fill: none; }
.st-label   { font: 500 15px var(--font-mono); fill: var(--blue-soft); }
.st-label--big { font: 800 30px var(--font-display); fill: var(--white); }
.st-height  { font: 500 17px var(--font-mono); fill: var(--white); }

/* — движение частей (значения переменных задаёт скрипт) — */
.st-inner  { transform: translateY(calc(var(--ext) * -150px + var(--fine) * -12px)); }
.st-adjust { transform: translateY(calc(var(--fine) * -12px)); }
.st-pin    { transform: translateX(calc(var(--pin) * -44px)); transition: transform .3s ease; }  /* штырь вынимается влево, подпись справа не закрывает */
.st-from-4, .st-from-5, .st-label, .st-nut, .st-tube-in, .st-tube-out {
  transition: opacity .45s ease, transform .6s cubic-bezier(.2, .7, .2, 1), filter .3s;
}

/* ===== живой режим ===== */
.story--live { height: 420vh; }                  /* чем больше, тем дольше листать раздел */
.story--live .story__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  padding-block: calc(var(--header-h) + 12px) 28px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.story--live .story__svg { height: min(calc(100vh - var(--header-h) - 70px), 640px); }

/* текст: виден только активный шаг, остальные приглушены и свёрнуты */
.story--live .story__step { opacity: .36; transition: opacity .35s; }
.story--live .story__step p {
  max-height: 0;
  margin-top: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .45s ease, margin .35s, opacity .35s;
}
.story--live .story__step.is-active { opacity: 1; }
.story--live .story__step.is-active::before { color: var(--accent-warm); }
.story--live .story__step.is-active p { max-height: 9em; margin-top: 6px; opacity: 1; }

/* части, которые появляются позже: до своего шага спрятаны и чуть приподняты */
.story--live:not([data-step="4"]):not([data-step="5"]) .st-from-4,
.story--live:not([data-step="5"]) .st-from-5 { opacity: 0; transform: translateY(-26px); }

/* подписи на схеме: видны только на своём шаге */
.story--live .st-label { opacity: 0; }
.story--live[data-step="1"] .st-label--1,
.story--live[data-step="2"] .st-label--2,
.story--live[data-step="3"] .st-label--3,
.story--live[data-step="4"] .st-label--4,
.story--live[data-step="5"] .st-label--5 { opacity: 1; }

/* подсветка детали, о которой идёт речь */
.story--live[data-step="1"] .st-tube-in,
.story--live[data-step="1"] .st-tube-out { filter: drop-shadow(0 0 10px var(--blue-bright)); }
.story--live[data-step="2"] .st-pin { filter: drop-shadow(0 0 8px var(--white)); }
.story--live[data-step="3"] .st-nut { filter: drop-shadow(0 0 10px var(--accent-warm)); }

/* полоска пролистанного внизу экрана */
.story--live .story__progress {
  display: block;
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(255,255,255,.1);
}
.story--live .story__progress span {
  display: block;
  height: 100%;
  background: var(--accent-warm);
  transform: scaleX(var(--p));
  transform-origin: left;
}

@media (max-width: 900px) {
  .story__grid { grid-template-columns: 1fr; gap: 28px; }
  .story__svg { height: min(56vh, 520px); }
}
/* Телефон, живой режим: схема сверху, под ней только текущий шаг */
@media (max-width: 900px) {
  .story--live .story__sticky { align-items: stretch; padding-bottom: 76px; }
  .story--live .story__grid { grid-template-rows: minmax(0, 1fr) auto; gap: 12px; height: 100%; }
  .story--live .story__visual { min-height: 0; }
  .story--live .story__svg { height: 100%; max-height: 46svh; }
  .story--live .story__text h2 { font-size: 1.25rem; }
  .story--live .story__steps { margin: 12px 0 0; min-height: 9.5em; }
  /* неактивные шаги прячем, но оставляем в счёте — иначе номер шага всегда был бы «01» */
  .story--live .story__step:not(.is-active) { position: absolute; visibility: hidden; pointer-events: none; }
  .story--live .story__step { border-top: 0; padding-block: 4px; }
  /* схема на телефоне мелкая — подписи на ней делаем крупнее */
  .story--live .st-label { font-size: 27px; }
  .story--live .st-label--big { font-size: 40px; }
  .story--live .st-height { font-size: 30px; }
  .story--live .story__step::before { top: 7px; }
  .story--live .story__cta { display: none; }      /* внизу экрана уже есть кнопка «Заказать звонок» */
}


/* ============================== 11. ДОСТАВКА ============================= */
.delivery { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.delivery__text { display: grid; gap: 16px; min-width: 0; }
.delivery__text h2 { margin-bottom: 4px; }
.delivery__text p { margin: 0; color: var(--muted); max-width: 32em; }
.delivery__text .eyebrow { margin-bottom: -4px; }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.ticks li::before {
  content: "";
  flex: none;
  width: 9px; height: 9px;
  margin-top: 8px;
  background: var(--blue-bright);
  transform: rotate(45deg);
}

.delivery__table { min-width: 0; overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.zones { width: 100%; border-collapse: collapse; font-size: .95rem; }
.zones th, .zones td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--line); }
.zones th { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.zones tbody tr:last-child td { border-bottom: 0; }
.zones td:first-child { font-weight: 700; }
.zones td:last-child, .zones th:last-child { white-space: nowrap; }

@media (max-width: 900px) { .delivery { grid-template-columns: 1fr; gap: 32px; } }
/* На телефоне таблица доставки должна помещаться целиком: меньше отступы,
   последняя колонка («по запросу») может переноситься на две строки */
@media (max-width: 480px) {
  .zones { font-size: .9rem; }
  .zones th, .zones td { padding: 12px 10px; }
  .zones td:last-child, .zones th:last-child { white-space: normal; }
}


/* ============================== 11а. ГАЛЕРЕЯ ОБЪЕКТОВ ==================== */
/* Сетка фото: 3 в ряд на компьютере, 2 на планшете, 1 на телефоне */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery__item { margin: 0; display: grid; gap: 10px; align-content: start; min-width: 0; }
.gallery__item figcaption { font-weight: 600; font-size: .95rem; }

.gallery__open {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--sky);
  cursor: zoom-in;
}
.gallery__open img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;                /* фото обрежется по рамке 4:3 */
  transition: transform .35s ease;
}
.gallery__open:hover img { transform: scale(1.04); }

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

/* Окно просмотра фото поверх страницы */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: calc(64px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
           calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: rgba(6,18,38,.96);   /* тёмно-синий фон, почти непрозрачный */
  animation: lightbox-in .2s ease;
}
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }

/* Фото и подпись под ним — по центру экрана */
.lightbox__stage {
  margin: 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 170px);   /* для старых браузеров */
  max-height: calc(100dvh - 170px);  /* оставляем место под подпись и кнопку «закрыть» */
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--sky);
}
.lightbox__caption { color: var(--white); font-weight: 600; text-align: center; }

.lightbox__btn {
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  cursor: pointer;
  transition: background-color .2s;
}
.lightbox__btn:hover { background: var(--blue-bright); }
.lightbox__btn svg { width: 24px; height: 24px; fill: none; stroke: var(--white); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lightbox__close {
  position: absolute;
  top: calc(8px + env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
}

/* На телефоне стрелки прячем — листают свайпом */
@media (max-width: 600px) {
  .lightbox { grid-template-columns: 1fr; }
  .lightbox__prev, .lightbox__next { display: none; }
}

/* Пока открыто окно, страница под ним не прокручивается */
html.is-locked { overflow: hidden; }


/* ============================== 12. ПОЧЕМУ МЫ ============================ */
.reasons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.reason { display: grid; gap: 8px; align-content: start; padding-top: 18px; border-top: 3px solid var(--blue); }
.reason b { font: 600 1.05rem var(--font-display); }
.reason p { margin: 0; color: var(--muted); font-size: .95rem; }

@media (max-width: 900px) { .reasons { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .reasons { grid-template-columns: 1fr; } }


/* ============================== 13. ЭТАПЫ ================================ */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.steps li::before { content: counter(step, decimal-leading-zero); font: 500 .85rem var(--font-mono); color: var(--blue); }
.steps b { font-size: 1.05rem; }
.steps p { margin: 0; color: var(--muted); font-size: .93rem; }

@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }


/* ============================== 13а. ЧАСТЫЕ ВОПРОСЫ ====================== */
/* Раскрывающийся список: вопрос (summary) + ответ (.faq__a). Стрелка справа поворачивается. */
.faq { display: grid; gap: 12px; max-width: 920px; }

.faq__item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.faq__item:hover { border-color: var(--blue-soft); }
.faq__item[open] { border-color: var(--blue); box-shadow: 0 10px 28px rgba(11,29,58,.08); }

.faq__q {
  position: relative;
  display: block;
  padding: 20px 64px 20px 24px;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;                 /* убираем стандартный треугольник */
}
.faq__q::-webkit-details-marker { display: none; } /* (Safari) */

/* Голубой кружок справа … */
.faq__q::before {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 30px; height: 30px;
  margin-top: -15px;
  border-radius: 50%;
  background: var(--sky);
  transition: background-color .2s;
}
/* … и стрелка-«галочка» в нём (рисуется двумя сторонами рамки) */
.faq__q::after {
  content: "";
  position: absolute;
  right: 31px;
  top: 50%;
  width: 8px; height: 8px;
  margin-top: -6px;
  border-right: 2.5px solid var(--blue);
  border-bottom: 2.5px solid var(--blue);
  transform: rotate(45deg);
  transition: transform .3s ease, margin-top .3s ease;
}
.faq__item[open] > .faq__q::before { background: var(--line); }
.faq__item[open] > .faq__q::after { transform: rotate(225deg); margin-top: -2px; }
.faq__q:focus-visible { outline-offset: -3px; border-radius: var(--radius); }

.faq__a { padding: 0 24px 22px; color: var(--muted); }
.faq__a p { margin: 0; max-width: 46em; }
/* Ответ плавно проявляется при раскрытии */
.faq__item[open] > .faq__a { animation: faq-open .3s ease; }
@keyframes faq-open {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 480px) {
  .faq__q { padding: 16px 56px 16px 18px; font-size: 1rem; }
  .faq__q::before { right: 14px; }
  .faq__q::after { right: 25px; }
  .faq__a { padding: 0 18px 18px; }
}


/* ============================== 14. ФОРМА ЗВОНКА ========================= */
.callback { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.callback__text { display: grid; gap: 16px; min-width: 0; }
.callback__text > p { margin: 0; color: #b9c9e4; max-width: 30em; }

.contacts { margin: 16px 0 0; display: grid; gap: 14px; }
.contacts div { display: grid; gap: 2px; }
.contacts dt { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--blue-soft); }
.contacts dd { margin: 0; font-size: 1.08rem; font-weight: 600; }
.contacts a { text-decoration: none; }
/* мелкая приписка под адресом склада: «Приезжайте — покажем товар вживую» */
.contacts__note { display: block; margin-top: 4px; font-size: .88rem; font-weight: 500; color: var(--blue-soft); }

/* Кнопка «Открыть на карте» под контактами */
.btn--map { justify-self: start; padding: 12px 18px; }

/* «Как добраться»: три кнопки карт в ряд (на узком экране переносятся) */
.map-links__title { margin: 8px 0 -4px; font: 500 .74rem var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--blue-soft); }
.map-links { display: flex; flex-wrap: wrap; gap: 10px; }
.btn--map svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }

.form {
  position: relative;
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 32px;
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* скрытое поле-ловушка для спама */
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: .86rem; font-weight: 700; }
.field__hint { font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: 500 1rem var(--font-body);
  transition: border-color .2s, background-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); background: var(--white); outline: none; }
.field textarea { resize: vertical; min-height: 84px; }

/* Выпадающие списки: убираем стрелку браузера (она прижата к краю)
   и рисуем свою «галочку» с отступом 18 px от правого края */
.select { position: relative; display: block; }
.select select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 48px;                 /* место под стрелку, чтобы текст на неё не наезжал */
  cursor: pointer;
}
.select::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 8px; height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;                /* клик проходит сквозь стрелку в список */
  transition: border-color .2s;
}
.select:hover::after, .select:focus-within::after { border-color: var(--blue); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field__error { font-size: .82rem; color: var(--error); }
.field__error:empty { display: none; }

.form__consent { margin: 0; font-size: .8rem; color: var(--muted); }

/* Сообщение «Заявка отправлена» закрывает форму целиком */
.form__done {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 32px;
  text-align: center;
  border-radius: 14px;
  background: var(--white);
}
.form__done b { font: 800 1.4rem var(--font-display); }
.form__done p { margin: 0; color: var(--muted); }

/* Анимация успешной отправки: окно проявляется → рисуется круг → рисуется галочка →
   галочка чуть «подпрыгивает» → проявляется текст. Всего около 1,3 секунды.
   У кого в системе «уменьшить движение» — всё сразу видно без анимации. */
.form__done { justify-items: center; animation: done-fade .3s ease both; }
.done-check { width: 76px; height: 76px; margin-bottom: 10px; animation: done-pop .4s ease 1s both; }
.done-check__circle {
  fill: none;
  stroke: var(--blue-bright);
  stroke-width: 2.5;
  stroke-dasharray: 166;               /* длина круга */
  stroke-dashoffset: 0;
  transform: rotate(-90deg);           /* круг начинает рисоваться сверху */
  transform-origin: center;
  transform-box: fill-box;
  animation: done-draw-circle .75s cubic-bezier(.65, 0, .45, 1) .1s both;
}
.done-check__tick {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 34;                /* длина галочки */
  stroke-dashoffset: 0;
  animation: done-draw-tick .45s cubic-bezier(.65, 0, .45, 1) .7s both;
}
.form__done b, .form__done p { animation: done-text .5s ease 1s both; }
.form__done p { animation-delay: 1.1s; }

/* Через несколько секунд галочка плавно исчезает (время — SETTINGS.formDoneSeconds в main.js) */
.form__done.is-hiding { animation: done-out .35s ease forwards; }
@keyframes done-out         { to { opacity: 0; } }
@keyframes done-fade        { from { opacity: 0; } }
@keyframes done-draw-circle { from { stroke-dashoffset: 166; } }
@keyframes done-draw-tick   { from { stroke-dashoffset: 34; } }
@keyframes done-pop         { 50% { transform: scale(1.08); } }
@keyframes done-text        { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 900px) { .callback { grid-template-columns: 1fr; gap: 32px; } }
@media (max-width: 480px) {
  .form { padding: 22px; }
  .form__row { grid-template-columns: 1fr; }
}


/* ============================== 15. ПОДВАЛ =============================== */
.footer { background: #061226; color: #8798b6; font-size: .9rem; }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-block: 28px; }
.footer a { text-decoration: none; color: var(--white); }

/* Кнопка внизу экрана на телефонах */
.mobile-cta { display: none; }
@media (max-width: 600px) {
  .mobile-cta {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    display: block;
    padding: 16px max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: var(--blue-bright);
    color: var(--white);
    text-align: center;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 -6px 20px rgba(11,29,58,.2);
    transition: transform .25s;
  }
  .mobile-cta.is-hidden { transform: translateY(110%); }
  .footer { padding-bottom: 64px; } /* чтобы кнопка не закрывала подвал */
}


/* ============================== 15а. КНОПКА TELEGRAM ===================== */
/* Круглая кнопка в правом нижнем углу. Цвета берутся из переменных в начале файла.
   --tg-size — диаметр кнопки, --tg-gap — отступ от краёв экрана. */
.tg-fab {
  --tg-size: 58px;
  --tg-gap: 20px;
  position: fixed;
  right: calc(var(--tg-gap) + env(safe-area-inset-right, 0px));
  bottom: calc(var(--tg-gap) + env(safe-area-inset-bottom, 0px));
  z-index: 45;
  width: var(--tg-size);
  height: var(--tg-size);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--blue-bright);
  box-shadow: 0 10px 26px rgba(11,29,58,.28), inset 0 0 0 2px rgba(255,255,255,.18);
  text-decoration: none;
  transition: background-color .2s, transform .2s, bottom .25s;
}
.tg-fab:hover { background: var(--blue); transform: translateY(-2px); }

.tg-fab__icon { width: 28px; height: 28px; margin-left: -3px; } /* сдвиг: самолётик визуально по центру */
.tg-fab__body { fill: var(--white); }
.tg-fab__fold { fill: var(--blue-soft); }

/* Подпись «Написать в Telegram» — выезжает слева при наведении */
.tg-fab__label {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-size: .9rem;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(11,29,58,.22);
  opacity: 0;
  pointer-events: none;
  transform: translate(8px, -50%);
  transition: opacity .2s, transform .2s;
}
.tg-fab:hover .tg-fab__label,
.tg-fab:focus-visible .tg-fab__label { opacity: 1; transform: translate(0, -50%); }

/* На телефоне: кнопка стоит НАД нижней полосой «Заказать звонок».
   58px — примерная высота этой полосы. Когда полоса прячется (у формы),
   кнопка Telegram опускается на её место. */
@media (max-width: 600px) {
  .tg-fab {
    --tg-size: 54px;
    --tg-gap: 16px;
    bottom: calc(58px + var(--tg-gap) + env(safe-area-inset-bottom, 0px));
  }
  .mobile-cta.is-hidden ~ .tg-fab { bottom: calc(var(--tg-gap) + env(safe-area-inset-bottom, 0px)); }
}


/* ============================== 15а. ПОЯВЛЕНИЕ ПРИ ПРОКРУТКЕ ============= */
/* Разделы мягко проявляются, когда до них долистали (скрипт: js/main.js, раздел 15).
   Скорость — переменная --reveal-time в начале файла.
   Выключить совсем — в js/main.js поставьте SETTINGS.animations: false.
   Класс reveal-on ставит скрипт: если он не загрузится, всё сразу видно. */
/* плавным делаем только появление; скрытие при загрузке — мгновенное, без мигания */
.reveal-on .reveal { opacity: 0; }
.reveal-on .reveal.is-visible { opacity: 1; transition: opacity var(--reveal-time) ease; }

/* «Волна»: внутри раздела заголовок и карточки поднимаются снизу по очереди.
   Номер по порядку (--i) ставит скрипт; пауза между ними — --fx-step. */
.reveal-on .reveal .fx-item { opacity: 0; transform: translateY(26px); }
.reveal-on .reveal.is-visible .fx-item {
  opacity: 1;
  transform: none;
  transition: opacity .7s ease calc(var(--i, 0) * var(--fx-step)),
              transform .9s cubic-bezier(.2, .7, .2, 1) calc(var(--i, 0) * var(--fx-step));
}


/* ============================== 15г. ЖИВЫЕ ЭФФЕКТЫ ======================= */
/* Работают, только когда у <html> есть класс fx-on (ставит js/main.js, раздел 17,
   если SETTINGS.animations: true и у посетителя не включено «уменьшить движение»). */

/* 1. Тонкая полоса прочитанного под меню (заполняется при прокрутке) */
.fx-on .header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: var(--blue-bright);
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
  pointer-events: none;
}

/* 2. Свечение за курсором на первом экране */
.fx-on .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(520px circle at var(--mx, 75%) var(--my, 35%), var(--fx-glow), transparent 65%);
  pointer-events: none;
  transition: opacity .4s;
}

/* 3. Карточки товаров: наклон за курсором и блик, как по металлу (только мышь) */
@media (hover: hover) and (pointer: fine) {
  .fx-on .product { position: relative; will-change: transform; }
  .fx-on .product.is-tilting {
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px);
    transition: transform .12s ease-out, box-shadow .25s;
  }
  .fx-on .product::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(360px circle at var(--sx, 50%) var(--sy, 0%), var(--fx-shine), transparent 45%);
    opacity: 0;
    mix-blend-mode: soft-light;
    pointer-events: none;
    transition: opacity .3s;
  }
  .fx-on .product.is-tilting::after { opacity: 1; }
}

/* 4. «Как заказать»: по этапам по очереди пробегает синяя полоса 01 → 02 → 03 → 04 */
.fx-on .steps li { position: relative; overflow: hidden; }
.fx-on .steps li::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 4px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
}
.fx-on .reveal.is-visible .steps li::after {
  transform: scaleX(1);
  transition: transform .7s cubic-bezier(.6, 0, .2, 1) calc(.4s + var(--i, 0) * 350ms);
}

/* 5. Блик, пробегающий по синим кнопкам при наведении */
.fx-on .btn--primary { position: relative; overflow: hidden; }
.fx-on .btn--primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, var(--fx-shine), transparent);
  transform: skewX(-20deg) translateX(0);
  pointer-events: none;
}
.fx-on .btn--primary:hover::after { transform: skewX(-20deg) translateX(420%); transition: transform .8s ease; }


/* ============================== 15б. ЭКСПЕРИМЕНТ: LIQUID GLASS ============ */
/* «Жидкое стекло»: полупрозрачные элементы с размытием того, что под ними,
   светлой кромкой и бликом сверху. Работает, только когда у <html> есть класс glass-on
   (его ставит js/main.js, если SETTINGS.glass: true). Без класса сайт выглядит как обычно.
   Сравнить: добавьте к адресу ?glass=0 (без стекла) или ?glass=1 (со стеклом).
   Настройки силы размытия и цветов — переменные --glass-… в начале файла. */

/* Общий «рецепт» стекла: блик сверху + полупрозрачный цвет + размытие + кромка + тень */
.glass-on .header,
.glass-on .tg-fab,
.glass-on .mobile-cta,
.glass-on .carousel__arrow,
.glass-on .hero__facts,
.glass-on .pmodal__window,
.glass-on .pmodal__close,
.glass-on .pmodal__arrow,
.glass-on .lightbox__btn {
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
}

/* Шапка: тёмное стекло — при прокрутке сквозь неё размыто видна страница */
.glass-on .header {
  background: linear-gradient(180deg, var(--glass-sheen-soft), transparent 70%), var(--glass-dark);
  border-bottom: 1px solid var(--glass-edge);
  box-shadow: 0 8px 30px var(--glass-shade);
}
.glass-on body::before { background: var(--glass-dark); }   /* полоса под «чёлкой» телефона */

/* Телефоны и планшеты: шапка СПЛОШНАЯ, без стекла. Safari на iOS 26 красит прозрачную
   область за адресной строкой в цвет шапки, только если цвет сплошной; со стеклом
   за адресной строкой просвечивал текст страницы (см. GitHub issue #4) */
@media (max-width: 1120px) {
  .glass-on .header,
  .glass-on body::before { background: var(--navy); }
}

/* Раскрывающееся меню на телефоне остаётся сплошным: оно лежит внутри стеклянной шапки,
   а стекло внутри стекла не размывает страницу — текст меню читался бы плохо */
@media (max-width: 1120px) {
  .glass-on .nav { background: var(--navy-2); border-top-color: var(--glass-edge); }
}

/* Круглая кнопка Telegram: синее стекло с бликом */
.glass-on .tg-fab {
  background: linear-gradient(160deg, var(--glass-sheen), transparent 55%), var(--glass-blue);
  box-shadow: 0 10px 30px var(--glass-shade), inset 0 1px 0 var(--glass-edge), inset 0 0 0 1px var(--glass-edge);
}

/* Нижняя кнопка «Заказать звонок» на телефоне */
.glass-on .mobile-cta {
  background: linear-gradient(180deg, var(--glass-sheen), transparent 70%), var(--glass-blue);
  border-top: 1px solid var(--glass-edge);
}

/* Стрелки карусели и окна товара: светлое стекло */
.glass-on .carousel__arrow,
.glass-on .pmodal__arrow {
  background: linear-gradient(180deg, var(--glass-sheen), transparent 70%), var(--glass-light);
  border-color: var(--glass-edge);
  box-shadow: 0 8px 24px var(--glass-shade), inset 0 1px 0 var(--glass-edge);
}
/* При наведении — синий фон, как без стекла (иначе белая стрелка на светлом стекле не видна) */
@media (hover: hover) {
  .glass-on .carousel__arrow:hover,
  .glass-on .pmodal__arrow:hover { background: var(--blue); }
}

/* Три цифры на первом экране — стеклянная плашка поверх сетки «чертежа» */
.glass-on .hero__facts {
  padding: 22px 24px;
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--glass-sheen), transparent 60%), rgba(255, 255, 255, .06);
  box-shadow: 0 12px 32px var(--glass-shade);
}

/* Окно товара и окно фото «плавают» над размытой страницей */
.glass-on .pmodal,
.glass-on .lightbox {
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.glass-on .pmodal__window {
  background: linear-gradient(180deg, var(--glass-sheen-soft), transparent 40%), var(--glass-light);
  border: 1px solid var(--glass-edge);
}
.glass-on .pmodal__gallery { background: rgba(255, 255, 255, .45); }
.glass-on .pmodal__close {
  background: linear-gradient(180deg, var(--glass-sheen), transparent 70%), var(--glass-light);
  box-shadow: 0 6px 18px var(--glass-shade), inset 0 0 0 1px var(--glass-edge);
}
.glass-on .lightbox__btn {
  background: linear-gradient(180deg, var(--glass-sheen), transparent 70%), rgba(255, 255, 255, .14);
  box-shadow: inset 0 0 0 1px var(--glass-edge);
}

/* На телефоне окно товара на весь экран — стекло там не нужно (и иначе крестик
   «закрыть» уезжал бы при прокрутке) */
@media (max-width: 760px) {
  .glass-on .pmodal__window {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--white);
    border: 0;
  }
}

/* Старые браузеры без размытия: стекло делаем плотнее, чтобы текст читался */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass-on .header, .glass-on .nav { background: var(--navy); }
  .glass-on .pmodal__window { background: var(--white); }
}

/* У кого в системе включено «уменьшить прозрачность» — стекла нет */
@media (prefers-reduced-transparency: reduce) {
  .glass-on .header, .glass-on .nav { background: var(--navy); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .glass-on .pmodal__window { background: var(--white); }
}


/* ============================== 15в. ДИЗАЙН 2 ============================ */
/* Вариант в духе usesafewatch.com: первый экран во весь экран с большой картинкой,
   прозрачное меню поверх неё, сменяющееся слово в заголовке, жёлтый акцент.
   Работает, только когда у <html> есть класс design-2 (ставит js/main.js:
   ссылка ?design=2 или SETTINGS.design: 2). Без него сайт выглядит как обычно. */

/* Шапка: прозрачная поверх картинки, при прокрутке — тёмная (или стеклянная) */
.design-2 .header {
  position: fixed;
  left: 0;
  right: 0;
  transition: background-color .3s, box-shadow .3s, border-color .3s;
}
.design-2 .header:not(.is-scrolled) {
  background: transparent;
  border-bottom-color: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.design-2 body::before { background: transparent; }
/* Пункты меню — маленькие, ЗАГЛАВНЫМИ, с разрядкой */
@media (min-width: 1121px) {
  .design-2 .nav a { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
}

/* Первый экран во весь экран */
.design-2 .hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
}
/* Картинка на фоне. Своё фото: замените hero-bg.svg на hero-bg.jpg */
.design-2 .hero::before {
  content: "";
  position: absolute;
  inset: -12% 0 0;                     /* запас сверху для эффекта глубины при прокрутке */
  background: url("../img/hero-bg.svg") 70% 100% / cover no-repeat;
  transform: translate3d(0, var(--parallax, 0px), 0);
  will-change: transform;
}
/* Затемнение: слева плотное (под текстом), справа видно картинку */
.design-2 .hero::after {
  background-image: linear-gradient(90deg, var(--hero-shade) 0%, var(--hero-shade) 30%, var(--hero-shade-light) 78%);
  background-size: 100% 100%;          /* одно затемнение на весь экран (у обычного дизайна тут сетка 34 px) */
  -webkit-mask-image: none;
  mask-image: none;
}
.design-2 .hero__grid {
  width: 100%;
  grid-template-columns: 1fr;
  padding-block: calc(var(--header-h) + 72px) 56px;
}
.design-2 .hero__media { display: none; }      /* картинка справа не нужна — она на фоне */
.design-2 .hero__text { max-width: 780px; }
.design-2 .hero h1 { font-size: clamp(2.3rem, 5.6vw, 4.4rem); }
.design-2 .hero h1 em { color: inherit; }

/* Сменяющееся слово: жёлтое, с плавной сменой */
.design-2 .rotate {
  display: inline-block;
  color: var(--accent-warm);
  transition: opacity .35s ease, transform .35s ease;
}
.design-2 .rotate.is-out { opacity: 0; transform: translateY(-.25em); }
.design-2 .rotate.is-in { animation: rotate-in .45s ease both; }
@keyframes rotate-in {
  from { opacity: 0; transform: translateY(.35em); }
  to   { opacity: 1; transform: none; }
}

/* «Смотреть каталог» — круглая жёлтая кнопка со стрелкой и подпись рядом */
.design-2 .hero__buttons { align-items: center; gap: 28px; }
.design-2 .hero__buttons .btn--ghost {
  padding: 0;
  gap: 14px;
  box-shadow: none;
}
.design-2 .hero__buttons .btn--ghost::before {
  content: "↓";
  width: 54px; height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-warm);
  color: var(--navy);
  font-size: 1.3rem;
  font-weight: 800;
  transition: transform .2s;
}
.design-2 .hero__buttons .btn--ghost:hover::before { transform: translateY(3px); }

/* Телефон: затемнение сверху вниз, текст внизу экрана */
@media (max-width: 760px) {
  .design-2 .hero::before { background-position: 78% 100%; }
  .design-2 .hero::after {
    background-image: linear-gradient(180deg, var(--hero-shade-light) 0%, var(--hero-shade) 58%);
  }
  .design-2 .hero__buttons .btn--ghost { flex: 0 1 auto; }
}


/* ============================== 16. МЕНЬШЕ АНИМАЦИЙ ====================== */
/* Для тех, у кого в системе включено «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
