/* AVK Systems — первый экран.
   Идея: техника как экспонат. Холодная светлая стена, скаллоп света над блоком,
   мягкая тень монтажа, под ним — объекты, для которых система производится. */

@font-face {
  font-family: "Jost";
  src: url("assets/fonts/jost-cyrillic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Jost";
  src: url("assets/fonts/jost-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #0c1838;
  --blue: #1f3c88;
  --orange: #fd5b03;
  --steel: #4f5b74;
  --wall-top: #ccd4de;
  --wall-mid: #dce2e9;
  --wall-low: #f4f6f9;
  --line: rgba(12, 24, 56, 0.14);
  --grid-line: rgba(31, 60, 136, 0.07);

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 40px);
  --header-h: 88px;
  --uses-height: 180px;
  --uses-half: 90px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --temperature-roll-duration: 1.2s;
  --temperature-roll-ease: cubic-bezier(0.45, 0, 0.55, 1);

  color-scheme: light;
}

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

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

body {
  margin: 0;
  font-family: "Jost", "Futura PT", "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--wall-low);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid rgba(31, 60, 136, 0.42);
  outline-offset: 3px;
  border-radius: 6px;
}

[tabindex="-1"]:focus {
  outline: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Стена ---------- */

.first-screen {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, var(--wall-top) 0%, var(--wall-mid) 38%, #e9edf1 68%, var(--wall-low) 100%);
}

/* Боковая виньетка — стена «уходит» в тень по краям */
.first-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(90% 80% at 50% 38%, rgba(200, 209, 221, 0) 46%, rgba(184, 195, 210, 0.72) 100%);
}

/* Фактура окрашенной стены */
.first-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.05 0 0 0 0 0.09 0 0 0 0 0.2 0 0 0 0.9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Сигнатура: скаллоп света от потолочного светильника над блоком */
.wall-light {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 50%;
  width: min(1180px, 124vw);
  height: min(96vh, 900px);
  transform: translateX(-50%);
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.9) 30%, rgba(255, 255, 255, 0.45) 60%, rgba(255, 255, 255, 0) 94%);
  -webkit-mask-image: radial-gradient(30% 93% at 50% 100%, #000 74%, transparent 100%);
  mask-image: radial-gradient(30% 93% at 50% 100%, #000 74%, transparent 100%);
  animation: light-on 1.8s ease 0.05s both;
}

/* Мягкий рассеянный ореол вокруг пятна */
.wall-light::after {
  content: "";
  position: absolute;
  inset: -10% -20% 0;
  background: radial-gradient(34% 44% at 50% 28%, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
  -webkit-mask-image: none;
  mask-image: none;
}

/* Инженерная карта воздушных потоков: только верхняя зона, ниже растворяется */
.hero-air-grid {
  position: absolute;
  z-index: 2;
  top: var(--header-h);
  left: 50%;
  width: min(1720px, 118vw);
  height: clamp(260px, 37vh, 420px);
  transform: translateX(-50%);
  pointer-events: none;
  overflow: hidden;
  opacity: 0.82;
}

.hero-air-grid img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  animation: grid-in 1.8s var(--ease-out) 0.1s both;
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 20;
}

.header-row {
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand {
  justify-self: start;
  display: inline-flex;
}

.brand img {
  width: 132px;
  height: auto;
}

.nav {
  display: flex;
  gap: clamp(12px, 1.45vw, 24px);
}

.nav a {
  position: relative;
  font-size: 14px;
  font-weight: 450;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding-block: 6px;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out);
}

.nav a:hover::after {
  transform: scaleX(1);
}

.header-cta {
  justify-self: end;
}

.mobile-header-cta {
  display: none;
}

.menu-toggle {
  display: none;
  justify-self: end;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  cursor: pointer;
}

.menu-toggle-bars,
.menu-toggle-bars::before {
  display: block;
  width: 16px;
  height: 1.5px;
  margin-inline: auto;
  background: currentColor;
  transition: transform 0.3s var(--ease-out);
}

.menu-toggle-bars {
  position: relative;
  transform: translateY(-3px);
}

.menu-toggle-bars::before {
  content: "";
  position: absolute;
  top: 6px;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars {
  transform: translateY(0) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before {
  top: 0;
  transform: rotate(-90deg);
}

.mobile-nav {
  position: absolute;
  top: calc(var(--header-h) - 8px);
  left: var(--gutter);
  right: var(--gutter);
  display: grid;
  gap: 4px;
  max-height: calc(100dvh - var(--header-h) - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 60px -20px rgba(12, 24, 56, 0.35);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a:not(.btn) {
  padding: 14px 12px;
  font-size: 18px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.mobile-nav .btn {
  margin-top: 10px;
  justify-content: center;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  border: 0;
  cursor: pointer;
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}

.btn-ghost {
  padding: 0 22px;
  border: 1px solid rgba(12, 24, 56, 0.22);
  color: var(--ink);
}

.btn-ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.btn-primary {
  padding: 6px 6px 6px 28px;
  min-height: 60px;
  font-size: 16px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 18px 36px -18px rgba(12, 24, 56, 0.55);
}

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

.btn-chip {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  transition: transform 0.45s var(--ease-out);
}

.btn-primary:hover .btn-chip {
  transform: translateX(3px);
}

.action-arrow {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quiz-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 52px;
  padding: 6px 7px 6px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 16px 30px -20px rgba(12, 24, 56, 0.72);
  font: 600 14px/1.35 'Jost', sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background-color .28s var(--ease-out), border-color .28s var(--ease-out), transform .28s var(--ease-out);
}

.quiz-cta:hover {
  border-color: var(--blue);
  background: var(--blue);
  transform: translateY(-1px);
}

.quiz-cta__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  color: #fff;
  background: var(--orange);
}

.quiz-cta__icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link-quiet:has(.action-arrow),
.text-action:has(.action-arrow) {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.mobile-nav .btn-primary {
  padding: 0 24px;
  box-shadow: none;
}

.link-quiet {
  font-size: 15px;
  font-weight: 450;
  text-decoration: none;
  padding-block: 6px;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size 0.45s var(--ease-out), color 0.3s;
}

.link-quiet:hover {
  color: var(--blue);
  background-size: 0 1px;
  background-position: 100% 100%;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: clamp(6px, 2.4vh, 34px);
}

/* Продукт смонтирован на стене по центральной оси */
.hero-unit {
  --unit-w: clamp(340px, min(58vw, 68vh), 740px);
  position: relative;
  z-index: 3;
  width: var(--unit-w);
  display: grid;
  grid-template-rows: auto 36px;
  perspective: 1200px;
  flex-shrink: 0;
}

/* Тихая орбита продукции: фокусный аппарат впереди, соседние уходят в глубину */
.product-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1798 / 882;
  transform-style: preserve-3d;
  animation: stage-in 1.4s var(--ease-out) 0.15s both;
}

.product-slide {
  --product-width: 100%;
  position: absolute;
  inset: -2% 0 0;
  margin: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translate3d(0, -8%, -260px) scale(0.52);
  transform-origin: 50% 54%;
  filter: blur(5px);
  pointer-events: none;
  transition:
    transform 1.15s var(--ease-out),
    opacity 0.85s ease,
    filter 0.95s ease;
  will-change: transform, opacity, filter;
}

.product-slide picture {
  display: contents;
}

.product-slide img {
  width: var(--product-width);
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 26px 26px rgba(16, 28, 60, 0.2)) drop-shadow(0 4px 5px rgba(16, 28, 60, 0.1));
}

.product-slide--wall {
  --product-width: 90%;
}

.product-slide--outdoor {
  --product-width: 72%;
}

.product-slide--outdoor img {
  mix-blend-mode: multiply;
}

.product-slide--two {
  --product-width: 88%;
}

.product-slide--three {
  --product-width: 82%;
}

.product-slide.is-active {
  z-index: 4;
  opacity: 1;
  transform: translate3d(0, 0, 90px) scale(1);
  filter: blur(0);
}

.product-slide.is-next {
  z-index: 2;
  opacity: 0;
  transform: translate3d(64%, 2%, -220px) rotateY(-16deg) scale(0.34);
  filter: blur(1.5px);
}

.product-slide.is-prev {
  z-index: 1;
  opacity: 0;
  transform: translate3d(-64%, 2%, -240px) rotateY(16deg) scale(0.32);
  filter: blur(2px);
}

.product-slide.is-far {
  z-index: 0;
  opacity: 0;
  transform: translate3d(0, -9%, -280px) scale(0.5);
}

.product-controls {
  position: relative;
  z-index: 8;
  justify-self: center;
  align-self: end;
  display: flex;
  align-items: center;
  gap: 2px;
}

.product-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.product-dot::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(31, 60, 136, 0.32);
  transition: width 0.45s var(--ease-out), background-color 0.35s ease;
}

.product-dot.is-active::before {
  width: 18px;
  border-radius: 999px;
  background: var(--orange);
}

/* Парные параметры микроклимата: слева постоянная влажность, справа —
   синхронная с оборудованием вертикальная лента температуры. */
.environment-facts {
  position: absolute;
  z-index: 7;
  top: 0;
  left: 50%;
  width: min(1240px, calc(100vw - 64px));
  height: calc(100% - 36px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
  pointer-events: none;
}

.environment-fact {
  position: relative;
  width: 190px;
  min-height: 120px;
  color: var(--blue);
}

.environment-fact--humidity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 14px;
  text-align: right;
}

.environment-fact--temperature {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  overflow: hidden;
}

.environment-scale-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.environment-scale {
  width: 28px;
  height: 120px;
  overflow: visible;
  color: rgba(31, 60, 136, 0.4);
}

.environment-scale use {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.temperature-scale__viewport {
  display: block;
  width: 28px;
  height: 120px;
  overflow: hidden;
  transform: scaleX(-1);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 90%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 90%, transparent 100%);
}

.temperature-scale__track {
  display: block;
  width: 28px;
  height: 360px;
  transform: translateY(-120px);
  will-change: transform;
}

.temperature-scale__track.is-shifting {
  animation: temperature-scale-roll var(--temperature-roll-duration) var(--temperature-roll-ease) both;
}

.environment-fact__copy {
  min-width: 0;
}

.environment-fact__icon {
  width: 30px;
  height: 30px;
  margin-bottom: 10px;
  color: var(--blue);
}

.environment-fact__weather {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  margin-bottom: 7px;
}

.environment-fact__weather svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.environment-fact__weather svg:first-child {
  color: var(--orange);
}

.environment-fact__weather i {
  width: 18px;
  height: 1px;
  background: rgba(31, 60, 136, 0.3);
}

.environment-fact__eyebrow {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.environment-fact__value {
  display: block;
  margin-top: 3px;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.environment-fact__note {
  display: block;
  max-width: 15em;
  margin-top: 5px;
  font-size: 10px;
  line-height: 1.25;
  color: var(--steel);
}

.environment-fact__disclaimer {
  display: block;
  margin-top: 4px;
  font-size: 8.5px;
  line-height: 1.2;
  color: rgba(79, 91, 116, 0.72);
}

.temperature-fact__viewport {
  position: relative;
  width: 100%;
  height: 120px;
  overflow: hidden;
}

.temperature-fact__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  transform: translateY(-100%);
  filter: blur(2px);
  transition:
    transform var(--temperature-roll-duration) var(--temperature-roll-ease),
    opacity 0.65s ease,
    filter 0.8s ease;
  will-change: transform, opacity, filter;
}

.temperature-fact__slide.is-active {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.temperature-fact__slide.is-prev {
  transform: translateY(100%);
}

/* Контактная тень на стене под блоком */
.unit-shadow {
  position: absolute;
  z-index: -1;
  left: 12%;
  right: 6%;
  bottom: 18px;
  height: 32%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(20, 32, 66, 0.2), rgba(20, 32, 66, 0));
  filter: blur(10px);
  animation: fade-in 1.6s ease 0.6s both;
}

/* Текст */
.hero-copy {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-inline: var(--gutter);
  margin-top: clamp(28px, 4.4vh, 56px);
  flex-shrink: 0;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  animation: rise 1s var(--ease-out) 0.4s both;
}

.kicker-mark {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
}

.hero-title {
  margin: clamp(10px, 1.8vh, 18px) 0 0;
  font-size: clamp(40px, min(6.4vw, 10.4vh), 100px);
  line-height: 0.98;
  letter-spacing: -0.028em;
  font-weight: 500;
  text-wrap: balance;
  animation: rise 1.1s var(--ease-out) 0.5s both;
}

.title-light {
  font-weight: 300;
  color: var(--blue);
}

.hero-lead {
  max-width: 40em;
  margin: clamp(14px, 2.2vh, 22px) 0 0;
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.5;
  color: var(--steel);
  text-wrap: balance;
  animation: rise 1.1s var(--ease-out) 0.6s both;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: clamp(20px, 3.2vh, 34px);
  animation: rise 1.1s var(--ease-out) 0.7s both;
}

/* Назначение: единая лента-триптих, раскрывается по наведению */
.uses-bridge {
  display: contents;
}

.uses {
  position: relative;
  z-index: 4;
  width: calc(100% - 2 * var(--gutter));
  max-width: calc(var(--container) - 2 * var(--gutter));
  margin: clamp(24px, 4vh, 48px) 0 clamp(20px, 3vh, 32px);
  display: flex;
  gap: 3px;
  height: var(--uses-height);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 14px 32px -28px rgba(12, 24, 56, 0.24);
  animation: rise 1.2s var(--ease-out) 0.85s both;
  flex-shrink: 0;
}

.use {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  color: #fff;
  background: var(--ink);
  cursor: default;
  transition: flex-grow 0.8s var(--ease-out);
}

.use img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
  filter: saturate(0.86) contrast(1.03);
  transform: scale(1.02);
  transition: transform 1.2s var(--ease-out), filter 0.8s ease;
}

.use::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8, 16, 38, 0.92) 0%, rgba(8, 16, 38, 0.6) 38%, rgba(8, 16, 38, 0) 82%);
}

.use-caption {
  position: absolute;
  z-index: 1;
  left: clamp(18px, 2vw, 28px);
  right: clamp(18px, 2vw, 28px);
  bottom: clamp(16px, 1.8vw, 22px);
  display: grid;
  gap: 2px;
}

.use-title {
  font-size: clamp(18px, 1.55vw, 22px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.use-text {
  font-size: 14px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.82);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.use-preview-copy { display: none; }

/* Активный кадр чистый, его подпись занимает соседнюю карточку. */
@media (min-width: 1024px) {
  .uses-preview-focus .uses { --uses-title-size: clamp(11px, 1.08vw, 15px); }
  .uses-preview-focus .uses.is-previewing .use { flex-grow: 0.95; }
  .uses-preview-focus .uses.is-previewing .use.is-preview-active { flex-grow: 1.8; }
  .uses-preview-focus .uses.is-previewing .use.is-preview-neighbor {
    flex-grow: 1.3;
    background: linear-gradient(125deg, #304d82 0%, #1d3565 52%, #101e3f 100%);
    background-size: 190% 190%;
    animation: usePanelDrift 9s ease-in-out infinite alternate;
  }

  .uses-preview-focus .use-caption {
    left: clamp(8px, 1vw, 14px);
    right: clamp(8px, 1vw, 14px);
    bottom: 18px;
  }

  .uses-preview-focus .use-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--uses-title-size);
    font-weight: 600;
    line-height: 1.25;
  }

  .uses-preview-focus .uses:not(.is-previewing) .use-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(12px, 0.95vw, 13px);
  }

  .uses-preview-focus .use.is-preview-active img {
    filter: saturate(1) contrast(1.03);
    transform: scale(1.035);
  }

  .uses-preview-focus .use.is-preview-active::after,
  .uses-preview-focus .use.is-preview-active .use-caption,
  .uses-preview-focus .use.is-preview-neighbor::after,
  .uses-preview-focus .use.is-preview-neighbor .use-caption,
  .uses-preview-focus .use.is-preview-neighbor img { opacity: 0; }

  .uses-preview-focus .uses.is-previewing .use-text { display: none; }
  .uses-preview-focus .use.is-preview-active .use-caption,
  .uses-preview-focus .use.is-preview-neighbor .use-caption { transition: none; }

  .uses-preview-focus .use img,
  .uses-preview-focus .use::after,
  .uses-preview-focus .use-caption { transition: opacity 0.32s ease, transform 1.2s var(--ease-out), filter 0.8s ease; }

  .uses-preview-focus .use.is-preview-neighbor .use-preview-copy {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 4px;
    padding: 18px clamp(10px, 1.2vw, 16px);
    color: #fff;
    pointer-events: none;
  }

  .uses-preview-focus .use-preview-icon {
    position: absolute;
    top: 16px;
    left: clamp(10px, 1.2vw, 16px);
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.9);
  }

  .uses-preview-focus .use-preview-icon svg { width: 22px; height: 22px; }

  .uses-preview-focus .use-preview-copy__title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--uses-title-size);
    font-weight: 600;
    line-height: 1.25;
  }

  .uses-preview-focus .use-preview-copy__text {
    white-space: normal;
    font-size: clamp(12px, 0.95vw, 13px);
    line-height: 1.28;
    color: rgba(255, 255, 255, 0.84);
  }

  @keyframes usePanelDrift {
    from { background-position: 0% 25%; }
    to { background-position: 100% 75%; }
  }
}

@media (prefers-reduced-motion: reduce) {
  .uses-preview-focus .uses.is-previewing .use.is-preview-neighbor { animation: none; }
}

@media (min-width: 1024px) and (max-height: 820px) {
  .uses-preview-focus .use.is-preview-neighbor .use-preview-copy { padding-block: 12px; gap: 3px; }
  .uses-preview-focus .use-preview-icon { top: 10px; width: 28px; height: 28px; }
  .uses-preview-focus .use-preview-icon svg { width: 18px; height: 18px; }
  .uses-preview-focus .use-preview-copy__text { line-height: 1.2; }
}

@media (min-width: 1024px) and (max-height: 680px) {
  .uses-preview-focus .use.is-preview-neighbor .use-preview-copy { padding-block: 6px; gap: 2px; }
  .uses-preview-focus .use-preview-icon { display: none; }
  .uses-preview-focus .use-preview-copy__text { line-height: 1.14; }
}

@media (min-width: 1024px) and (hover: hover) {
  .uses:hover .use {
    flex-grow: 0.85;
  }

  .uses .use:hover {
    flex-grow: 1.45;
  }

  .use:hover img {
    transform: scale(1.06);
    filter: saturate(1) contrast(1.03);
  }
}

.use:focus-visible {
  outline-offset: -4px;
  border-radius: 0;
}

/* Планшет и десктоп: свободная высота равномерно расходится между тремя уровнями */
@media (min-width: 761px) {
  .first-screen {
    min-height: calc(100svh - var(--uses-half) - 28px);
  }

  .hero {
    padding-top: clamp(4px, 1.5vh, 20px);
    padding-bottom: calc(var(--uses-half) + 28px);
    justify-content: space-between;
  }

  .hero-unit {
    translate: 0 20px;
  }

  .hero-copy {
    margin-top: 0;
  }

  .uses {
    left: 50%;
    margin-block: 0;
    margin-inline: 0;
    translate: -50% -50%;
    margin-bottom: calc(0px - var(--uses-height));
  }
}

/* Десктоп: компактный масштаб без потери вертикального ритма */
@media (min-width: 981px) {

  .hero-unit {
    --unit-w: clamp(360px, min(52vw, 60vh), 680px);
  }

  .hero-title {
    font-size: clamp(40px, min(5.7vw, 8.6vh), 86px);
  }

  .hero-lead {
    margin-top: clamp(12px, 1.6vh, 18px);
  }

  .hero-actions {
    margin-top: clamp(18px, 2.2vh, 26px);
  }

}

/* Средняя высота десктопа: сохраняем карточки 180 px, уплотняем только экспонат. */
@media (min-width: 981px) and (max-height: 950px) {
  .hero {
    gap: 12px;
    padding-top: 8px;
  }

  .hero-unit {
    --unit-w: clamp(360px, min(52vw, 58vh), 640px);
    translate: 0 10px;
  }
}

/* Низкие ноутбучные экраны: заранее уплотняем композицию,
   чтобы переходная лента целиком оставалась в первом viewport. */
@media (min-width: 761px) and (max-height: 820px) {
  :root {
    --header-h: 76px;
    --uses-height: 150px;
    --uses-half: 75px;
  }

  .brand img {
    width: 120px;
  }

  .hero {
    padding-top: 6px;
    padding-bottom: 101px;
  }

  .hero-unit {
    --unit-w: clamp(330px, min(48vw, 50vh), 560px);
    grid-template-rows: auto 32px;
    translate: 0 12px;
  }

  .hero-copy {
    margin-top: 0;
  }

  .hero-title {
    font-size: clamp(38px, min(5.4vw, 7.8vh), 78px);
  }

  .hero-lead {
    margin-top: 8px;
  }

  .hero-actions {
    margin-top: 12px;
  }

  .btn-primary {
    min-height: 52px;
  }

  .btn-chip {
    width: 40px;
    height: 40px;
  }

}

/* Очень низкая альбомная высота: масштабируем, но никогда не схлопываем слои */
@media (min-width: 761px) and (max-height: 680px) {
  :root {
    --header-h: 64px;
    --uses-height: 110px;
    --uses-half: 55px;
  }

  .brand img {
    width: 106px;
  }

  .hero {
    gap: 12px;
    padding-top: 6px;
    padding-bottom: 79px;
  }

  .hero-unit {
    --unit-w: clamp(280px, min(46vw, 46vh), 480px);
    grid-template-rows: auto 30px;
    translate: 0 8px;
  }

  .kicker {
    font-size: 11px;
  }

  .hero-title {
    font-size: clamp(32px, min(4.8vw, 6.5vh), 58px);
  }

  .hero-lead {
    margin-top: 6px;
    font-size: 14.5px;
    line-height: 1.35;
  }

  .hero-actions {
    margin-top: 8px;
  }

  .btn-primary {
    min-height: 48px;
    font-size: 15px;
  }

  .btn-chip {
    width: 36px;
    height: 36px;
  }

}

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

@keyframes stage-in {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes light-on {
  0% { opacity: 0; }
  35% { opacity: 0.55; }
  45% { opacity: 0.35; }
  100% { opacity: 1; }
}

@keyframes grid-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes temperature-scale-roll {
  0% {
    transform: translateY(-120px);
  }
  76% {
    transform: translateY(3px);
  }
  90% {
    transform: translateY(-1.5px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes temperature-scale-roll-tablet {
  0% {
    transform: translateY(-108px);
  }
  76% {
    transform: translateY(2.5px);
  }
  90% {
    transform: translateY(-1.25px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes temperature-scale-roll-mobile {
  0% {
    transform: translateY(-68px);
  }
  76% {
    transform: translateY(2px);
  }
  90% {
    transform: translateY(-1px);
  }
  100% {
    transform: translateY(0);
  }
}

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

@media (1024px <= width < 1200px) {
  .header-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
  }

  .brand img { width: 110px; }
  .nav { justify-content: center; gap: clamp(7px, 0.9vw, 11px); }
  .nav a { font-size: 12px; white-space: nowrap; }
  .header-cta { padding-inline: 14px; font-size: 13px; }
}

@media (width < 1024px) {
  .nav { display: none; }

  .header-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
  }

  .menu-toggle {
    display: block;
  }
}

@media (max-width: 980px) {

  .product-slide.is-next,
  .product-slide.is-prev {
    opacity: 0;
  }

  .environment-facts {
    width: calc(100vw - 32px);
  }

  .environment-fact {
    width: 144px;
    min-height: 112px;
  }

  .environment-fact--humidity {
    grid-template-columns: minmax(0, 1fr) 22px;
    gap: 8px;
  }

  .environment-fact--temperature {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 8px;
  }

  .environment-scale,
  .temperature-scale__viewport {
    width: 22px;
    height: 108px;
  }

  .temperature-scale__track {
    width: 22px;
    height: 324px;
    transform: translateY(-108px);
  }

  .temperature-scale__track.is-shifting {
    animation-name: temperature-scale-roll-tablet;
  }

  .temperature-fact__viewport {
    height: 112px;
  }

  .environment-fact__value {
    font-size: 18px;
  }

  .environment-fact__note {
    font-size: 10px;
  }

  .environment-fact__note,
  .environment-fact__disclaimer {
    display: none;
  }
}

/* Планшет: карточки читаются в прокручиваемой ленте, с явной навигацией. */
@media (761px <= width < 1024px) {
  .mobile-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
  }

  .mobile-nav a:not(.btn) {
    padding-block: 12px;
    font-size: 15px;
  }

  .mobile-nav .btn { grid-column: 1 / -1; }

  .uses-bridge {
    position: relative;
    display: block;
    height: calc(var(--uses-half) + 68px);
  }

  .uses {
    width: calc(100% - 2 * var(--gutter));
    max-width: calc(var(--container) - 2 * var(--gutter));
    margin: 0;
    margin-bottom: 0;
    gap: 12px;
    border-radius: 0;
    box-shadow: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .uses::-webkit-scrollbar { display: none; }

  .use {
    flex: 0 0 calc((100% - 12px) / 1.7);
    border-radius: 18px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .uses-bridge > .mobile-rail-nav:not([hidden]) {
    position: absolute;
    top: calc(var(--uses-half) + 12px);
    left: 50%;
    width: min(400px, calc(100% - 2 * var(--gutter)));
    margin: 0;
    translate: -50% 0;
  }
}

@media (width < 761px) {
  :root {
    --header-h: 72px;
  }

  html,
  body {
    overflow-x: clip;
  }

  html {
    scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top) + 16px);
  }

  section[id] {
    scroll-margin-top: calc(var(--header-h) + env(safe-area-inset-top) + 16px);
  }

  .site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 90;
    padding-top: env(safe-area-inset-top);
    border-bottom: 1px solid rgba(31, 60, 136, .1);
    background: #eff4f9;
    box-shadow: 0 12px 30px -24px rgba(8, 24, 58, .65);
  }

  .header-row {
    grid-template-columns: minmax(88px, 1fr) auto auto;
    gap: 8px;
  }

  .header-cta { display: none; }

  .mobile-header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 13px;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
  }

  .mobile-nav {
    top: calc(var(--header-h) + env(safe-area-inset-top) - 8px);
  }

  /* Mobile first paint must not wait for decorative entrance delays. Product
     switching and the live temperature scale keep their own animations. */
  .wall-light,
  .hero-air-grid img,
  .product-stage,
  .unit-shadow,
  .kicker,
  .hero-title,
  .hero-lead,
  .hero-actions,
  .uses {
    animation: none;
  }

  .first-screen {
    z-index: 50;
    min-height: 0;
    overflow: visible;
    padding-top: calc(var(--header-h) + env(safe-area-inset-top));
  }

  /* Header lives inside the first-screen stacking context. Raise that whole
     context while its menu is open so the overlap rail can never cover it. */
  .first-screen.is-mobile-nav-open {
    z-index: 80;
  }

  body.is-mobile-nav-open {
    overflow: hidden;
  }

  .brand img {
    width: 100px;
  }

  .wall-light {
    width: 190vw;
    height: 640px;
  }

  .hero-air-grid {
    width: 180vw;
    height: 260px;
    opacity: 0.64;
  }

  .hero {
    padding-top: 14px;
    /* Верхняя половина ленты + видимый отступ после обеих кнопок. */
    padding-bottom: calc(var(--uses-half) + 32px);
  }

  .hero-unit {
    --unit-w: min(86vw, 440px);
    grid-template-rows: auto 36px auto;
    perspective: none;
  }

  .product-stage {
    transform-style: flat;
  }

  .product-slide,
  .product-slide.is-next,
  .product-slide.is-prev,
  .product-slide.is-far {
    inset: 0;
    transform: translateY(-3%) scale(0.96);
    filter: none;
  }

  .product-slide.is-active {
    transform: none;
    filter: none;
  }

  /* На мобильных тяжёлая drop-shadow вместе с 3D-слоем обрезалась по
     нижней границе сцены и давала горизонтальный шов только у высоких
     изображений. Мягкую контактную тень уже рисует .unit-shadow. */
  .product-slide img {
    filter: none;
  }

  .product-controls {
    grid-row: 2;
  }

  .environment-facts {
    position: relative;
    top: auto;
    left: auto;
    grid-row: 3;
    justify-self: center;
    width: min(480px, calc(100vw - 32px));
    height: 76px;
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    transform: none;
  }

  .environment-fact {
    width: auto;
    min-height: 76px;
  }

  .environment-fact--humidity {
    grid-template-columns: minmax(0, 1fr) 20px;
    gap: 8px;
  }

  .environment-fact--temperature {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 8px;
  }

  .environment-scale,
  .temperature-scale__viewport {
    width: 20px;
    height: 68px;
  }

  .temperature-scale__track {
    width: 20px;
    height: 204px;
    transform: translateY(-68px);
  }

  .temperature-scale__track.is-shifting {
    animation-name: temperature-scale-roll-mobile;
  }

  .environment-fact__icon {
    width: 20px;
    height: 20px;
    margin-bottom: 3px;
  }

  .environment-fact__weather {
    height: 18px;
    margin-bottom: 2px;
  }

  .environment-fact__weather svg {
    width: 16px;
    height: 16px;
  }

  .environment-fact__weather i {
    width: 10px;
  }

  .environment-fact__eyebrow {
    font-size: 8px;
  }

  .environment-fact__value {
    font-size: 17px;
  }

  .environment-fact__note {
    display: none;
  }

  .environment-fact__disclaimer {
    display: none;
  }

  .temperature-fact__viewport {
    height: 76px;
  }

  /* Shared rows for both readouts, even when a temperature label wraps. */
  .environment-fact__copy {
    display: grid;
    grid-template-rows: 22px 20px 22px;
    row-gap: 3px;
    width: 100%;
  }

  .environment-fact__icon,
  .environment-fact__weather {
    grid-row: 1;
    align-self: center;
    height: 22px;
    margin: 0;
  }

  .environment-fact__icon {
    justify-self: end;
    width: 22px;
    display: block;
  }

  .environment-fact__weather svg {
    width: 20px;
    height: 20px;
  }

  .environment-fact__eyebrow {
    grid-row: 2;
    align-self: end;
    margin: 0;
  }

  .environment-fact__value {
    grid-row: 3;
    align-self: start;
    margin: 0;
    line-height: 22px;
  }

  .hero-copy {
    width: 100%;
    max-width: 100%;
    margin-top: 30px;
  }

  .kicker {
    font-size: 12px;
    letter-spacing: 0.16em;
  }

  .hero-title {
    font-size: clamp(38px, 11.4vw, 56px);
    line-height: 1;
  }

  .title-strong,
  .title-light {
    display: block;
  }

  .hero-actions {
    flex-direction: column;
    align-self: stretch;
    gap: 16px;
  }

  .btn-primary {
    justify-content: space-between;
    width: 100%;
  }

  .hero-actions .btn-primary {
    white-space: normal;
    text-align: left;
  }

  .hero-actions .btn-chip {
    flex-shrink: 0;
  }

  .uses-bridge {
    position: relative;
    /* Лента перекрывает нижнюю границу hero; её верхняя половина не должна
       уходить под stacking context первого экрана (z-index: 50). */
    z-index: 60;
    display: block;
    height: 0;
  }

  .uses {
    left: auto;
    width: 100%;
    max-width: none;
    height: var(--uses-height);
    margin: 0;
    translate: 0 -50%;
    padding: 0 var(--gutter);
    display: flex;
    border-radius: 0;
    box-shadow: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    gap: 12px;
    scrollbar-width: none;
  }

  .uses-bridge > .mobile-rail-nav:not([hidden]) {
    position: absolute;
    top: calc(var(--uses-half) + 12px);
    right: var(--gutter);
    left: var(--gutter);
    width: auto;
    margin: 0;
  }

  .uses::-webkit-scrollbar {
    display: none;
  }

  .use {
    /* С учётом отступов и gap следующая карточка начинается на 80% экрана. */
    flex: 0 0 calc(80% + var(--gutter) * 0.6 - 12px);
    height: 100%;
    border-radius: 18px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .use-caption {
    bottom: 16px;
    left: 18px;
    right: 18px;
  }

  .use-title {
    font-size: 18px;
  }

  .use-text {
    display: -webkit-box;
    white-space: normal;
    overflow: hidden;
    text-overflow: clip;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 360px) {
  .hero-actions .btn-primary {
    min-height: 56px;
    gap: 8px;
    padding-left: 18px;
    font-size: 13.5px;
  }

  .hero-actions .btn-chip {
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
