/* =========================================================
   Система погодного регулирования — стили
   Палитра и приёмы взяты из презентации: белый лист,
   красная плашка со скошенным краем, тонкая красная диагональ,
   фото в белых рамках с тенью.
   ========================================================= */

:root {
  color-scheme: light;

  --red: #b51100;
  --red-deep: #8e0d00;
  --red-soft: #fbeeec;
  --cold: #2a68a6;
  --cold-soft: #e9f1f9;

  --ink: #2e2e2e;
  --ink-2: #4d4d4d;
  --muted: #898989;
  --line: #e4e0dc;
  --paper: #f6f4f1;
  --white: #fff;

  --sans: "Open Sans", "Segoe UI", Verdana, sans-serif;
  --serif: "PT Serif", "Times New Roman", Times, serif;

  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1200px;
  --header-h: 72px;
  --slant: 28px;

  --shadow-photo: 0 1px 2px rgba(0, 0, 0, .08), 0 10px 28px rgba(0, 0, 0, .10);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

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

body {
  margin: 0;
  overflow-x: clip;
  background: var(--white);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

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

.container {
  width: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; background: var(--red); color: #fff; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Красная плашка-заголовок (главный мотив) ---------- */

.banner {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin-bottom: clamp(28px, 4vw, 48px);
  padding: .55em calc(var(--slant) + 1.1em) .55em 0;
  background: var(--red);
  color: #fff;
  font: 300 clamp(22px, 2.7vw, 34px)/1.2 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  /* левый край уходит за границу экрана, правый скошен */
  clip-path: polygon(-100vw 0, 100% 0, calc(100% - var(--slant)) 100%, -100vw 100%);
}
.banner::before {
  content: "";
  position: absolute;
  inset: 0 100% 0 auto;
  width: 100vw;
  background: inherit;
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px;
  padding: 12px 26px;
  border: 2px solid transparent;
  font: 600 15px/1 var(--sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-deep); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--white { background: #fff; color: var(--red); }
.btn--white:hover { background: var(--red-soft); }

/* ---------- Шапка ---------- */

.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 4px 18px rgba(0, 0, 0, .05); }

.header__row {
  display: flex; align-items: center; gap: 28px;
  height: var(--header-h);
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.brand__mark {
  width: 34px; height: 24px;
  background: var(--red);
  clip-path: polygon(0 0, 100% 0, 78% 100%, 0 100%);
}
.brand__text {
  font: 700 11.5px/1.3 var(--serif);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
}

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a {
  position: relative;
  padding: 8px 10px;
  font-size: 14px; font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  transition: color .2s;
}
.nav a::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 2px;
  background: var(--red);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav a:hover, .nav a.is-active { color: var(--ink); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }

.nav .nav__call { display: none; }

.header__phone {
  font-weight: 800; font-size: 16px; letter-spacing: .02em;
  text-decoration: none; white-space: nowrap;
  color: var(--red);
}
.header__phone:hover { color: var(--red-deep); }

.burger {
  display: none;
  width: 44px; height: 44px; margin-right: -10px;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.burger span {
  width: 22px; height: 2px; background: var(--ink);
  transition: transform .25s var(--ease), opacity .2s;
}
.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); }

/* ---------- Первый экран ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex; align-items: center;
  min-height: min(780px, calc(100svh - var(--header-h)));
  padding: 48px 0 56px;
}

.hero__media {
  position: absolute; z-index: -2;
  top: 32px; bottom: 32px; right: 0;
  width: 54%;
  clip-path: polygon(20% 0, 100% 0, 100% 100%, 0 100%);
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 38% 50%; }

.hero__line {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  pointer-events: none;
}
.hero__line line { stroke: var(--red); stroke-width: 1.5; }

.hero__copy { max-width: 540px; }

.banner--hero {
  width: min(780px, 100vw - 2 * var(--gutter));
  max-width: none;
  margin-bottom: 32px;
  padding: .9em calc(var(--slant) + 1.4em) .9em 0;
  font: 700 clamp(19px, 2.2vw, 28px)/1.32 var(--serif);
  letter-spacing: .15em;
  box-shadow: none;
}

.hero__lead { font-size: 18px; color: var(--ink-2); max-width: 46ch; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero__contacts {
  margin-top: 32px;
  font-weight: 600; font-size: 16px; letter-spacing: .05em; line-height: 2;
}
.hero__contacts a { text-decoration: none; }
.hero__contacts a:hover { color: var(--red); }

.hero__brands {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px;
  margin-top: 28px;
}
.hero__brands img { height: 26px; width: auto; }
.hero__brands li:nth-child(1) img { height: 30px; }
.hero__brands li:nth-child(2) img { height: 17px; }
.hero__brands li:nth-child(4) img { height: 32px; }

/* ---------- Цифры ---------- */

.stats { border-block: 1px solid var(--line); }
.stats__row { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat {
  padding: 28px 24px;
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b {
  display: block;
  font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; line-height: 1.1;
  color: var(--red);
  letter-spacing: -.01em;
  white-space: nowrap;
}
.stat span { display: block; margin-top: 8px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); }

/* ---------- Секции ---------- */

.section { padding: clamp(64px, 9vw, 112px) 0; scroll-margin-top: var(--header-h); }
.section--paper { background: var(--paper); }
.section:not(.section--paper) + .section:not(.section--paper) { padding-top: 0; }

.lead { font-size: 19px; color: var(--ink); }
.h3 { font-size: 22px; font-weight: 700; line-height: 1.3; margin-bottom: 14px; }

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

/* --- О системе: факты --- */

.facts {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
}
.fact {
  position: relative;
  padding: 30px 30px 32px;
  background: var(--paper);
}
.fact__num {
  display: block;
  font: 700 13px/1 var(--sans); letter-spacing: .2em;
  color: var(--red);
  margin-bottom: 14px;
}
.fact h3 { font-size: 19px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; }
.fact p { font-size: 16px; color: var(--ink-2); }

/* --- Откуда переплата --- */

.overheat {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px);
  align-items: center;
  margin-top: clamp(56px, 7vw, 88px);
}
.overheat__text > p + p { margin-top: 14px; }
.overheat__text p { color: var(--ink-2); }

.note {
  display: flex; gap: 14px; align-items: flex-start;
  margin-top: 24px !important;
  padding: 16px 18px;
  border-left: 3px solid var(--red);
  background: var(--red-soft);
  font-size: 15.5px;
  color: var(--ink) !important;
}
.note svg {
  flex: none; width: 22px; height: 22px; margin-top: 2px;
  fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round;
}

.thermo {
  padding: 32px;
  background: var(--white);
  box-shadow: var(--shadow-photo);
}
.thermo__head { display: flex; justify-content: space-between; gap: 16px; }
.thermo__head > div:last-child { text-align: right; }
.thermo__label { display: block; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.thermo__val { display: block; font-size: clamp(36px, 4.4vw, 52px); font-weight: 800; line-height: 1.1; white-space: nowrap; }
.thermo__val--cold { color: var(--cold); }
.thermo__val--hot { color: var(--red); }

.scale { margin-top: 28px; }
.scale__track {
  position: relative; height: 14px;
  background: linear-gradient(90deg, #eef3f8, #c9dbee);
}
.scale__gap {
  position: absolute; top: 0; bottom: 0; left: 25%; right: 25%;
  background: repeating-linear-gradient(-45deg, var(--red) 0 6px, #d23a28 6px 12px);
  transform-origin: left;
}
.scale__gap em {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; font-style: normal;
  color: var(--red); white-space: nowrap;
}
.scale__pin {
  position: absolute; top: -6px; left: var(--x);
  width: 4px; height: 26px; margin-left: -2px;
}
.scale__pin--cold { background: var(--cold); }
.scale__pin--hot { background: var(--red-deep); }
.scale__ticks {
  display: flex; justify-content: space-between;
  margin-top: 10px;
  font-size: 13px; color: var(--muted);
}
.scale__ticks li { width: 0; display: flex; justify-content: center; white-space: nowrap; }
.scale__ticks li:first-child { justify-content: flex-start; }
.scale__ticks li:last-child { justify-content: flex-end; }

.thermo__foot {
  display: flex; align-items: center; gap: 18px;
  margin-top: 28px; padding-top: 24px;
  border-top: 1px solid var(--line);
}
.thermo__foot b { font-size: 34px; font-weight: 800; color: var(--red); white-space: nowrap; line-height: 1; }
.thermo__foot span { font-size: 15px; color: var(--ink-2); line-height: 1.45; }

.seasons { margin-top: clamp(56px, 7vw, 88px); }
.seasons img { width: 100%; aspect-ratio: 2000 / 475; object-fit: cover; }

/* --- Устройство --- */

.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.split__text p { color: var(--ink-2); }
.split__text .lead { color: var(--ink); }

.parts { counter-reset: part; display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.parts li {
  counter-increment: part;
  display: flex; gap: 14px; align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600; font-size: 16px; line-height: 1.4;
}
.parts li::before {
  content: counter(part, decimal-leading-zero);
  flex: none;
  font-size: 12.5px; font-weight: 700; letter-spacing: .14em;
  color: var(--red);
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 8px 16px;
  border: 1.5px solid var(--red);
  color: var(--red);
  font-size: 13.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}

/* --- Фото в рамках --- */

.photo {
  display: block; width: 100%;
  padding: 8px;
  background: var(--white);
  border: 0;
  box-shadow: var(--shadow-photo);
  cursor: zoom-in;
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) {
  .photo:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(0, 0, 0, .08), 0 18px 40px rgba(0, 0, 0, .14); }
}

.collage { display: grid; gap: 18px; }
.collage--parts {
  grid-template-columns: 1fr 1.45fr;
  grid-template-areas: "a a" "b c";
}
.collage--parts .photo--a { grid-area: a; aspect-ratio: 601 / 444; }
.collage--parts .photo--b { grid-area: b; aspect-ratio: 339 / 520; }
.collage--parts .photo--c { grid-area: c; align-self: center; aspect-ratio: 560 / 414; }

.collage--projects {
  grid-template-columns: 1.7fr 1fr;
  grid-template-areas: "a a" "b c";
}
.collage--projects .photo--a { grid-area: a; aspect-ratio: 1068 / 600; }
.collage--projects .photo--b { grid-area: b; aspect-ratio: 633 / 543; }
.collage--projects .photo--c { grid-area: c; aspect-ratio: auto; }

/* --- Как работает: схема --- */

.how {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.3fr); gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.steps button {
  display: flex; align-items: center; gap: 12px;
  min-height: 52px;
  padding: 10px 14px;
  background: var(--white);
  border: 1.5px solid var(--line);
  font-size: 15px; font-weight: 700; text-align: left;
  cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s;
}
.steps button i {
  display: grid; place-items: center; flex: none;
  width: 26px; height: 26px;
  font-style: normal; font-size: 13px;
  border: 1.5px solid currentColor;
  color: var(--red);
  transition: background-color .2s, color .2s;
}
.steps button:hover { border-color: var(--red); }
.steps button[aria-selected="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.steps button[aria-selected="true"] i { background: #fff; border-color: #fff; color: var(--red); }

.step-panel {
  position: relative;
  margin-top: 20px;
  padding: 26px 28px;
  min-height: 210px;
  background: var(--white);
  border-left: 3px solid var(--red);
}
.step-text h3 { font-size: 20px; font-weight: 700; line-height: 1.3; margin-bottom: 10px; }
.step-text p { color: var(--ink-2); font-size: 16px; }
.step-text.is-on { animation: stepIn .35s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateY(6px); } }

.remote {
  display: flex; gap: 14px; align-items: flex-start;
  margin-top: 20px;
  font-size: 15.5px; color: var(--ink-2);
}
.remote b { color: var(--ink); }
.remote svg {
  flex: none; width: 26px; height: 26px;
  fill: none; stroke: var(--red); stroke-width: 1.8; stroke-linecap: round;
}

.diagram {
  padding: clamp(12px, 2vw, 24px);
  background: var(--white);
  box-shadow: var(--shadow-photo);
}
.dg { display: block; width: 100%; height: auto; overflow: visible; }

.dg .pipe { fill: none; stroke-width: 9; stroke-linecap: square; }
.dg .pipe--hot { stroke: var(--red); }
.dg .pipe--cold { stroke: var(--cold); }
.dg .pipe--mix { stroke: #7f5d99; }
.dg .pipe--bypass { stroke: #b9b2ab; stroke-width: 7; }

.dg .flow {
  fill: none; stroke: rgba(255, 255, 255, .75); stroke-width: 2.5;
  stroke-dasharray: 6 22;
  animation: flow 1.6s linear infinite;
}
.dg .flow--mix { animation-duration: 1.2s; }
@keyframes flow { to { stroke-dashoffset: -28; } }

.dg .sym { fill: var(--white); stroke: var(--ink); stroke-width: 2; }
.dg .sym-line { fill: none; stroke: var(--ink); stroke-width: 2; }
.dg .sym-fill { fill: var(--ink); }
.dg .node { fill: var(--ink); }
.dg .screen { fill: var(--ink); }
.dg .screen-txt { fill: #fff; font: 700 12px var(--sans); }
.dg .lbl { fill: var(--ink-2); font: 600 16px var(--sans); }
.dg .lbl--hot { fill: var(--red); }
.dg .lbl--cold { fill: var(--cold); }
.dg .tag { fill: var(--ink); font: 700 11px var(--sans); }

.dg .house path { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.dg .house .win rect { fill: #dfe8f1; }

.dg .sig path {
  fill: none; stroke: var(--muted); stroke-width: 1.5;
  stroke-dasharray: 5 5;
}

/* подсветка активного этапа */
.dg [data-steps] { transition: opacity .35s var(--ease); }
.dg.is-stepping [data-steps] { opacity: .28; }
.dg.is-stepping [data-steps].is-on { opacity: 1; }
.dg .part.is-on .sym,
.dg .part.is-on .sym-line { stroke: var(--red); }
.dg .part.is-on .sym-fill { fill: var(--red); }
.dg .part.is-on .lbl { fill: var(--red); }
.dg .part.is-on .pipe--bypass { stroke: #8f8780; }
.dg .sig path.is-on {
  stroke: var(--red);
  animation: sig 1s linear infinite;
}
@keyframes sig { to { stroke-dashoffset: -20; } }

.duo {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  margin-top: clamp(40px, 5vw, 64px);
}
.duo .photo { aspect-ratio: 831 / 616; }

/* --- Объекты --- */

.split--projects { grid-template-columns: .9fr 1.1fr; }

.districts { border-top: 1px solid var(--line); }
.districts li {
  display: flex; align-items: center; gap: 22px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.districts b {
  display: flex; align-items: baseline; gap: 10px;
  width: 150px; flex: none;
  font-size: 54px; font-weight: 800; line-height: 1;
  color: var(--red);
}
.districts small { font-size: 15px; font-weight: 600; color: var(--red); }
.districts span { font-size: 16px; line-height: 1.4; color: var(--muted); }
.districts em { display: block; font-style: normal; font-size: 20px; font-weight: 700; color: var(--ink); }

.split--projects .btn { margin-top: 28px; }

/* --- Качество --- */

.brands { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.brand-card {
  display: flex; flex-direction: column;
  padding: 26px 24px 0;
  background: var(--white);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
@media (hover: hover) {
  .brand-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-photo); }
}
.brand-card__logo { height: 34px; width: auto; max-width: 70%; object-fit: contain; object-position: left center; }
/* логотипы разных пропорций — выравниваем по оптической площади */
.brand-card:nth-child(1) .brand-card__logo { height: 40px; }
.brand-card:nth-child(2) .brand-card__logo { height: 38px; }
.brand-card:nth-child(3) .brand-card__logo { height: 24px; margin-block: 7px; }
.brand-card:nth-child(4) .brand-card__logo { height: 34px; margin-block: 3px; }
.brand-card__country {
  margin-top: 18px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted);
}
.brand-card p { margin-top: 4px; font-size: 16.5px; font-weight: 600; line-height: 1.35; }
.brand-card__img {
  margin: auto auto 0; padding-top: 18px;
  height: 220px; width: 100%; object-fit: contain; object-position: center bottom;
}

.quality {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 4vw, 56px);
  align-items: stretch;
  margin-top: clamp(40px, 5vw, 64px);
}

.checks li {
  position: relative;
  padding: 18px 0 18px 44px;
  border-bottom: 1px solid var(--line);
  font-size: 17px; color: var(--ink-2);
}
.checks li:first-child { border-top: 1px solid var(--line); }
.checks li b { color: var(--ink); }
.checks li::before {
  content: "";
  position: absolute; left: 4px; top: 25px;
  width: 18px; height: 10px;
  border-left: 3px solid var(--red); border-bottom: 3px solid var(--red);
  transform: rotate(-45deg);
}

.price {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 36px clamp(28px, 3vw, 44px) 36px;
  background: var(--red);
  color: #fff;
  clip-path: polygon(0 0, 100% 0, 100% 100%, var(--slant) 100%, 0 calc(100% - var(--slant)));
}
.price__label { font-size: 13px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; opacity: .85; }
.price__val { margin-top: 8px; font-size: clamp(30px, 3.4vw, 42px); font-weight: 800; line-height: 1.1; }
.price p { margin-top: 12px; font-size: 16px; opacity: .92; max-width: 34ch; }
.price .btn { margin-top: 24px; }

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

.contacts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  align-items: center;
}
.contacts__text { display: flex; flex-direction: column; align-items: flex-start; }
.contacts__name { font-size: clamp(26px, 3vw, 36px); font-weight: 800; }
.contacts__phone {
  margin-top: 18px;
  font-size: clamp(32px, 4.4vw, 54px); font-weight: 800; line-height: 1.1; letter-spacing: .01em;
  text-decoration: none;
  transition: color .2s;
}
.contacts__phone:hover { color: var(--red); }
.contacts__mail {
  margin-top: 18px;
  font-size: clamp(18px, 2.2vw, 28px); font-weight: 700;
  color: var(--red);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px;
  word-break: break-word;
}
.contacts__mail:hover { color: var(--red-deep); }
.contacts .hero__actions { margin-top: 36px; }

.contacts__gear {
  position: relative;
  display: grid; grid-template-columns: .8fr 1.2fr; align-items: end; gap: 8px;
}
.gear { width: 100%; mix-blend-mode: multiply; }

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

.footer { border-top: 1px solid var(--line); padding: 28px 0 36px; font-size: 14px; color: var(--muted); }
.footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
.footer__brand { font: 700 12px/1.6 var(--serif); letter-spacing: .14em; text-transform: uppercase; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--red); }

/* ---------- Лайтбокс ---------- */

.lightbox {
  max-width: min(1100px, 94vw); max-height: 92vh;
  padding: 10px; border: 0;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  overflow: visible;
}
.lightbox::backdrop { background: rgba(20, 16, 14, .78); }
.lightbox img { max-height: calc(92vh - 20px); width: auto; margin: auto; }
.lightbox[open] { animation: lbIn .25s var(--ease); }
@keyframes lbIn { from { opacity: 0; transform: scale(.96); } }
.lightbox__close {
  position: absolute; top: -14px; right: -14px;
  width: 40px; height: 40px;
  border: 0; border-radius: 50%;
  background: var(--red); color: #fff;
  font-size: 26px; line-height: 1;
  cursor: pointer;
}

/* ---------- Появление при прокрутке ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* плашка «выезжает» слева, как в слайдах */
.js [data-reveal="banner"] {
  opacity: 1;
  transform: none;
  clip-path: polygon(-100vw 0, -100vw 0, -100vw 100%, -100vw 100%);
  transition: clip-path .9s var(--ease);
}
.js [data-reveal="banner"].is-in {
  clip-path: polygon(-100vw 0, 100% 0, calc(100% - var(--slant)) 100%, -100vw 100%);
}

.js .scale__gap { transform: scaleX(0); transition: transform 1s .4s var(--ease); }
.js .thermo.is-in .scale__gap { transform: none; }

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

@media (max-width: 1100px) {
  .nav a { padding: 8px 7px; font-size: 13.5px; }
  .header__row { gap: 18px; }
  .brands { grid-template-columns: repeat(2, 1fr); }

  /* первый экран: фото сверху, плашка заходит на него */
  .hero { flex-direction: column; align-items: stretch; min-height: 0; padding: 0 0 48px; }
  .hero__media {
    position: relative; inset: auto;
    width: 100%; height: clamp(240px, 46vw, 460px);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 86%);
  }
  .hero__line { display: none; }
  .hero__copy { max-width: 640px; }
  .banner--hero { margin-top: -40px; width: auto; max-width: 100%; }
}

@media (max-width: 960px) {
  :root { --header-h: 64px; --slant: 20px; }

  .burger { display: flex; }
  .header__phone { margin-left: auto; font-size: 15px; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    padding: 8px var(--gutter) 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 30px rgba(0, 0, 0, .08);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s .2s;
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav a { padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }

  .stats__row { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 24px 20px; border-left: 0; }
  .stat:first-child { padding-left: 20px; }
  .stat:nth-child(odd) { padding-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }

  .facts, .overheat, .split, .split--projects, .how, .quality, .contacts { grid-template-columns: 1fr; }

  /* схема — над вкладками, чтобы было видно, что подсвечивается */
  .diagram { order: -1; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .banner { letter-spacing: .07em; }
  .banner--hero { letter-spacing: .1em; }
  .brand__text { font-size: 10px; letter-spacing: .12em; }
  .header__phone { display: none; }
  .nav .nav__call {
    display: flex; justify-content: center;
    margin-top: 16px; padding: 14px;
    border: 0;
    background: var(--red); color: #fff; font-weight: 700;
  }
  .burger { margin-left: auto; }

  .fact { padding: 24px 22px; }
  .parts { grid-template-columns: 1fr; }
  .thermo { padding: 24px 20px; }
  .thermo__foot { flex-direction: column; align-items: flex-start; gap: 8px; }
  .steps button { font-size: 14px; padding: 10px; gap: 8px; }
  .step-panel { padding: 22px 20px; min-height: 0; }
  .diagram { overflow-x: auto; overscroll-behavior-x: contain; padding: 10px 0 10px 10px; }
  .dg { min-width: 600px; padding-right: 10px; }
  .diagram::after {
    content: "Схему можно прокрутить вбок →";
    position: sticky; left: 0;
    display: block; padding-top: 6px;
    font-size: 12.5px; color: var(--muted);
  }
  .duo { grid-template-columns: 1fr; }
  .collage { gap: 12px; }
  .photo { padding: 5px; }
  .brands { grid-template-columns: 1fr 1fr; gap: 12px; }
  .brand-card { padding: 18px 16px 0; }
  .brand-card:nth-child(1) .brand-card__logo { height: 30px; }
  .brand-card:nth-child(2) .brand-card__logo { height: 28px; }
  .brand-card:nth-child(3) .brand-card__logo { height: 18px; margin-block: 5px; }
  .brand-card:nth-child(4) .brand-card__logo { height: 26px; margin-block: 2px; }
  .brand-card p { font-size: 14.5px; }
  .brand-card__img { height: 140px; }
  .districts b { font-size: 44px; width: 128px; }
  .districts small { font-size: 14px; }
  .hero__brands { gap: 12px 16px; }
  .hero__brands img { height: 21px; }
  .hero__brands li:nth-child(1) img { height: 24px; }
  .hero__brands li:nth-child(2) img { height: 13px; }
  .hero__brands li:nth-child(4) img { height: 25px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js [data-reveal="banner"] { clip-path: polygon(-100vw 0, 100% 0, calc(100% - var(--slant)) 100%, -100vw 100%); }
  .js .scale__gap { transform: none; }
}
