/* ==========================================================================
   МАГМА — лендинг. Предварительная версия: только HTML + CSS.
   Палитра: чёрный фон, коричнево-золотой акцент, тёплый белый текст.
   ========================================================================== */

:root {
  --bg: #0b0b0a;
  --bg-raised: #131211;
  --bg-panel: #1a1917;
  --line: rgb(255 255 255 / .1);
  --line-strong: rgb(255 255 255 / .22);

  --text: #f5f2ec;
  --text-muted: #aaa49b;
  --text-dim: #8d867e;

  --gold: #c4a174;
  --gold-bright: #dfc198;
  --gold-deep: #8c6d45;
  --paper: #e9e5de;

  --font-display: "Geologica", "Onest", system-ui, sans-serif;
  --font-body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --gutter: clamp(20px, 4vw, 56px);
  --section: clamp(80px, 11vw, 160px);
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Мягкие скругления: мелкие контролы, карточки и фото, крупные панели */
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;
  --radius-pill: 999px;
}

/* ── База ─────────────────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

::selection { background: var(--gold); color: #14110c; }

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

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

.nowrap { white-space: nowrap; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--gold);
  color: #14110c;
  border-radius: var(--radius-s);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ── Типографика ──────────────────────────────────────────────────────── */

h1, h2, .h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -.022em;
  text-wrap: balance;
}

h2, .section--not-found h1 {
  font-size: clamp(25px, 3.2vw, 43px);
  line-height: 1.08;
  max-width: 17em;
}

.h3 {
  font-size: clamp(21px, 1.9vw, 26px);
  line-height: 1.2;
}

.h3--rule {
  margin-top: clamp(64px, 8vw, 112px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.eyebrow {
  font: 500 12px/1.4 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
}

.lead {
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 34em;
  text-wrap: pretty;
}

.note {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-dim);
  max-width: 44em;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  height: 54px;
  padding: 0 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font: 500 15px/1 var(--font-body);
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color .3s var(--ease),
    border-color .3s var(--ease),
    color .3s var(--ease),
    translate .3s var(--ease),
    box-shadow .3s var(--ease);
}

.btn--primary { background: var(--gold); color: #14110c; }
.btn--primary:hover { background: var(--gold-bright); }

.btn--ghost { border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-bright); }

.btn--small { height: 42px; padding: 0 20px; font-size: 14px; }
.btn--block { width: 100%; }

/* ── Шапка ────────────────────────────────────────────────────────────── */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-header__logo img { height: 42px; width: auto; }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.site-header__phone {
  font-size: 14.5px;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color .2s;
}
.site-header__phone:hover { color: var(--gold-bright); }

.site-menu { display: none; }

.site-menu summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--text);
  border-radius: var(--radius-s);
  list-style: none;
  cursor: pointer;
  transition: color .3s var(--ease), background-color .3s var(--ease);
}
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu summary:hover { color: var(--gold-bright); background: rgb(255 255 255 / .05); }
.site-menu summary:focus-visible { outline-offset: -2px; }

/* Бургер: три мягкие черты, при открытии собираются в крестик */
.burger {
  display: grid;
  gap: 5px;
  width: 20px;
}
.burger i {
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: translate .35s var(--ease), rotate .35s var(--ease), opacity .25s var(--ease);
}
.site-menu[open]:not(.is-closing) .burger i:nth-child(1) { translate: 0 7px; rotate: 45deg; }
.site-menu[open]:not(.is-closing) .burger i:nth-child(2) { opacity: 0; }
.site-menu[open]:not(.is-closing) .burger i:nth-child(3) { translate: 0 -7px; rotate: -45deg; }
.site-menu__panel {
  position: absolute;
  inset: 100% 0 auto;
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg-raised);
  border-block: 1px solid var(--line-strong);
  border-radius: 0 0 var(--radius-m) var(--radius-m);
  box-shadow: 0 14px 28px rgb(0 0 0 / .35);
}
.site-menu__links {
  display: grid;
  padding-block: 4px 0;
}
.site-menu__links > li { border-bottom: 1px solid var(--line); }
.site-menu__links > li > a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 7px 4px;
  font-size: 15px;
  line-height: 1.3;
}

/* Группы мобильного меню: аккордеоны на <details> */
.menu-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 7px 4px;
  font-size: 15px;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
  transition: color .2s;
}
.menu-group > summary::-webkit-details-marker { display: none; }
.menu-group > summary::after {
  content: "";
  flex: 0 0 7px;
  height: 7px;
  margin: -3px 4px 0 0;
  border-right: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  rotate: 45deg;
  transition: rotate .3s var(--ease), margin .3s var(--ease);
}
.menu-group[open] > summary { color: var(--gold-bright); }
.menu-group[open] > summary::after { rotate: 225deg; margin-top: 3px; }
.menu-group ul { padding: 0 4px 10px 14px; }
.menu-group ul li { border-top: 1px solid var(--line); }
.menu-group ul a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 0;
  font-size: 14.5px;
  line-height: 1.3;
  color: var(--text-muted);
}
.site-menu__cta { width: 100%; margin-block: 16px 20px; }
.site-menu__phone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-bottom: 18px;
  font-size: 15px;
  color: var(--text-muted);
  transition: color .2s;
}
.site-menu__phone:hover { color: var(--gold-bright); }

.site-menu__links a:focus-visible { outline-offset: -2px; }
.site-menu__links a:hover,
.site-menu__links [aria-current="page"],
.site-nav [aria-current="page"] { color: var(--gold-bright); }

/* Плавное появление и исчезновение панели меню */
@media (prefers-reduced-motion: no-preference) {
  .site-menu[open] .site-menu__panel { animation: menu-in .4s var(--ease) both; }
  .site-menu.is-closing .site-menu__panel { animation: menu-out .28s var(--ease) both; }
}

.progress {
  position: absolute;
  inset: auto 0 -1px;
  height: 2px;
  background: var(--gold);
  border-radius: var(--radius-pill);
  transform-origin: left;
  scale: 0 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.4vw, 24px);
  margin-inline: auto;
  font-size: 14.5px;
  color: var(--text-muted);
}

.site-nav > a {
  position: relative;
  padding: 8px 0;
  white-space: nowrap;
  transition: color .2s;
}
.site-nav > a::after {
  content: "";
  position: absolute;
  inset: auto 0 2px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.site-nav > a:hover { color: var(--text); }
.site-nav > a:hover::after { transform: scaleX(1); }

/* ── Выпадающие пункты меню ───────────────────────────────────────────── */

.nav-drop { position: relative; }

.nav-drop > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 0;
  white-space: nowrap;
  list-style: none;
  cursor: pointer;
  transition: color .2s;
}
.nav-drop > summary::-webkit-details-marker { display: none; }
.nav-drop > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  rotate: 45deg;
  transition: rotate .25s var(--ease), margin .25s var(--ease);
}
.nav-drop[open] > summary::after { rotate: 225deg; margin-top: 3px; }
.nav-drop > summary:hover,
.nav-drop[open] > summary { color: var(--text); }

.nav-drop__panel {
  position: absolute;
  top: calc(100% + 20px);
  left: 0;
  min-width: 250px;
  padding: 8px;
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-m);
  box-shadow: 0 18px 40px rgb(0 0 0 / .45);
}
@media (prefers-reduced-motion: no-preference) {
  .nav-drop[open] .nav-drop__panel { animation: nav-drop-in .25s var(--ease) both; }
}
.nav-drop__panel a {
  display: block;
  padding: 11px 13px;
  border-radius: var(--radius-s);
  color: var(--text-muted);
  white-space: nowrap;
  transition: color .2s, background-color .2s;
}
.nav-drop__panel a:hover { color: var(--gold-bright); background: rgb(255 255 255 / .05); }

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

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: min(100svh, 1000px);
  padding-top: var(--header-h);
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0 0 0 auto;
  width: 74%;
  z-index: -1;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}
/* Видео-фон проявляется поверх постера, когда загрузилось и играет */
.hero__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.hero__media.is-video video { opacity: 1; }
.hero__media::before,
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.hero__media::before {
  background: linear-gradient(90deg, var(--bg) 0%, rgb(11 11 10 / .8) 16%, rgb(11 11 10 / .38) 36%, transparent 58%);
}
.hero__media::after {
  background: linear-gradient(180deg, rgb(11 11 10 / .5) 0%, transparent 18%, transparent 66%, var(--bg) 100%);
}

.hero__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(48px, 8vh, 96px);
}

.hero__title {
  margin-top: 22px;
  font-size: clamp(34px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: -.03em;
}

.hero__title .line {
  display: block;
  overflow: hidden;
  /* запас под выносные элементы букв, чтобы маска их не резала */
  padding-block: .06em .16em;
  margin-block: -.06em -.16em;
}
.hero__title .line > span { display: block; }

.hero__lead {
  margin-top: clamp(22px, 2.6vw, 34px);
  max-width: 30em;
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.55;
  color: #d3cec6;
  text-wrap: pretty;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(28px, 3.4vw, 44px);
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.facts__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 24px 30px 0;
}
.facts__item + .facts__item {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.facts dt {
  font-size: 13.5px;
  color: var(--text-muted);
}
.facts dd {
  font: 300 clamp(26px, 2.8vw, 40px)/1 var(--font-display);
  letter-spacing: -.03em;
  white-space: nowrap;
}
.facts small {
  font-size: .42em;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--gold);
}

/* ── Секции ───────────────────────────────────────────────────────────── */

.section { padding-top: var(--section); }

/* Якорь-алиас для старых ссылок (/#about) */
.anchor-alias { display: block; height: 0; }

.section-head {
  display: grid;
  grid-template-columns: 3fr 9fr;
  gap: 16px 32px;
  padding-top: 26px;
  border-top: 1px solid var(--line-strong);
}
.section-head .eyebrow { padding-top: .5em; }
.section-head .lead { margin-top: clamp(18px, 2vw, 28px); }
.section--not-found { padding-bottom: var(--section); }
.section--not-found .btn { margin-top: 28px; }

/* ── Конструкция ──────────────────────────────────────────────────────── */

.anatomy {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(32px, 5vw, 88px);
  align-items: center;
  margin-top: clamp(40px, 6vw, 88px);
}

.anatomy__figure {
  position: relative;
  width: min(100%, 470px);
  aspect-ratio: 950 / 1180;
  margin-inline: auto;
}
.anatomy__figure::before {
  content: "";
  position: absolute;
  inset: -6% -22%;
  z-index: -1;
  background: radial-gradient(closest-side, rgb(196 161 116 / .16), transparent);
}
.anatomy__figure img {
  width: 100%;
  height: 100%;
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
  mask-image: linear-gradient(#000 70%, transparent);
}

.pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  translate: -50% -50%;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: rgb(11 11 10 / .88);
  color: var(--gold-bright);
  font: 500 12px/1 var(--font-mono);
  box-shadow: 0 0 0 5px rgb(11 11 10 / .35);
}

.layers { counter-reset: none; }
.layers__item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 4px 20px;
  align-items: baseline;
  padding: 22px 14px;
  border-top: 1px solid var(--line);
}
.layers__item:last-child { border-bottom: 1px solid var(--line); }
.layers__n {
  font: 500 12px/1 var(--font-mono);
  color: var(--gold);
}
.layers h3 {
  font: 500 clamp(17px, 1.4vw, 19px)/1.3 var(--font-display);
  letter-spacing: -.01em;
}
.layers p {
  margin-top: 6px;
  font-size: 15.5px;
  color: var(--text-muted);
  max-width: 36em;
}
.layers__spec {
  font: 400 clamp(17px, 1.6vw, 21px)/1 var(--font-mono);
  color: var(--gold-bright);
  white-space: nowrap;
}

/* Температура: 400 → 50 */
.thermo {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  margin-top: clamp(56px, 8vw, 112px);
  padding: clamp(28px, 4vw, 56px);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}
.thermo__side { display: flex; flex-direction: column; gap: 10px; }
.thermo__side--out { text-align: right; align-items: flex-end; }
.thermo__label { font-size: 14px; color: var(--text-muted); }
.thermo__value {
  font: 300 clamp(52px, 7.6vw, 112px)/.86 var(--font-display);
  letter-spacing: -.045em;
  color: var(--gold-bright);
}
.thermo__side--out .thermo__value { color: var(--text); }
.thermo__value small {
  margin-left: .12em;
  font-size: .26em;
  font-weight: 400;
  letter-spacing: 0;
  vertical-align: top;
  color: var(--text-muted);
}

.thermo__wall { padding-bottom: 6px; }
.thermo__bar {
  position: relative;
  display: flex;
  height: 64px;
  gap: 2px;
  border-radius: var(--radius-s);
  overflow: hidden;
}
.thermo__bar::after {
  /* жар, угасающий в толще изоляции */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgb(223 150 70 / .5), rgb(196 161 116 / .14) 55%, transparent 88%);
  mix-blend-mode: screen;
  pointer-events: none;
}
.thermo__bar i {
  flex: var(--w) 1 0;
  min-width: 4px;
  display: flex;
  align-items: flex-end;
  padding: 0 0 8px 10px;
  font-style: normal;
  overflow: hidden;
}
.thermo__bar b {
  position: relative;
  z-index: 1;
  font: 400 11px/1.2 var(--font-mono);
  letter-spacing: .04em;
  white-space: nowrap;
  color: var(--text);
}
.is-steel { background: var(--text); padding: 0 !important; }
.is-ceramic { background: rgb(245 242 236 / .2); }
.is-basalt { background: rgb(196 161 116 / .26); }
.thermo__caption {
  margin-top: 12px;
  font: 400 11px/1.3 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
}

.triad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: clamp(40px, 5vw, 64px);
}
.triad li {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.triad h3 {
  font: 500 17px/1.3 var(--font-display);
  letter-spacing: -.01em;
}
.triad p {
  margin-top: 8px;
  font-size: 15.5px;
  color: var(--text-muted);
  max-width: 26em;
}

/* ── Материалы ────────────────────────────────────────────────────────── */

.grades { margin-top: clamp(40px, 6vw, 80px); }

.grades__head,
.grade {
  display: grid;
  grid-template-columns: 3fr 2fr 5fr 2fr;
  gap: 8px 32px;
  align-items: baseline;
}
.grades__head {
  padding-bottom: 14px;
  font: 400 11px/1.3 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.grades__head span:last-child { text-align: right; }

.grade {
  padding: 26px 0;
  border-top: 1px solid var(--line);
  transition: background-color .3s;
}
.grades__list li:last-child { border-bottom: 1px solid var(--line); }

.grade__name {
  font: 300 clamp(30px, 3.3vw, 46px)/1 var(--font-display);
  letter-spacing: -.035em;
}
.grade__name small {
  margin-right: .5em;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: .12em;
  color: var(--gold);
  vertical-align: .9em;
}
.grade__class {
  font-size: 15px;
  color: var(--text-muted);
}
.grade__text {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 34em;
}
.grade__temp {
  position: relative;
  justify-self: end;
  width: 100%;
  padding-bottom: 12px;
  text-align: right;
  font: 400 clamp(17px, 1.6vw, 21px)/1 var(--font-mono);
  color: var(--gold-bright);
  white-space: nowrap;
}
.grade__temp::before,
.grade__temp::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: var(--radius-pill);
}
.grade__temp::before { width: 100%; background: var(--line); }
.grade__temp::after { width: calc(var(--t) * 100%); background: var(--gold); }

/* Раскрывающиеся таблицы */
.spec {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--bg-raised);
}
.spec summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font: 500 13px/1.3 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
  transition: color .2s;
}
.spec summary::-webkit-details-marker { display: none; }
.spec summary::after {
  content: "+";
  font: 300 22px/1 var(--font-display);
  color: var(--gold);
  transition: rotate .3s var(--ease);
}
.spec summary:hover { color: var(--gold-bright); }
.spec[open] summary::after { rotate: 45deg; }
.spec[open] summary { border-bottom: 1px solid var(--line); }

.table-scroll {
  overflow-x: auto;
  scrollbar-color: var(--gold-deep) transparent;
  scrollbar-width: thin;
}
.table-scroll::-webkit-scrollbar { height: 8px; }
.table-scroll::-webkit-scrollbar-track { background: transparent; }
.table-scroll::-webkit-scrollbar-thumb {
  background: var(--gold-deep);
  border-radius: var(--radius-pill);
}

.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}
.data caption {
  padding: 0 0 14px;
  text-align: left;
  font: 400 11px/1.3 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.data th, .data td {
  padding: 13px 16px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.data thead th {
  font: 400 11px/1.3 var(--font-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold);
  vertical-align: bottom;
}
.data tbody th {
  font-weight: 500;
  color: var(--text);
}
.data td { color: var(--text-muted); }
.data .num {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 13.5px;
}
.data thead .num { font-size: 11px; }
.data__group { text-align: center !important; }
.data tbody tr:last-child > * { border-bottom: 0; }
.spec .data th, .spec .data td { padding-inline: 12px; }
.spec .data th:first-child, .spec .data td:first-child { padding-left: 22px; }
.spec .data th:last-child, .spec .data td:last-child { padding-right: 22px; }

.data--compare th, .data--compare td {
  padding-left: 0;
  white-space: normal;
}
.data--compare thead th { color: var(--text-dim); }
.data--compare .is-ours { color: var(--text); }
.data--compare thead .is-ours { color: var(--gold); }
.data--compare tbody tr:last-child > * { border-bottom: 1px solid var(--line); }

.insulation {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: clamp(32px, 5vw, 80px);
  margin-top: clamp(64px, 8vw, 112px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.insulation__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 30% 50%;
}
figcaption {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--text-dim);
}
.insulation__body {
  /* грид-элемент не должен расширяться под min-content широкой таблицы:
     иначе при раскрытии аккордеона появляется горизонтальный скролл страницы */
  min-width: 0;
}
.insulation__body > * + * { margin-top: 28px; }

/* Раскрывашка характеристик стоит на всю ширину под двухколоночным блоком */
.insulation + .spec { margin-top: clamp(36px, 4vw, 64px); }

.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.duo h4 {
  font: 500 12px/1.3 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
}
.duo p {
  margin-top: 10px;
  font-size: 15.5px;
  color: var(--text-muted);
}

/* ── Покрытие ─────────────────────────────────────────────────────────── */

.coating {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(32px, 5vw, 80px);
  margin-top: clamp(40px, 6vw, 80px);
}
.coating__main { overflow: hidden; border-radius: var(--radius-m); position: relative; }
.coating__main img {
  width: 100%;
  aspect-ratio: 5 / 6;
  object-fit: cover;
}
/* Видео проявляется поверх постера, когда загрузилось и играет */
.coating__main video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
.coating__main.is-video video { opacity: 1; }
.coating__body {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3vw, 44px);
}
.coating__aside {
  margin-top: auto;
  width: 100%;
  align-self: stretch;
}
.coating__aside img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.specs > div {
  display: grid;
  grid-template-columns: 11em 1fr;
  gap: 4px 24px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.specs > div:last-child { border-bottom: 1px solid var(--line); }
.specs dt {
  font-size: 14.5px;
  color: var(--text-muted);
}
.specs dd { font-size: 16.5px; }

.swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--text-muted);
}
.swatch {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  margin-bottom: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
}
.swatch--moire {
  background:
    radial-gradient(rgb(255 255 255 / .09) .6px, transparent 1px) 0 0 / 4px 4px,
    radial-gradient(rgb(255 255 255 / .05) .6px, transparent 1px) 2px 2px / 4px 4px,
    #171717;
}
.swatch--grey { background: #84878a; border-color: transparent; }
.swatch--white { background: #edece8; border-color: transparent; }
.swatch--ral {
  border-style: dashed;
  border-color: var(--gold-deep);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: .1em;
  color: var(--gold);
}

/* ── Комплектация ─────────────────────────────────────────────────────── */

.system {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  margin-top: clamp(40px, 6vw, 80px);
}
.system__figure {
  padding: clamp(20px, 3vw, 40px);
  border-radius: var(--radius-l);
  background:
    linear-gradient(rgb(11 11 10 / .08), rgb(11 11 10 / .38)),
    url("../img/steel.webp?v=b3538f4e00") center / cover;
}
.system__figure img {
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgb(0 0 0 / .35));
}
.specs--wide > div { grid-template-columns: 9em 1fr; padding: 20px 0; }
.specs--wide dd { font-size: clamp(16px, 1.4vw, 19px); font-family: var(--font-display); letter-spacing: -.01em; }

.products {
  display: grid;
  /* третья колонка шире ровно настолько, чтобы панели совпали по высоте */
  grid-template-columns: 1fr 1fr 1.39fr;
  gap: clamp(16px, 2vw, 28px);
  margin-top: 32px;
}
.product__img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--paper);
  border-radius: var(--radius-m);
  overflow: hidden;
}
.product__img img {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.product--wide .product__img { aspect-ratio: 1400 / 756; }
.product--wide .product__img img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: normal;
}
.product h4 {
  margin-top: 16px;
  font: 500 17px/1.3 var(--font-display);
  letter-spacing: -.01em;
}
.product__spec {
  margin-top: 6px;
  font: 400 13px/1.4 var(--font-mono);
  color: var(--gold);
}
.product__text {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-muted);
  max-width: 34em;
}

/* ── Монтаж ───────────────────────────────────────────────────────────── */

.rules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: clamp(40px, 6vw, 80px);
}
.rules li {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font: 400 clamp(17px, 1.6vw, 21px)/1.3 var(--font-display);
  letter-spacing: -.015em;
  text-wrap: balance;
}
.rules span {
  display: block;
  margin-bottom: clamp(20px, 3vw, 44px);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0;
  color: var(--gold);
}

.ridge {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  margin-top: clamp(56px, 7vw, 96px);
  padding: clamp(24px, 4vw, 56px);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}
.ridge svg { width: 100%; overflow: visible; }

.rg-fill { fill: rgb(255 255 255 / .035); }
.rg-roof { fill: none; stroke: var(--text); stroke-width: 2.5; stroke-linejoin: round; }
.rg-level { fill: none; stroke: var(--text-dim); stroke-width: 1; stroke-dasharray: 2 5; }
.rg-angle { fill: none; stroke: var(--gold); stroke-width: 1.25; stroke-dasharray: 7 5; }
.rg-arc { fill: none; stroke: var(--gold); stroke-width: 1; }
.rg-pipe { fill: var(--bg-raised); stroke: var(--gold-bright); stroke-width: 1.5; stroke-linejoin: round; }
.rg-cap { fill: none; stroke: var(--gold-bright); stroke-width: 3; }
.rg-ext { fill: none; stroke: var(--text-dim); stroke-width: 1; stroke-dasharray: 2 4; }
.rg-dim { fill: none; stroke: var(--text-muted); stroke-width: 1; }
.rg-text { font: 400 13px var(--font-mono); fill: var(--text-muted); }
.rg-text--gold { fill: var(--gold); }
.rg-text--dim { fill: var(--text-dim); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

.ridge__rules { margin-top: 24px; }
.ridge__rules > div {
  display: grid;
  grid-template-columns: 9.5em 1fr;
  gap: 4px 20px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.ridge__rules dt {
  font: 400 13px/1.55 var(--font-mono);
  color: var(--gold);
}
.ridge__rules dd { font-size: 15.5px; color: var(--text-muted); }

.formula {
  margin-top: 8px;
  padding: 18px 0;
  border-block: 1px solid var(--line);
  font: 400 clamp(16px, 1.5vw, 19px)/1.3 var(--font-mono);
  color: var(--gold-bright);
}
.formula sub {
  font-size: .62em;
  color: var(--text-muted);
}
.ridge .note { margin-top: 12px; }

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

.cases { margin-top: clamp(40px, 6vw, 80px); }

.case {
  display: grid;
  grid-template-columns: 3fr 9fr;
  gap: 24px 32px;
  padding-block: clamp(20px, 2.4vw, 32px);
  border-top: 1px solid var(--line);
}
.case__head {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
}
.case__head h3 {
  font: 500 clamp(19px, 1.7vw, 24px)/1.2 var(--font-display);
  letter-spacing: -.02em;
}
.case__head p {
  margin-top: 10px;
  font-size: 15.5px;
  color: var(--text-muted);
  max-width: 16em;
}
.case__photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 1vw, 14px);
}
.case__photos .ph { aspect-ratio: 4 / 5; }

/* Фото в рамке: обрезка под зум и вытеснение */
.ph {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-m);
  background: var(--bg-panel);
}
.ph img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Производство ─────────────────────────────────────────────────────── */

.stats, .pledge {
  display: grid;
  margin-top: clamp(40px, 6vw, 80px);
  border-block: 1px solid var(--line);
}
.stats { grid-template-columns: repeat(5, 1fr); }
.stats > div, .pledge > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(22px, 2.6vw, 36px) 20px clamp(22px, 2.6vw, 36px) 0;
}
.stats > div + div, .pledge > div + div {
  padding-left: clamp(16px, 2vw, 28px);
  border-left: 1px solid var(--line);
}
.stats dd {
  font: 300 clamp(27px, 3vw, 42px)/1 var(--font-display);
  letter-spacing: -.035em;
  white-space: nowrap;
}
.stats small, .pledge small {
  font-size: .42em;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--gold);
}
.stats dt, .pledge dt {
  font-size: 14.5px;
  line-height: 1.4;
  color: var(--text-muted);
  max-width: 15em;
}

.mosaic {
  display: grid;
  grid-template-columns: 7fr 2.5fr 2.5fr;
  grid-template-rows: 1fr 1fr;
  gap: clamp(8px, 1vw, 14px);
  margin-top: clamp(32px, 4vw, 56px);
}
.mosaic .ph { aspect-ratio: 3 / 4; }
.mosaic .mosaic__main {
  grid-row: 1 / -1;
  aspect-ratio: auto;
  min-height: 0;
}
.mosaic__main img { object-position: 62% 60%; }

/* ── Гарантия ─────────────────────────────────────────────────────────── */

.pledge { grid-template-columns: repeat(3, 1fr); }
.pledge dd {
  font: 300 clamp(46px, 6.4vw, 96px)/.9 var(--font-display);
  letter-spacing: -.045em;
  color: var(--gold-bright);
  white-space: nowrap;
}
.pledge small { font-size: .24em; color: var(--text-muted); }
.pledge dt { font-size: 16px; }

.proof {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
  margin-top: clamp(40px, 5vw, 72px);
}
.checks {
  columns: 2;
  column-gap: 40px;
  font-size: 16px;
}
.checks li {
  position: relative;
  break-inside: avoid;
  padding: 14px 0 14px 26px;
  border-top: 1px solid var(--line);
}
.checks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 1.45em;
  width: 10px;
  height: 1px;
  background: var(--gold);
}

.docs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.docs img {
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius-m);
  filter: saturate(.75) brightness(.92);
}
.docs figure:hover img { filter: none; }

/* ── Заявка ───────────────────────────────────────────────────────────── */

.section--contact { padding-bottom: var(--section); }

.contact {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(40px, 6vw, 96px);
  padding-top: 26px;
  border-top: 1px solid var(--line-strong);
}
.contact h2 { margin-top: 22px; max-width: 11em; }
.contact .lead { margin-top: clamp(18px, 2vw, 28px); }

.contact__list { margin-top: clamp(32px, 4vw, 56px); }
.contact__list li {
  display: grid;
  grid-template-columns: 8em 1fr;
  gap: 4px 20px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  font-size: 17px;
}
.contact__list li:last-child { border-bottom: 1px solid var(--line); }
.contact__list span:first-child {
  font: 400 12px/2.1 var(--font-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.contact__list a { transition: color .2s; }
.contact__list a:hover { color: var(--gold-bright); }

.form {
  display: grid;
  gap: 22px;
  align-content: start;
  padding: clamp(24px, 3vw, 40px);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}
.field { display: grid; gap: 4px; }
.field label {
  font: 400 11px/1.4 var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 11px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  font-size: 17px;
  outline: 0;
  resize: vertical;
  transition: border-color .2s;
}
.field select {
  appearance: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23c4a174' stroke-width='1.5'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 2px center;
  cursor: pointer;
}
.field option { background: var(--bg-panel); color: var(--text); }
.field ::placeholder { color: var(--text-dim); }
.field :is(input, select, textarea):hover { border-bottom-color: var(--text-muted); }
.field :is(input, select, textarea):focus { border-bottom-color: var(--gold); }
.field :is(input, select, textarea):focus-visible { outline: 0; box-shadow: 0 1px 0 var(--gold); }

.form__legal {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-dim);
}
.check-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-dim);
}
.check-consent input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--gold);
  cursor: pointer;
}
.check-consent a { text-decoration: underline; text-underline-offset: 3px; }
.check-consent a:hover { color: var(--text-muted); }
.form__legal a { text-decoration: underline; text-underline-offset: 3px; }
.form__legal a:hover { color: var(--text-muted); }
.form__status {
  color: var(--gold-bright);
  font-size: 15px;
}
.form__status:empty { position: absolute; }
.form__status[data-state="error"] { color: #ffb7a8; }
.form [aria-invalid="true"] { border-color: #ffb7a8; }
.form button:disabled { opacity: .65; cursor: wait; }

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

.site-footer {
  border-top: 1px solid var(--line);
}
.site-footer__top {
  display: grid;
  grid-template-columns: minmax(240px, 1.25fr) repeat(3, minmax(150px, .8fr));
  gap: clamp(32px, 4vw, 56px) clamp(24px, 3vw, 48px);
  padding-block: clamp(44px, 6vw, 76px) clamp(30px, 4.2vw, 52px);
}
.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.site-footer__brand img { height: 40px; width: auto; }
.site-footer__phone {
  margin-top: 8px;
  font: 500 18px/1.3 var(--font-display);
  letter-spacing: -.01em;
  color: var(--text);
  transition: color .2s;
}
.site-footer__phone:hover { color: var(--gold-bright); }
.site-footer__email,
.site-footer__address {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}
.site-footer__email { transition: color .2s; }
.site-footer__email:hover { color: var(--gold-bright); }
.site-footer__address { font-style: normal; margin-top: 4px; color: var(--text-dim); }

.site-footer__title {
  font: 500 11px/1.4 var(--font-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.site-footer__col ul { display: grid; gap: 9px; margin-top: 18px; }
.site-footer__col a {
  font-size: 14.5px;
  color: var(--text-muted);
  transition: color .2s;
}
.site-footer__col a:hover { color: var(--text); }

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  padding-block: 18px 26px;
  border-top: 1px solid var(--line);
}
.site-footer__copy {
  font-size: 13px;
  color: var(--text-dim);
}
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 12.5px;
}
.site-footer__legal a {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s;
}
.site-footer__legal a:hover { color: var(--text-muted); }

@media (max-width: 900px) {
  .site-footer__top { grid-template-columns: 1fr 1fr; }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .site-footer__top { grid-template-columns: 1fr; }
}

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

@media (max-width: 1120px) {
  .products { grid-template-columns: 1fr 1fr; }
  .product--wide { grid-column: 1 / -1; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stats > div:nth-child(4) { padding-left: 0; border-left: 0; }
  .stats > div:nth-child(n + 4) { border-top: 1px solid var(--line); }
}

@media (max-width: 1240px) {
  .site-header__inner { gap: clamp(9px, 2vw, 24px); justify-content: space-between; }
  .site-nav { display: none; }
  .site-menu { display: block; }
  /* на планшетах и мобильных CTA и телефон уступают место бургеру */
  .site-header__actions { display: none; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .site-header__logo img { height: clamp(30px, 9vw, 36px); }

  .hero__media { width: 100%; }
  .hero__media::before {
    background: linear-gradient(180deg, rgb(11 11 10 / .5) 0%, rgb(11 11 10 / .35) 30%, rgb(11 11 10 / .9) 68%, var(--bg) 100%);
  }
  .hero__media::after { display: none; }
  .hero__media img, .hero__media video { object-position: 46% 30%; }
  .hero__inner { justify-content: flex-end; padding-top: clamp(170px, 30svh, 280px); }

  .section-head,
  .anatomy,
  .insulation,
  .coating,
  .system,
  .ridge,
  .proof,
  .contact,
  .case { grid-template-columns: 1fr; }

  .case__head { position: static; }
  .anatomy__figure { width: min(78%, 400px); }
  .insulation__photo img { aspect-ratio: 3 / 2; }
  .coating__aside { width: 100%; }
  .coating__aside img { aspect-ratio: 4 / 3; }

  .grades__head { display: none; }
  .grade {
    grid-template-columns: 1fr auto;
    grid-template-areas: "name temp" "class class" "text text";
  }
  .grade__name { grid-area: name; }
  .grade__class { grid-area: class; }
  .grade__text { grid-area: text; }
  .grade__temp { grid-area: temp; width: 7em; }

  .thermo { grid-template-columns: 1fr 1fr; align-items: start; }
  .thermo__wall { grid-column: 1 / -1; grid-row: 2; }

  .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .mosaic .mosaic__main { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 4 / 3; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }

  .btn--small { padding: 0 14px; }
  .hero__actions .btn { flex: 1 1 100%; }

  .facts { grid-template-columns: 1fr 1fr; }
  .facts__item:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts__item:nth-child(n + 3) { border-top: 1px solid var(--line); }

  .layers__item { grid-template-columns: 28px 1fr auto; gap: 4px 12px; }
  .triad, .rules, .duo, .pledge { grid-template-columns: 1fr; }
  .triad { gap: 20px; }
  .rules { gap: 24px; }
  .rules span { margin-bottom: 14px; }

  .thermo__bar b { font-size: 10px; }

  /* чертёж сжимается втрое — подписи укрупняем, чтобы читались */
  .rg-text { font-size: 26px; }
  .rg-text--dim { font-size: 18px; }

  .swatches { grid-template-columns: 1fr 1fr; }
  .specs > div, .specs--wide > div, .ridge__rules > div, .contact__list li { grid-template-columns: 1fr; }

  .products { grid-template-columns: 1fr; }

  .case__photos {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 72%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .case__photos .ph { scroll-snap-align: center; }

  .stats { grid-template-columns: 1fr 1fr; }
  .stats > div:nth-child(n) { border-top: 0; border-left: 0; padding-left: 0; }
  .stats > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line); }
  .stats > div:nth-child(n + 3) { border-top: 1px solid var(--line); }

  .pledge > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .checks { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Движение
   Всё на чистом CSS, без JS.
   • Наведение и появление первого экрана работают во всех браузерах.
   • Эффекты, привязанные к прокрутке (animation-timeline), — в Chrome, Edge
     и Safari 26+. В остальных страница просто статична, ничего не ломается.
   ══════════════════════════════════════════════════════════════════════════ */

@property --n {
  syntax: "<integer>";
  initial-value: 0;
  inherits: false;
}

/* флажок «блок вошёл в экран»: 0 или 1, наследуется вложенными элементами */
@property --in {
  syntax: "<integer>";
  initial-value: 0;
  inherits: true;
}

/* ── Наведение ────────────────────────────────────────────────────────── */

.btn span[aria-hidden] { display: inline-block; transition: translate .3s var(--ease); }
.btn:hover span[aria-hidden] { translate: 0 3px; }

.btn--primary { position: relative; overflow: hidden; }
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 32%, rgb(255 255 255 / .42) 50%, transparent 68%);
  translate: -120% 0;
  transition: translate .8s var(--ease);
  pointer-events: none;
}
.btn--primary:hover::after { translate: 120% 0; }

/* Изображения: плавный зум при наведении.
   Зум идёт через transform, а анимации прокрутки — через scale и translate,
   поэтому они не перебивают друг друга и переход не срывается в скачок. */
.zoom {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-m);
}
.system__figure { overflow: hidden; }

.ph img,
.zoom img,
.coating__main img,
.system__figure img,
.product__img img,
.docs img {
  transition: transform 1.1s var(--ease), filter .8s var(--ease);
}

@media (hover: hover) {
  /* мягкий ховер кнопок: лёгкий подъём и тень, дольше и плавнее прежнего */
  .btn:hover { translate: 0 -2px; }
  .btn:active { translate: 0 0; transition-duration: .15s; }
  .btn--primary:hover { box-shadow: 0 12px 28px -14px rgb(196 161 116 / .6); }
  .btn--ghost:hover { background: rgb(255 255 255 / .04); box-shadow: 0 12px 28px -18px rgb(0 0 0 / .7); }

  .ph:hover img,
  .zoom:hover img,
  .coating__main:hover img {
    transform: scale(1.06);
    filter: brightness(1.07);
  }
  .system__figure:hover img,
  .product:hover .product__img img { transform: scale(1.05); }
  .docs figure:hover img { transform: translateY(-6px); }
}

.swatch { transition: translate .4s var(--ease), box-shadow .4s var(--ease); }
.swatches li:hover .swatch { translate: 0 -5px; box-shadow: 0 14px 24px -14px rgb(196 161 116 / .55); }

.grade__name { transition: color .3s, transform .5s var(--ease); }
.grade:hover .grade__name { color: var(--gold-bright); transform: translateX(10px); }

.contact__list li { transition: padding-left .4s var(--ease); }
.contact__list li:hover { padding-left: 8px; }

/* Поля формы: золотая линия выезжает при фокусе */
.field { position: relative; }
.field::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--gold);
  transform-origin: left;
  scale: 0 1;
  transition: scale .45s var(--ease);
  pointer-events: none;
}
.field:focus-within::after { scale: 1 1; }
.field label { transition: color .25s; }
.field:focus-within label { color: var(--gold); }

/* Разрез: слой в списке и метка на рендере подсвечивают друг друга */
.pin { transition: background-color .3s, color .3s, scale .35s var(--ease); }
.layers__item { transition: background-color .35s; }

.pin:hover,
.anatomy:has(.layers__item:nth-child(1):hover) .pin:nth-of-type(1),
.anatomy:has(.layers__item:nth-child(2):hover) .pin:nth-of-type(2),
.anatomy:has(.layers__item:nth-child(3):hover) .pin:nth-of-type(3),
.anatomy:has(.layers__item:nth-child(4):hover) .pin:nth-of-type(4),
.anatomy:has(.layers__item:nth-child(5):hover) .pin:nth-of-type(5) {
  background: var(--gold);
  color: #14110c;
  scale: 1.3;
}

.layers__item:hover,
.anatomy:has(.pin:nth-of-type(1):hover) .layers__item:nth-child(1),
.anatomy:has(.pin:nth-of-type(2):hover) .layers__item:nth-child(2),
.anatomy:has(.pin:nth-of-type(3):hover) .layers__item:nth-child(3),
.anatomy:has(.pin:nth-of-type(4):hover) .layers__item:nth-child(4),
.anatomy:has(.pin:nth-of-type(5):hover) .layers__item:nth-child(5) {
  background: linear-gradient(90deg, rgb(196 161 116 / .11), transparent 75%);
}

/* Таблицы-раскрывашки: высота меняется сразу (без анимации block-size),
   поэтому страница не «едет» при открытии, а под таблицей не остаётся
   пустого места при закрытии. Содержимое мягко проявляется. */
@media (prefers-reduced-motion: no-preference) {
  .spec[open] > .table-scroll { animation: spec-in .35s var(--ease) both; }
}

/* ── По загрузке и постоянные ─────────────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  .hero__eyebrow, .hero__lead, .hero__actions, .facts {
    animation: rise .9s var(--ease) both;
  }
  .hero__lead { animation-delay: .46s; }
  .hero__actions { animation-delay: .58s; }
  .facts { animation-delay: .74s; }

  /* заголовок выезжает построчно из-под маски */
  .hero__title .line > span { animation: line-up 1.15s var(--ease) both; }
  .hero__title .line:nth-child(1) > span { animation-delay: .08s; }
  .hero__title .line:nth-child(2) > span { animation-delay: .18s; }
  .hero__title .line:nth-child(3) > span { animation-delay: .28s; }

  .hero__media img { animation: settle 2.2s var(--ease) both; }

  /* метки на разрезе «дышат» */
  .pin::after {
    content: "";
    position: absolute;
    inset: -1px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    animation: pulse 3.2s ease-out infinite;
    pointer-events: none;
  }
  .pin:nth-of-type(2)::after { animation-delay: .6s; }
  .pin:nth-of-type(3)::after { animation-delay: 1.2s; }
  .pin:nth-of-type(4)::after { animation-delay: 1.8s; }
  .pin:nth-of-type(5)::after { animation-delay: 2.4s; }

  .anatomy__figure::before { animation: breathe 5.5s ease-in-out infinite alternate; }
  .thermo__bar::after { animation: heat 3.4s ease-in-out infinite alternate; }

  /* цифры первого экрана набегают до значения */
  .count--load {
    position: relative;
    display: inline-block;
    -webkit-text-fill-color: transparent;
    counter-reset: n var(--n);
    animation: count 1.9s var(--ease) .8s both;
  }
  .count--load::after {
    content: counter(n);
    position: absolute;
    inset: 0 auto auto 0;
    -webkit-text-fill-color: currentColor;
  }
}

/* ── По прокрутке ─────────────────────────────────────────────────────── */

/* Здесь два вида эффектов.

   1. Привязанные к положению прокрутки: индикатор, шапка, параллакс. Их мало,
      и это только transform и opacity — их считает видеокарта.

   2. Появление блоков. Прокрутка тут лишь ставит флажок --in («блок вошёл
      в экран на 80px»), а само движение — обычный CSS-переход. Он идёт по
      времени и не повторяет шаги колеса мыши, поэтому не дёргается.

      Важно: флажок ставится на родителе, а переход вешается на вложенные
      элементы. Переход на том же элементе, что и анимация флажка, браузер
      не запускает — значение просто перескакивает. */

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {

    /* ── 1. Привязано к положению ── */

    .progress {
      animation: progress linear both;
      animation-timeline: scroll(root);
    }
    .site-header {
      animation: header-in linear both;
      animation-timeline: scroll(root);
      animation-range: 0 220px;
    }
    .hero__media img {
      animation: settle 2.2s var(--ease) both, drift linear both;
      animation-timeline: auto, scroll(root);
      animation-range: normal, 0 110vh;
    }
    .coating__main img,
    .ph.mosaic__main img {
      animation: parallax linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }

    /* ── 2. Флажок «вошёл в экран» ── */

    .section-head,
    .anatomy__figure,
    .layers__item,
    .thermo,
    .triad,
    .grade,
    .insulation__photo,
    .insulation__body > .h3,
    .duo,
    .coating__main,
    .coating__aside,
    .specs > div,
    .swatches,
    .system__figure,
    .h3--rule,
    .products,
    .rules,
    .ridge__figure,
    .ridge__rules > div,
    .case,
    .stats,
    .mosaic,
    .pledge,
    .checks,
    .docs {
      animation: flag linear both;
      animation-timeline: view();
      animation-range: entry 70px entry 90px;
    }

    /* Подъём с проявлением */
    .section-head h2,
    .section-head .lead,
    .anatomy__figure > img,
    .layers__item > *,
    .thermo > *,
    .triad > li,
    .rules > li,
    .stats > div,
    .pledge > div,
    .products > .product,
    .swatches > li,
    .docs > figure,
    .duo > div,
    .checks > li,
    .grade > *,
    .specs > div > *,
    .ridge__rules > div > *,
    .h3--rule > span,
    .insulation__body > .h3 > span,
    .insulation__photo > figcaption,
    .coating__aside > figcaption,
    .case__head {
      opacity: var(--in);
      translate: 0 calc((1 - var(--in)) * 26px);
      transition:
        opacity .9s var(--ease) var(--dl, 0s),
        translate 1.1s var(--ease) var(--dl, 0s),
        transform .5s var(--ease),
        color .3s;
    }
    .h3--rule > span,
    .insulation__body > .h3 > span { display: inline-block; }

    /* Соседи в одном ряду — лесенкой */
    :is(.triad, .rules, .stats, .pledge, .products, .swatches, .docs, .duo, .checks, .thermo, .case__photos, .mosaic) > :nth-child(2) { --dl: .09s; }
    :is(.triad, .rules, .stats, .pledge, .products, .swatches, .docs, .duo, .checks, .thermo, .case__photos, .mosaic) > :nth-child(3) { --dl: .18s; }
    :is(.triad, .rules, .stats, .pledge, .products, .swatches, .docs, .duo, .checks, .thermo, .case__photos, .mosaic) > :nth-child(4) { --dl: .27s; }
    :is(.triad, .rules, .stats, .pledge, .products, .swatches, .docs, .duo, .checks, .thermo, .case__photos, .mosaic) > :nth-child(5) { --dl: .36s; }
    :is(.triad, .rules, .stats, .pledge, .products, .swatches, .docs, .duo, .checks, .thermo, .case__photos, .mosaic) > :nth-child(6) { --dl: .45s; }
    :is(.triad, .rules, .stats, .pledge, .products, .swatches, .docs, .duo, .checks, .thermo, .case__photos, .mosaic) > :nth-child(7) { --dl: .54s; }

    /* Заголовок секции: линия прочерчивается, текст поднимается следом */
    .section-head {
      position: relative;
      border-top-color: transparent;
    }
    .section-head::before {
      content: "";
      position: absolute;
      inset: -1px 0 auto;
      height: 1px;
      background: var(--line-strong);
      transform-origin: left;
      scale: var(--in) 1;
      transition: scale 1.3s var(--ease);
    }
    .section-head .eyebrow {
      opacity: var(--in);
      translate: calc((var(--in) - 1) * 18px) 0;
      transition: opacity .8s var(--ease), translate 1s var(--ease);
    }
    .section-head h2 { --dl: .08s; }
    .section-head .lead { --dl: .2s; }

    /* Фото вытесняются слева направо и «усаживаются» */
    .case .ph,
    .mosaic .ph,
    .insulation__photo > .zoom,
    .coating__aside > .zoom {
      clip-path: inset(0 calc((1 - var(--in)) * 100%) 0 0);
      transition: clip-path 1.2s var(--ease) var(--dl, 0s);
    }
    .case .ph img,
    .mosaic .ph img,
    .insulation__photo .zoom img,
    .coating__aside .zoom img {
      scale: calc(1 + (1 - var(--in)) * .16);
      transition:
        scale 1.7s var(--ease) var(--dl, 0s),
        transform 1.1s var(--ease),
        filter .8s var(--ease);
    }
    .coating__main > img {
      clip-path: inset(0 calc((1 - var(--in)) * 100%) 0 0);
      transition:
        clip-path 1.2s var(--ease),
        transform 1.1s var(--ease),
        filter .8s var(--ease);
    }
    .system__figure > img {
      opacity: var(--in);
      scale: calc(.94 + .06 * var(--in));
      transition:
        opacity 1s var(--ease),
        scale 1.4s var(--ease),
        transform 1.1s var(--ease),
        filter .8s var(--ease);
    }

    /* Разрез: метки выскакивают по очереди */
    .pin {
      --dl: .35s;
      opacity: var(--in);
      transform: scale(calc(.2 + .8 * var(--in)));
      transition:
        opacity .5s var(--ease) var(--dl),
        transform .7s cubic-bezier(.3, 1.5, .5, 1) var(--dl),
        background-color .3s,
        color .3s,
        scale .35s var(--ease);
    }
    .pin:nth-of-type(2) { --dl: .47s; }
    .pin:nth-of-type(3) { --dl: .59s; }
    .pin:nth-of-type(4) { --dl: .71s; }
    .pin:nth-of-type(5) { --dl: .83s; }

    /* 400 → 50: стенка «прогревается», цифры считают */
    .thermo__bar {
      clip-path: inset(0 calc((1 - var(--in)) * 100%) 0 0);
      transition: clip-path 1.6s var(--ease) .25s;
    }
    .thermo .count {
      position: relative;
      display: inline-block;
      -webkit-text-fill-color: transparent;
      --n: calc(var(--in) * var(--to));
      counter-reset: n var(--n);
      transition: --n 1.9s var(--ease) .25s;
    }
    .thermo .count::after {
      content: counter(n);
      position: absolute;
      inset: 0 auto auto 0;
      -webkit-text-fill-color: currentColor;
    }

    /* Марки стали: шкала температуры растёт */
    .grade__temp::after {
      transform-origin: right;
      scale: var(--in) 1;
      transition: scale 1.4s var(--ease) .2s;
    }

    /* Чертёж кровли рисуется: скат → дымоходы → размеры */
    .rg-roof {
      stroke-dasharray: 1;
      stroke-dashoffset: calc(1 - var(--in));
      transition: stroke-dashoffset 1.4s var(--ease);
    }
    .rg-fill {
      opacity: var(--in);
      transition: opacity .9s var(--ease) .6s;
    }
    .rg-chimney {
      --dl: .8s;
      opacity: var(--in);
      translate: 0 calc((1 - var(--in)) * 22px);
      transition: opacity .6s var(--ease) var(--dl), translate .9s var(--ease) var(--dl);
    }
    .rg-chimney:nth-of-type(2) { --dl: .95s; }
    .rg-chimney:nth-of-type(3) { --dl: 1.1s; }
    .rg-level, .rg-angle, .rg-arc, .rg-ext, .rg-dim, .rg-text {
      opacity: var(--in);
      transition: opacity .9s var(--ease) 1.5s;
    }
  }

  @media (prefers-reduced-motion: no-preference) and (min-width: 901px) {
    /* на десктопе текст первого экрана растворяется, уступая место секции */
    .hero__inner {
      animation: hero-out linear both;
      animation-timeline: scroll(root);
      animation-range: 22vh 95vh;
    }
  }
}

/* ── Ключевые кадры ───────────────────────────────────────────────────── */

@keyframes rise { from { opacity: 0; translate: 0 18px; } }
@keyframes nav-drop-in { from { opacity: 0; translate: 0 -8px; } }
@keyframes spec-in { from { opacity: 0; translate: 0 -6px; } }
@keyframes menu-in { from { opacity: 0; translate: 0 -12px; } }
@keyframes menu-out { to { opacity: 0; translate: 0 -12px; } }
@keyframes line-up { from { translate: 0 112%; } }
@keyframes settle { from { opacity: 0; scale: 1.06; } }
@keyframes pulse {
  from { opacity: .75; scale: 1; }
  70%, to { opacity: 0; scale: 2.2; }
}
@keyframes breathe { from { opacity: .55; } to { opacity: 1; } }
@keyframes heat { from { opacity: .55; } to { opacity: 1; } }
@keyframes count { from { --n: 0; } to { --n: var(--to); } }

@keyframes flag { from { --in: 0; } to { --in: 1; } }
@keyframes progress { to { scale: 1 1; } }
@keyframes header-in {
  from {
    background-color: rgb(11 11 10 / 0);
    border-bottom-color: transparent;
  }
}
@keyframes drift { to { translate: 0 9%; } }
@keyframes hero-out { to { opacity: 0; translate: 0 -44px; } }
@keyframes parallax {
  from { scale: 1.14; translate: 0 -5.5%; }
  to { scale: 1.14; translate: 0 5.5%; }
}
