/* ============================================================================
   ГАРАНТ СТАЛЬ — дизайн-система «Industrial Elegance & Precision Metal»
   Бишкек, ул. Пишпекская 9 · garantstalkg.com
   ----------------------------------------------------------------------------
   Структура файла:
   00 · Токены и базовый слой
   01 · Типографика
   02 · Материальные поверхности (сталь / стекло / латунь / чёрный металл)
   03 · Разметка, оболочки, служебные утилиты
   04 · Шапка и навигация
   05 · Кнопки и элементы управления
   06 · Плиты (карточки), таблицы спецификаций
   07 · Hero-визуализатор
   08 · Секции главной, каталог, аккордеон
   09 · Калькулятор
   10 · Формы, модальные окна, футер
   11 · Движение и адаптив
   ========================================================================== */

/* ── 00 · Токены и базовый слой ─────────────────────────────────────────── */

:root {
  /* Металл — глубина */
  --steel-950: #070910;
  --steel-900: #0b0e14;
  --steel-870: #0f131c;
  --steel-840: #131822;
  --steel-800: #171d29;
  --steel-760: #1e2533;
  --steel-700: #2a3245;

  /* Линии и фаски */
  --edge:        #2a3245;
  --edge-soft:   rgba(226, 232, 240, 0.08);
  --edge-bright: rgba(226, 232, 240, 0.16);

  /* Сатин — текст */
  --satin:       #e2e8f0;
  --satin-dim:   #a6b1c6;
  --satin-faint: #75809a;

  /* Латунь / титановое золото */
  --brass:       #d97706;
  --brass-lit:   #f59e0b;
  --brass-pale:  #f7d68a;
  --brass-deep:  #8a4b06;
  --brass-wash:  rgba(217, 119, 6, 0.12);
  --brass-line:  rgba(245, 158, 11, 0.34);

  /* Закалённое стекло */
  --glass:       rgba(56, 189, 248, 0.08);
  --glass-edge:  rgba(125, 211, 252, 0.30);
  --glass-lit:   #7dd3fc;

  /* Семантика */
  --danger: #f87171;
  --ok:     #4ade80;

  /* Шрифты */
  --font-display: "Syne", "Trebuchet MS", sans-serif;
  --font-body: "Space Grotesk", "Segoe UI", system-ui, sans-serif;

  /* Ритм 4/8 */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --shell: 1320px;
  --shell-narrow: 940px;

  --radius: 3px;
  --radius-lg: 6px;

  /* Тени — «вес металла», не мягкий пух */
  --lift-1: 0 1px 0 rgba(226, 232, 240, 0.05) inset, 0 18px 40px -28px rgba(0, 0, 0, 0.9);
  --lift-2: 0 1px 0 rgba(226, 232, 240, 0.07) inset, 0 34px 80px -40px rgba(0, 0, 0, 1);
  --lift-brass: 0 0 0 1px var(--brass-line), 0 26px 60px -34px rgba(217, 119, 6, 0.55);

  /* Движение */
  --ease-out: cubic-bezier(0.22, 0.68, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0.06, 0.68, 0.19);
  --t-fast: 160ms;
  --t-base: 240ms;
  --t-slow: 420ms;

  /* Слои */
  --z-base: 1;
  --z-sticky: 40;
  --z-nav: 80;
  --z-drawer: 90;
  --z-modal: 120;
  --z-toast: 160;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6.5rem;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.65;
  color: var(--satin-dim);
  background-color: var(--steel-900);
  background-image:
    radial-gradient(120% 80% at 78% -10%, rgba(56, 189, 248, 0.07), transparent 60%),
    radial-gradient(90% 60% at 8% 4%, rgba(217, 119, 6, 0.06), transparent 62%);
  background-attachment: fixed;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  /* Длинные токены (почта, артикулы) не должны рвать сетку на узких экранах */
  overflow-wrap: break-word;
}

body.is-locked {
  overflow: hidden;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--brass-lit);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--brass);
  color: var(--steel-950);
}

.skip-link {
  position: fixed;
  top: -100px;
  left: var(--space-4);
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--brass-lit);
  color: var(--steel-950);
  font-weight: 600;
  transition: top var(--t-fast) var(--ease-out);
}

.skip-link:focus-visible {
  top: var(--space-4);
}

/* [hidden] должен побеждать display:grid/flex у компонентов */
[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

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

h1, h2, h3, h4, h5 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--satin);
  text-wrap: balance;
}

p {
  margin: 0;
}

/* Нижняя граница подобрана по самому длинному неразрывному слову
   («десятилетиями»), чтобы оно помещалось в колонку на экране 320 px. */
.display {
  font-size: clamp(2.125rem, 1.05rem + 5.2vw, 6.25rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.94;
}

.display em {
  font-style: normal;
  display: block;
  color: transparent;
  background: linear-gradient(96deg, var(--brass-pale), var(--brass-lit) 34%, var(--brass-deep) 72%, var(--brass-pale));
  -webkit-background-clip: text;
  background-clip: text;
}

.h1 { font-size: clamp(1.875rem, 1.2rem + 3.2vw, 4rem); }
.h2 { font-size: clamp(1.625rem, 1.15rem + 2.2vw, 3rem); }
.h3 { font-size: clamp(1.375rem, 1.15rem + 0.9vw, 1.875rem); }
.h4 { font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem); letter-spacing: -0.01em; }

.lead {
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.6;
  color: var(--satin-dim);
  max-width: 62ch;
}

.muted { color: var(--satin-faint); }
.satin { color: var(--satin); }
.brass { color: var(--brass-lit); }

.micro {
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--satin-faint);
}

/* Технические числа — табличные цифры, чтобы не «прыгали» при пересчёте */
.tabular {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Маркер секции: 01 —— Название */
.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--satin-faint);
}

.eyebrow__num {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  color: var(--brass-lit);
}

.eyebrow__rule {
  flex: 0 0 clamp(28px, 6vw, 72px);
  height: 1px;
  background: linear-gradient(90deg, var(--brass), transparent);
}

.section-head {
  max-width: 72ch;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.section-head .lead { margin-top: var(--space-4); }

/* ── 02 · Материальные поверхности ──────────────────────────────────────── */

/* Шлифованная нержавейка: продольная сатинировка + бегущий блик */
.mat-steel {
  background-image:
    linear-gradient(101deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0) 20%,
      rgba(255, 255, 255, 0.07) 44%, rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, 0.12) 100%),
    repeating-linear-gradient(97deg,
      rgba(255, 255, 255, 0.055) 0 1px,
      rgba(0, 0, 0, 0.06) 1px 2px,
      rgba(255, 255, 255, 0.025) 2px 3px,
      rgba(0, 0, 0, 0.035) 3px 4px),
    linear-gradient(158deg, #59637a 0%, #2c3444 38%, #6a7688 58%, #343d4f 78%, #4c566a 100%);
}

/* Закалённое стекло: холодный градиент + матовое размытие подложки */
.mat-glass {
  background-image:
    linear-gradient(128deg, rgba(125, 211, 252, 0.22) 0%, rgba(56, 189, 248, 0.05) 38%,
      rgba(226, 232, 240, 0.13) 66%, rgba(56, 189, 248, 0.09) 100%);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-color: var(--glass-edge) !important;
  box-shadow: inset 0 1px 0 rgba(226, 232, 240, 0.22), inset 0 -1px 0 rgba(125, 211, 252, 0.14);
}

/* Латунь / титановое золото */
.mat-brass {
  background-image:
    linear-gradient(101deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 26%, rgba(255, 255, 255, 0.12) 62%, rgba(255, 255, 255, 0) 100%),
    repeating-linear-gradient(97deg, rgba(255, 255, 255, 0.05) 0 1px, rgba(0, 0, 0, 0.06) 1px 3px),
    linear-gradient(158deg, #f7d68a 0%, #d97706 34%, #8a4b06 62%, #e9ab4a 86%, #c26f08 100%);
}

/* Чернёный / порошково-окрашенный чёрный металл */
.mat-black {
  background-image:
    radial-gradient(120% 90% at 20% 10%, rgba(255, 255, 255, 0.09), transparent 55%),
    repeating-linear-gradient(43deg, rgba(255, 255, 255, 0.018) 0 2px, rgba(0, 0, 0, 0.05) 2px 4px),
    linear-gradient(158deg, #262b34 0%, #0d1015 42%, #2f353f 66%, #14181e 100%);
}

/* Инженерная сетка — «калька чертежа» */
.bp {
  position: relative;
  isolation: isolate;
}

.bp::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(226, 232, 240, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 232, 240, 0.045) 1px, transparent 1px);
  background-size: 88px 88px;
  -webkit-mask-image: radial-gradient(120% 80% at 50% 0%, #000 12%, transparent 78%);
  mask-image: radial-gradient(120% 80% at 50% 0%, #000 12%, transparent 78%);
}

/* Размерная линия с засечками — язык чертежа */
.dimline {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass-lit);
}

.dimline::before,
.dimline::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--brass-line);
}

.dimline > span {
  position: relative;
  padding: 0 var(--space-1);
  white-space: nowrap;
}

/* ── 03 · Разметка и утилиты ────────────────────────────────────────────── */

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

.shell--narrow { width: min(var(--shell-narrow), 100% - var(--gutter) * 2); }

.section {
  padding-block: clamp(3.5rem, 8vw, 7.5rem);
  position: relative;
}

.section--tight { padding-block: clamp(2.5rem, 5vw, 4.5rem); }

.section--sunk {
  background: linear-gradient(180deg, rgba(7, 9, 16, 0.8), rgba(11, 14, 20, 0));
  border-block: 1px solid var(--edge-soft);
}

.stack > * + * { margin-top: var(--space-4); }
.stack-lg > * + * { margin-top: var(--space-6); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.75rem);
}

/* У grid- и flex-элементов min-width по умолчанию auto: длинное слово
   внутри распирает колонку наружу. Разрешаем им сжиматься. */
.grid > *,
.split > *,
.hero__grid > *,
.cluster > *,
.calc > * {
  min-width: 0;
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

/* Асимметричная раскладка: контент + техническая колонка */
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

@media (min-width: 62rem) {
  .split { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); }
  .split--offset > *:last-child { margin-top: clamp(2rem, 5vw, 5rem); }
  .split--flip > *:first-child { order: 2; }
}

.hr {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, var(--edge), transparent 82%);
}

/* ── 04 · Шапка и навигация ─────────────────────────────────────────────── */

.masthead {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  border-bottom: 1px solid transparent;
  transition: background var(--t-base) var(--ease-out),
    border-color var(--t-base) var(--ease-out),
    backdrop-filter var(--t-base) var(--ease-out);
}

.masthead.is-stuck {
  background: rgba(9, 12, 18, 0.82);
  border-bottom-color: var(--edge);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  min-height: 5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  flex-shrink: 0;
}

.brand__mark {
  width: 40px;
  height: 44px;
  flex: none;
}

.brand__text {
  display: grid;
  line-height: 1;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--satin);
}

.brand__tag {
  margin-top: 4px;
  font-size: 0.5625rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--satin-faint);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.4vw, 1.5rem);
  margin-inline-start: auto;
}

.nav__link {
  position: relative;
  padding: 0.5rem 0;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--satin-dim);
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease-out);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--brass-lit);
  transition: right var(--t-base) var(--ease-out);
}

.nav__link:hover { color: var(--satin); }
.nav__link:hover::after { right: 0; }

.nav__link[aria-current="page"] {
  color: var(--satin);
}

.nav__link[aria-current="page"]::after {
  right: 0;
}

.masthead__aside {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.phone-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--satin);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.phone-link svg { width: 18px; height: 18px; color: var(--brass-lit); }

.burger {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  cursor: pointer;
  place-items: center;
}

.burger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--satin);
  transition: transform var(--t-base) var(--ease-out), opacity var(--t-fast) linear;
}

.burger span + span { margin-top: 5px; }

.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* CTA в шапке уступает место навигации раньше, чем появляется бургер */
/* CTA в шапке появляется только там, где после логотипа, шести пунктов меню
   и телефона остаётся честный запас, — иначе он упирается в край сетки. */
@media (max-width: 96rem) {
  .masthead__aside .btn { display: none; }
}

@media (max-width: 80rem) {
  .burger { display: grid; }

  .nav {
    position: fixed;
    inset: 5rem 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-4) var(--gutter) var(--space-7);
    margin: 0;
    max-height: calc(100dvh - 5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: rgba(8, 10, 16, 0.97);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--edge);
    z-index: var(--z-drawer);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out),
      visibility 0s linear var(--t-base);
  }

  .nav.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
  }

  .nav__link {
    padding: 1rem 0;
    font-size: 1.0625rem;
    border-bottom: 1px solid var(--edge-soft);
  }

  .nav__link::after { display: none; }

  .nav__link[aria-current="page"] { color: var(--brass-lit); }
}

/* На узких экранах слоган в логотипе съедает всю строку шапки */
@media (max-width: 30rem) {
  .masthead__inner { gap: 0.75rem; min-height: 4.5rem; }
  .brand { gap: 0.625rem; }
  .brand__mark { width: 32px; height: 36px; }
  .brand__name { font-size: 0.9375rem; letter-spacing: 0.05em; }
  .brand__tag { display: none; }
}

@media (max-width: 40rem) {
  .phone-link span { display: none; }
  .phone-link {
    width: 46px;
    height: 46px;
    justify-content: center;
    border: 1px solid var(--edge);
    border-radius: var(--radius);
  }
}

/* ── 05 · Кнопки и элементы управления ──────────────────────────────────── */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0.8125rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-base) var(--ease-out),
    border-color var(--t-base) var(--ease-out), color var(--t-base) var(--ease-out),
    background-color var(--t-base) var(--ease-out);
}

.btn svg { width: 18px; height: 18px; flex: none; }

.btn:active { transform: translateY(1px); }

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Латунная — единственный первичный CTA на экран */
.btn--brass {
  color: #1a1102;
  background-image: linear-gradient(140deg, var(--brass-pale), var(--brass-lit) 42%, var(--brass) 78%, var(--brass-deep));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 18px 34px -22px rgba(217, 119, 6, 0.9);
}

.btn--brass::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.55) 45%, transparent 62%);
  transform: translateX(-120%);
  transition: transform 620ms var(--ease-out);
}

.btn--brass:hover::after { transform: translateX(120%); }
.btn--brass:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 22px 44px -20px rgba(217, 119, 6, 0.95); }

/* Стальная — вторичная */
.btn--steel {
  color: var(--satin);
  background: rgba(226, 232, 240, 0.04);
  border-color: var(--edge);
}

.btn--steel:hover {
  border-color: var(--brass-line);
  background: rgba(226, 232, 240, 0.07);
  color: #fff;
}

/* Стеклянная — на тёмных фотофонах и в hero */
.btn--glass {
  color: var(--satin);
  background: var(--glass);
  border-color: var(--glass-edge);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.btn--glass:hover { background: rgba(56, 189, 248, 0.14); }

.btn--ghost {
  padding-inline: 0.25rem;
  min-height: 44px;
  color: var(--satin-dim);
  background: none;
  border: 0;
}

.btn--ghost:hover { color: var(--brass-lit); }

.btn--wide { width: 100%; }
.btn--sm { min-height: 42px; padding: 0.5rem 1rem; font-size: 0.75rem; }

/* Текстовая ссылка со стрелкой */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass-lit);
}

.link-arrow svg {
  width: 16px;
  height: 16px;
  transition: transform var(--t-base) var(--ease-out);
}

.link-arrow:hover svg { transform: translate(3px, -3px); }

/* Чип-переключатель (фильтры каталога, опции калькулятора) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.02);
  color: var(--satin-dim);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out),
    background-color var(--t-fast) var(--ease-out);
}

.chip:hover { border-color: var(--edge-bright); color: var(--satin); }

.chip[aria-pressed="true"],
.chip.is-active {
  border-color: var(--brass);
  color: var(--brass-lit);
  background: var(--brass-wash);
}

.chip__count {
  font-size: 0.6875rem;
  color: var(--satin-faint);
  font-variant-numeric: tabular-nums;
}

/* Бегущая строка компетенций */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--edge-soft);
  background: rgba(7, 9, 16, 0.6);
  padding-block: 0.875rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  gap: var(--space-6);
  animation: slide-x 46s linear infinite;
}

.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-6);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--satin-faint);
  white-space: nowrap;
}

.marquee__item::after {
  content: "";
  width: 6px;
  height: 6px;
  rotate: 45deg;
  background: var(--brass);
}

@keyframes slide-x {
  to { transform: translateX(-50%); }
}

/* ── 06 · Плиты (карточки) и спецификации ───────────────────────────────── */

.plate {
  position: relative;
  container-type: inline-size;
  padding: clamp(1.25rem, 2.4vw, 2rem);
  background: linear-gradient(168deg, var(--steel-840), var(--steel-870) 62%, var(--steel-900));
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  box-shadow: var(--lift-1);
  overflow: hidden;
  isolation: isolate;
  transition: border-color var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out),
    box-shadow var(--t-base) var(--ease-out);
}

/* Фаска: срез верхнего правого угла как у стальной пластины */
.plate::before {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  width: 26px;
  height: 26px;
  background: linear-gradient(225deg, var(--brass-lit) 0 1.5px, transparent 1.5px);
  opacity: 0.55;
  transition: opacity var(--t-base) var(--ease-out);
}

.plate--interactive:hover,
.plate--interactive:focus-within {
  border-color: var(--brass-line);
  transform: translateY(-3px);
  box-shadow: var(--lift-2);
}

.plate--interactive:hover::before { opacity: 1; }

.plate--flush { padding: 0; }
.plate--plain::before { display: none; }

.plate__index {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--brass-lit);
}

.plate__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: var(--space-4);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: rgba(226, 232, 240, 0.03);
  color: var(--brass-lit);
}

.plate__icon svg { width: 24px; height: 24px; }

.plate__title {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--satin);
  margin-bottom: var(--space-2);
}

.plate__body {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--satin-dim);
}

/* Таблица технических характеристик */
.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.spec caption {
  text-align: left;
  padding-bottom: var(--space-3);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--satin-faint);
}

.spec th,
.spec td {
  padding: 0.8125rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--edge-soft);
  vertical-align: top;
}

.spec th {
  font-weight: 500;
  color: var(--satin-faint);
  width: 46%;
}

.spec td {
  color: var(--satin);
  font-variant-numeric: tabular-nums;
}

.spec tr:last-child th,
.spec tr:last-child td { border-bottom: 0; }

/* В узкой карточке две колонки превращаются в кашу — раскладываем в строки.
   Ориентируемся на ширину самой плиты, а не окна: одна и та же таблица живёт
   и в широкой секции, и в колонке калькулятора. */
@container (max-width: 26rem) {
  .spec,
  .spec tbody,
  .spec tr,
  .spec th,
  .spec td {
    display: block;
    width: auto;
  }

  .spec tr {
    padding-block: 0.75rem;
    border-bottom: 1px solid var(--edge-soft);
  }

  .spec tr:last-child { border-bottom: 0; }

  .spec th,
  .spec td {
    padding: 0;
    border-bottom: 0;
  }

  .spec th {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
  }

  .spec td { margin-top: 0.25rem; }

  .spec thead { display: none; }
}

/* Список с латунными засечками */
.ticks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.ticks li {
  position: relative;
  padding-left: 1.75rem;
  font-size: 0.9375rem;
  color: var(--satin-dim);
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 12px;
  height: 1px;
  background: var(--brass-lit);
}

.ticks li strong { color: var(--satin); font-weight: 600; }

/* Метрики */
.metric__value {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--satin);
  font-variant-numeric: tabular-nums;
}

.metric__value sup {
  font-size: 0.44em;
  color: var(--brass-lit);
  margin-left: 2px;
  vertical-align: super;
}

.metric__label {
  margin-top: var(--space-3);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--satin-faint);
}

/* Бейджи */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.3125rem 0.625rem;
  border: 1px solid var(--edge);
  border-radius: 2px;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--satin-faint);
  background: rgba(226, 232, 240, 0.03);
}

.badge--brass { color: var(--brass-lit); border-color: var(--brass-line); background: var(--brass-wash); }
.badge--glass { color: var(--glass-lit); border-color: var(--glass-edge); background: var(--glass); }

/* ── 07 · Hero-визуализатор ─────────────────────────────────────────────── */

.hero {
  position: relative;
  padding-block: clamp(3rem, 7vw, 6.5rem) clamp(3rem, 6vw, 5.5rem);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

@media (min-width: 64rem) {
  .hero__grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr); }
}

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.4375rem 0.875rem 0.4375rem 0.5rem;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.03);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--satin-dim);
}

.hero__kicker b {
  display: inline-block;
  padding: 0.1875rem 0.5rem;
  border-radius: 999px;
  background: var(--brass-lit);
  color: #1a1102;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.hero__title { margin-block: var(--space-5) var(--space-5); }

.hero__actions { margin-top: var(--space-6); }

.hero__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-4);
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: var(--space-5);
  border-top: 1px solid var(--edge-soft);
}

.hero__fact b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--satin);
  letter-spacing: -0.02em;
}

.hero__fact span {
  display: block;
  margin-top: 4px;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--satin-faint);
}

/* Визуализатор материалов */
.viz {
  position: relative;
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  background: var(--steel-870);
  box-shadow: var(--lift-2);
  overflow: hidden;
}

.viz__stage {
  position: relative;
  aspect-ratio: 4 / 5;
  min-height: 340px;
  overflow: hidden;
}

@media (min-width: 48rem) {
  .viz__stage { aspect-ratio: 16 / 13; }
}

.viz__layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity var(--t-slow) var(--ease-out), transform 900ms var(--ease-out);
  will-change: opacity, transform;
}

.viz__layer.is-active {
  opacity: 1;
  transform: none;
}

/* Проекция изделия поверх материала — линии сечения */
.viz__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(7, 9, 16, 0.55), rgba(7, 9, 16, 0) 38%, rgba(7, 9, 16, 0.72));
}

.viz__marks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: rgba(226, 232, 240, 0.5);
}

.viz__readout {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-6);
  padding: var(--space-4) clamp(1rem, 3vw, 1.75rem);
  background: linear-gradient(0deg, rgba(7, 9, 16, 0.94), rgba(7, 9, 16, 0.55));
  border-top: 1px solid var(--edge-soft);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.viz__readout dt {
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--satin-faint);
}

.viz__readout dd {
  margin: 4px 0 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--satin);
  font-variant-numeric: tabular-nums;
}

.viz__switch {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--edge);
  background: var(--steel-900);
}

.viz__btn {
  position: relative;
  min-height: 78px;
  padding: 0.75rem 0.5rem;
  display: grid;
  gap: 6px;
  justify-items: center;
  align-content: center;
  border: 0;
  border-right: 1px solid var(--edge-soft);
  background: transparent;
  color: var(--satin-faint);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}

.viz__btn:last-child { border-right: 0; }
.viz__btn:hover { color: var(--satin); background: rgba(226, 232, 240, 0.03); }

.viz__swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--edge-bright);
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
}

.viz__btn[aria-selected="true"] {
  color: var(--satin);
  background: rgba(226, 232, 240, 0.05);
}

.viz__btn[aria-selected="true"] .viz__swatch {
  transform: scale(1.12);
  box-shadow: 0 0 0 2px var(--steel-900), 0 0 0 3px var(--brass-lit);
}

.viz__btn[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 2px;
  background: var(--brass-lit);
}

/* Технический комментарий к выбранному материалу */
.viz__note {
  display: flex;
  gap: var(--space-3);
  min-height: 3.25rem;
  align-items: center;
  padding: var(--space-3) clamp(1rem, 3vw, 1.75rem);
  border-top: 1px solid var(--edge);
  background: var(--steel-950);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--satin-dim);
}

.viz__note::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  rotate: 45deg;
  background: var(--brass-lit);
}

/* ── 08 · Секции, каталог, аккордеон ────────────────────────────────────── */

/* Направления производства — асимметричная сетка «бенто» */
.bento {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: 1fr;
}

/* Планшет: две ровные колонки, ведущая карточка — во всю ширину.
   Асимметричную «бенто»-раскладку включаем только там, где колонки
   действительно широкие, иначе текст в узких ячейках рвётся в лапшу. */
@media (min-width: 40rem) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento > *:nth-child(1) { grid-column: 1 / -1; }
}

@media (min-width: 72rem) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .bento > * { grid-column: span 2; }
  .bento > *:nth-child(1) { grid-column: span 4; grid-row: span 2; }
}

.bento > *:nth-child(1) .plate__title { font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2rem); }

/* Карточка изделия — container query для внутренней раскладки */
.card-wrap { container-type: inline-size; }

.product {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  padding: 0;
}

.product__art {
  position: relative;
  aspect-ratio: 16 / 10;
  border-bottom: 1px solid var(--edge);
  overflow: hidden;
  background: var(--steel-950);
}

.product__art svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.product__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 70% at 30% 0%, rgba(226, 232, 240, 0.07), transparent 65%);
  pointer-events: none;
}

.product__tag {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 2;
}

.product__inner {
  display: grid;
  gap: var(--space-3);
  padding: clamp(1.125rem, 2vw, 1.5rem);
}

.product__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  font-size: 0.75rem;
  color: var(--satin-faint);
  letter-spacing: 0.04em;
}

.product__meta b { color: var(--satin-dim); font-weight: 500; }

.product__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) clamp(1.125rem, 2vw, 1.5rem);
  border-top: 1px solid var(--edge-soft);
}

.product__price {
  font-size: 0.8125rem;
  color: var(--satin-faint);
}

.product__price b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  color: var(--satin);
  font-variant-numeric: tabular-nums;
}

@container (max-width: 300px) {
  .product__foot { flex-direction: column; align-items: stretch; }
  .product__foot .btn { width: 100%; }
}

.catalog__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
  padding-bottom: var(--space-5);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--edge);
}

.catalog__empty {
  padding: clamp(2rem, 5vw, 4rem);
  text-align: center;
  border: 1px dashed var(--edge);
  border-radius: var(--radius);
}

/* ── Кадр (.shot) ────────────────────────────────────────────────────────
   Слот под фотографию. Пока файла нет — показывает собственную графику
   в языке сайта, а не серую заглушку. Как только JPEG появляется в assets/,
   main.js подгружает его и проявляет поверх графики. Разметку не трогаем. */

.shot {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--steel-950);
  box-shadow: var(--lift-1);
  transition: border-color var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out);
}

.shot--wide { aspect-ratio: 16 / 9; }
.shot--tall { aspect-ratio: 3 / 4; }

.shot:hover {
  border-color: var(--brass-line);
  transform: translateY(-3px);
}

.shot__art,
.shot__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.shot__art svg { width: 100%; height: 100%; display: block; }

.shot__img {
  z-index: 2;
  object-fit: cover;
  opacity: 0;
  transition: opacity 700ms var(--ease-out);
}

.shot__img.is-loaded { opacity: 1; }

/* Затемнение снизу — чтобы подпись читалась и поверх графики, и поверх фото */
.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 9, 16, 0) 42%, rgba(7, 9, 16, 0.88) 100%);
}

.shot__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: grid;
  gap: 4px;
  padding: clamp(0.875rem, 2vw, 1.25rem);
}

.shot__cap b {
  font-family: var(--font-display);
  font-size: clamp(0.9375rem, 0.9rem + 0.3vw, 1.0625rem);
  font-weight: 700;
  color: var(--satin);
  letter-spacing: -0.01em;
}

.shot__cap span {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--satin-dim);
}

.shot__idx {
  position: absolute;
  top: clamp(0.75rem, 2vw, 1rem);
  left: clamp(0.75rem, 2vw, 1rem);
  z-index: 4;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--brass-lit);
}

/* Технологический процесс */
.flow {
  counter-reset: step;
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr));
}

.flow__step {
  position: relative;
  padding-top: var(--space-6);
  border-top: 1px solid var(--edge);
}

.flow__step::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  top: -0.85rem;
  left: 0;
  padding-right: var(--space-3);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--brass-lit);
  background: var(--steel-900);
}

.flow__step h3 {
  font-size: 1.0625rem;
  margin-bottom: var(--space-2);
}

.flow__step p { font-size: 0.9375rem; }

/* Аккордеон */
.accordion { border-top: 1px solid var(--edge); }

.accordion__item { border-bottom: 1px solid var(--edge); }

.accordion__trigger {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  min-height: 68px;
  padding: var(--space-4) 0;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  color: var(--satin);
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.95rem + 0.35vw, 1.1875rem);
  font-weight: 600;
  transition: color var(--t-fast) var(--ease-out);
}

.accordion__trigger:hover { color: var(--brass-lit); }

.accordion__sign {
  margin-left: auto;
  position: relative;
  width: 18px;
  height: 18px;
  flex: none;
}

.accordion__sign::before,
.accordion__sign::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 1.5px;
  background: var(--brass-lit);
  transition: transform var(--t-base) var(--ease-out);
}

.accordion__sign::after { transform: rotate(90deg); }

.accordion__trigger[aria-expanded="true"] .accordion__sign::after { transform: rotate(0deg); }

.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--t-slow) var(--ease-out);
}

.accordion__panel[data-open="true"] { grid-template-rows: 1fr; }

.accordion__panel > div {
  overflow: hidden;
  min-height: 0;
}

.accordion__panel p,
.accordion__panel ul { padding-bottom: var(--space-5); max-width: 78ch; }

/* Полоса нормативов */
.norms {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.norm {
  padding: var(--space-4);
  border-left: 2px solid var(--brass);
  background: linear-gradient(90deg, var(--brass-wash), transparent 70%);
}

.norm b {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  color: var(--satin);
  letter-spacing: 0.01em;
}

.norm span {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  color: var(--satin-faint);
}

/* Полоса-призыв */
.cta-band {
  position: relative;
  padding: clamp(2rem, 5vw, 4rem);
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 88% 10%, rgba(217, 119, 6, 0.16), transparent 58%),
    linear-gradient(160deg, var(--steel-840), var(--steel-950));
  overflow: hidden;
}

.cta-band::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -90px;
  width: 320px;
  height: 320px;
  border: 1px solid var(--brass-line);
  border-radius: 50%;
  opacity: 0.4;
  pointer-events: none;
}

/* ── 09 · Калькулятор ───────────────────────────────────────────────────── */

.calc {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
}

@media (min-width: 66rem) {
  .calc { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .calc__result { position: sticky; top: 6.5rem; }
}

.calc__group + .calc__group {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--edge-soft);
}

.calc__legend {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding: 0;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--satin-faint);
}

.calc__legend b {
  font-family: var(--font-display);
  color: var(--brass-lit);
  font-size: 0.8125rem;
}

/* Выбор типа изделия — «плитки-радио» */
.optgrid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
}

.opt {
  position: relative;
  display: block;
  cursor: pointer;
}

.opt input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.opt__face {
  display: grid;
  gap: 6px;
  height: 100%;
  min-height: 92px;
  padding: var(--space-4);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: rgba(226, 232, 240, 0.02);
  transition: border-color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out),
    transform var(--t-fast) var(--ease-out);
}

.opt:hover .opt__face { border-color: var(--edge-bright); }
.opt:active .opt__face { transform: scale(0.985); }

.opt input:checked + .opt__face {
  border-color: var(--brass);
  background: var(--brass-wash);
  box-shadow: inset 0 0 0 1px var(--brass-line);
}

.opt input:focus-visible + .opt__face {
  outline: 2px solid var(--brass-lit);
  outline-offset: 2px;
}

.opt__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--satin);
  line-height: 1.35;
}

.opt__hint {
  font-size: 0.75rem;
  color: var(--satin-faint);
  line-height: 1.45;
}

.opt__price {
  margin-top: auto;
  font-size: 0.75rem;
  color: var(--brass-lit);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

/* Ползунок */
.slider__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.slider__value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--satin);
  font-variant-numeric: tabular-nums;
}

.slider__value small {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--satin-faint);
  margin-left: 4px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 44px;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brass) var(--fill, 40%), var(--steel-700) var(--fill, 40%));
}

input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--steel-700);
}

input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 2px;
  background: var(--brass);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -9px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background-image: linear-gradient(150deg, var(--brass-pale), var(--brass) 55%, var(--brass-deep));
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.9);
  transition: transform var(--t-fast) var(--ease-out);
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background-image: linear-gradient(150deg, var(--brass-pale), var(--brass) 55%, var(--brass-deep));
}

input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.14); }

.slider__scale {
  display: flex;
  justify-content: space-between;
  margin-top: -2px;
  font-size: 0.6875rem;
  color: var(--satin-faint);
  font-variant-numeric: tabular-nums;
}

/* Переключатели-опции */
.switchrow {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-height: 56px;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--edge-soft);
  cursor: pointer;
}

.switchrow:last-child { border-bottom: 0; }

.switchrow input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.switchrow__box {
  position: relative;
  flex: none;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(226, 232, 240, 0.04);
  transition: background-color var(--t-base) var(--ease-out), border-color var(--t-base) var(--ease-out);
}

.switchrow__box::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--satin-faint);
  transition: transform var(--t-base) var(--ease-out), background-color var(--t-base) var(--ease-out);
}

.switchrow input:checked + .switchrow__box {
  background: var(--brass-wash);
  border-color: var(--brass);
}

.switchrow input:checked + .switchrow__box::after {
  transform: translateX(20px);
  background-image: linear-gradient(150deg, var(--brass-pale), var(--brass));
}

.switchrow input:focus-visible + .switchrow__box {
  outline: 2px solid var(--brass-lit);
  outline-offset: 2px;
}

.switchrow__text { display: grid; gap: 2px; min-width: 0; }
.switchrow__text b { font-size: 0.9375rem; font-weight: 600; color: var(--satin); }
.switchrow__text span { font-size: 0.75rem; color: var(--satin-faint); }
.switchrow__price {
  margin-left: auto;
  font-size: 0.8125rem;
  color: var(--satin-dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Смета */
.estimate {
  container-type: inline-size;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  border: 1px solid var(--brass-line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 100% at 90% 0%, rgba(217, 119, 6, 0.14), transparent 60%),
    linear-gradient(170deg, var(--steel-840), var(--steel-950));
  box-shadow: var(--lift-2);
}

.estimate__total {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--satin);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.estimate__total small {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--satin-faint);
  letter-spacing: 0;
}

.estimate__lines {
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
}

.estimate__lines li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3) var(--space-4);
  flex-wrap: wrap;
  padding: 0.625rem 0;
  font-size: 0.875rem;
  border-bottom: 1px dashed var(--edge-soft);
}

.estimate__lines li > span:first-child {
  flex: 1 1 60%;
  min-width: 0;
}

.estimate__lines li:last-child { border-bottom: 0; }
.estimate__lines dt, .estimate__lines span:first-child { color: var(--satin-faint); }
.estimate__lines b {
  color: var(--satin);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.estimate__note {
  margin-top: var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--edge);
  border-radius: 2px;
  background: rgba(226, 232, 240, 0.02);
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--satin-faint);
}

.estimate.is-bumped { animation: bump 380ms var(--ease-out); }

@keyframes bump {
  0% { transform: scale(1); }
  38% { transform: scale(1.012); }
  100% { transform: scale(1); }
}

/* ── 10 · Формы, модальные окна, футер ──────────────────────────────────── */

.form { display: grid; gap: var(--space-5); }

.field { display: grid; gap: var(--space-2); }

.field__label {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--satin-dim);
}

.field__label .req { color: var(--brass-lit); margin-left: 3px; }

.field__control {
  width: 100%;
  min-height: 52px;
  padding: 0.875rem 1rem;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: rgba(7, 9, 16, 0.6);
  color: var(--satin);
  font-size: 1rem;
  transition: border-color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}

textarea.field__control { min-height: 130px; resize: vertical; line-height: 1.6; }

select.field__control {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--satin-faint) 50%),
    linear-gradient(135deg, var(--satin-faint) 50%, transparent 50%);
  background-position: right 1.2rem center, right 0.9rem center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.75rem;
}

select.field__control option { background: var(--steel-840); color: var(--satin); }

.field__control::placeholder { color: var(--satin-faint); opacity: 0.7; }

.field__control:hover { border-color: var(--edge-bright); }

.field__control:focus {
  outline: none;
  border-color: var(--brass);
  background: rgba(7, 9, 16, 0.9);
  box-shadow: 0 0 0 3px var(--brass-wash);
}

.field__help { font-size: 0.75rem; color: var(--satin-faint); line-height: 1.5; }

.field__error {
  display: none;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--danger);
}

.field__error svg { width: 15px; height: 15px; flex: none; }

.field.is-invalid .field__control { border-color: var(--danger); }
.field.is-invalid .field__error { display: flex; }

/* Зона чертежа */
.dropzone {
  position: relative;
  display: grid;
  gap: var(--space-2);
  justify-items: center;
  text-align: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px dashed var(--edge);
  border-radius: var(--radius);
  background: rgba(226, 232, 240, 0.015);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}

.dropzone:hover,
.dropzone.is-hot {
  border-color: var(--brass);
  background: var(--brass-wash);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone svg { width: 32px; height: 32px; color: var(--brass-lit); }

.dropzone__title { font-weight: 600; color: var(--satin); font-size: 0.9375rem; }

.filelist {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.filelist li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--edge);
  border-radius: 2px;
  background: rgba(7, 9, 16, 0.5);
  font-size: 0.8125rem;
  color: var(--satin-dim);
}

.filelist svg { width: 18px; height: 18px; color: var(--brass-lit); flex: none; }
.filelist span:last-of-type { margin-left: auto; color: var(--satin-faint); font-variant-numeric: tabular-nums; }

.filelist button {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--satin-faint);
  cursor: pointer;
}

.filelist button:hover { color: var(--danger); background: rgba(248, 113, 113, 0.1); }

/* Модальное окно */
.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  place-items: center;
  padding: var(--gutter);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base) var(--ease-out), visibility 0s linear var(--t-base);
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 10, 0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.modal__box {
  position: relative;
  container-type: inline-size;
  width: min(760px, 100%);
  max-height: min(86dvh, 900px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  background: linear-gradient(168deg, var(--steel-840), var(--steel-950));
  box-shadow: var(--lift-2);
  transform: translateY(14px) scale(0.985);
  transition: transform var(--t-base) var(--ease-out);
}

.modal.is-open .modal__box { transform: none; }

.modal__close {
  position: absolute;
  top: 0.875rem;
  right: 0.875rem;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: rgba(226, 232, 240, 0.03);
  color: var(--satin-dim);
  cursor: pointer;
  transition: color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}

.modal__close:hover { color: var(--satin); border-color: var(--brass-line); }
.modal__close svg { width: 18px; height: 18px; }

/* Тост */
.toast {
  position: fixed;
  left: 50%;
  bottom: clamp(1rem, 4vw, 2.5rem);
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-width: min(520px, calc(100% - 2rem));
  padding: 0.875rem 1.25rem;
  border: 1px solid var(--brass-line);
  border-radius: var(--radius);
  background: rgba(12, 16, 24, 0.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--lift-2);
  color: var(--satin);
  font-size: 0.875rem;
  transform: translate(-50%, 140%);
  transition: transform var(--t-slow) var(--ease-out);
}

.toast.is-shown { transform: translate(-50%, 0); }
.toast svg { width: 20px; height: 20px; color: var(--brass-lit); flex: none; }

/* Контакты */
.contact-card {
  display: grid;
  gap: var(--space-3);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
}

.contact-card__value {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1rem + 0.7vw, 1.5rem);
  font-weight: 700;
  color: var(--satin);
  word-break: break-word;
}

/* Ссылка-значение остаётся полноценной целью для пальца */
a.contact-card__value {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  align-self: start;
}

.contact-card a.contact-card__value:hover { color: var(--brass-lit); }

/* Схема проезда */
.mapframe {
  position: relative;
  border: 1px solid var(--edge);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--steel-950);
}

.mapframe svg { width: 100%; height: auto; display: block; }

.mapframe__bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border-top: 1px solid var(--edge);
  background: rgba(7, 9, 16, 0.7);
}

/* Футер */
.footer {
  margin-top: clamp(3rem, 6vw, 6rem);
  padding-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--edge);
  background: linear-gradient(180deg, rgba(7, 9, 16, 0.5), rgba(7, 9, 16, 0.95));
}

.footer__grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.footer__brand { grid-column: 1 / -1; }

@media (min-width: 60rem) {
  .footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; }
  .footer__brand { grid-column: auto; }
}

.footer__title {
  margin-bottom: var(--space-4);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--satin-faint);
}

.footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.footer__list a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  font-size: 0.9375rem;
  color: var(--satin-dim);
  transition: color var(--t-fast) var(--ease-out);
}

.footer__list a:hover { color: var(--brass-lit); }

.footer__bottom {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-block: var(--space-5);
  border-top: 1px solid var(--edge-soft);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--satin-faint);
}

.social {
  display: flex;
  gap: var(--space-2);
}

.social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  color: var(--satin-dim);
  transition: color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out),
    background-color var(--t-fast) var(--ease-out);
}

.social a:hover {
  color: var(--brass-lit);
  border-color: var(--brass-line);
  background: var(--brass-wash);
}

.social svg { width: 20px; height: 20px; }

/* Плавающая кнопка WhatsApp */
.floating-wa {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: var(--z-sticky);
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--brass-line);
  background: linear-gradient(150deg, var(--brass-lit), var(--brass) 60%, var(--brass-deep));
  color: #1a1102;
  box-shadow: 0 18px 40px -18px rgba(217, 119, 6, 0.9);
  transition: transform var(--t-base) var(--ease-out);
}

.floating-wa:hover { transform: scale(1.06); }
.floating-wa svg { width: 26px; height: 26px; }

/* Хлебные крошки */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding-block: var(--space-5) 0;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--satin-faint);
}

.crumbs a:hover { color: var(--brass-lit); }
.crumbs li { list-style: none; display: flex; align-items: center; gap: var(--space-2); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; color: var(--edge); }

.pagehead {
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 4vw, 3rem);
  border-bottom: 1px solid var(--edge-soft);
}

/* ── 11 · Движение и адаптив ────────────────────────────────────────────── */

/* Прячем блоки до появления ТОЛЬКО если скрипт жив: класс .js ставит
   инлайн-строка в <head>. Без JS контент виден сразу. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 620ms var(--ease-out), transform 620ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .js [data-reveal] { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
}

/* Планшет и ниже */
@media (max-width: 48rem) {
  .viz__switch { grid-template-columns: repeat(2, 1fr); }
  .viz__btn:nth-child(2) { border-right: 0; }
  .viz__btn:nth-child(-n + 2) { border-bottom: 1px solid var(--edge-soft); }
  .viz__readout { position: static; background: var(--steel-900); }
  .hero__facts { grid-template-columns: repeat(2, 1fr); }

  /* Панель управления и панель фактов на планшете сжимаются по вертикали */
  .section { padding-block: clamp(3rem, 7vw, 4.5rem); }
  .mapframe__bar { flex-direction: column; align-items: stretch; }
  .mapframe__bar .cluster { justify-content: stretch; }
  .mapframe__bar .btn { flex: 1 1 auto; }
}

/* Телефон */
@media (max-width: 34rem) {
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__brand { grid-column: 1 / -1; }
  .catalog__toolbar { align-items: flex-start; flex-direction: column; }
  .estimate__total { flex-wrap: wrap; }
  .cta-band::after { display: none; }
}

/* Узкий телефон 320–390: убираем всё, что не помещается по-честному */
@media (max-width: 24rem) {
  .hero__facts { gap: var(--space-3); }
  .hero__fact b { font-size: 1.25rem; }
  .hero__kicker { font-size: 0.625rem; letter-spacing: 0.12em; }
  .viz__btn { font-size: 0.625rem; letter-spacing: 0.04em; min-height: 70px; }
  .viz__swatch { width: 26px; height: 26px; }
  .viz__readout { gap: var(--space-3); padding: var(--space-3) var(--space-4); }
  .btn { padding-inline: 1.125rem; font-size: 0.8125rem; }
  .plate { padding: 1.125rem; }
  .modal__box { padding: 1.25rem 1.125rem 1.5rem; }
  .footer__grid { grid-template-columns: 1fr; }
  .slider__value { font-size: 1.25rem; }
  .switchrow { align-items: flex-start; flex-wrap: wrap; gap: var(--space-2) var(--space-3); }
  .switchrow__price { order: 3; flex: 1 0 100%; margin-left: 0; text-align: right; }
}

/* Телефон в альбомной ориентации: высота дороже воздуха */
@media (max-height: 32rem) and (orientation: landscape) {
  .masthead__inner { min-height: 4rem; }
  .nav { inset-block-start: 4rem; max-height: calc(100dvh - 4rem); }
  .hero { padding-block: 2rem; }
  .section { padding-block: 2.5rem; }
  .viz__stage { aspect-ratio: 16 / 9; min-height: 0; }
  .floating-wa { width: 48px; height: 48px; }
}

/* Невысокий десктоп: липкая смета не должна вылезать за экран */
@media (min-width: 66rem) {
  .calc__result {
    max-height: calc(100dvh - 8rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* Очень широкие экраны: держим строку читаемой, а не растягиваем на 4K */
@media (min-width: 100rem) {
  :root { --shell: 1440px; }
  .hero__title { max-width: 16ch; }
}

@media print {
  .masthead, .footer, .floating-wa, .marquee, .btn { display: none !important; }
  body { background: #fff; color: #000; }
}
