﻿/* ============================================================
   Каркас 11 — прототип
   Направление: инженерный чертёж + металл и дерево.
   База — тёплый бумажный фон, тёмные секции графитом,
   акцент — жжёная охра. Сетка-миллиметровка как структурный мотив.
   ============================================================ */

/* Шрифты — свои субсеты вместо Google Fonts.
   Файлы: site/fonts/*.woff2, собраны fontTools.subset по набору символов сайта. */

@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('fonts/unbounded-latin.woff2') format('woff2');
  unicode-range: U+0020-007E, U+00A0, U+00AB, U+00B0, U+00B7, U+00BB, U+00D7,
                 U+2013, U+2014, U+2026, U+2192;
}
@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('fonts/unbounded-cyrillic.woff2') format('woff2');
  unicode-range: U+0400-045F, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('fonts/golos-latin.woff2') format('woff2');
  unicode-range: U+0020-007E, U+00A0, U+00AB, U+00B0, U+00B7, U+00BB, U+00D7,
                 U+2013, U+2014, U+2026, U+2192;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('fonts/golos-cyrillic.woff2') format('woff2');
  unicode-range: U+0401-040C, U+040E-044F, U+0451-045C, U+045E-045F, U+2116;
}

:root {
  /* Роли цвета. База — обсидиан: страница, панели и текст берут значения отсюда.
     Светлая тема возвращает бумагу целиком (html.theme-light) — это прежний вид.
     Тёмные якоря (--obsidian…, --gold…) остаются отдельными токенами: на них живут
     правила .is-dark и тёмные панели в обеих темах. */
  color-scheme: dark;

  --paper: oklch(15.5% 0.004 286);
  --paper-2: oklch(18.8% 0.004 286);
  /* поверхность на тон светлее панели: обложка сметы, поиск, главная ступень */
  --raise: oklch(21.5% 0.004 286);
  --ink: oklch(88% 0.008 250);
  --ink-soft: oklch(74% 0.012 250);
  --ink-faint: oklch(70% 0.01 250);

  --graphite: oklch(24% 0.012 250);
  --graphite-2: oklch(29% 0.014 250);
  --graphite-line: oklch(38% 0.014 250);

  --ochre: var(--gold);
  --ochre-deep: var(--gold);
  --ochre-pale: oklch(92% 0.045 85);

  --line: oklch(100% 0 0 / 0.13);
  --line-dark: oklch(100% 0 0 / 0.14);
  /* разделитель между секциями: в тёмной базе волос читается сам */
  --divider: var(--line);

  /* наведение карточек: тёплый волос и тень подъёма (реф «ЧАЙКА»).
     Цвет задан явно, а не color-mix: в oklch смесь золота (hue 82) с обсидианом
     (hue 286) идёт кратчайшим путём через малиновый — рамка розовела. */
  --hover-line: oklch(62% 0.095 76);
  --hover-shadow: 0 12px 32px oklch(0% 0 0 / 0.35);
  /* свечение основной кнопки: только на тёмном, на бумаге его не видно */
  --btn-glow: 0 8px 24px oklch(77.7% 0.106 82.2 / 0.18);

  /* кнопки: в тёмной базе основная — золотая заливка (ink на золоте 8,67) */
  --btn-solid: var(--gold);
  --btn-solid-fg: var(--obsidian);
  --btn-solid-hover: oklch(84% 0.1 84);
  --btn-solid-fg-hover: var(--obsidian);

  /* тёмные якоря: обсидиан + золото (только на тёмных областях, см. .is-dark) */
  --obsidian: oklch(15.5% 0.004 286);
  --obsidian-2: oklch(18.8% 0.004 286);
  --gold: oklch(77.7% 0.106 82.2);
  --gold-deep: oklch(54% 0.12 72);
  --on-dark: oklch(88% 0.008 250);
  --on-dark-2: oklch(74% 0.012 250);

  --r: 3px;
  /* Карточки и кнопки рефа «ЧАЙКА» — радиус 12. Мелкие поверхности (поля,
     рамки, чипы) остаются на `--r`. */
  --r-lg: 12px;

  --font-display: "Unbounded", "Golos Text", system-ui, sans-serif;
  --font-body: "Golos Text", system-ui, -apple-system, sans-serif;

  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.06rem);
  --step-1: clamp(1.15rem, 1.06rem + 0.42vw, 1.4rem);
  --step-2: clamp(1.4rem, 1.2rem + 0.9vw, 2rem);
  --step-3: clamp(1.85rem, 1.4rem + 2.2vw, 3rem);
  --step-4: clamp(2.3rem, 1.3rem + 4.92vw, 3.625rem);

  /* три размера вместо восьми: подписи, вспомогательный текст, основной мелкий */
  --text-xs: clamp(0.78rem, 0.76rem + 0.1vw, 0.85rem);
  --text-sm: clamp(0.86rem, 0.84rem + 0.12vw, 0.94rem);
  --text-md: clamp(0.94rem, 0.91rem + 0.15vw, 1rem);

  /* вес: Golos Text грузится в 400/500/600 */
  --w-regular: 400;
  --w-medium: 500;
  --w-strong: 600;

  --gutter: clamp(1.1rem, 4vw, 2rem);
  /* Ритм рефа «ЧАЙКА»: внешний блок 1280 с полями 32, содержимое 1216.
     Раньше контейнер был 90rem (1440) — строки и сетки стояли слишком широко. */
  --page: 80rem;
  --content: 76rem;
  --measure: 62rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Светлая тема — прежний вид сайта целиком. Ставится инлайн-скриптом в <head>
   до первой отрисовки, иначе страница мигнёт тёмной. */
html.theme-light {
  color-scheme: light;

  --paper: oklch(96.2% 0.012 85);
  --paper-2: oklch(93% 0.014 82);
  --raise: color-mix(in oklch, var(--paper-2) 60%, white);
  --ink: oklch(22% 0.014 70);
  --ink-soft: oklch(36% 0.012 70);
  --ink-faint: oklch(42% 0.012 70);

  --ochre: oklch(62% 0.145 58);
  --ochre-deep: oklch(52% 0.14 50);
  --ochre-pale: oklch(88% 0.06 70);

  --line: oklch(84% 0.012 80);
  --divider: color-mix(in oklch, var(--line) 65%, transparent);

  /* на бумаге тень мягкая: 0,35 на светлом читается грязным пятном */
  --hover-line: color-mix(in oklch, var(--ochre-deep) 35%, var(--paper-2));
  --hover-shadow: 0 12px 32px oklch(0% 0 0 / 0.10);
  --btn-glow: none;

  --btn-solid: var(--ink);
  --btn-solid-fg: var(--paper);
  --btn-solid-hover: var(--ochre-deep);
  --btn-solid-fg-hover: oklch(99% 0 0);
}

*,
*::before,
*::after { box-sizing: border-box; }


html { scroll-behavior: smooth; }

[id] { scroll-margin-top: 5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Мелкий текст читается плохо при весе 400: поднимаем до 500 и добавляем воздуха между строк. */
:where(figcaption, .case__meta, .disclaimer, .crumbs, .eyebrow, .topbar, .footer, .section__note, .strip, small) {
  font-weight: var(--w-medium);
  letter-spacing: 0.005em;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0;
  margin: 0;
  text-wrap: balance;
}
/* Интерлиньяж по рефу: первый экран 1,06, заголовок секции 1,12, подзаголовок 1,2. */
h1 { line-height: 1.06; }
h3 { line-height: 1.2; }
/* плотный трекинг — только на крупном дисплейном кегле */
.section__head h2,
.page-head h1,
.request__intro h2 { letter-spacing: -0.02em; }

p { margin: 0; }
a { color: inherit; }
/* браузер рисует strong весом 700, а в субсетах Golos это не начертание сайта */
strong, b { font-weight: var(--w-strong); }
img, svg { max-width: 100%; display: block; }
table { border-collapse: collapse; width: 100%; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; z-index: 100;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 1rem; }

/* ---------- типографика-утилиты ---------- */

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--ochre-deep);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: "";
  width: 1.6rem; height: 1px;
  background: currentColor;
  flex: none;
}

.lede {
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 52ch;
}

/* ---------- кнопки ---------- */

.btn {
  --btn-bg: var(--btn-solid);
  --btn-fg: var(--btn-solid-fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  min-height: 3.25rem;
  line-height: 1.2;
  border: 1px solid var(--btn-bg);
  border-radius: var(--r-lg);
  background: var(--btn-bg);
  color: var(--btn-fg);
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
              border-color 0.18s var(--ease), transform 0.18s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible {
  outline: 2px solid var(--ochre);
  outline-offset: 3px;
}

.btn--solid {
  --btn-bg: var(--btn-solid);
  --btn-fg: var(--btn-solid-fg);
  box-shadow: var(--btn-glow);
}
.btn--solid:hover {
  --btn-bg: var(--btn-solid-hover);
  --btn-fg: var(--btn-solid-fg-hover);
}

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover {
  --btn-bg: var(--paper-2);
  border-color: var(--ink-faint);
}

.btn--sm { padding: 0.5rem 1rem; min-height: 2.375rem; font-size: var(--text-sm); line-height: 1.2; }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: var(--step--1);
  text-decoration: none;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid currentColor;
  align-self: flex-start;
  transition: color 0.18s var(--ease);
}
.link-arrow::after { content: "→"; color: var(--ochre-deep); transition: transform 0.18s var(--ease); }
.link-arrow:hover { color: var(--ochre-deep); }
.link-arrow:hover::after { transform: translateX(3px); }

/* ---------- topbar + nav ---------- */

.topbar {
  background: var(--graphite);
  color: oklch(80% 0.01 250);
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
}
/* Верхняя строка в тёмной шапке сливается с ней — отдельного шва нет. */
.topbar.is-dark { background: var(--obsidian); color: var(--on-dark-2); }
.topbar.is-dark .topbar__phone { color: var(--on-dark); }
.topbar.is-dark .topbar__phone:hover { color: var(--gold); }
.topbar__inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0.5rem var(--gutter);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.topbar__sep {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--ochre);
  flex: none;
}
.topbar.is-dark .topbar__sep { background: var(--gold); }
.topbar__phone {
  margin-left: auto;
  color: var(--paper);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.topbar__phone:hover { color: var(--ochre-pale); }

/* Переключатель темы. Стоит на тёмной шапке, которая остаётся тёмной в обеих
   темах: дорожка 44×26 на волосе, ползунок справа — тёмная (по умолчанию),
   слева — светлая. Высота кнопки 30 px, вровень с чипами. */
.theme {
  display: inline-flex;
  align-items: center;
  height: 1.875rem;
  padding: 0 0.1rem;
  border: 0;
  background: none;
  cursor: pointer;
  flex: none;
}
.theme__track {
  position: relative;
  display: block;
  width: 2.75rem;
  height: 1.625rem;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: oklch(100% 0 0 / 0.08);
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.theme__knob {
  position: absolute;
  top: 50%;
  left: 0.1875rem;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: -0.5625rem;
  border-radius: 50%;
  background: var(--gold);
  transform: translateX(1.125rem);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
html.theme-light .theme__knob { transform: translateX(0); background: var(--on-dark-2); }
.theme:hover .theme__track { border-color: var(--gold); }
.theme:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Шапка — тёмное стекло: обсидиан просвечивает, содержимое размывается. */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklch, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav.is-dark {
  background: color-mix(in oklch, var(--obsidian) 94%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
/* В тёмной шапке марка — золотая буква на обсидиане, активный пункт — золотая линия. */
.nav.is-dark .brand__mark {
  background: var(--obsidian-2);
  color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--line);
}
.nav.is-dark .brand__text em { color: var(--on-dark-2); }
.nav.is-dark .nav__links a { color: var(--on-dark-2); }
.nav.is-dark .nav__links a:hover { color: var(--on-dark); border-color: var(--gold); }
.nav.is-dark .nav__links a[aria-current="page"] { color: var(--gold); border-color: var(--gold); }
.nav__inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0.75rem var(--gutter);
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
/* Кнопка в шапке — флекс-элемент и сжимается ниже своего текста: на 1024–1090
   «Получить расчёт» ломалось в две строки, шапка росла 71 → 94. */
.nav__inner > .btn { white-space: nowrap; }
/* На узком десктопе шапка переполнялась на 4 px: зазоры ужимаются, пункты
   и кнопка остаются в одну строку. */
@media (max-width: 68rem) {
  .nav__inner { gap: 1rem; }
  .nav__links { gap: 1rem; }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  flex: none;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 2.35rem; height: 2.35rem;
  background: var(--ink);
  color: var(--ochre-pale);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  border-radius: var(--r);
}
.brand__text { display: grid; line-height: 1.15; }
.brand__text strong {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  letter-spacing: 0.06em;
}
.brand__text em {
  font-style: normal;
  font-size: 0.7rem;
  color: var(--ink-faint);
}

.nav__links {
  display: flex;
  gap: 1.4rem;
  list-style: none;
  margin: 0 auto 0 0;
  padding: 0;
  font-size: var(--text-sm);
}
.nav__links a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.3rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav__links a:hover {
  color: var(--ink);
  border-color: var(--ochre);
}
/* Активный пункт: линия под пунктом, страница, на которой пользователь сейчас. */
.nav__links a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--ochre);
}

.nav__toggle {
  display: none;
  place-items: center;
  width: 2.6rem; height: 2.6rem;
  padding: 0;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--r);
  cursor: pointer;
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  display: block;
  width: 1.15rem; height: 2px;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.nav__toggle span { position: relative; }
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav__toggle span::before { top: -6px; }
.nav__toggle span::after { top: 6px; }
.nav.is-open .nav__toggle span { background: transparent; }
.nav.is-open .nav__toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav__toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 62rem) {
  .nav__inner { flex-wrap: wrap; gap: 0.6rem 1rem; justify-content: space-between; }
  .nav__links {
    order: 3;
    width: 100%;
    margin: 0;
    gap: 1.1rem;
    overflow-x: auto;
    scrollbar-width: none;
    font-size: var(--text-sm);
  }
  .nav__links::-webkit-scrollbar { display: none; }
  [id] { scroll-margin-top: 7.5rem; }
}
@media (max-width: 48rem) {
  .nav__inner { flex-wrap: wrap; padding-block: 0.6rem; }
  .nav__toggle { display: grid; }
  .nav__inner > .btn { display: none; }
  .nav__links {
    display: none;
    order: 4;
    flex-direction: column;
    gap: 0;
    overflow: visible;
    font-size: var(--text-md);
    border-top: 1px solid var(--line);
    padding-top: 0.4rem;
  }
  .nav.is-open .nav__links { display: flex; }
  .nav__links li { border-bottom: 1px solid var(--line); }
  .nav__links li:last-child { border-bottom: 0; }
  .nav__links a { display: block; padding: 0.85rem 0.15rem; }
  [id] { scroll-margin-top: 5rem; }
}
@media (max-width: 24rem) {
  .brand__text em { display: none; }
  .btn--sm { padding-inline: 0.85rem; }
}

/* ---------- hero ---------- */

/* Герой тёмный во всю ширину экрана, а текст остаётся в 90rem — поля считаются
   от центра, как у page-head и .section--dark. На 1920 по бокам больше нет
   светлых полос бумаги. */
.hero {
  position: relative;
  padding: clamp(1.2rem, 4vh, 3rem) max(var(--gutter), calc(50% - 40rem + var(--gutter))) clamp(1rem, 3.2vh, 2.5rem);
  max-width: none;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in oklch, var(--line) 60%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklch, var(--line) 60%, transparent) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(120% 90% at 70% 10%, oklch(0% 0 0 / 0.5), transparent 70%);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.5rem, 4svh, 4rem) clamp(2rem, 5vw, 5rem);
  align-items: center;
}
@media (max-width: 60rem) {
  .hero__grid { grid-template-columns: 1fr; align-items: start; }
  /* на узком экране факты идут раньше кнопок: кнопка уезжает за сгиб на телефоне */
  .hero__copy { display: flex; flex-direction: column; }
  .hero .eyebrow { order: 0; }
  .hero h1 { order: 1; }
  .lede { order: 2; }
  .facts { order: 3; margin-top: 1.6rem; }
  .hero__actions { order: 4; margin-bottom: 0; }
}

/* Кегль героя привязан к высоте экрана: на ноутбуке 768 px шапка и герой
   должны влезть целиком, на большом мониторе остаётся прежний размер.
   Третий предел — ширина: Unbounded широкий, и на телефоне 40 px из рефа
   не влезали в колонку — слово «металлокаркас» уезжало за край. */
.hero h1 {
  font-size: clamp(1.6rem, min(6.44svh, 8.6vw, var(--step-4)), 3.625rem);
  margin: clamp(0.6rem, 1.6svh, 1rem) 0 clamp(0.8rem, 2svh, 1.2rem);
  letter-spacing: -0.03em;
}

/* Ноутбук 1366×768 и ниже: шапка, герой и полоса преимуществ
   должны уместиться в первый экран, иначе непонятно, что ниже есть контент.
   Главный резерв — блок фактов: в 2×2 он занимает 168 px, в строку 63 px. */
@media (min-width: 60rem) and (max-height: 60rem) {
  .hero { padding-block: clamp(0.2rem, 0.8svh, 0.7rem); }
  .hero__grid { gap: clamp(0.3rem, 1.4svh, 1.1rem) clamp(1.6rem, 3.5vw, 4rem); }
  .hero__actions { margin: clamp(0.5rem, 1.6svh, 1rem) 0 clamp(0.6rem, 1.8svh, 1.2rem); }
  .strip { margin-top: clamp(0.4rem, 1.2svh, 0.9rem); }
  .strip li { padding-block: 0.6rem; }
}
/* 768 и 720 по высоте: 58 px из рефа в первый экран не влезают,
   кегль опускается на 5,4svh (41 px на 1366, 40 на 1280),
   вступление — с 1,5 до 1,4 интерлиньяжа. */
@media (min-width: 60rem) and (max-height: 54rem) {
  .hero h1 { font-size: clamp(1.6rem, min(5.4svh, 8.6vw, var(--step-4)), 3.625rem); }
  .hero .lede { font-size: var(--text-md); line-height: 1.4; }
}
/* 1024 на 768: копия уже не держит три строки заголовка — кегль ниже. */
@media (max-width: 70rem) and (max-height: 54rem) {
  .hero h1 { font-size: clamp(1.6rem, min(4.4svh, 8.6vw, var(--step-4)), 3.625rem); }
}
.hero__accent {
  font-style: normal;
  color: var(--ochre-deep);
  position: relative;
}
.hero__accent::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.06em;
  height: 0.055em;
  background: var(--ochre);
  opacity: 0.35;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0 2.6rem;
}

/* Четыре факта стоят в узкой колонке героя: «изготовление» — самое длинное слово,
   в четыре колонки оно не влезает при ширине окна 1000–1366. Пока колонка узкая — 2×2. */
/* Панель, а не россыпь линий: как блок фактов в рефе (95 px). */
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0.9rem 1.1rem;
  background: color-mix(in oklch, var(--obsidian-2) 80%, transparent);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-lg);
}
.facts > div {
  padding: 0.85rem 0.9rem 0 0;
  border-right: 1px solid var(--line);
}
.facts > div:nth-child(2n) { border-right: 0; padding-left: 0.9rem; }
.facts > div:nth-child(n+3) {
  margin-top: 0.85rem;
  border-top: 1px solid var(--line);
}
.facts dt {
  font-size: 0.7rem;
  color: var(--ink-faint);
  margin-bottom: 0.35rem;
}
.facts dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}
/* Колонка героя от 90rem достаточно широкая: четыре факта в строку. */
@media (min-width: 90rem) {
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .facts > div { padding: 0.85rem 0.75rem 0 0; border-right: 1px solid var(--line); }
  .facts > div:nth-child(n+3) { margin-top: 0; border-top: 0; }
  .facts > div + div { padding-left: 0.75rem; }
  .facts > div:nth-child(2n) { border-right: 1px solid var(--line); padding-left: 0.75rem; }
  .facts > div:last-child { border-right: 0; }
}

/* Низкое окно (ноутбук 768 и 720): факты в строку — в 2×2 они занимают
   168 px вместо 63, и первый экран не влезает. Ставится после базовых правил,
   иначе базовое `repeat(2, …)` перекрывает это. */
@media (min-width: 60rem) and (max-height: 60rem) {
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .facts > div { padding: 0.5rem 0.6rem 0 0; border-right: 1px solid var(--line); }
  .facts > div + div { padding-left: 0.6rem; }
  .facts > div:nth-child(2n) { border-right: 1px solid var(--line); padding-left: 0.6rem; }
  .facts > div:nth-child(n+3) { margin-top: 0; border-top: 0; }
  .facts > div:last-child { border-right: 0; }
  .facts dt { margin-bottom: 0.15rem; }
  .facts dd { font-size: var(--text-xs); line-height: 1.22; }
}
/* Колонка героя уже 72rem — слову «изготовление» тесно: остаются 2×2,
   но без вертикального запаса. */
@media (min-width: 60rem) and (max-height: 60rem) and (max-width: 72rem) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div { padding: 0.45rem 0.9rem 0 0; }
  .facts > div:nth-child(2n) { border-right: 0; padding-left: 0.9rem; }
  .facts > div:nth-child(n+3) { margin-top: 0; border-top: 1px solid var(--line); }
}

.hero__media { margin: 0; }
.frame {
  background: color-mix(in oklch, var(--paper-2) 70%, var(--paper));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1rem, 2.5vw, 2rem);
  position: relative;
}
.frame::after {
  content: "";
  position: absolute;
  inset: 0.5rem;
  border: 1px dashed color-mix(in oklch, var(--line) 90%, transparent);
  border-radius: var(--r);
  pointer-events: none;
}

/* встроенная 3D-модель: прозрачный фон, ничего лишнего */
.model {
  position: relative;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    linear-gradient(to right, color-mix(in oklch, var(--line) 40%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklch, var(--line) 40%, transparent) 1px, transparent 1px);
  background-size: 44px 44px;
  overflow: hidden;
  aspect-ratio: 16 / 11;
  /* выше экрана модель не растёт: иначе от лестницы видно только середину */
  max-height: min(68svh, 40rem);
}
.model__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.model__hint {
  position: absolute;
  left: 0.9rem;
  bottom: 0.8rem;
  margin: 0;
  padding: 0.3rem 0.6rem;
  border-radius: var(--r);
  background: color-mix(in oklch, var(--paper) 80%, transparent);
  font-size: var(--text-xs);
  color: var(--ink-faint);
  pointer-events: none;
}
/* Угловые засечки рамки: модель в 3D-секции на обсидиане, и золото держит
   границу кадра, не споря со светлой сеткой внутри. */
.is-dark .model::before,
.is-dark .model::after {
  content: "";
  position: absolute;
  width: 1.1rem; height: 1.1rem;
  border: 1px solid var(--gold);
  pointer-events: none;
}
.is-dark .model::before { left: 0.5rem; top: 0.5rem; border-right: 0; border-bottom: 0; }
.is-dark .model::after { right: 0.5rem; bottom: 0.5rem; border-left: 0; border-top: 0; }

.model__open {
  position: absolute;
  right: 0.9rem;
  top: 0.9rem;
}
.is-dark .model__frame { background: transparent; }
.model__open .btn { background: color-mix(in oklch, var(--paper) 88%, transparent); backdrop-filter: blur(6px); }
.is-dark .model__open .btn { background: color-mix(in oklch, var(--obsidian-2) 82%, transparent); }
.model__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.2rem;
}
@media (max-width: 40rem) {
  .model { aspect-ratio: 4 / 3.4; }
  .model__hint { display: none; }
  .model__open {
    left: 0.6rem;
    right: auto;
    top: auto;
    bottom: 0.6rem;
  }
  .model__open .btn { font-size: var(--text-xs); padding: 0.4rem 0.7rem; }
}
.hero__media figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
  font-size: var(--text-xs);
  letter-spacing: 0.03em;
  color: var(--ink-faint);
}
.hero__media figcaption span:first-child {
  color: var(--ink-soft);
  font-weight: 500;
}

/* Схема: линии — золото поверх обсидиана, контуры ступеней — светлые,
   заливка балки и площадки — тёмное золото. */
.s-grid path {
  stroke: color-mix(in oklch, var(--line) 75%, transparent);
  stroke-width: 1;
}
.s-beam { fill: color-mix(in oklch, var(--ink) 85%, var(--ochre-deep)); }
.s-steps { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.s-tread { stroke: var(--ink); stroke-width: 2; opacity: 0.5; }
.s-slab { fill: color-mix(in oklch, var(--ink) 30%, var(--paper)); stroke: var(--ink); stroke-width: 1.5; }
.s-dim path { stroke: var(--ochre-deep); stroke-width: 1.2; }
.s-nodes circle {
  fill: var(--ochre);
  stroke: var(--paper);
  stroke-width: 2.5;
}
.is-dark .s-grid path { stroke: color-mix(in oklch, var(--gold) 22%, transparent); }
/* Заливки — тёплый бронзовый, без подмеса обсидиана: он фиолетовый и мовит золото.
   Светлее 3:1 к фону, иначе силуэт косоура не читается. */
.is-dark .s-beam { fill: oklch(51% 0.055 74); }
.is-dark .s-steps { stroke: var(--on-dark); }
.is-dark .s-slab {
  fill: oklch(60% 0.085 80);
  stroke: var(--gold);
}
.is-dark .s-dim path { stroke: var(--gold); }
.is-dark .s-nodes circle { fill: var(--gold); stroke: var(--obsidian); }

/* при скролле ступени встают на косоур */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .schematic {
      view-timeline-name: --sheme;
      view-timeline-axis: block;
    }
    .s-beam {
      animation: beam-in linear both;
      animation-timeline: --sheme;
      animation-range: entry 5% cover 35%;
    }
    .s-tread {
      animation: tread-in linear both;
      animation-timeline: --sheme;
      animation-range: entry 10% cover 45%;
    }
    .s-nodes circle {
      animation: node-in linear both;
      animation-timeline: --sheme;
      animation-range: entry 30% cover 60%;
      animation-delay: calc(var(--i) * 0.06s);
    }
    .s-nodes circle:nth-child(1) { --i: 0; }
    .s-nodes circle:nth-child(2) { --i: 1; }
    .s-nodes circle:nth-child(3) { --i: 2; }
    .s-nodes circle:nth-child(4) { --i: 3; }
  }
}

@keyframes beam-in {
  from { opacity: 0; transform: translateX(-8%); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes tread-in {
  from { transform: translateY(-14%); opacity: 0; }
  to { transform: translateY(0); opacity: 0.5; }
}
@keyframes node-in {
  from { opacity: 0; transform: scale(0.2); }
  to { opacity: 1; transform: scale(1); }
}

/* ---------- strip ---------- */

/* Полоса преимуществ — та же тёмная плита сверху, что герой, в обеих темах:
   делят её только волос и вертикальные засечки между пунктами. */
.strip {
  background: var(--obsidian);
  color: var(--on-dark);
  margin-top: 0;
  border-top: 1px solid var(--line-dark);
}
.strip ul {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  font-size: var(--text-sm);
}
.strip li {
  padding: 1.1rem 1.2rem 1.1rem 0;
  border-right: 1px solid var(--line-dark);
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
}
.strip li:last-child { border-right: 0; }
.strip li + li { padding-left: 1.2rem; }
.strip .num {
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 60rem) {
  .strip ul { grid-template-columns: 1fr 1fr; }
  .strip li:nth-child(2) { border-right: 0; }
  .strip li:nth-child(-n+2) { border-bottom: 1px solid var(--line-dark); }
  .strip li:nth-child(3) { padding-left: 0; }
}
@media (max-width: 34rem) {
  .strip ul { grid-template-columns: 1fr; }
  .strip li { border-right: 0; border-bottom: 1px solid var(--line-dark); padding-left: 0; }
  .strip li:last-child { border-bottom: 0; }
}

/* ---------- секции ---------- */

.section {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(3rem, 5.56vw, 5rem) var(--gutter);
}
.section--tight { padding-block: clamp(2.6rem, 4.45vw, 4rem); }

/* Разделитель между соседними секциями — волос 1px, как в рефе.
   В тёмной базе это тот же волос, что у панелей; в светлой — прежний мягкий. */
.section + .section {
  border-top: 1px solid var(--divider);
}

/* Тёмная секция во всю ширину экрана (3D-модель). Цвета даёт .is-dark,
   здесь — выход за 90rem и золотая сетка 26 px; внутренние поля считаются
   от центра, поэтому текст встаёт в одну линию с соседними секциями. */
.section--dark {
  position: relative;
  max-width: none;
  padding-inline: max(var(--gutter), calc(50% - 40rem + var(--gutter)));
  overflow: hidden;
}
.section--dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in oklch, var(--gold) 20%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklch, var(--gold) 20%, transparent) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(100% 100% at 50% 25%, oklch(0% 0 0 / 0.75), transparent 82%);
  pointer-events: none;
}
.section--dark > * { position: relative; }

/* Шапка секции по рефу: слева eyebrow и заголовок, справа лид отдельной колонкой.
   Так заголовок держит короткую строку, а лид читается в своей мере. */
.section__head {
  max-width: none;
  margin-bottom: clamp(1.8rem, 3.5vw, 2.8rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
  column-gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.section__head > .eyebrow { grid-column: 1; }
.section__head h2 {
  grid-column: 1;
  font-size: var(--step-3);
  line-height: 1.05;
  margin: 0.8rem 0 0;
}
.section__head > .section__note {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  max-width: none;
  margin: 0;
}
@media (max-width: 62rem) {
  .section__head { display: block; }
  .section__head h2 { margin-bottom: 0.9rem; }
}
/* Лид секции — 14 px / 1,55, как `text-sm` рефа: заметка справа набрана
   мельче основного текста, чтобы не спорить с h2. */
.section__note {
  color: var(--ink-soft);
  max-width: 58ch;
  font-size: 0.875rem;
  line-height: 1.55;
}

/* Тёмные якоря: обсидиан вместо графита (шапка, герой, 3D, заявка, подвал).
   Класс переопределяет роли цвета на месте, поэтому вложенные компоненты
   (.facts, .btn, .strip, .model, .eyebrow) красятся сами. */
.is-dark {
  --paper: var(--obsidian);
  --paper-2: var(--obsidian-2);
  --raise: oklch(21.5% 0.004 286);
  --ink: var(--on-dark);
  --ink-soft: var(--on-dark-2);
  --ink-faint: var(--on-dark-2);
  --line: oklch(100% 0 0 / 0.13);
  --ochre: var(--gold);
  --ochre-deep: var(--gold);
  --ochre-pale: oklch(92% 0.045 85);
  background: var(--obsidian);
  color: var(--on-dark);
}

/* Кнопки на тёмном: основная — золотая заливка (ink на золоте 8,48),
   вторичная — обводка по линии тёмной области. */
.is-dark .btn--solid {
  --btn-bg: var(--gold);
  --btn-fg: var(--obsidian);
}
.is-dark .btn--solid:hover {
  --btn-bg: var(--ochre-pale);
  --btn-fg: var(--obsidian);
}
.is-dark .btn--ghost {
  --btn-fg: var(--on-dark);
  border-color: var(--line);
}
.is-dark .btn--ghost:hover {
  --btn-bg: var(--obsidian-2);
  border-color: var(--gold);
}

.section--dark {
  background: var(--obsidian);
  color: var(--on-dark);
  max-width: none;
}
.section--dark > * { max-width: var(--content); margin-inline: auto; }
.section--dark .section__note { color: var(--on-dark-2); }
.section--dark .eyebrow { color: var(--gold); }
.section--dark .section__head { padding-inline: 0; }

/* ---------- маршруты ---------- */

.routes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 52rem) {
  .routes { grid-template-columns: 1fr; }
}

.route {
  padding: clamp(1.4rem, 3vw, 2.4rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color 0.2s var(--ease);
}
.route:hover { border-color: var(--hover-line); }
.route--outline {
  background: transparent;
}
@media (max-width: 52rem) {
  .route--outline {
    border-left: 0;
  }
}
.route__idx {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.route h3 { font-size: var(--step-2); }
.route__lead {
  color: var(--ink-soft);
  font-size: var(--text-md);
  max-width: 34ch;
}
.route__foot {
  font-size: var(--text-sm);
  color: var(--ink-faint);
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
  margin-top: auto;
}
.route__foot strong { color: var(--ink); }

.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  font-size: var(--text-md);
}
.checks li {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  gap: 0.55rem;
  align-items: start;
  color: var(--ink-soft);
}
.checks li::before {
  content: "";
  width: 0.5rem; height: 0.5rem;
  margin-top: 0.42rem;
  border: 1px solid var(--ochre-deep);
  transform: rotate(45deg);
}

/* ---------- комплектация ---------- */

.kit {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.2rem, 3vw, 3rem);
  align-items: start;
}
@media (max-width: 52rem) {
  .kit { grid-template-columns: 1fr; }
}
.kit__title {
  font-size: var(--step-0);
  font-family: var(--font-display);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--ink);
}
.kit__title--out {
  color: var(--ink-faint);
  border-color: var(--line);
}
.kit__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.kit__list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-md);
}
.kit__list li:last-child { border-bottom: 0; }
.kit__list span { font-weight: 500; }
.kit__list em {
  font-style: normal;
  font-size: var(--text-sm);
  color: var(--ink-faint);
  text-align: right;
  max-width: 22ch;
}
.kit__col--out .kit__list li { opacity: 0.85; }
.kit__hint {
  margin-top: 1.2rem;
  font-size: var(--text-sm);
  color: var(--ink-faint);
  padding: 0.9rem 1rem;
  background: var(--paper-2);
  border-left: 2px solid var(--ochre);
}

/* Пять узлов: на тёмном — карточки-строки с волосом и радиусом 12
   вместо сплошной сетки 2px (линии на обсидиане читаются жёстко). */
.nodes {
  list-style: none;
  margin: 1.2rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  counter-reset: none;
}
.nodes li {
  display: flex;
  gap: 0.9rem;
  padding: 0.8rem 1rem;
  background: color-mix(in oklch, var(--paper-2) 80%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  font-size: var(--text-md);
  color: var(--ink-soft);
  transition: border-color 0.2s var(--ease);
}
.nodes li:hover { border-color: var(--hover-line); }
.nodes li span {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--ochre-deep);
  font-variant-numeric: tabular-nums;
  padding-top: 0.15rem;
}

/* ---------- проекты ---------- */

.cases {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.case--wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; }
@media (max-width: 60rem) {
  .cases { grid-template-columns: 1fr; }
  .case--wide { grid-template-columns: 1fr; }
}

.case {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s var(--ease), translate 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
}
.case:hover {
  border-color: var(--hover-line);
  /* `translate`, а не `transform`: появление (.reveal.is-in) гасит transform
     на том же элементе, и подъём им бы затирался */
  translate: 0 -2px;
  box-shadow: var(--hover-shadow);
}
.case:active { translate: none; }
@media (prefers-reduced-motion: reduce) {
  .case:hover { translate: none; }
}
.case--wide .case__body { padding: clamp(1.2rem, 2.5vw, 2rem); }

.case__media {
  margin: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: var(--paper-2);
  background-image:
    linear-gradient(to right, color-mix(in oklch, var(--line) 55%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklch, var(--line) 55%, transparent) 1px, transparent 1px);
  background-size: 44px 44px;
  border-bottom: 1px solid var(--line);
}
.case__media::after {
  content: "Фото объекта";
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--ink-faint);
}
.case__media:has(img)::after { display: none; }
.case__media:not(:has(img)) {
  aspect-ratio: auto;
  min-height: clamp(7rem, 11vw, 9rem);
}
.case__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.001);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.case:hover .case__media img { transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) {
  .case__media img { transition: none; }
  .case:hover .case__media img { transform: none; }
}
.case--wide .case__media {
  aspect-ratio: 16 / 10;
  border-bottom: 0;
  border-right: 1px solid var(--line);
}
.case--wide .case__media:empty {
  aspect-ratio: auto;
  min-height: 100%;
  height: auto;
}
@media (max-width: 60rem) {
  .case--wide .case__media:empty {
    min-height: clamp(7rem, 11vw, 9rem);
  }
}
@media (max-width: 60rem) {
  .case--wide .case__media { border-right: 0; border-bottom: 1px solid var(--line); }
}

.case__body {
  padding: clamp(1.1rem, 2vw, 1.6rem);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.case__meta {
  font-size: var(--text-sm);
  color: var(--ink-faint);
}
.case h3 { font-size: var(--step-1); }
.case__body > p:not(.case__meta) {
  font-size: var(--text-md);
  color: var(--ink-soft);
}

.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.6rem;
  margin: 0.2rem 0 0.4rem;
}
.specs > div { display: grid; }
.specs dt {
  font-size: 0.7rem;
  color: var(--ink-faint);
}
.specs dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

.disclaimer {
  margin-top: 1.2rem;
  font-size: var(--text-sm);
  color: var(--ink-faint);
}

.cases__more {
  margin-top: 1.6rem;
}
.cases__more .btn { width: auto; }

/* ---------- ступени ---------- */

.treads {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 62rem) {
  .treads { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 52rem) {
  .treads { grid-template-columns: 1fr; }
}
.tread {
  display: grid;
  gap: 0.8rem;
  align-content: start;
  padding: clamp(1.2rem, 2.6vw, 2rem);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color 0.2s var(--ease);
}
.tread:hover { border-color: var(--hover-line); }
.tread--main { background: color-mix(in oklch, var(--paper-2) 60%, var(--raise)); }
.tread__idx {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--ochre-deep);
}
.tread h3 { font-size: var(--step-1); }
.tread__lead { font-size: var(--text-md); color: var(--ink-soft); }
.tread__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
.tread__list li { padding-left: 1.1rem; position: relative; }
.tread__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 5px;
  height: 1px;
  background: var(--ochre-deep);
}

.coating {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(1.2rem, 3vw, 3rem);
  margin-top: clamp(1.6rem, 3vw, 2.6rem);
  padding-top: clamp(1.6rem, 3vw, 2.6rem);
  border-top: 1px solid var(--ink);
}
@media (max-width: 52rem) {
  .coating { grid-template-columns: 1fr; gap: 1.2rem; }
}
.coating__lead { display: grid; gap: 0.6rem; align-content: start; }
.coating__lead h3 { font-size: var(--step-2); }
.coating__lead p { font-size: var(--text-sm); color: var(--ink-faint); max-width: 30ch; }
.coating__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.2rem;
}
.coating__list li {
  display: grid;
  gap: 0.4rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
}
.coating__list li:last-child { border-bottom: 0; padding-bottom: 0; }
.coating__list span {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 500;
}
.coating__list em {
  font-style: normal;
  font-size: var(--text-md);
  color: var(--ink-soft);
  max-width: 62ch;
}

.mount { margin-top: clamp(2rem, 4vw, 3.4rem); }
.mount__title { font-size: var(--step-2); margin-bottom: 1.2rem; }

/* Панель схемы (реф «ЧАЙКА»): тёмная плита, на ней полоса с табами
   и навигацией, под ней сам кадр. */
.stage {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--paper-2);
  overflow: hidden;
}
.stage__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.stage__tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
}
.stage__tab {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.stage__tab:hover { color: var(--ink); }
.stage__tab.is-active {
  background: var(--btn-solid);
  color: var(--btn-solid-fg);
}
.stage__nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
.stage__step {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.stage__step:hover { border-color: var(--hover-line); }
.stage__count {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  margin: 0 0.35rem;
  min-width: 4.2rem;
  text-align: center;
}
.stage__count span:first-child { color: var(--gold); }
.stage__play {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gold);
  background: transparent;
  border: 1px solid color-mix(in oklch, var(--gold) 55%, var(--line));
  border-radius: 999px;
  padding: 0.5rem 1rem 0.5rem 1.9rem;
  cursor: pointer;
  position: relative;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
/* треугольник «играть» / две черты «пауза» — одним элементом */
.stage__play::before {
  content: "";
  position: absolute;
  left: 0.8rem;
  top: 50%;
  translate: 0 -50%;
  border: 4px solid transparent;
  border-left: 6px solid currentColor;
  border-right: 0;
}
.stage__play[aria-pressed="true"]::before {
  width: 6px;
  height: 9px;
  border: 0;
  border-left: 2px solid currentColor;
  border-right: 2px solid currentColor;
}
.stage__play:hover {
  border-color: var(--gold);
  background: color-mix(in oklch, var(--gold) 10%, transparent);
}

.stage__body { position: relative; }
.stage__view[hidden] { display: none; }
.mount__frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(62svh, 34rem);
  border: 0;
  background: var(--paper-2);
}

/* фото-слайды: те же шесть кадров, что в карточках #cases */
.stage__shot { display: none; margin: 0; }
.stage__shot.is-active { display: block; }
.stage__shot img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(62svh, 34rem);
  object-fit: cover;
}
.stage__shot figcaption {
  padding: 0.7rem 0.95rem;
  font-size: var(--text-sm);
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}
.stage__shot figcaption strong { color: var(--ink); font-weight: 500; }
.mount__scenes {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  margin: 1rem 0 0;
  padding: 0;
  counter-reset: none;
}
.mount__scenes li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: var(--text-sm);
  color: var(--ink-faint);
}
.mount__scenes li span {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--ochre-deep);
  font-variant-numeric: tabular-nums;
}
.mount__scenes li.is-active { color: var(--ink); }

.mount__notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1.2rem, 2.5vw, 2rem);
  margin-top: clamp(1.6rem, 3vw, 2.4rem);
  padding-top: clamp(1.6rem, 3vw, 2.4rem);
  border-top: 1px solid var(--line);
}
.mount__notes h4 { font-size: var(--text-md); margin-bottom: 0.4rem; }
.mount__notes p { font-size: var(--text-sm); color: var(--ink-soft); }

/* ---------- цена ---------- */

.price {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
@media (max-width: 60rem) {
  .price { grid-template-columns: 1fr; }
}

.price table { font-size: var(--text-md); }
/* Ячейки плотнее, как в таблицах рефа: 0,7 по вертикали, 0,9 по горизонтали. */
.price thead th {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--ink-faint);
  font-weight: 500;
  text-align: left;
  padding: 0.7rem 0.9rem 0.7rem 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.price thead th:not(:first-child) { text-align: right; }
.price tbody th {
  text-align: left;
  font-weight: 500;
  font-family: var(--font-display);
  font-size: var(--text-md);
  padding: 0.7rem 0.9rem 0.7rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  line-height: 1.3;
}
.price tbody th em {
  display: block;
  font-style: normal;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--ink-faint);
  margin-top: 0.3rem;
  font-weight: var(--w-medium);
}
.price tbody td {
  text-align: right;
  padding: 0.7rem 0 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: var(--text-sm);
}
.price tbody tr:last-child th,
.price tbody tr:last-child td { border-bottom: 1px solid var(--ink); }

@media (max-width: 40rem) {
  .price thead { display: none; }
  .price tbody th { border-bottom: 0; padding-bottom: 0.3rem; }
  .price tbody tr {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
  }
  .price tbody tr:last-child { border-bottom: 1px solid var(--ink); }
  /* Линия у последней строки — одна: иначе рамка строки и рамка ячейки
     ложатся друг на друга и низ выглядит толще остальных. */
  .price tbody tr:last-child th,
  .price tbody tr:last-child td { border-bottom: 0; }
  .price tbody td {
    display: flex;
    justify-content: space-between;
    border-bottom: 0;
    padding: 0.25rem 0;
    font-size: var(--text-sm);
  }
  .price tbody td::before {
    content: attr(data-label);
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: var(--ink-faint);
  }
}

.price__side h3 {
  font-family: var(--font-display);
  font-size: var(--step-0);
  color: var(--ink);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--ink);
}
.deltas {
  list-style: none;
  margin: 0 0 1.6rem;
  padding: 0;
}
.deltas li {
  display: grid;
  gap: 0.1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-md);
}
.deltas li span { font-weight: 500; }
.deltas li em {
  font-style: normal;
  font-size: var(--text-sm);
  color: var(--ink-faint);
}
.price__note {
  margin-top: 0.8rem;
  font-size: var(--text-xs);
  color: var(--ink-faint);
}

/* ---------- ответственность ---------- */

.scroll-x { overflow-x: auto; }

.resp {
  font-size: var(--text-md);
  min-width: 46rem;
}
.resp thead th {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--ink-faint);
  font-weight: 500;
  text-align: left;
  padding: 0 1.2rem 0.8rem 0;
  border-bottom: 1px solid var(--ink);
}
.resp thead th:last-child { color: var(--ochre-deep); }
.resp tbody th {
  text-align: left;
  font-weight: 500;
  padding: 0.85rem 1.2rem 0.85rem 0;
  border-bottom: 1px solid var(--line);
  width: 22%;
}
.resp tbody td {
  padding: 0.85rem 1.2rem 0.85rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}
.resp tbody td + td { border-left: 1px solid var(--line); padding-left: 1.2rem; }

.logistics-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.2rem, 3vw, 3rem);
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}
@media (max-width: 52rem) {
  .logistics-notes { grid-template-columns: 1fr; }
}
.logistics-notes h3 {
  font-size: var(--step-0);
  font-family: var(--font-display);
  margin-bottom: 0.6rem;
  color: var(--ochre-deep);
}
.logistics-notes p { font-size: var(--text-md); color: var(--ink-soft); }
.logistics-notes strong { color: var(--ink); }

/* ---------- этапы ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  counter-reset: step;
  border-top: 1px solid var(--ink);
}
@media (max-width: 60rem) {
  .steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 34rem) {
  .steps { grid-template-columns: 1fr; }
}
.steps li {
  padding: 0.9rem 1.2rem 0 0;
  border-right: 1px solid var(--line);
  border-top: 2px solid var(--ochre);
  position: relative;
}
.steps li + li { padding-left: 1.2rem; }
.steps li:last-child { border-right: 0; }
@media (max-width: 60rem) {
  .steps li:nth-child(2) { border-right: 0; }
  .steps li:nth-child(-n+2) { padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); }
  .steps li:nth-child(3) { padding-left: 0; }
}
.steps__n {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--ochre-deep);
  display: block;
  margin-bottom: 0.55rem;
  font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.steps p { font-size: var(--text-sm); color: var(--ink-soft); }

/* ---------- FAQ ---------- */

.faq {
  max-width: 60rem;
  border-top: 1px solid var(--ink);
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer;
  padding: 1.1rem 2.2rem 1.1rem 0;
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 500;
  list-style: none;
  position: relative;
  transition: color 0.2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--ochre-deep);
  transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq summary:hover { color: var(--ochre-deep); }
.faq summary:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }
.faq details p {
  padding: 0 3rem 1.3rem 0;
  font-size: var(--text-md);
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ---------- заявка ---------- */

/* Заявка и подвал — во всю ширину экрана, но текст в тех же 90rem, что у
   обычных секций: внутренние поля считаются от центра, а не от края. */
.section--request {
  background: var(--obsidian);
  color: var(--on-dark);
  max-width: none;
  border-top: 1px solid var(--line-dark);
  padding-inline: max(var(--gutter), calc(50% - 40rem + var(--gutter)));
}

.request {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 60rem) {
  .request { grid-template-columns: 1fr; }
}

.request__intro .eyebrow { color: var(--gold); }
.request__intro h2 {
  font-size: var(--step-3);
  margin: 0.9rem 0 1rem;
}
.request__intro > p { color: var(--on-dark-2); max-width: 40ch; }

.request__list {
  list-style: none;
  margin: 1.8rem 0 2rem;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  font-size: var(--text-md);
  color: var(--on-dark);
}
.request__list li {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  gap: 0.6rem;
  align-items: start;
}
.request__list li::before {
  content: "";
  width: 0.5rem; height: 0.5rem;
  margin-top: 0.4rem;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}

.request__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-dark);
}
.request__contact a {
  text-decoration: none;
  color: var(--on-dark);
  border-bottom: 1px solid var(--gold-deep);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.request__contact a:hover { color: var(--gold); border-color: var(--gold); }

.form {
  background: var(--obsidian-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-lg);
  padding: clamp(1.2rem, 3vw, 2rem);
  display: grid;
  gap: 1.4rem;
}
.form fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}
.form legend {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--on-dark-2);
  padding: 0;
  margin-bottom: 0.2rem;
}
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.choices label {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: var(--text-sm);
  cursor: pointer;
}
.choices input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}
.choices span {
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--line-dark);
  border-radius: var(--r);
  color: var(--on-dark);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.choices input:checked + span {
  border-color: var(--gold);
  background: color-mix(in oklch, var(--gold) 16%, var(--obsidian-2));
  color: var(--on-dark);
}
.choices input:focus-visible + span {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.choices label:hover span { border-color: var(--on-dark-2); }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}
.field-row--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 34rem) {
  .field-row,
  .field-row--3 { grid-template-columns: 1fr; }
}
.field { display: grid; gap: 0.35rem; }
.field > span {
  font-size: var(--text-xs);
  color: var(--on-dark-2);
}
.field input,
.field select {
  width: 100%;
  font: inherit;
  font-size: var(--text-md);
  padding: 0.7rem 0.8rem;
  color: var(--on-dark);
  background: oklch(21.5% 0.004 286);
  border: 1px solid var(--line-dark);
  border-radius: var(--r);
  transition: border-color 0.2s, background 0.2s;
}
.field input::placeholder { color: oklch(58% 0.008 250); }
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--gold);
  background: oklch(23.5% 0.004 286);
}
.field select { appearance: none; cursor: pointer; }

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: start;
  font-size: var(--text-sm);
  color: var(--on-dark-2);
  cursor: pointer;
}
.consent input {
  margin-top: 0.15rem;
  width: 1rem; height: 1rem;
  accent-color: var(--gold);
}
.consent a { color: var(--on-dark); }

.form .btn--solid {
  --btn-bg: var(--gold);
  --btn-fg: var(--obsidian);
  border-color: var(--gold);
  padding: 1.05rem;
}
.form .btn--solid:hover {
  --btn-bg: var(--ochre-pale);
  --btn-fg: var(--obsidian);
}

.form__status {
  font-size: var(--text-sm);
  min-height: 1.2rem;
  color: var(--ochre-pale);
}
.form__note {
  font-size: 0.75rem;
  color: oklch(58% 0.008 250);
}

/* ---------- footer ---------- */

.footer {
  background: var(--obsidian);
  color: var(--on-dark-2);
  border-top: 1px solid var(--line-dark);
  padding: clamp(2rem, 4vw, 3rem) max(var(--gutter), calc(50% - 40rem + var(--gutter))) 2rem;
}
.footer__inner {
  max-width: none;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line-dark);
}
@media (max-width: 60rem) {
  .footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 34rem) {
  .footer__inner { grid-template-columns: 1fr; }
}
.footer strong {
  font-family: var(--font-display);
  font-size: var(--text-md);
  letter-spacing: 0.06em;
  color: var(--on-dark);
  display: block;
  margin-bottom: 0.6rem;
}
.footer p { font-size: var(--text-sm); line-height: 1.5; }
.footer__label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--on-dark-2);
  margin-bottom: 0.7rem;
}
.footer a {
  display: block;
  font-size: var(--text-sm);
  text-decoration: none;
  padding: 0.18rem 0;
  transition: color 0.2s;
}
.footer a:hover { color: var(--gold); }
.footer__legal {
  max-width: none;
  margin: 1.2rem auto 0;
  font-size: var(--text-xs);
  color: var(--on-dark-2);
}

/* ---------- мобильная CTA ---------- */

.mobile-cta {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 50;
  display: none;
  background: color-mix(in oklch, var(--obsidian) 94%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line-dark);
  padding: 0.5rem;
  gap: 0.5rem;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
}
.mobile-cta a {
  flex: 1;
  text-align: center;
  padding: 0.85rem;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  text-decoration: none;
  color: var(--on-dark);
  border: 1px solid var(--line-dark);
  border-radius: var(--r);
}
.mobile-cta a:last-child {
  background: var(--gold);
  color: var(--obsidian);
  border-color: var(--gold);
}
@media (max-width: 48rem) {
  .mobile-cta { display: flex; }
  body { padding-bottom: 4.3rem; }
  .footer { padding-bottom: 1.5rem; }
}

/* ---------- галерея проектов ---------- */

.gal-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.gal-bar__count {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}
.gal-bar__search { width: min(100%, 18rem); }
.gal-bar__search input {
  width: 100%;
  font: inherit;
  font-size: var(--text-md);
  padding: 0.6rem 0.8rem;
  color: var(--ink);
  background: color-mix(in oklch, var(--paper) 60%, var(--raise));
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: border-color 0.2s;
}
.gal-bar__search input::placeholder { color: var(--ink-faint); }
.gal-bar__search input:focus { outline: none; border-color: var(--ochre); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.4rem 0 clamp(1.4rem, 3vw, 2.2rem);
}
/* Чип рефа: высота 30, радиус-капсула, кегль 12; активный — мягкий
   прямоугольник радиусом 8, чтобы отличался не только цветом. */
.chip {
  font: inherit;
  font-size: 0.75rem;
  min-height: 1.875rem;
  padding: 0.25rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 9999px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s, border-radius 0.2s;
}
.chip span {
  font-family: var(--font-display);
  font-size: 0.72em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
}
.chip:hover {
  border-color: color-mix(in oklch, var(--ochre) 40%, var(--line));
  color: var(--ink);
  background: color-mix(in oklch, var(--ochre) 8%, transparent);
}
.chip.is-active {
  background: color-mix(in oklch, var(--ochre) 16%, transparent);
  border-color: var(--ochre);
  border-radius: 8px;
  padding: 0.3125rem 0.875rem;
  color: var(--ink);
}
.chip.is-active span { color: var(--ochre-deep); }
.chip:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }

.gal {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr));
  gap: 1rem;
}
@media (max-width: 40rem) {
  /* на телефоне одна карточка на всю ширину — 53 проекта в столбик слишком долго */
  .gal { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
  .gal__body { padding: 0.6rem 0.65rem 0.75rem; }
  .gal__body h2 { font-size: var(--text-sm); }
}
.gal[hidden] { display: none; }
.gal__card {
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--paper-2);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: border-color 0.2s var(--ease), translate 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
}
.gal__card:hover {
  border-color: var(--hover-line);
  translate: 0 -2px;
  box-shadow: var(--hover-shadow);
}
.gal__card:active { translate: none; }
.gal__media {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.gal__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease);
}
.gal__card:hover .gal__media img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) {
  .gal__media img { transition: none; }
  .gal__card:hover .gal__media img { transform: none; }
  .gal__card:hover { translate: none; }
}
.gal__body { padding: 0.85rem 0.95rem 1rem; display: grid; gap: 0.3rem; }
.gal__body h2 {
  font-size: var(--text-md);
  font-family: var(--font-display);
  line-height: 1.25;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.gal__meta { font-size: var(--text-xs); color: var(--ink-faint); }

.gal-empty {
  padding: 3rem 0;
  font-size: var(--text-md);
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}

/* просмотр */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: oklch(15.5% 0.004 286 / 0.995);
  padding: 0.8rem;
  color: var(--on-dark);
}
.viewer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.2rem 0.2rem 0.8rem;
}
.viewer__title {
  font-family: var(--font-display);
  font-size: var(--text-md);
  color: var(--on-dark);
}
.viewer[hidden] { display: none; }
.viewer__stage {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 0;
}
.viewer__stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--r);
}
.viewer__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  color: var(--on-dark);
  background: color-mix(in oklch, var(--obsidian-2) 80%, transparent);
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.viewer__btn svg { width: 16px; height: 16px; }
.viewer__btn:hover { color: var(--gold); border-color: var(--gold); }
.viewer__btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.viewer__btn--prev,
.viewer__btn--next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.viewer__btn--prev { left: 0.8rem; }
.viewer__btn--next { right: 0.8rem; }
.viewer__count {
  justify-self: center;
  padding: 0.6rem 0;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  color: var(--on-dark-2);
}
@media (max-width: 40rem) {
  .viewer__btn--prev,
  .viewer__btn--next { top: auto; bottom: 3.6rem; transform: none; }
  .viewer__btn--prev { left: 1rem; }
  .viewer__btn--next { right: 1rem; }
} 
/* ---------- внутренние страницы ---------- */

/* Шапка внутренней страницы — тёмный якорь на всю ширину экрана; содержимое
   держится в тех же 90rem, что и секции (поля считаются от центра). */
.page-head {
  position: relative;
  background: var(--obsidian);
  color: var(--on-dark);
  padding: clamp(1.6rem, 4vw, 3.2rem) max(var(--gutter), calc(50% - 40rem + var(--gutter)))
    clamp(1.2rem, 3vw, 2rem);
  overflow: hidden;
}
.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, oklch(100% 0 0 / 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(100% 0 0 / 0.07) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(120% 90% at 75% 0%, oklch(0% 0 0 / 0.6), transparent 68%);
  pointer-events: none;
}
.page-head > * { position: relative; }
.page-head h1 {
  font-size: var(--step-3);
  margin: 0.9rem 0 1rem;
}
.page-head > p { max-width: 62ch; color: var(--on-dark-2); }
.page-head .eyebrow { color: var(--gold); }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: var(--text-xs);
  color: var(--on-dark-2);
  margin-bottom: 0.4rem;
}
.crumbs a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.crumbs a:hover { color: var(--gold); border-color: var(--gold); }

.prose {
  max-width: 62ch;
  display: grid;
  gap: 0.9rem;
}
.prose p { color: var(--ink-soft); }
.prose strong { color: var(--ink); }
.prose a { color: var(--ink); }
.prose h2,
.prose h3 { font-size: var(--step-1); margin-top: 0.4rem; }
.prose h3 { font-size: var(--step-1); margin-top: 0.4rem; }
.prose ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}
.prose ul li {
  position: relative;
  padding-left: 1.7rem;
  font-size: var(--text-md);
  color: var(--ink-soft);
}
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 0.45rem; height: 0.45rem;
  background: var(--ochre);
}
.prose--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.2rem, 3vw, 3rem);
  max-width: none;
}
.prose--split > div { display: grid; gap: 0.8rem; align-content: start; }
@media (max-width: 52rem) {
  .prose--split { grid-template-columns: 1fr; }
}

/* три равные колонки */
.steps--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 60rem) {
  .steps--3 { grid-template-columns: 1fr 1fr; }
  .steps--3 li:nth-child(3) { padding-left: 0; grid-column: 1 / -1; border-right: 0; }
  .steps--3 li:nth-child(-n+2) { border-bottom: 1px solid var(--line); padding-bottom: 1.4rem; }
}
@media (max-width: 40rem) {
  .steps--3 { grid-template-columns: 1fr; }
  .steps--3 li { border-right: 0; padding-left: 0; border-bottom: 1px solid var(--line); padding-bottom: 1.4rem; }
}

/* пример сметы */
.estimate {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--raise);
}
.estimate__cap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.2rem;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
.estimate__cap strong {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--ink);
}
.estimate table { font-size: var(--text-md); }
.estimate thead th {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  color: var(--ink-faint);
  font-weight: 500;
  text-align: left;
  padding: 0.8rem 1.2rem;
  border-bottom: 1px solid var(--ink);
}
.estimate thead th:last-child { text-align: right; }
.estimate tbody th {
  text-align: left;
  font-weight: 500;
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.estimate tbody td {
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: var(--text-sm);
}
.estimate tbody td:last-child {
  text-align: right;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.estimate__row th { font-family: var(--font-display); font-size: var(--text-md); }
.estimate__out th,
.estimate__out td { color: var(--ink-faint); }
.estimate__out td:last-child { color: var(--ink-faint); }
/* Строка итога: специфичность выше, чем у .estimate tbody td, иначе
   описание читается тёмным тестом (--ink) на обсидиане. */
.estimate tbody .estimate__total th,
.estimate tbody .estimate__total td {
  background: var(--obsidian);
  color: var(--on-dark);
  border-bottom: 0;
  padding-block: 1.1rem;
}
.estimate tbody .estimate__total td:last-child { color: var(--gold); }
.estimate__note {
  padding: 0.9rem 1.2rem;
  border-top: 1px solid var(--line);
  font-size: var(--text-xs);
  color: var(--ink-faint);
}
@media (max-width: 44rem) {
  .estimate thead { display: none; }
  .estimate tbody tr {
    display: grid;
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid var(--line);
  }
  .estimate tbody th,
  .estimate tbody td {
    border-bottom: 0;
    padding: 0.1rem 0;
  }
  .estimate tbody td:last-child { text-align: left; margin-top: 0.35rem; }
  .estimate__total { gap: 0.2rem; }
}

/* призыв в конце страницы */
.cta-inline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(1.2rem, 3vw, 2.5rem);
  align-items: center;
  border-top: 2px solid var(--ochre);
  padding-top: clamp(1.2rem, 3vw, 1.8rem);
}
@media (max-width: 54rem) {
  .cta-inline { grid-template-columns: 1fr; }
}
.cta-inline h2 { font-size: var(--step-2); margin-bottom: 0.6rem; }
.cta-inline p { color: var(--ink-soft); max-width: 54ch; font-size: var(--text-md); }
.cta-inline__actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* ---------- появление ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
/* стаггер 60 мс, как в рефе */
.reveal[data-delay="1"] { transition-delay: 0.06s; }
.reveal[data-delay="2"] { transition-delay: 0.12s; }
.reveal[data-delay="3"] { transition-delay: 0.18s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- интерактив ---------- */

/* счётчики */
.num-roll {
  font-variant-numeric: tabular-nums;
  display: inline-block;
  transition: opacity 0.3s ease;
}



/* ---------- кнопка «наверх» ---------- */

.to-top {
  position: fixed;
  right: clamp(0.8rem, 2.2vw, 1.6rem);
  bottom: clamp(0.9rem, 2.2vw, 1.6rem);
  z-index: 45;
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  color: var(--ink);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease),
              visibility 0.25s, border-color 0.18s, color 0.18s;
}
.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.to-top:hover { border-color: var(--ink-faint); color: var(--ochre-deep); }
.to-top:focus-visible { outline: 2px solid var(--ochre); outline-offset: 3px; }
.to-top svg { width: 1rem; height: 1rem; }

/* на телефоне снизу висит полоса с кнопками — поднимаемся над ней */
@media (max-width: 48rem) {
  .to-top { bottom: calc(4.6rem + env(safe-area-inset-bottom)); }
}

/* пока играет анимация производства, кнопка не нужна: внутри фрейма своя панель */
body.is-watching .to-top { opacity: 0; visibility: hidden; pointer-events: none; }


/* переходы между страницами */
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.35s;
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

