/* ==========================================================================
   style.css — оформление сайта «Термоклимат»

   Как читать этот файл:
   1. Переменные (:root) — цвета, шрифты, размеры. Меняете здесь — меняется везде.
   2. Базовые стили — для всех тегов сразу (body, h1, a...).
   3. Компоненты — кнопки, шапка, карточки. Имена классов по схеме
      «блок__элемент--вариант» (BEM): .pcard, .pcard__name, .btn--primary.
   4. В конце — правила для узких экранов (@media).
   ========================================================================== */

:root {
  /* Цвета */
  /* Палитра взята из логотипа: синий «ТЕРМО» и оранжевый «КЛИМАТ»,
     бледно-голубая снежинка и бледно-оранжевое солнце. */
  --ink: #1b2a3a;          /* основной текст */
  --ink-2: #4f6072;        /* второстепенный текст */
  --line: #dbe4ed;         /* линии и рамки */
  --bg: #ffffff;           /* фон страницы */
  --frost: #eef5fd;        /* «снежинка»: холодный фон секций */
  --sun: #fff5e6;          /* «солнце»: тёплый фон секций */
  --accent: #1473e0;       /* синий из логотипа: ссылки, иконки */
  --accent-dark: #0b5cbc;  /* он же при наведении и для мелкого текста */
  --warm: #f7960f;         /* оранжевый из логотипа: главные кнопки */
  --warm-dark: #e58300;    /* он же при наведении */
  --screen: #eef5fd;       /* дисплей пульта */
  --screen-text: #1473e0;  /* цифры на дисплее */
  --ok: #1d7a4c;
  --tg: #229ed9;           /* фирменный голубой Telegram */
  --max: #6f3ff5;          /* фиолетовый для MAX */
  --wa: #25d366;           /* зелёный WhatsApp */
  --error: #b3261e;

  /* Поверхности: карточки, формы, шапка. В тёмной теме они меняются. */
  --surface: #ffffff;
  --header-bg: rgba(255, 255, 255, .94);
  --footer-bg: #f4f8fc;
  --lead-bg: #1473e0;      /* фон блока с формой заявки */
  --photo-bg: #ffffff;     /* фон под фото товаров: у них белый фон */
  --field-border: #b9c7d3;
  --screen-border: #d3e4f8;
  --sun-border: #fbe1bb;
  --tag-bg: #e1eefd;
  --ok-bg: #e3f4ea;
  --error-bg: #fbe9e7;
  --on-warm: #1b2a3a;      /* текст на оранжевых кнопках — тёмный в обеих темах */
  --heat-text: #d57500;    /* цифры на пульте в режиме «Обогрев» */
  --warm-text: #a65a00;    /* тёмно-оранжевый для мелкого текста на тёплом фоне */
  color-scheme: light;

  /* Шрифты */
  --font-display: "Jost", "Century Gothic", "Segoe UI", sans-serif; /* тонкий геометрический, как буквы логотипа */
  --font-body: "Golos Text", "Segoe UI", Arial, sans-serif;

  /* Размеры */
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 28px;
}

/* ---------- Тёмная тема ----------
   Включается атрибутом data-theme="dark" у тега <html>. Его ставит маленький
   скрипт в base.html: по выбору человека или по настройке системы.
   Здесь переопределяем только цвета — всё остальное берётся из :root. */
:root[data-theme="dark"] {
  --ink: #e7eef5;
  --ink-2: #a3b3c3;
  --line: #2a3b4c;
  --bg: #0e1720;
  --frost: #122130;
  --sun: #231b11;
  --accent: #5aa6ff;
  --accent-dark: #8cc2ff;
  --warm-dark: #ffab3d;
  --screen: #0f1b27;
  --screen-text: #6fb2ff;
  --ok: #5fd08f;
  --error: #ff8a80;
  --surface: #15212c;
  --header-bg: rgba(14, 23, 32, .92);
  --footer-bg: #0a121a;
  --lead-bg: #123a68;
  --photo-bg: #e9eef3;
  --field-border: #3a4d60;
  --screen-border: #263b52;
  --sun-border: #3d2e18;
  --tag-bg: #183150;
  --ok-bg: #12301f;
  --error-bg: #3a1a17;
  --heat-text: #ffab3d;
  --warm-text: #ffb75a;
  color-scheme: dark;      /* тёмные полосы прокрутки и поля ввода от браузера */
}
/* Фото товаров на светлой подложке: белый фон картинки «растворяется» в подложке */
:root[data-theme="dark"] .pcard__img img,
:root[data-theme="dark"] .product__media img { mix-blend-mode: multiply; }
:root[data-theme="dark"] .pcard__img,
:root[data-theme="dark"] .product__media { background: var(--photo-bg); }

/* Логотип: светлая и тёмная версии, показываем нужную */
.logo__dark { display: none; }
:root[data-theme="dark"] .logo__light { display: none; }
:root[data-theme="dark"] .logo__dark { display: block; }

/* ---------- Базовые стили ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }   /* height: auto — пропорции берутся из width/height в HTML */

/* Атрибут hidden должен прятать элемент, даже если у класса задан display */
[hidden] { display: none !important; }

h1, h2, h3 { margin: 0 0 .6em; line-height: 1.15; font-weight: 700; }
h1, h2 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.005em; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2, .h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
h3, .h3 { font-size: 1.12rem; font-family: var(--font-body); font-weight: 600; }
p { margin: 0 0 1em; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }

/* Видимая рамка фокуса для тех, кто ходит по сайту с клавиатуры */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--ink-2); }
.small { font-size: .9rem; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

.ico { flex: none; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 24px;
  border: 2px solid transparent; border-radius: 10px;
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--warm); color: var(--on-warm); }   /* тёмный текст: белый на оранжевом плохо читается */
.btn--primary:hover { background: var(--warm-dark); color: var(--on-warm); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--wide { width: 100%; }

.link { font-weight: 600; }

/* ---------- Шапка ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
/* Полоска над шапкой — два цвета логотипа: синий «ТЕРМО» и оранжевый «КЛИМАТ» */
.header::before { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--accent) 50%, var(--warm) 50%); }
.header__row { display: flex; align-items: center; gap: 28px; min-height: 88px; }

.logo { display: block; flex: none; }
.logo img { height: 76px; width: auto; }      /* ширина подстроится сама по пропорциям */
.logo--footer img { height: 84px; }

.nav { display: flex; gap: 22px; margin-right: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .97rem; padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { border-color: var(--accent); }

.header__contact { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.header__phone { font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.header__hours { font-size: .82rem; color: var(--ink-2); white-space: nowrap; }

/* Круглые кнопки мессенджеров в шапке — в пару к переключателю темы */
.header__msgs { display: flex; gap: 8px; flex: none; }
.round-btn {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--accent); transition: border-color .15s, background-color .15s;
}
.round-btn:hover { border-color: var(--accent); background: var(--frost); }

/* Кнопки мессенджеров (в форме заявки, на странице товара, в контактах) */
.msgs { display: flex; flex-wrap: wrap; gap: 10px; }
.msg {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font-weight: 600; text-decoration: none; transition: border-color .15s;
}
.msg .ico { color: var(--accent); }
/* Значок мессенджера — в цветном кружке фирменного цвета */
.msg__ico { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; margin-left: -6px; color: #fff; }
.msg__ico .ico { color: #fff; }
.msg--tg .msg__ico { background: var(--tg); }
.msg--max .msg__ico { background: var(--max); --msg-ink: var(--max); }
.msg--wa .msg__ico { background: var(--wa); --msg-ink: var(--wa); }
.round-btn--wa { color: var(--wa); --msg-ink: var(--surface); }
.round-btn--wa:hover { border-color: var(--wa); }
.msg--max .msg__ico .ico { --msg-ink: var(--max); }
.round-btn--tg { color: var(--tg); }
.round-btn--max { color: var(--max); --msg-ink: var(--surface); }
.round-btn--tg:hover { border-color: var(--tg); }
.round-btn--max:hover { border-color: var(--max); }
.msg:hover { border-color: var(--accent); color: var(--ink); }
.msgs--light { margin-top: 20px; }
.msgs--light .msg { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .35); color: #fff; }
.msgs--light .msg .ico { color: #fff; }
.msgs--light .msg__ico { background: #fff; }
.msgs--light .msg--tg .msg__ico .ico { color: var(--tg); }
.msgs--light .msg--max .msg__ico .ico { color: var(--max); --msg-ink: #fff; }
.msgs--light .msg--wa .msg__ico .ico { color: var(--wa); --msg-ink: #fff; }
.msgs--light .msg:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.buy .msgs { margin: -6px 0 18px; }

/* Кнопка смены темы */
.theme-toggle {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; transition: border-color .15s, color .15s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle__to-light { display: none; color: var(--warm); }
:root[data-theme="dark"] .theme-toggle__to-dark { display: none; }
:root[data-theme="dark"] .theme-toggle__to-light { display: block; }

.burger { display: none; width: 44px; height: 44px; border: 0; background: none; padding: 10px; cursor: pointer; }
.burger span { display: block; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s, opacity .2s; }

/* ---------- Первый экран и пульт-калькулятор ---------- */
.hero { position: relative; overflow: hidden; overflow: clip;   /* clip — обрезает и не даёт прокрутить блок вбок */
  padding: clamp(40px, 7vw, 88px) 0; background: var(--frost); transition: background-color .6s ease; }
.hero__grid { position: relative; }

/* Режим «Обогрев»: первый экран теплеет */
.hero[data-mode="heat"] { background: var(--sun); }
.hero[data-mode="heat"] .remote__screen { background: var(--sun); border-color: var(--sun-border); }
.hero[data-mode="heat"] .remote__digits, .hero[data-mode="heat"] .remote__unit, .hero[data-mode="heat"] .remote__sub b { color: var(--heat-text); }
.remote__screen, .remote__digits { transition: background-color .6s, border-color .6s, color .6s; }

/* Подписи для двух режимов: видна только нужная */
.only-heat { display: none; }
[data-mode="heat"] .only-heat { display: revert; }
[data-mode="heat"] .only-cool { display: none; }

/* Кондиционер над пультом и поток воздуха из него.
   --air — цвет потока: голубой при охлаждении, оранжевый при обогреве. */
.hero { --air: var(--accent); }
.hero[data-mode="heat"] { --air: var(--warm); }
.hero__text { position: relative; z-index: 1; }      /* текст поверх потока воздуха */
.hero__side { position: relative; display: flex; flex-direction: column; align-items: flex-end; }
.hero__side .remote { position: relative; z-index: 1; }

.unit { position: relative; width: min(100%, 400px); margin: -12px 0 44px;
  container-type: inline-size; }   /* cqw ниже — проценты от ширины кондиционера */
.unit__body { position: relative; z-index: 2; display: block; width: 100%; height: auto; overflow: visible;
  filter: drop-shadow(0 18px 24px var(--unit-shadow)); }
.unit__case { fill: var(--unit-case); stroke: var(--unit-edge); stroke-width: 1.5; }
.unit__seam { stroke: var(--unit-edge); stroke-width: 1.2; opacity: .8; }
.unit__front { fill: var(--unit-front); }
.unit__slot { fill: var(--unit-slot); }
.unit__louver { fill: var(--unit-case); stroke: var(--unit-edge); stroke-width: 1.2;
  transform-box: fill-box; transform-origin: 50% 0;
  transition: transform .9s cubic-bezier(.3, .8, .3, 1); }
/* Шторка открывается: в охлаждении чуть-чуть, в обогреве — сильнее (воздух вниз) */
.hero[data-mode="cool"] .unit__louver { transform: translateY(5px) scaleY(1.5); }
.hero[data-mode="heat"] .unit__louver { transform: translateY(6px) scaleY(1.9); }
.unit__led { fill: #2fd27a; filter: drop-shadow(0 0 4px #2fd27a); }
.unit__icon { fill: none; stroke: var(--air); stroke-width: 2.4; stroke-linecap: round; transition: stroke .6s; }

/* Поток воздуха: от шторки влево-вниз, за текстом первого экрана */
/* Поток рисуется в том же масштабе, что и кондиционер, и привязан к его шторке:
   рисунок кондиционера — 420 единиц в ширину, рисунок потока — 1100, шторка — на высоте 88.
   Поэтому ширина потока = 1100/420 ширины кондиционера, а верх — 88/420 его ширины.
   Так поток выходит ровно из-под шторки при любом размере экрана. */
.air { position: absolute; z-index: 0; right: 0; top: 20.95cqw; width: 261.9cqw; height: auto; aspect-ratio: 1100 / 600;
  max-width: none; overflow: visible; pointer-events: none;
  /* поток виден у кондиционера и растворяется, не доходя до текста */
  -webkit-mask-image: radial-gradient(130% 105% at 85% 0%, #000 30%, transparent 78%);
          mask-image: radial-gradient(130% 105% at 85% 0%, #000 30%, transparent 78%); }
.air__line { fill: none; stroke: var(--air); stroke-width: 1.5; opacity: .14; transition: stroke .6s; }
.air__flow { fill: none; stroke: var(--air); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1 17;
  opacity: .45; transition: stroke .6s;
  animation: air-flow 2.6s linear infinite; animation-delay: calc(var(--n) * -.45s); }
@keyframes air-flow { to { stroke-dashoffset: -180; } }
.hero.is-offscreen .air__flow { animation-play-state: paused; }   /* первый экран не виден — поток стоит */
.air__flake { fill: none; stroke: var(--air); stroke-width: 1.8; stroke-linecap: round; opacity: 0; }
.air__spark { fill: var(--air); opacity: 0; filter: drop-shadow(0 0 6px var(--warm)); }

/* При смене режима новый поток «выдувается» из шторки: линии прорисовываются от начала */
.air__set .air__line, .air__set .air__flow { animation-name: air-flow, air-draw; animation-duration: 2.6s, 1.4s;
  animation-timing-function: linear, cubic-bezier(.3, .7, .3, 1); animation-iteration-count: infinite, 1;
  animation-fill-mode: none, both; animation-delay: calc(var(--n) * -.45s), calc(.15s + var(--n) * .08s); }
.air__set .air__line { animation-name: none, air-draw; }
@keyframes air-draw { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }

/* Цвета блока для светлой и тёмной темы */
:root { --unit-case: #ffffff; --unit-front: #f3f7fb; --unit-edge: #d3dfeb; --unit-slot: #2a3e53; --unit-shadow: rgba(20, 80, 150, .18); }
:root[data-theme="dark"] { --unit-case: #1d2c3c; --unit-front: #192736; --unit-edge: #34485e; --unit-slot: #070d13; --unit-shadow: rgba(0, 0, 0, .45); }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); max-width: 15ch; text-wrap: balance; }
.hero__lead { font-size: 1.18rem; color: var(--ink-2); max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 36px; }

.hero__facts { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 0; }
.hero__facts dt { font-size: .88rem; color: var(--ink-2); }
.hero__facts dd { margin: 0; font: 600 1.3rem var(--font-display); }

/* Пульт: белый корпус, светлый «снежный» дисплей с тонкими синими цифрами */
.remote {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -30px rgba(20, 115, 224, .35);
  max-width: 420px; justify-self: end; width: 100%;
}
.remote__screen {
  background: var(--screen); color: var(--screen-text);
  border: 1px solid var(--screen-border);
  border-radius: 16px; padding: 18px 20px 16px;
  margin-bottom: 22px;
}
/* Переключатель режима — две кнопки, как на пульте */
.remote__modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; margin-bottom: 14px;
  border-radius: 12px; background: var(--frost); }
.remote__mode {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px;
  border: 0; border-radius: 9px; background: transparent; color: var(--ink-2);
  font: 500 .95rem var(--font-body); cursor: pointer; transition: background-color .3s, color .3s, box-shadow .3s;
}
.remote__mode[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px -2px rgba(20, 60, 110, .2); }
:root[data-theme="dark"] .remote__mode[aria-pressed="true"] { background: #26394f; box-shadow: none; }
.remote__mode[data-mode="cool"] .ico { color: var(--accent); }
.remote__mode[data-mode="heat"] .ico { color: var(--warm); }
.remote__state { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--ink-2); }
.remote__state .ico { color: var(--accent); }
[data-mode="heat"] .remote__state .ico { color: var(--warm); }
.remote__main { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 2px; }
.remote__digits {
  font: 300 clamp(4rem, 10vw, 5.8rem)/1 var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.remote__unit { font: 400 1.4rem var(--font-display); }
.remote__sub { margin: 0; font-size: .95rem; color: var(--ink-2); }
.remote__sub b { font-weight: 600; color: var(--screen-text); }

.remote__label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 8px; }
.remote__controls { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.remote__btn {
  width: 48px; height: 48px; flex: none;
  border-radius: 50%; border: 1px solid var(--line); background: var(--frost);
  font: 500 1.5rem/1 var(--font-body); color: var(--ink); cursor: pointer;
}
.remote__btn:hover { border-color: var(--ink); }
.remote__btn:active { transform: scale(.94); }

/* Ползунок от синего к оранжевому — как «ТЕРМО» → «КЛИМАТ» в логотипе */
.remote__range { flex: 1; appearance: none; height: 8px; border-radius: 8px; cursor: pointer;
  background: linear-gradient(90deg, var(--accent), #7fb4ef 50%, var(--warm)); }
.remote__range::-webkit-slider-thumb { appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--surface); border: 3px solid var(--ink); }
.remote__range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 3px solid var(--ink); }
.remote__note { font-size: .82rem; color: var(--ink-2); margin: 12px 0 0; }

/* ---------- Секции ---------- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section--tight { padding: clamp(28px, 4vw, 44px) 0; }
.section--tint { background: var(--frost); }
.section--warm { background: var(--sun); }
.section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.section__head h2 { margin: 0; }

.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.split--even { grid-template-columns: 1fr 1fr; margin-top: 48px; }

/* Типы кондиционеров — список строк, а не плитки */
.types { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
.type {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 18px; align-items: center;
  padding: 20px 4px; border-top: 1px solid var(--line);
  text-decoration: none; color: var(--ink);
}
.type__icon { color: var(--accent); display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; background: var(--frost); }
.type__title { display: block; font-weight: 600; font-size: 1.08rem; }
.type__text { display: block; color: var(--ink-2); font-size: .93rem; }
.type__meta { text-align: right; font-size: .88rem; color: var(--ink-2); white-space: nowrap; }
.type:hover .type__title { color: var(--accent); }
.type:hover .type__icon { background: var(--accent); color: #fff; }

/* Преимущества */
.pros { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.pros li { border-top: 3px solid var(--warm); padding-top: 16px; }
.pros p { color: var(--ink-2); margin: 0; }
.pros--stack { grid-template-columns: 1fr; gap: 24px; margin: 0; }

/* Этапы — настоящая последовательность, поэтому с номерами */
.steps { list-style: none; counter-reset: step; margin: 8px 0 24px; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 22px 60px; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -4px;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font: 500 1.1rem var(--font-display);
  color: var(--accent); border: 2px solid var(--accent); background: var(--surface);
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 40px; bottom: 2px; width: 2px; background: var(--line); }
.steps h3 { margin-bottom: .25em; }
.steps p { color: var(--ink-2); margin: 0; }

/* Таблица цен */
.pricebox { background: var(--sun); border: 1px solid var(--sun-border); border-radius: var(--r-md); padding: 28px; }
.pricebox__note { color: var(--ink-2); font-size: .92rem; margin: 16px 0 12px; }
.ptable { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ptable th { text-align: left; font-weight: 500; font-size: .85rem; padding: 0 8px 10px 0; color: var(--ink-2); }
.ptable td { padding: 12px 8px 12px 0; border-top: 1px solid rgba(27, 42, 58, .1); }
.ptable td:last-child, .ptable th:last-child { text-align: right; padding-right: 0; white-space: nowrap; }
.ptable--wide { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.ptable--wide th { padding: 16px 20px; background: var(--frost); }
.ptable--wide td { padding: 16px 20px; border-top: 1px solid var(--line); }
.ptable--wide td:nth-child(n+3) { font-weight: 600; text-align: right; }
.ptable--wide th:nth-child(n+3) { text-align: right; width: 22%; }
/* у широкой таблицы последняя колонка с таким же отступом от рамки, как первая */
.ptable--wide td:last-child, .ptable--wide th:last-child { padding-right: 20px; }
.ptable__sub { display: none; font-size: .85rem; color: var(--ink-2); }

/* Работы */
.works { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.works--all { grid-template-columns: repeat(3, 1fr); gap: 32px; }
/* Обложка работы — это кнопка: по клику открывается просмотр всех фото */
.work__photo {
  position: relative; display: block; width: 100%; padding: 0; margin-bottom: 14px;
  border: 0; border-radius: var(--r-sm); overflow: hidden; background: var(--line); cursor: zoom-in;
}
.work__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.work__photo:hover img { transform: scale(1.04); }
.work__count {
  position: absolute; right: 10px; bottom: 10px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(15, 25, 35, .72); color: #fff; font-size: .82rem; font-weight: 500;
}

.section__lead { color: var(--ink-2); max-width: 60ch; margin: -6px 0 28px; }

/* «До и после»: фото «до» лежит сверху и обрезается слева направо по --pos */
.ba-list { display: grid; grid-template-columns: repeat(2, minmax(0, 440px)); gap: 32px; }   /* фото вертикальные — карточки не шире 440 px */
.ba-item { margin: 0; }
.ba-item h3 { margin: 16px 0 .3em; }
.ba-item p { color: var(--ink-2); margin: 0; }
.ba-item .ba-item__soon { margin-top: 8px; font-size: .85rem; color: var(--warm-text); }
.ba { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-md); overflow: hidden; background: var(--line); user-select: none; }
.ba__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba__before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__label {
  position: absolute; top: 12px; padding: 4px 12px; border-radius: 999px;
  background: rgba(15, 25, 35, .7); color: #fff; font-size: .85rem; font-weight: 500; pointer-events: none;
}
.ba__label--before { left: 12px; }
.ba__label--after { right: 12px; }
/* Вертикальная линия с ручкой */
.ba__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; translate: -50% 0; background: #fff; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.ba__handle::after {
  content: "‹ ›"; position: absolute; top: 50%; left: 50%; translate: -50% -50%;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--warm); color: var(--on-warm); font: 600 1.1rem/1 var(--font-body); letter-spacing: 2px;
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, .35);
}
/* Настоящий ползунок прозрачный и растянут на всё фото — им удобно управлять и мышью, и пальцем, и стрелками */
.ba__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ba:focus-within .ba__handle::after { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Наши мастера */
/* ---------- Видео с объектов ----------
   Тёмная полоса в обеих темах — видео на тёмном фоне смотрится как в кинотеатре.
   Карточки вертикальные (9:16), как «истории» в соцсетях. */
.section--dark { background: #0f1b28; color: #e9f0f7; }
.section--dark h2 { color: #fff; }
.section--dark .section__lead { color: #a9bccf; }
.link--light { color: #8fc3ff; }
.reels { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.reel {
  position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; padding: 0; border: 0;
  border-radius: 20px; overflow: hidden; background: #1c2a3a; cursor: pointer; color: #fff; text-align: left;
  box-shadow: 0 24px 40px -24px rgba(0, 0, 0, .7);
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s;
}
.reel:hover { transform: translateY(-6px); box-shadow: 0 34px 50px -26px rgba(0, 0, 0, .8); }
.reel:focus-visible { outline: 3px solid var(--warm); outline-offset: 3px; }
.reel__poster, .reel__preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel__preview { opacity: 0; transition: opacity .4s; }
.reel.is-previewing .reel__preview { opacity: 1; }
.reel__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(6, 14, 24, .88) 0%, rgba(6, 14, 24, .2) 45%, transparent 70%); }
.reel__play {
  position: absolute; left: 50%; top: 42%; translate: -50% -50%; display: grid; place-items: center;
  width: 64px; height: 64px; border-radius: 50%; color: #fff; padding-left: 4px;
  background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .45);
  backdrop-filter: blur(6px); transition: transform .3s, background-color .3s, opacity .3s;
}
.reel:hover .reel__play { transform: scale(1.1); background: var(--warm); border-color: var(--warm); }
.reel.is-previewing .reel__play { opacity: 0; }
.reel__time { position: absolute; top: 12px; right: 12px; font-size: .8rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(6, 14, 24, .6); }
.reel__text { position: absolute; left: 16px; right: 16px; bottom: 16px; display: grid; gap: 4px; }
.reel__text b { font: 500 1.15rem/1.2 var(--font-display); }
.reel__text span { font-size: .86rem; color: #c9d6e3; line-height: 1.35; }

/* Плеер — окно поверх страницы */
.player { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; }
.player::backdrop { background: rgba(4, 10, 18, .9); }
.player[open] { display: grid; place-items: center; }
.player__box { display: grid; gap: 12px; justify-items: center; }
.player__video { height: min(84vh, 900px); aspect-ratio: 9 / 16; max-width: 94vw; border-radius: 16px; background: #000; }
.player__title { margin: 0; color: #fff; font-weight: 600; }
.player[open] .player__box { animation: rise .4s cubic-bezier(.2, .7, .2, 1) both; }

/* Страница «О нас»: текст о компании и фото автомобиля */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.about__text { max-width: 60ch; }
.about__text p { color: var(--ink-2); font-size: 1.06rem; }
.about__facts { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 28px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.about__facts dt { font-size: .88rem; color: var(--ink-2); }
.about__facts dd { margin: 0; font: 600 1.25rem var(--font-display); }
.car { margin: 0; }
.car__photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-lg); background: var(--frost); }
.car figcaption { padding: 16px 4px 0; }
.car h3 { margin: 0 0 .3em; }
.car p { margin: 0; color: var(--ink-2); }

.team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.member__photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-md); background: var(--frost); margin-bottom: 14px; }
.member h3 { margin-bottom: .2em; }
.member__role { color: var(--accent-dark); font-weight: 500; margin: 0 0 .4em; }
.member p { color: var(--ink-2); font-size: .95rem; margin: 0; }
.member .member__years { margin-top: 8px; color: var(--ink); font-weight: 500; }

/* Окно просмотра фото */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: rgba(8, 14, 20, .9); color: #fff;
  backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .25s, overlay .25s allow-discrete, display .25s allow-discrete;
}
.lightbox[open] { opacity: 1; display: grid; place-items: center; }
@starting-style { .lightbox[open] { opacity: 0; } }   /* с чего начинается анимация открытия */
.lightbox::backdrop { background: transparent; }
.lightbox__figure { margin: 0; display: grid; justify-items: center; gap: 12px; padding: 56px 72px; }
.lightbox__img {
  max-width: min(1100px, 100%); max-height: calc(100dvh - 160px); border-radius: var(--r-sm);
  opacity: 0; transform: scale(.97); transition: opacity .3s, transform .3s;
}
.lightbox__img.is-shown { opacity: 1; transform: none; }
.lightbox__caption { font-size: .95rem; color: #cfd9e3; text-align: center; }
.lightbox__counter { color: #8fa3b6; margin-left: 8px; }
.lightbox__btn {
  position: fixed; display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, .18); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 16px; top: 50%; translate: 0 -50%; }
.work h3 { margin-bottom: .3em; }
.work p { color: var(--ink-2); font-size: .95rem; margin: 0; }
.work .work__place { color: var(--accent-dark); font-weight: 500; margin-bottom: .3em; }
.car__btn { margin: 0; border-radius: var(--r-lg); }
.car__btn .car__photo { border-radius: 0; }

/* Решения по типам помещений */
.solutions { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; }
.solutions a { display: block; padding: 18px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.solutions a:hover h3 { color: var(--accent); }
.solutions h3 { margin-bottom: .2em; }
.solutions p { color: var(--ink-2); margin: 0; font-size: .95rem; }
.brands { margin: 32px 0 0; color: var(--ink-2); }
.brands span { color: var(--ink); font-weight: 600; }

/* Вопросы-ответы на нативных <details> — работает даже без JavaScript */
.faq-wrap { display: grid; grid-template-columns: .7fr 1.3fr; gap: 48px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; gap: 16px;
  padding: 18px 0; font-weight: 600; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.6rem/1 var(--font-body); color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-2); max-width: 62ch; margin: -4px 0 20px; }
.faq--page { max-width: 820px; }

/* ---------- Форма заявки ---------- */
.lead { padding: clamp(48px, 7vw, 88px) 0; }
.lead--dark { background: var(--lead-bg); color: #fff; }   /* синий из логотипа */
.lead__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.lead__text p { color: #e2eefc; max-width: 30em; }
.lead:not(.lead--dark) .lead__text p { color: var(--ink-2); }
.lead__phones { list-style: none; padding: 0; margin: 24px 0 0; }
.lead__phones a { font: 500 1.5rem var(--font-display); color: inherit; text-decoration: none; }
.lead__phones li + li { margin-top: 6px; }

.form { background: var(--surface); color: var(--ink); border-radius: var(--r-md); padding: clamp(20px, 3vw, 32px); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form__hint { font-size: .8rem; color: var(--ink-2); margin: 12px 0 0; }
.form__msg { padding: 12px 14px; border-radius: var(--r-sm); margin-bottom: 16px; font-weight: 500; }
.form__msg--success { background: var(--ok-bg); color: var(--ok); }
.form__msg--error { background: var(--error-bg); color: var(--error); }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 6px; }
.field em { font-style: normal; font-weight: 400; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  font: inherit; color: var(--ink);
  border: 1px solid var(--field-border); border-radius: var(--r-sm); background: var(--surface);
}
.field textarea { resize: vertical; }
/* Своя стрелка у выпадающих списков: стандартная прилипает к краю поля.
   Рисуем галочку SVG-картинкой с отступом 16px справа и оставляем место под неё. */
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  padding-right: 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none' stroke='%237a8a9a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 14px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(20, 115, 224, .2); }

.trap { position: absolute; left: -9999px; }

.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.check em { display: block; font-style: normal; font-size: .85rem; color: var(--ink-2); }

/* ---------- Внутренние страницы ---------- */
.phead { background: var(--frost); padding: 28px 0 40px; }
.phead--product { padding: 20px 0 4px; background: none; }
.phead h1 { margin-bottom: .35em; max-width: 30ch; text-wrap: balance; }
.phead__lead { font-size: 1.12rem; color: var(--ink-2); max-width: 46em; margin: 0; }

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .9rem; margin-bottom: 18px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs a + a::before { content: "/"; margin-right: 6px; color: var(--line); }

.prose { max-width: 62ch; }
.prose h2 { font-size: 1.4rem; margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--ink-2); }

.ticks { padding-left: 1.2em; margin: 0 0 1em; color: var(--ink-2); }
.ticks li + li { margin-top: 8px; }
.ticks--icons { list-style: none; padding: 0; }
.ticks--icons li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); margin: 0; color: var(--ink); }
.ticks--icons .ico { color: var(--accent); margin-top: 3px; }

.alert { background: var(--sun); border-left: 4px solid var(--warm); padding: 18px 20px; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 24px 0; }
.alert ul { margin: 0; padding-left: 1.2em; }

/* ---------- Каталог ---------- */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 28px; scrollbar-width: thin; }
.tabs a {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .95rem;
}
.tabs a .ico { color: var(--accent); }
.tabs a:hover { border-color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.tabs a[aria-current="page"] .ico { color: #fff; }

.catalog { display: grid; grid-template-columns: 270px 1fr; gap: 40px; align-items: start; }
.filters { position: sticky; top: 112px; background: var(--frost); border-radius: var(--r-md); padding: 22px; }
.filters__title { font: 500 1.35rem var(--font-display); margin-bottom: 16px; list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.filters__title::-webkit-details-marker { display: none; }
.filters__title::after { content: "+"; font: 400 1.5rem/1 var(--font-body); color: var(--accent); display: none; }
.filters__box:not([open]) .filters__title { margin-bottom: 0; }
.filters__on { font: 500 .8rem var(--font-body); color: var(--accent-dark); margin-right: auto; }
.filters__hint { font-size: .85rem; color: var(--ink-2); margin: -8px 0 16px; }
.filters .link { display: block; text-align: center; margin-top: 12px; font-size: .92rem; }
.catalog__count { color: var(--ink-2); margin-bottom: 4px; }
.catalog__note { color: var(--ink-2); font-size: .875rem; margin-bottom: 16px; }

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

.pcard { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; transition: border-color .15s; }
.pcard:hover { border-color: var(--accent); }
.pcard__img { display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 6px;   /* отступы уже есть в самих фото */ background: var(--photo-bg); border-bottom: 1px solid var(--line); }
.pcard__img img { max-height: 100%; object-fit: contain; }
.pcard__body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.pcard__brand { font-size: .82rem; color: var(--ink-2); margin: 0 0 4px; }
.pcard__name { font-size: 1rem; line-height: 1.3; margin: 0 0 10px; word-break: break-word; }
.pcard__name a { color: var(--ink); text-decoration: none; }
.pcard__name a::after { content: ""; position: absolute; inset: 0; } /* вся карточка кликабельна */
.pcard { position: relative; }
.pcard__facts { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.pcard__facts li { font-size: .82rem; padding: 3px 9px; border-radius: 6px; background: var(--frost); color: var(--ink); }
/* Значки: «Тихий», «Греет в мороз», «Инвертор» */
.badges { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.badge--quiet { background: var(--tag-bg); color: var(--accent-dark); }
.badge--inverter { background: var(--frost); color: var(--ink-2); border: 1px solid var(--line); }
.badge--winter { background: var(--sun); color: var(--warm-text); border: 1px solid var(--sun-border); }
.badge--new { background: var(--lead-bg); color: #fff; border: 1px solid var(--lead-bg); }
/* На странице товара — крупнее и с пояснением */
.badges--big { gap: 10px; margin: 4px 0 0; }
.badges--big .badge { padding: 10px 14px; border-radius: var(--r-sm); font-size: .95rem; }
.badges--big .badge span { display: block; font-weight: 400; font-size: .82rem; color: var(--ink-2); margin-top: 2px; }
.badges--big .badge--new span { color: rgba(255, 255, 255, .85); }
.pcard__price { margin: auto 0 0; font: 600 1.35rem var(--font-display); }
.pcard__price .muted { font: 500 .95rem var(--font-body); }

.empty { border: 1px dashed var(--field-border); border-radius: var(--r-md); padding: 32px; }
.empty p { max-width: 50ch; color: var(--ink-2); }

.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 32px; }
.pager a { min-width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 500; }
.pager a:hover { border-color: var(--ink); }
.pager a[aria-current="page"] { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Страница товара ---------- */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.product__media { background: var(--photo-bg); border: 1px solid var(--line); border-radius: var(--r-md); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: 32px; position: sticky; top: 112px; overflow: hidden; }
.product__media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.product__brand { color: var(--ink-2); margin-bottom: 6px; }
.product__name { font-size: clamp(1.6rem, 3vw, 2.3rem); max-width: none; word-break: break-word; }
.product__type { color: var(--ink-2); }

.keyfacts { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; margin: 24px 0; }
.keyfacts div { background: var(--surface); padding: 14px 16px; flex: 1 1 110px; } /* растягиваются и делят строку поровну */
.keyfacts dt { font-size: .82rem; color: var(--ink-2); }
.keyfacts dd { margin: 2px 0 0; font: 600 1.2rem var(--font-display); white-space: nowrap; }

.buy { background: var(--frost); border-radius: var(--r-md); padding: 24px; }
.buy__price { font: 600 2.3rem var(--font-display); margin: 0 0 4px; }
.buy__price--ask { font-size: 1.5rem; }
.buy__install { color: var(--ink-2); margin-bottom: 18px; }
.buy__install b { color: var(--ink); }
.buy__note { color: var(--ink-2); font-size: .8125rem; margin: -10px 0 18px; }
.buy__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.buy__perks { list-style: none; padding: 0; margin: 0; }
.buy__perks li { display: flex; gap: 10px; align-items: center; font-size: .95rem; }
.buy__perks li + li { margin-top: 6px; }
.buy__perks .ico { color: var(--ok); }

.specs { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; margin: 0 0 16px; }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--ink-2); }
.specs dd { margin: 0; font-weight: 600; text-align: right; }

/* ---------- Контакты ---------- */
.contacts { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: start; }
.contacts__list { margin: 0; }
.contacts__list div { padding: 16px 0; border-top: 1px solid var(--line); }
.contacts__list dt { font-size: .88rem; color: var(--ink-2); }
.contacts__list dd { margin: 4px 0 0; font-weight: 500; }
.contacts__big { display: block; font: 500 1.6rem var(--font-display); color: var(--ink); text-decoration: none; }
.contacts__map iframe { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--r-md); background: var(--frost); }

/* ---------- 404 ---------- */
.notfound__code { font: 300 clamp(5rem, 16vw, 9rem)/1 var(--font-display); color: var(--accent); margin: 0 0 12px; }

/* ---------- Подвал ---------- */
.footer { background: var(--footer-bg); color: var(--ink-2); padding: 56px 0 24px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.footer__note { margin-top: 14px; max-width: 28ch; font-size: .95rem; }
.footer__title { font: 600 1rem var(--font-body); color: var(--ink); margin-bottom: 12px; }
.footer__list { list-style: none; padding: 0; margin: 0; font-size: .95rem; }
.footer__list li + li { margin-top: 6px; }
.footer a { color: var(--ink-2); text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .85rem; }

.callbar { display: none; }

/* ==========================================================================
   Узкие экраны. Правила внутри @media срабатывают, только если
   ширина окна меньше указанной.
   ========================================================================== */
@media (max-width: 1100px) {
  .pgrid, .pgrid--4 { grid-template-columns: repeat(2, 1fr); }
  .pros { grid-template-columns: repeat(2, 1fr); }
  .works { grid-template-columns: repeat(2, 1fr); }
  .team { grid-template-columns: repeat(2, 1fr); }
  .reels { grid-template-columns: repeat(2, 1fr); }
}

/* Меню прячется за кнопку-«бургер», когда пунктам уже тесно в одну строку */
@media (max-width: 1379px) {   /* меню прячется в «бургер», когда пункты перестают помещаться */
  .burger { display: block; }
  .header__contact { margin-left: auto; }
  .header__hours { display: none; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav a[aria-current="page"] { color: var(--accent); border-color: var(--line); }
  .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); }
}

@media (max-width: 960px) {
  .header__contact { display: none; }
  .header__row { min-height: 72px; }
  .logo img { height: 60px; }
  .theme-toggle { margin-left: auto; }
  .header__msgs { margin-left: auto; }
  .header__msgs + .theme-toggle { margin-left: 0; }

  .hero__grid, .split, .split--even, .lead__grid, .faq-wrap, .product, .contacts, .about { grid-template-columns: 1fr; }
  .remote { justify-self: stretch; max-width: none; }
  .hero__side { align-items: stretch; }
  .unit { width: min(100%, 360px); align-self: center; margin-bottom: 40px; }
  .types { grid-template-columns: 1fr; }
  .solutions { grid-template-columns: 1fr 1fr; }
  .catalog { grid-template-columns: 1fr; }
  .filters { position: static; padding: 16px 18px; }
  .filters__title::after { display: block; }
  .filters__box[open] .filters__title::after { content: "−"; }
  .product__media { position: static; aspect-ratio: 4 / 3; padding: 12px; }   /* фото товаров тоже 4:3 */
  .specs { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .works--all { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  body { font-size: 16px; padding-bottom: 64px; } /* место под кнопку «Позвонить» */
  .hero__actions .btn { width: 100%; }
  .pgrid, .pgrid--4, .works, .works--all, .solutions, .pros, .ba-list { grid-template-columns: 1fr; }
  /* На телефоне видео листаются пальцем вбок, как истории */
  .reels { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 12px; scrollbar-width: none; }
  .reels li { flex: 0 0 66%; scroll-snap-align: center; }
  .team { gap: 20px; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
  .type { grid-template-columns: 48px 1fr; }
  .type__icon { width: 48px; height: 48px; }
  .type__meta { grid-column: 2; text-align: left; }
  .ptable--wide th, .ptable--wide td { padding: 12px 10px; font-size: .92rem; }
  .ptable--wide td:last-child, .ptable--wide th:last-child { padding-right: 14px; }
  .ptable--wide td:first-child, .ptable--wide th:first-child { padding-left: 14px; }
  .ptable--wide .ptable__area { display: none; }  /* площадь переезжает под мощность */
  .ptable--wide .ptable__sub { display: block; }
  .footer__grid { grid-template-columns: 1fr; }
  .lightbox__figure { padding: 64px 12px 84px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 16px; translate: none; }

  /* Нижняя панель на телефоне: «Позвонить» и мессенджеры */
  .callbar { display: flex; gap: 8px; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; }
  .callbar a {
    display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border-radius: 12px;
    font-weight: 600; text-decoration: none; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .35);
  }
  .callbar__call { flex: 1; background: var(--warm); color: var(--on-warm); }
  .callbar__call:hover { color: var(--on-warm); }
  .callbar__msg { width: 56px; color: #fff; }
  .callbar__msg:hover { color: #fff; }
  .callbar__msg--tg { background: var(--tg); }
  .callbar__msg--max { background: var(--max); --msg-ink: var(--max); }
  .callbar__msg--wa { background: var(--wa); --msg-ink: var(--wa); }
  .callbar__msg { width: 52px; }
  .header__msgs { display: none; }   /* на телефоне мессенджеры уже есть в нижней панели */
  .header__msgs + .theme-toggle { margin-left: auto; }
}

/* ==========================================================================
   Скорость: браузер не рисует блоки ниже экрана, пока до них не долистают.
   contain-intrinsic-size — примерная высота блока, чтобы полоса прокрутки не прыгала;
   auto — после первого показа браузер запомнит настоящую высоту.
   ========================================================================== */
.section, .lead, .footer { content-visibility: auto; contain-intrinsic-size: auto 640px; }
.hero, .phead, .section--tight { content-visibility: visible; }

/* ==========================================================================
   Анимации
   ========================================================================== */

/* 1. Плавная смена страниц (View Transitions API).
   Браузер сам делает «снимок» старой и новой страницы и анимирует переход.
   Работает в Chrome, Edge, Яндекс Браузере, Opera и Safari 18+;
   в остальных браузерах страницы просто открываются как обычно. */
@view-transition { navigation: auto; }

/* Шапка в переходе не участвует — остаётся на месте */
.header { view-transition-name: site-header; }
main { view-transition-name: page; }

::view-transition-old(page) { animation: page-out .22s ease-in both; }
::view-transition-new(page) { animation: page-in .38s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes page-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } }

/* Фото товара «перелетает» из карточки каталога на страницу товара */
::view-transition-group(*) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }

/* При смене темы двигаться должна только круговая заливка (см. main.js) */
:root.theme-switching .header, :root.theme-switching main,
:root.theme-switching [style*="view-transition-name"] { view-transition-name: none !important; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
:root:not(.theme-switching)::view-transition-new(root) { animation: page-in .3s ease both; }

/* 2. Первый экран главной: текст и пульт мягко появляются один раз при открытии */
.hero__text > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.hero__text > :nth-child(2) { animation-delay: .08s; }
.hero__text > :nth-child(3) { animation-delay: .16s; }
.hero__text > :nth-child(4) { animation-delay: .24s; }
.remote { animation: rise .8s .18s cubic-bezier(.2, .7, .2, 1) both; }
/* Кондиционер «включается»: появляется, загорается лампочка, открывается шторка, идёт воздух */
.unit__body { animation: rise .8s .05s cubic-bezier(.2, .7, .2, 1) both; }
.unit__led { animation: led-on .4s .6s ease both; }
@keyframes led-on { from { opacity: 0; } }
.unit__louver { animation: louver-open 1s .6s cubic-bezier(.3, .8, .3, 1) backwards; }
@keyframes louver-open { from { transform: none; } }
.air { animation: air-in 1.2s .9s ease both; }
@keyframes air-in { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

/* Цифры на пульте «подпрыгивают» при каждом изменении площади */
.remote__digits.is-changed { animation: tick .25s ease-out; }
@keyframes tick { from { transform: translateY(-4px); opacity: .55; } }

/* 3. Ответы в «Вопросах» раскрываются плавно (Chrome/Edge 131+, в других — сразу) */
:root { interpolate-size: allow-keywords; }
.faq details::details-content {
  block-size: 0; overflow: hidden;
  transition: block-size .3s ease, content-visibility .3s allow-discrete;
}
.faq details[open]::details-content { block-size: auto; }

/* 4. Каталог. Фильтры, вкладки и страницы меняются без перезагрузки (main.js):
   пока грузится новый список, старый бледнеет, а новые карточки
   выкладываются по очереди — каждая на 35 мс позже предыдущей (--i — её номер). */
.tabs a { transition: background-color .2s, border-color .2s, color .2s; }
.catalog__results { transition: opacity .18s ease; }
.catalog__results.is-loading { opacity: .4; pointer-events: none; }
.catalog__results.is-fresh .pcard { animation: card-in .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 35ms); }
@keyframes card-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* Фото в карточке чуть приближается при наведении — видно, на что нажмёте */
.pcard__img { overflow: hidden; }
.pcard__img img { transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.pcard:hover .pcard__img img { transform: scale(1.04); }

/* 5. Шапка: когда страницу прокрутили, под ней появляется тень, а логотип чуть уменьшается.
   Высота шапки не меняется — иначе текст страницы дёргался бы вверх-вниз. */
.header { transition: box-shadow .3s ease, border-color .3s ease; }
.header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(10, 40, 80, .35); }
.logo img { transition: transform .3s ease; transform-origin: left center; }
.header.is-scrolled .logo img { transform: scale(.86); }

/* 6. Этапы установки: линия между шагами заполняется цветом по мере прокрутки,
   а кружок с номером «загорается», когда шаг доезжает до середины экрана.
   Работает в Chrome, Edge, Яндекс Браузере и Safari 26; в остальных этапы просто видны сразу. */
@supports (animation-timeline: view()) {
  .steps li:not(:last-child)::after {
    background: linear-gradient(var(--accent), var(--accent)) top / 100% 0% no-repeat, var(--line);
    animation: step-fill linear both; animation-timeline: view(); animation-range: entry 80% cover 55%;
  }
  @keyframes step-fill { to { background-size: 100% 100%, auto; } }
  .steps li::before { animation: step-on linear both; animation-timeline: view(); animation-range: entry 60% cover 35%; }
  @keyframes step-on { from { color: var(--ink-2); border-color: var(--line); transform: scale(.85); } }
}

/* 7. Отклик на нажатие: кнопка чуть «вдавливается» */
.btn, .remote__btn, .remote__mode, .round-btn, .theme-toggle, .msg { transition-property: background-color, color, border-color, box-shadow, transform; transition-duration: .18s; }
.btn:active, .remote__btn:active, .round-btn:active, .theme-toggle:active, .msg:active { transform: scale(.96); }

/* 8. Значок луны/солнца на кнопке темы поворачивается при смене */
.theme-toggle .ico { animation: theme-icon .5s cubic-bezier(.3, .8, .3, 1); }
@keyframes theme-icon { from { transform: rotate(-90deg) scale(.6); opacity: 0; } }

/* 9. Типы кондиционеров на главной: значок «подпрыгивает» навстречу курсору */
.type__icon { transition: background-color .25s, color .25s, transform .3s cubic-bezier(.3, .8, .3, 1); }
.type:hover .type__icon { transform: translateY(-3px) rotate(-4deg); }
.type__meta { transition: transform .3s cubic-bezier(.3, .8, .3, 1); }
.type:hover .type__meta { transform: translateX(-4px); }

/* 10. Сообщение после отправки заявки появляется плавно */
.form__msg { animation: rise .5s cubic-bezier(.2, .7, .2, 1) both; }

/* 11. Мобильное меню выезжает сверху, а не появляется рывком */
@media (max-width: 1379px) {
  .nav { transition: opacity .22s ease, translate .22s ease, display .22s allow-discrete; opacity: 0; translate: 0 -8px; }
  .nav.is-open { opacity: 1; translate: 0 0; }
  @starting-style { .nav.is-open { opacity: 0; translate: 0 -8px; } }
}

/* Если человек отключил анимации в системе — отключаем и у нас */
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Страницы «Политика» и «Согласие» */
.legal { max-width: 72ch; }
.legal h2 { font-size: 1.15rem; }
.legal__todo { padding: 12px 14px; border-radius: var(--r-sm); background: #fff3c4; color: #6b5200; font-weight: 600; }
.check--consent { font-size: .85rem; color: var(--ink-2); margin: 4px 0 16px; }
.check--consent a { color: var(--accent); }
.footer__bottom a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
