/* ООО «БЕРГ ГРУПП» — корпоративный сайт.
   Дизайн-система общая с berggroups.site: белый премиум-минимализм.
   Мотив «≡» — три полосы из E в логотипе BERG.
   Кейсы поданы как инженерный чертёж: линейная графика на миллиметровке. */

:root {
  --bg:      #ffffff;
  --bg-2:    #f6f5f4;
  --bg-3:    #ebeae8;
  --bg-4:    #dbdad9;
  --ink:     #08080a;
  --ink-2:   #141414;
  --text:    #0d0d0d;
  --muted:   #6b6a68;
  --muted-2: #9c9b98;
  --line:    rgba(0,0,0,0.08);
  --line-2:  rgba(0,0,0,0.14);
  --line-on-ink: rgba(255,255,255,0.12);
  /* Что читается поверх «чернильных» поверхностей и стеклянной шапки.
     В тёмной теме чернила сами становятся светлыми, поэтому цвет текста
     на них обязан переворачиваться вместе с ними. */
  --on-ink:      #ffffff;
  --on-ink-soft: rgba(255,255,255,0.7);
  --on-ink-dim:  rgba(255,255,255,0.58);
  --on-ink-mute: rgba(255,255,255,0.42);
  --nav-bg:      rgba(255,255,255,0.72);
  --nav-bg-open: rgba(255,255,255,0.97);
  --logo-invert: 0;
  --grid:    rgba(17,17,19,0.05);
  --radius:  8px;
  --radius-lg: 10px;
  --nav-h:   52px;
  --accent:  #0066cc;
  /* Глубины в системе нет: разделяют волосяные линии, не тени */
  --shadow-soft: none;
  --shadow-lift: none;
  --space-band: 84px;
  --font-display: 'Unbounded', -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* ── Тёмная тема ──
   Палитра переворачивается на токенах: «чернила» становятся светлыми,
   бумага тёмной. Чертежи рисуются currentColor и переворачиваются сами,
   логотип — фильтром, потому что он растровый. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #0c0c0d;
    --bg-2:    #141415;
    --bg-3:    #1b1b1d;
    --bg-4:    #26262a;
    --ink:     #f2f1ef;
    --ink-2:   #e4e3e1;
    --text:    #efeeec;
    --muted:   #9b9a97;
    --muted-2: #6f6e6c;
    --line:    rgba(255,255,255,0.10);
    --line-2:  rgba(255,255,255,0.20);
    --line-on-ink: rgba(0,0,0,0.14);
    --grid:    rgba(255,255,255,0.055);
    --accent:  #58a6ff;

    --on-ink:      #0c0c0d;
    --on-ink-soft: rgba(12,12,13,0.74);
    --on-ink-dim:  rgba(12,12,13,0.62);
    --on-ink-mute: rgba(12,12,13,0.45);
    --nav-bg:      rgba(12,12,13,0.72);
    --nav-bg-open: rgba(12,12,13,0.97);
    --logo-invert: 1;
  }

  ::selection { background: rgba(88,166,255,0.26); color: var(--ink); }

  /* На тёмном фоне тонкая линия читается хуже — держим её чуть плотнее */
  .step, .flow-row:last-child p { border-color: var(--ink); }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.47059;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { text-wrap: balance; }
p, li, summary { text-wrap: pretty; }

::selection { background: rgba(0,102,204,0.16); color: var(--ink); }

a, button, summary, input { -webkit-tap-highlight-color: transparent; }

a { color: inherit; text-decoration: none; }
.link { color: var(--accent); font-weight: 500; }
.link:hover { text-decoration: underline; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ── Навигация ── */

.site-nav-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo { height: 14px; width: auto; display: block; filter: invert(var(--logo-invert)); }
.brand-dim {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.nav-links { display: flex; align-items: center; gap: 26px; }

/* Полоса прочитанного — тонкая, по нижней кромке шапки */
.read-bar {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  pointer-events: none;
}
.read-bar i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
}

.nav-link {
  position: relative;
  font-size: 13px;
  color: var(--muted);
  transition: color 0.2s;
  line-height: 1;
  padding: 6px 0;
}
.nav-link:hover { color: var(--text); }

/* Отметка раздела, который сейчас на экране */
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: var(--ink);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.32s cubic-bezier(.22,1,.36,1);
}
.nav-link.active { color: var(--text); }
.nav-link.active::after { transform: scaleX(1); }

/* Переключатель языка: та же плотность, что у пунктов меню,
   но моноширинный, чтобы читался как техническая метка, а не раздел */
.nav-lang {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted-2);
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  line-height: 1;
  transition: color 0.2s, border-color 0.2s;
}
.nav-lang:hover { color: var(--text); border-color: var(--line-2); }

.nav-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--bg);
  background: var(--ink);
  border-radius: 999px;
  padding: 8px 16px;
  transition: opacity 0.2s;
}
.nav-cta:hover { opacity: 0.85; }

.nav-burger { display: none; }

@media (max-width: 900px) {
  .nav-burger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 40px; height: 40px;
    margin-right: -8px;
    background: none; border: 0; padding: 0;
    cursor: pointer;
  }
  .nav-burger span {
    display: block;
    width: 18px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.2s;
  }
  .menu-open .nav-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-open .nav-burger span:nth-child(2) { opacity: 0; }
  .menu-open .nav-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--nav-bg-open);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px calc(20px + env(safe-area-inset-bottom));
  }
  .menu-open .nav-links { display: flex; }
  body.menu-open { overflow: hidden; }
  .nav-links .nav-link {
    padding: 14px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--line);
  }
  .nav-lang { align-self: flex-start; margin-top: 16px; font-size: 12px; padding: 7px 11px; }
  .nav-cta { align-self: flex-start; margin-top: 12px; padding: 10px 20px; }
  /* В выпадающем меню у пунктов уже есть разделители — подчёркивание лишнее */
  .nav-link::after { display: none; }
}

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

main { flex: 1; padding-top: var(--nav-h); }

.section { padding: 84px 0; }
.section + .section { padding-top: 0; }

/* Полоса-передышка. Тринадцать разделов подряд на чистом белом читаются
   одним полотном — подложка делит ленту на главы, не добавляя декора. */
.section.band {
  padding-top: var(--space-band);
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section.band + .section { padding-top: var(--space-band); }

/* Внутри полосы карточка обязана стать светлее фона, а не темнее */
.band .calc { background: var(--bg); border: 1px solid var(--line); }
.band .calc-controls, .band .calc-out { background: var(--bg); }

@media (max-width: 640px) {
  .section { padding: 56px 0; }
  .section + .section { padding-top: 0; }
  .section.band, .section.band + .section { padding-top: 56px; }
}

section { scroll-margin-top: 76px; }

/* Разделитель-мотив «≡» */
.rule {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 26px;
  margin-bottom: 30px;
}
.rule span { height: 2px; background: var(--ink); border-radius: 1px; }
.rule span:nth-child(2) { width: 78%; }
.rule span:nth-child(3) { width: 52%; }

.section-head { margin-bottom: 30px; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.6vw, 54px);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1.06;
  max-width: 18ch;
}
.section-head h2 b { font-weight: 700; }

.section-intro {
  font-size: clamp(15px, 1.5vw, 17px);
  color: var(--muted);
  max-width: 640px;
  line-height: 1.7;
  margin-top: 18px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 16px;
}

/* ── Герой ── */

.hero { padding: 76px 0 60px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 44px;
  align-items: center;
}

/* Лист чертежа в герое — тот же язык, что и в кейсах:
   посетитель видит приём раньше, чем доходит до работ */
.hero-sheet {
  position: relative;
  background-color: var(--bg-2);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: right bottom;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}
.hero-sheet { position: relative; z-index: 1; }
.hero-sheet .bp { max-width: 400px; }

/* Наклон считает JS и кладёт в переменные; здесь только сглаживание.
   Углы держим малыми: заметный «3D-tilt» читается как трюк. */
.hero-sheet {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  transform: perspective(1200px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform 0.5s cubic-bezier(.22,1,.36,1);
}
.hero-sheet.tilting { transition: transform 0.12s linear; }

@media (prefers-reduced-motion: reduce) {
  .hero-sheet { transform: none; transition: none; }
}

/* Параллакс на прокрутке — там, где браузер умеет вести анимацию сам.
   Ни одного обработчика scroll: работает на компоситоре. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* Обёртка ведёт параллакс, лист внутри — наклон: две трансформации
       на одном элементе перетирали бы друг друга */
    .hero-sheet-wrap {
      animation: sheetDrift linear both;
      animation-timeline: scroll(root);
      animation-range: 0 90vh;
    }
    @keyframes sheetDrift {
      to { transform: translateY(-26px) scale(0.985); }
    }
  }
}

@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.72fr); gap: 48px; }
  .hero-grid h1, .hero-grid .hero-sub { max-width: 100%; }
  .hero-sheet { min-height: 330px; }
}
@media (max-width: 999px) {
  /* В одну колонку лист идёт под текстом и не забирает первый экран */
  .hero-sheet { min-height: 230px; padding: 24px 18px; }
}
@media (max-width: 480px) {
  /* Чертёж — главный визуальный довод, на телефоне он тоже нужен;
     просто ужимаем поля и высоту */
  .hero-sheet { min-height: 190px; padding: 18px 12px; }
  .hero-sheet .bp { max-width: 320px; }
}

/* Подложка с логотипом на узком экране идёт полосой под текстом:
   поверх абзаца она читалась бы как грязь под строками */
@media (max-width: 899px) {
  .hero { display: flex; flex-direction: column; }
  .hero > .wrap { order: 1; }
  /* Селектор с запасом: правила ленты объявлены ниже по файлу */
  .hero > .hero-bg {
    order: 2;
    position: static;
    height: 84px;
    margin-top: 34px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--bg-2);
  }
  .hero > .hero-bg .marquee-track img {
  filter: invert(var(--logo-invert)); height: 52px; opacity: 0.09; }
}

@media (max-width: 640px) {
  .hero { padding: 44px 0 0; }
  .hero h1 { font-size: clamp(32px, 8.4vw, 44px); }
  .hero-logo { width: min(240px, 58vw); margin-bottom: 24px; }
  .hero-sub { margin-bottom: 28px; }
}

/* Две кнопки разной ширины в столбик выглядят как ошибка вёрстки */
@media (max-width: 520px) {
  .hero-actions { display: grid; gap: 10px; }
  .btn-cta, .btn-ghost { width: 100%; justify-content: center; text-align: center; }
  .btn-cta { display: inline-flex; }
}

.hero-logo {
  filter: invert(var(--logo-invert));
  width: min(280px, 62vw);
  height: auto;
  display: block;
  margin-bottom: 32px;
  animation: logoReveal 1.1s cubic-bezier(.22,1,.36,1) 0.1s backwards;
}
@keyframes logoReveal {
  from { clip-path: inset(0 100% 0 0); opacity: 0.4; }
  to   { clip-path: inset(0 0 0 0); opacity: 1; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 5.4vw, 70px);
  line-height: 1.06;
  letter-spacing: -0.045em;
  font-weight: 300;
  max-width: 22ch;
  margin-bottom: 28px;
}
.hero h1 b { font-weight: 700; }

/* Заголовок собирается по словам: каждое выезжает из-под своей строки.
   Разбивку делает JS — без него заголовок просто виден, как обычно. */
/* Запас снизу — иначе маска срезает хвосты у «у», «р», «ц» */
.hero h1 .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.16em;
  margin-bottom: -0.16em;
}
.hero h1 .w > span {
  display: inline-block;
  transform: translateY(115%);
  animation: wordUp 0.86s cubic-bezier(.22,1,.36,1) forwards;
  animation-delay: calc(var(--i) * 0.055s + 0.18s);
}
@keyframes wordUp { to { transform: translateY(0); } }

/* Подзаголовок, кнопки и сноска идут следом, не наперегонки с заголовком */
.hero .cascade {
  opacity: 0;
  transform: translateY(12px);
  animation: cascadeIn 0.7s cubic-bezier(.22,1,.36,1) forwards;
}
.hero-sub.cascade    { animation-delay: 0.52s; }
.hero-actions.cascade { animation-delay: 0.62s; }
.hero-note.cascade   { animation-delay: 0.72s; }
@keyframes cascadeIn { to { opacity: 1; transform: none; } }

.hero-sub {
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--muted);
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 34px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.hero-note {
  font-size: 13px;
  color: var(--muted-2);
  margin-top: 18px;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-weight: 600;
  font-size: 14px;
  color: var(--bg);
  background: var(--ink);
  border-radius: 999px;
  padding: 13px 26px;
  transition: opacity 0.2s, transform 0.35s cubic-bezier(.22,1,.36,1), box-shadow 0.3s;
}
/* Место под стрелку занято всегда: ширину кнопки анимировать нельзя,
   иначе на hover дёргается соседняя кнопка */
.btn-cta::after {
  content: '→';
  display: inline-block;
  margin-left: 8px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s, transform 0.25s cubic-bezier(.22,1,.36,1);
}
.btn-cta:hover { opacity: 0.86; }
.btn-cta:hover::after { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .btn-cta::after { opacity: 1; transform: none; transition: none; } }
/* Кнопка тянется к курсору — смещение считает JS, здесь только плавность */
.btn-cta.magnet { transition: opacity 0.2s, transform 0.14s ease-out, box-shadow 0.3s; will-change: transform; }

.btn-ghost {
  display: inline-block;
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 12px 25px;
  transition: border-color 0.2s, background 0.2s;
}
.btn-ghost:hover { border-color: var(--ink); background: transparent; }

/* ── Полоса фактов ── */

.factbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.fact { background: var(--bg); padding: 26px 24px 26px 0; }
.fact + .fact { padding-left: 24px; }
.fact-num {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 34px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 9px;
  /* Цифры набегают со счётчика — без табличных знаков строка дёргается */
  font-variant-numeric: tabular-nums;
}
.fact-label { font-size: 13px; color: var(--muted); line-height: 1.45; max-width: 22ch; }

@media (max-width: 760px) {
  .factbar { grid-template-columns: repeat(2, 1fr); }
  .fact { padding-right: 14px; }
  /* В две колонки отступ задаёт колонка, а не порядок ячейки,
     иначе второй ряд уезжает вправо относительно первого */
  .fact:nth-child(odd) { padding-left: 0; }
  .fact:nth-child(even) { padding-left: 24px; }
}

/* ── Задачи: слева проблема клиента, справа что мы с ней делаем ── */

.problems { display: grid; gap: 0; }

.problem {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  column-gap: 40px;
  align-items: start;
  padding: 26px 0 28px;
  border-top: 1px solid var(--line);
}
.problem:last-child { border-bottom: 1px solid var(--line); }

/* Строк шесть, читают их по одной — подсветка держит место взгляда */
.problem { transition: background 0.25s; }
@media (hover: hover) and (pointer: fine) {
  .problem:hover { background: var(--bg-2); }
}

.problem-q {
  font-family: var(--font-display);
  font-size: clamp(15px, 1.7vw, 17px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.34;
}
.problem-a { font-size: 14px; color: var(--muted); line-height: 1.66; }

@media (max-width: 780px) {
  .problem { grid-template-columns: 1fr; row-gap: 12px; padding: 22px 0 24px; }
}

/* ── Арифметика ручной работы ── */

.calc {
  background: var(--bg-3);
  border-radius: var(--radius-lg);
  padding: 46px 44px 40px;
}
@media (max-width: 640px) { .calc { padding: 32px 24px 28px; border-radius: var(--radius); } }

.calc-head { max-width: 660px; margin-bottom: 34px; }
.calc-head h3 {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.6vw, 27px);
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
}
.calc-head h3 b { font-weight: 700; }
.calc-head p { font-size: 15px; color: var(--muted); line-height: 1.7; }

/* Живой счёт: посетитель двигает ползунки, сумма пересчитывается */

.calc-live {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1px;
  background: var(--line-2);
  border-top: 1px solid var(--line-2);
}
@media (max-width: 780px) { .calc-live { grid-template-columns: 1fr; } }

.calc-controls, .calc-out { background: var(--bg-3); padding: 30px 30px 32px 0; }
.calc-out { padding-left: 34px; }
@media (max-width: 780px) {
  .calc-controls, .calc-out { padding: 26px 0 24px; }
}

.ctrl + .ctrl { margin-top: 30px; }

.ctrl-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}
.ctrl-val {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.ctrl-ends {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
  margin-top: 10px;
}

/* Ползунок: трек — та же тонкая линия, что и всюду на сайте */
.ctrl input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  /* На тач-экране в 22px пальцем не попасть */
  height: 44px;
  background: transparent;
  cursor: pointer;
}
.ctrl input[type=range]::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 1px;
  background: var(--line-2);
}
.ctrl input[type=range]::-moz-range-track {
  height: 2px;
  border-radius: 1px;
  background: var(--line-2);
}
.ctrl input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 19px; height: 19px;
  margin-top: -8.5px;
  border-radius: 50%;
  background: var(--ink);
  border: 0;
  transition: transform 0.18s cubic-bezier(.22,1,.36,1);
}
.ctrl input[type=range]::-moz-range-thumb {
  width: 19px; height: 19px;
  border-radius: 50%;
  background: var(--ink);
  border: 0;
  transition: transform 0.18s cubic-bezier(.22,1,.36,1);
}
.ctrl input[type=range]:hover::-webkit-slider-thumb,
.ctrl input[type=range]:focus-visible::-webkit-slider-thumb { transform: scale(1.16); }
.ctrl input[type=range]:hover::-moz-range-thumb,
.ctrl input[type=range]:focus-visible::-moz-range-thumb { transform: scale(1.16); }
.ctrl input[type=range]:active::-webkit-slider-thumb { transform: scale(0.94); }
.ctrl input[type=range]:focus-visible { outline: none; }
.ctrl input[type=range]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(0,102,204,0.22), 0 2px 8px rgba(0,0,0,0.18);
}

.calc-out-label { font-size: 14px; color: var(--muted); margin-bottom: 14px; max-width: 30ch; }

.calc-out-num {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-bottom: 18px;
}

.calc-out-sub { font-size: 14px; color: var(--text); line-height: 1.6; margin-bottom: 14px; }
.calc-out-sub b { font-variant-numeric: tabular-nums; }
.calc-note { font-size: 13px; color: var(--muted-2); line-height: 1.6; }

/* ── Карточки услуг ── */

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  position: relative;
  overflow: hidden;
  background: var(--bg-3);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
  display: flex;
  flex-direction: column;
}

/* Тот же жест, что и у знака «≡»: линия прочерчивается слева направо */
.card::after, .contact-card::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(.22,1,.36,1);
}
.contact-card::after { background: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  .card:hover::after, .contact-card:hover::after { transform: scaleX(1); }
}
.card {
  box-shadow: inset 0 0 0 1px transparent;
  transition: background 0.3s, box-shadow 0.3s;
}
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    background: var(--bg);
    box-shadow: inset 0 0 0 1px var(--line-2);
  }
}
.card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 13px;
  line-height: 1.28;
}
.card p { font-size: 14px; color: var(--muted); line-height: 1.62; flex: 1; }
.card-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* Поддержка — сквозная услуга, а не один из видов разработки:
   занимает всю строку и раскладывается вдоль, а не столбиком */
.card-wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: flex-start;
  gap: 32px;
}
.card-wide h3 { flex: 0 0 210px; margin-bottom: 0; }
.card-wide p { flex: 1; }
.card-wide .card-meta {
  flex: 0 0 auto;
  margin-top: 0;
  padding: 0 0 0 32px;
  border-top: 0;
  border-left: 1px solid var(--line);
  align-self: stretch;
  display: flex;
  align-items: center;
  white-space: nowrap;
}
@media (max-width: 760px) {
  .card-wide { flex-direction: column; gap: 0; }
  .card-wide h3 { flex: none; margin-bottom: 13px; }
  .card-wide .card-meta {
    align-self: flex-start;
    margin-top: 18px;
    padding: 14px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

/* ── Лента решений: страница идёт вниз, карточки едут вбок ──
   На узких экранах и при отключённом движении это обычная сетка,
   разметка одна и та же. */

.rail-hint { display: none; }

@media (min-width: 1000px) and (prefers-reduced-motion: no-preference) {
  .rail-section .wrap { margin-bottom: 8px; }

  /* Высота задаёт длину прокрутки, за которую лента проходит целиком */
  .rail { position: relative; height: 300vh; }

  .rail-sticky {
    position: sticky;
    /* Подсказка и полоса прогресса живут в границах экрана, а не секции */
    isolation: isolate;
    top: var(--nav-h);
    height: calc(100vh - var(--nav-h));
    display: flex;
    align-items: center;
    overflow: hidden;
  }

  .rail-track {
    display: flex;
    gap: 18px;
    padding: 0 max(24px, calc((100vw - 1120px) / 2));
    transform: translate3d(0, 0, 0);
  }

  .rail-track .card {
    flex: 0 0 330px;
    min-height: 330px;
  }

  /* В ленте «Поддержка» — такая же карточка, как остальные */
  .rail-track .card-wide { grid-column: auto; flex-direction: column; gap: 0; }
  .rail-track .card-wide h3 { flex: none; margin-bottom: 13px; }
  .rail-track .card-wide p { flex: 1; }
  .rail-track .card-wide .card-meta {
    align-self: flex-start;
    margin-top: 18px;
    padding: 14px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .rail-hint {
    display: block;
    position: absolute;
    left: max(24px, calc((100vw - 1120px) / 2));
    bottom: 56px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted-2);
  }

  /* Сколько ленты пройдено — иначе непонятно, когда кончится боковой ход */
  .rail-progress {
    position: absolute;
    left: max(24px, calc((100vw - 1120px) / 2));
    right: max(24px, calc((100vw - 1120px) / 2));
    bottom: 40px;
    height: 2px;
    background: var(--line);
  }
  .rail-progress i {
    display: block;
    height: 100%;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: left;
  }
}

@media (min-width: 1000px) and (prefers-reduced-motion: no-preference) {
  .rail-section { padding-bottom: 0; }
}

/* ── Процесс: настоящая последовательность, поэтому нумерация ── */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 26px;
  row-gap: 8px;
  counter-reset: step;
}
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.step {
  padding: 26px 0 30px;
  border-top: 2px solid var(--ink);
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.step h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 11px;
  line-height: 1.3;
}
.step p { font-size: 14px; color: var(--muted); line-height: 1.62; }

/* ── Кейсы: чертёж ── */

.case {
  display: grid;
  /* Ровно 1:1 — граница листа обязана совпасть со средним
     разделителем полосы метрик, иначе линии не сходятся встык */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
  margin-bottom: 20px;
}
.case:last-child { margin-bottom: 0; }

@media (max-width: 880px) {
  .case { grid-template-columns: 1fr; }
}

/* Лист чертежа */
.sheet {
  position: relative;
  background-color: var(--bg-2);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  /* Привязка к правому нижнему углу: клетка заканчивается ровно на границе
     с полосой метрик, а не обрывается на середине квадрата */
  background-position: right bottom;
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 34px 30px;
  min-height: 320px;
}
@media (max-width: 880px) {
  .sheet { border-right: 0; border-bottom: 1px solid var(--line); min-height: 260px; }
}

/* Лист отстаёт от прокрутки на несколько пикселей — глубина без параллакс-трюков.
   Ведёт браузер по своей шкале, ни одного обработчика прокрутки. */
@supports (animation-timeline: view()) {
  @media (min-width: 881px) and (prefers-reduced-motion: no-preference) {
    .sheet-stick {
      animation: sheetLag linear both;
      animation-timeline: view();
      animation-range: entry 20% exit 80%;
    }
    @keyframes sheetLag {
      from { transform: translateY(-14px); }
      to   { transform: translateY(14px); }
    }
  }
}

/* Лист высокий — чертёж в нём не уезжает наверх, пока читают правую
   колонку. Прилипание ограничено самим листом, дальше он уходит с ним. */
.sheet-stick { width: 100%; display: flex; justify-content: center; }
@media (min-width: 881px) {
  .sheet { align-items: flex-start; }
  .sheet-stick { position: sticky; top: 92px; }
}

.sheet-tag {
  position: absolute;
  top: 16px; left: 18px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.bp { width: 100%; height: auto; max-width: 420px; color: var(--ink); display: block; }
.bp .ln   { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.bp .ln-2 { fill: none; stroke: currentColor; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; opacity: 0.42; }
.bp .ln-3 { fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: round; opacity: 0.24; }
.bp .dash { fill: none; stroke: currentColor; stroke-width: 1; stroke-dasharray: 4 4; opacity: 0.4; }
.bp .fill { fill: currentColor; }
.bp text {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: currentColor;
  opacity: 0.5;
  letter-spacing: 0.04em;
}
.bp .glyph { font-family: var(--font-display); font-size: 20px; fill: currentColor; opacity: 0.32; }
.bp .fill-2 { fill: currentColor; opacity: 0.12; }
.bp .fill-3 { fill: currentColor; opacity: 0.06; }
/* Элементы, добавленные только ради движения: до запуска их не видно */
.bp .mover { fill: currentColor; opacity: 0; }

/* ── Чертёж оживает: после вычерчивания схема начинает работать ──
   Анимируем только элементы вне списка STROKES (.ln/.ln-2/.ln-3),
   потому что тем JS проставляет inline-стили для вычерчивания. */

.bp .live-progress,
.bp .live-bar-1,
.bp .live-bar-2,
.bp .live-type { transform-box: fill-box; transform-origin: left center; }
.bp .live-progress { transform: scaleX(0.61); }
.bp .live-core,
.bp .live-ring { transform-box: fill-box; transform-origin: center; }

/* Лист 01 — палец нажимает, прогресс набегает */
.bp.live .live-ring  { animation: bpRing 2.6s cubic-bezier(.22,1,.36,1) infinite; }
.bp.live .live-core  { animation: bpTap 2.6s cubic-bezier(.22,1,.36,1) infinite; }
.bp.live .live-progress { animation: bpProgress 7.8s cubic-bezier(.4,0,.2,1) infinite; }

@keyframes bpRing {
  0%, 70%, 100% { transform: scale(1); opacity: 0.4; }
  10%           { transform: scale(1); opacity: 0.4; }
  40%           { transform: scale(1.14); opacity: 0; }
}
@keyframes bpTap {
  0%, 12%, 100% { transform: scale(1); }
  6%            { transform: scale(0.88); }
}
@keyframes bpProgress {
  0%   { transform: scaleX(0.08); }
  86%  { transform: scaleX(1); }
  94%  { transform: scaleX(1); }
  100% { transform: scaleX(0.08); }
}

/* Лист 02 — платёж идёт по маршруту, обратная связь пульсирует пунктиром */
.bp.live .live-pay  { animation: bpPay 5.2s cubic-bezier(.65,0,.35,1) infinite; }
.bp.live .live-loop { animation: bpLoop 1.4s linear infinite; }

@keyframes bpPay {
  0%           { transform: translateX(0);     opacity: 0; }
  6%           { transform: translateX(0);     opacity: 0.5; }
  26%          { transform: translateX(123px); opacity: 0.5; }
  40%          { transform: translateX(123px); opacity: 0.5; }
  60%          { transform: translateX(246px); opacity: 0.5; }
  80%          { transform: translateX(246px); opacity: 0.5; }
  92%, 100%    { transform: translateX(246px); opacity: 0; }
}
@keyframes bpLoop {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -16; }
}

/* Лист 03 — голоса набираются, кворум пульсирует */
.bp.live .live-bar-1  { animation: bpVote 6s cubic-bezier(.22,1,.36,1) infinite; }
.bp.live .live-bar-2  { animation: bpVote 6s cubic-bezier(.22,1,.36,1) 0.45s infinite; }
.bp.live .live-quorum { animation: bpQuorum 6s ease-in-out infinite; }

@keyframes bpVote {
  0%        { transform: scaleX(0.06); }
  55%, 88%  { transform: scaleX(1); }
  100%      { transform: scaleX(0.06); }
}
@keyframes bpQuorum {
  0%, 40%, 100% { opacity: 0.28; }
  62%           { opacity: 0.75; }
}

/* Лист 04 — в поиске набирают запрос, маркер идёт по разделам */
.bp.live .live-type   { animation: bpType 6.4s steps(11, end) infinite; }
.bp.live .live-caret  { animation: bpCaret 1s steps(1, end) infinite; }
.bp.live .live-marker { animation: bpMarker 6.4s cubic-bezier(.22,1,.36,1) infinite; }

@keyframes bpType {
  0%        { transform: scaleX(0); }
  45%, 88%  { transform: scaleX(1); }
  100%      { transform: scaleX(0); }
}
@keyframes bpCaret {
  0%, 50%   { opacity: 0.75; }
  51%, 100% { opacity: 0; }
}
@keyframes bpMarker {
  0%, 20%   { transform: translateY(0); }
  30%, 45%  { transform: translateY(16px); }
  55%, 70%  { transform: translateY(32px); }
  80%, 92%  { transform: translateY(48px); }
  100%      { transform: translateY(0); }
}

/* Герой — ручной ряд не стоит на месте: пунктир бежит, люди носят */
.bp.live .live-hand { animation: bpHand 1.6s linear infinite; }
.bp.live .live-carrier { animation: bpCarry 3.4s ease-in-out infinite; }
.bp.live .live-carrier-2 { animation-delay: 1.7s; }

@keyframes bpHand {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -16; }
}
@keyframes bpCarry {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2.5px); }
}

/* Герой — данные проходят цепочку сами */
.bp.live .live-hero { animation: bpHero 5.4s cubic-bezier(.65,0,.35,1) infinite; }

/* Точка идёт строго по стрелкам и гаснет на время «внутри» системы —
   иначе она едет сквозь карточки, будто ничего там не происходит */
@keyframes bpHero {
  0%, 5%     { transform: translateX(0);     opacity: 0; }
  10%        { transform: translateX(0);     opacity: 0.55; }
  32%        { transform: translateX(55px);  opacity: 0.55; }
  38%        { transform: translateX(55px);  opacity: 0; }
  39%        { transform: translateX(140px); opacity: 0; }
  45%        { transform: translateX(140px); opacity: 0.55; }
  67%        { transform: translateX(195px); opacity: 0.55; }
  74%, 100%  { transform: translateX(195px); opacity: 0; }
}

/* Правая колонка кейса */
.case-body {
  padding: 34px 34px 30px;
  display: flex;
  flex-direction: column;
}
@media (max-width: 520px) { .case-body { padding: 26px 22px 28px; } }

.case-body h3 {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.1vw, 23px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.22;
  margin-bottom: 14px;
}
.case-desc { font-size: 15px; color: var(--muted); line-height: 1.68; }

/* Было → Сделали. Результат читается ниже, в полосе метрик */
.case-flow { display: flex; flex-direction: column; gap: 18px; }

.flow-row {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  column-gap: 16px;
  align-items: start;
}
@media (max-width: 620px) {
  .flow-row { grid-template-columns: 1fr; row-gap: 7px; }
}

.flow-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding-top: 4px;
}
.flow-row p { font-size: 14px; color: var(--muted); line-height: 1.66; }
.flow-row:last-child p { color: var(--text); }

.case-cta {
  align-self: flex-start;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.case-cta::after { content: ' →'; }
.case-cta:hover { text-decoration: underline; }

.case-list { list-style: none; margin: 20px 0 0; }
.case-list li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 10px;
}
.case-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 11px; height: 2px;
  background: var(--ink);
  border-radius: 1px;
}

.case-stack {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-2);
  line-height: 1.7;
  margin-top: auto;
  padding: 22px 0 0;
}

/* Полоса метрик внизу кейса */
.metric-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}
@media (max-width: 560px) { .metric-strip { grid-template-columns: repeat(2, 1fr); } }

.metric-head {
  grid-column: 1 / -1;
  background: var(--bg);
  padding: 16px 22px 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.metric { background: var(--bg); padding: 20px 22px 22px; }
.metric-num {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 7px;
  font-variant-numeric: tabular-nums;
}
.metric-label { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* ── Условия: бенто из шести плиток ──
   Раньше это была та же сетка колонок с линией сверху, что и «Процесс»,
   и два раздела подряд читались одинаково. Здесь другой ритм: две широкие
   плитки задают такт, одна из них тёмная, ведущая лежит на миллиметровке. */

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.tile {
  transition: background 0.3s, box-shadow 0.3s;
  box-shadow: inset 0 0 0 1px transparent;
  position: relative;
  background: var(--bg-3);
  border-radius: var(--radius);
  padding: 26px 24px 28px;
  display: flex;
  flex-direction: column;
}

.tile-lead, .tile-ink { grid-column: span 2; }

.tile-key {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted-2);
  margin-bottom: 18px;
}

.tile h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 11px;
}
.tile p { font-size: 14px; color: var(--muted); line-height: 1.62; }
.tile-add {
  margin-top: auto;
  padding-top: 16px;
  font-size: 13px !important;
  color: var(--muted-2) !important;
}

/* Ведущая плитка — на листе миллиметровки, как чертежи в работах */
.tile-lead {
  background-color: var(--bg-2);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  padding: 30px 28px 30px;
}
.tile-lead h3 { font-size: 19px; }
.tile-lead p { font-size: 15px; }

/* Тёмная плитка — единственная в разделе, держит вес композиции */
.tile-ink { background: var(--ink); }
.tile-ink h3 { color: var(--on-ink); }
.tile-ink p { color: var(--on-ink-dim); }
.tile-ink .tile-key { color: var(--on-ink-mute); }

@media (hover: hover) and (pointer: fine) {
  .tile:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
  .tile-ink:hover { box-shadow: inset 0 0 0 1px var(--line-on-ink); }
}

@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .bento { grid-template-columns: 1fr; }
  .tile-lead, .tile-ink { grid-column: span 1; }
}

/* ── Нужна ли вообще разработка ── */

.compare { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 780px) { .compare { grid-template-columns: 1fr; } }

.compare-cell {
  background: var(--bg-3);
  border-radius: var(--radius);
  padding: 32px 30px 34px;
}
.compare-cell.is-accent { background: var(--bg); border: 1px solid var(--line-2); }

.compare-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 14px;
}
.is-accent .compare-tag { color: var(--accent); }

.compare-cell h3 {
  font-family: var(--font-display);
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.24;
  margin-bottom: 13px;
}
.compare-cell > p { font-size: 14px; color: var(--muted); line-height: 1.66; }

.compare-cell ul { list-style: none; margin-top: 20px; }
.compare-cell li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 10px;
}
.compare-cell li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 11px; height: 2px;
  border-radius: 1px;
  background: var(--muted-2);
}
.is-accent li::before { background: var(--accent); }

/* ── Вопросы ── */

.faq { border-top: 1px solid var(--line); max-width: 820px; }

.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 44px 22px 0;
  position: relative;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.4;
  transition: color 0.2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }

/* Плюс, превращающийся в минус */
.faq summary::before,
.faq summary::after {
  content: '';
  position: absolute;
  right: 4px; top: 50%;
  width: 13px; height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.25s cubic-bezier(.22,1,.36,1);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }

.faq details p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.72;
  max-width: 70ch;
  padding: 0 0 24px;
  margin-top: -4px;
  /* Высоту разворачивает JS — здесь только чтобы текст не выпирал по дороге */
  overflow: hidden;
}

/* ── Подсказка-пример ── */

.hint {
  margin-top: 22px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 640px;
  padding-left: 16px;
  border-left: 2px solid var(--line-2);
}
.hint-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 6px;
}

/* ── Тёмный блок-якорь: госзаказчикам ── */

.ink-block {
  background: var(--ink);
  color: var(--on-ink);
  border-radius: var(--radius-lg);
  padding: 58px 52px;
}
@media (max-width: 640px) { .ink-block { padding: 38px 24px; border-radius: var(--radius); } }

.ink-block .eyebrow { color: var(--on-ink-mute); }
.ink-block .rule span { background: var(--on-ink); }
.ink-block h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4.6vw, 54px);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1.06;
  margin-bottom: 20px;
  max-width: 17ch;
}
.ink-block h2 b { font-weight: 700; }
.ink-block > p {
  font-size: 15px;
  color: var(--on-ink-soft);
  line-height: 1.7;
  max-width: 620px;
  margin-bottom: 38px;
}

.ink-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-on-ink);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 780px) { .ink-grid { grid-template-columns: 1fr; } }

.ink-cell { background: var(--ink); padding: 24px 22px; }
.ink-cell h3 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 11px;
  color: var(--on-ink);
}
.ink-cell p { font-size: 13px; color: var(--on-ink-dim); line-height: 1.62; }

/* ── Реквизиты ── */

.req-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.req-table tr { border-bottom: 1px solid var(--line); }
.req-table tr:first-child { border-top: 1px solid var(--line); }
.req-table th {
  text-align: left;
  font-weight: 400;
  color: var(--muted);
  padding: 15px 24px 15px 0;
  width: 260px;
  vertical-align: top;
  font-size: 13px;
}
.req-table td { padding: 15px 0; vertical-align: top; }
.req-table td.mono { font-size: 14px; }
@media (max-width: 640px) {
  .req-table th { width: 128px; padding-right: 14px; font-size: 12px; }
  .req-table td { font-size: 13px; }
}

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

.contact-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg-3);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}
@media (hover: hover) and (pointer: fine) {
  .contact-card:hover {
    background: var(--bg);
    box-shadow: inset 0 0 0 1px var(--line-2);
  }
}
.contact-card h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 10px;
}
.contact-card p { font-size: 14px; color: var(--muted); line-height: 1.62; flex: 1; }
.contact-handle {
  align-self: flex-start;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

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

footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 52px;
  background: var(--bg-2);
  margin-top: 84px;
}
.foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
  flex-wrap: wrap;
}
.foot-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.foot-brand img { height: 13px; width: auto; filter: invert(var(--logo-invert)); }
.foot-legal { font-size: 13px; color: var(--muted); line-height: 1.75; max-width: 60ch; }
.foot-links { display: flex; flex-direction: column; gap: 10px; }
.foot-links a { font-size: 13px; color: var(--muted); }
.foot-links a:hover { color: var(--text); }

/* ── Лента логотипа ──
   Тот же приём, что и у больших студийных сайтов: гигантская строка
   едет по горизонтали. Дублируем набор дважды и сдвигаем ровно на
   половину — так стык не виден и лента бесконечна. */

/* Подложка первого экрана: лента идёт за текстом и чертежом */
.hero { position: relative; overflow: hidden; }
.hero > .wrap { position: relative; z-index: 1; }

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  width: max-content;
  padding-right: clamp(28px, 4vw, 64px);
  animation: marqueeRun 34s linear infinite;
}

.marquee-track img {
  height: clamp(96px, 17vw, 230px);
  width: auto;
  opacity: 0.045;
  display: block;
}

@keyframes marqueeRun {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Прокрутка подталкивает ленту: сдвиг и слой ставит JS, на время толчка */

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ── Заставка ──
   Ставит и снимает её JS: без скрипта посетитель сразу видит страницу,
   а не пустой экран. Один раз за сессию, длится меньше секунды. */

.intro {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.62s cubic-bezier(.76,0,.24,1);
}
.intro.gone { transform: translateY(-101%); }

.intro-mark {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 74px;
}
.intro-mark span {
  height: 5px;
  border-radius: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  animation: introBar 0.5s cubic-bezier(.22,1,.36,1) forwards;
}
.intro-mark span:nth-child(2) { width: 78%; animation-delay: 0.1s; }
.intro-mark span:nth-child(3) { width: 52%; animation-delay: 0.2s; }
@keyframes introBar { to { transform: scaleX(1); } }

body.intro-lock { overflow: hidden; }

/* ── Курсор ──
   Элементы создаёт JS: без него курсор остаётся системным.
   mix-blend-mode сам инвертирует их на тёмном блоке. */

.cursor-ring, .cursor-dot {
  position: fixed;
  top: 0; left: 0;
  z-index: 900;
  pointer-events: none;
  border-radius: 50%;
  mix-blend-mode: difference;
  opacity: 0;
  transition: opacity 0.3s;
}
html.has-cursor .cursor-ring,
html.has-cursor .cursor-dot { opacity: 1; }
html.has-cursor.cursor-out .cursor-ring,
html.has-cursor.cursor-out .cursor-dot { opacity: 0; }

.cursor-dot {
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  background: #fff;
}

.cursor-ring {
  width: 32px; height: 32px;
  margin: -16px 0 0 -16px;
  border: 1px solid rgba(255,255,255,0.55);
  transition: width 0.28s cubic-bezier(.22,1,.36,1),
              height 0.28s cubic-bezier(.22,1,.36,1),
              margin 0.28s cubic-bezier(.22,1,.36,1),
              border-color 0.28s, opacity 0.3s;
}
html.has-cursor .cursor-ring.is-hot {
  width: 54px; height: 54px;
  margin: -27px 0 0 -27px;
  border-color: rgba(255,255,255,0.9);
}

/* Системный курсор остаётся на месте: своё кольцо — спутник, а не замена.
   Спрятанный указатель ломает привычные состояния и мешает попадать по целям. */
.cursor-dot { display: none; }

@media (prefers-reduced-motion: reduce) {
  .cursor-ring, .cursor-dot { display: none; }
}

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

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s cubic-bezier(.22,1,.36,1), transform 0.7s cubic-bezier(.22,1,.36,1);
}
.reveal.in { opacity: 1; transform: none; }

/* Поочерёдное появление элементов внутри сетки */
.stagger > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.62s cubic-bezier(.22,1,.36,1), transform 0.62s cubic-bezier(.22,1,.36,1);
}
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(2) { transition-delay: 0.07s; }
.stagger.in > *:nth-child(3) { transition-delay: 0.14s; }
.stagger.in > *:nth-child(4) { transition-delay: 0.21s; }
.stagger.in > *:nth-child(5) { transition-delay: 0.28s; }
.stagger.in > *:nth-child(6) { transition-delay: 0.35s; }
.stagger.in > *:nth-child(7) { transition-delay: 0.42s; }

/* Фон этих сеток и есть линии-разделители — держим его прозрачным,
   пока ячейки не появились, иначе мелькает сплошной прямоугольник */
.factbar.stagger, .ink-grid.stagger { transition: background-color 0.5s ease 0.2s; }
.factbar.stagger:not(.in), .ink-grid.stagger:not(.in) { background-color: transparent; }

/* Знак «≡» прочерчивается слева направо */
.reveal .rule span,
.stagger .rule span {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(.22,1,.36,1);
}
.reveal.in .rule span,
.stagger.in .rule span { transform: scaleX(1); }
.reveal.in .rule span:nth-child(2) { transition-delay: 0.09s; }
.reveal.in .rule span:nth-child(3) { transition-delay: 0.18s; }

/* Чертёж вычерчивается: подготовка состояний, запуск из JS */
.bp.pending .fill,
.bp.pending .fill-2,
.bp.pending .fill-3,
.bp.pending .dash,
.bp.pending text { opacity: 0; }
.bp.drawn .fill,
.bp.drawn .fill-2,
.bp.drawn .fill-3,
.bp.drawn .dash,
.bp.drawn text { transition: opacity 0.55s ease 0.5s; }
.bp.drawn .fill { opacity: 1; }
.bp.drawn .fill-2 { opacity: 0.12; }
.bp.drawn .fill-3 { opacity: 0.06; }
.bp.drawn .dash { opacity: 0.4; }
.bp.drawn text { opacity: 0.5; }
.bp.drawn .glyph { opacity: 0.32; }

/* Тень навигации после прокрутки */
.site-nav-bar { transition: box-shadow 0.3s, border-color 0.3s; }
.site-nav-bar.scrolled { border-bottom-color: var(--line-2); }
.site-nav-bar { transform: translateY(0); transition: box-shadow 0.3s, border-color 0.3s, transform 0.42s cubic-bezier(.22,1,.36,1); }
.site-nav-bar.hidden { transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) { .site-nav-bar.hidden { transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .stagger > * { opacity: 1; transform: none; transition: none; }
  .reveal .rule span, .stagger .rule span { transform: none; transition: none; }
  .hero-logo { animation: none; }
  .card:hover, .contact-card:hover, .btn-cta:hover { transform: none; }
  .bp .live-ring, .bp .live-core, .bp .live-progress,
  .bp .live-pay, .bp .live-loop, .bp .live-bar-1, .bp .live-bar-2,
  .bp .live-quorum, .bp .live-type, .bp .live-caret, .bp .live-marker,
  .bp .live-hero, .bp .live-hand, .bp .live-carrier { animation: none; }
  .hero h1 .w > span { transform: none; animation: none; }
  .hero .cascade { opacity: 1; transform: none; animation: none; }
  .nav-link::after { transition: none; }
}
