/* ==========================================================================
   TRM — публичный лендинг
   Все значения — из landing/DESIGN.md. Хардкод цветов вне :root запрещён.
   ========================================================================== */

/* --- 1. Токены -------------------------------------------------------- */

:root {
  /* Backgrounds */
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-alt: #f2f2f2;
  --surface-hover: #f0f0f0;

  /* Inverted */
  --bg-invert: #050505;
  --surface-invert: #1a1a1a;
  --surface-invert-hover: #202020;

  /* Rules */
  --rule: #e6e6e6;
  --rule-strong: #d4d4d4;
  --rule-invert: #2e2e2e;
  --rule-invert-strong: #3a3a3a;

  /* Borders */
  --border: #e6e6e6;
  --border-hover: #cccccc;

  /* Text */
  --text: #1a1a1a;
  --text-secondary: #6b6b6b;   /* 5.1:1 на --bg — проходит WCAG AA для корпуса */
  --text-tertiary: #8a8a8a;    /* 3.3:1 — только крупные декоративные индексы и скобки */
  --text-invert: #fafafa;
  --text-invert-secondary: #808080;
  --text-invert-tertiary: #7a7a7a;

  /* Accent */
  --accent: #ff5533;
  --accent-hover: #e6421f;
  --accent-soft: rgba(255, 85, 51, 0.12);

  /* Frost — подсветка матовой полосы поверх гигантского набора */
  --frost-tint: rgba(255, 255, 255, 0.07);

  /* RGB */
  --bg-rgb: 250, 250, 250;
  --text-rgb: 26, 26, 26;
  --invert-rgb: 5, 5, 5;
  --accent-rgb: 255, 85, 51;

  /* Semantic */
  --success: #2f9e6b;
  --error: #d93a2b;
  --warning: #c98a12;

  /* Type */
  --font-display: 'Unbounded', 'Wix Madefor Display', 'Helvetica Neue', Arial, sans-serif;
  --font-text: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  /* Space */
  --sp-1: 8px;  --sp-2: 16px; --sp-3: 24px; --sp-4: 32px;
  --sp-5: 48px; --sp-6: 64px; --sp-7: 96px; --sp-8: 144px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 0.35s;
  --dur: 0.6s;
  --dur-slow: 1.1s;

  /* Layout */
  --pad: 24px;
  --nav-h: 88px;
}

/* --- 2. База ---------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
html, body { overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: -0.005em;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

[id] { scroll-margin-top: 112px; }

h1, h2, h3, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

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

/* --- 3. Сетка и «линейка» бланка -------------------------------------- */

.shell { position: relative; z-index: 1; }

/* Рейки — flex, а не grid: скрытая рейка не занимает места, поэтому число колонок
   меняется одним display:none, без пересчёта треков. Последний элемент нулевой
   ширины держит правую кромку. */
.rails {
  position: fixed;
  inset: 0;
  padding: 0 var(--pad);
  display: flex;
  pointer-events: none;
  z-index: 0;
}
.rails i {
  flex: 1;
  border-left: 1px dotted var(--rule);
  clip-path: inset(0 0 100% 0);
  animation: railDraw var(--dur-slow) var(--ease) forwards var(--d, 0s);
}
.rails .end { flex: 0 0 0px; }
@keyframes railDraw { to { clip-path: inset(0 0 0 0); } }

.section {
  position: relative;
  padding: var(--sp-7) var(--pad);
  border-top: 1px dotted var(--rule);
}
.section:first-of-type { border-top: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  /* 3px, а не 0: набор не должен касаться рейки — тонкие «1» и «І» с ней сливаются */
  padding: 0 3px;
}
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

.hr { height: 1px; border-top: 1px dotted var(--rule); }

/* --- 4. Шкала кворума (прогресс чтения) ------------------------------- */

.quorum {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 60;
  pointer-events: none;
}
.quorum__bar {
  height: 100%;
  background: var(--accent);
  transform: scaleX(var(--p, 0));
  transform-origin: 0 50%;
  will-change: transform;
}
.quorum__mark {
  position: absolute;
  top: 6px;
  left: 80%;
  transform: translateX(-100%);
  padding-right: 8px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
  white-space: nowrap;
}
.quorum.is-full .quorum__mark { opacity: 1; }

/* --- 5. Навигация ----------------------------------------------------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 var(--pad);
  color: var(--text);
  transition: color 0.45s ease;
}
.nav__bg {
  position: absolute;
  inset: 0;
  background: var(--surface-invert);
  transform: translateY(-101%);
  transition: transform 0.55s var(--ease);
  z-index: -2;
}
.nav__frost {
  position: absolute;
  top: 100%; left: 0; right: 0;
  height: 60px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.45s ease;
  z-index: -1;
  pointer-events: none;
}
.nav.is-scrolled { color: var(--text-invert); }
.nav.is-scrolled .nav__bg { transform: translateY(0); }
.nav.is-scrolled .nav__frost { opacity: 1; }

.nav__inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;          /* тач-цель */
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -0.03em;
  color: inherit;
  text-decoration: none;
  line-height: 1;
}
.nav__menu { display: flex; align-items: center; gap: var(--sp-5); }
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 0;
  font-size: 15px;
  color: inherit;
  text-decoration: none;
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; right: 100%; bottom: 8px;
  height: 1px;
  background: currentColor;
  transition: right 0.45s var(--ease);
}
.nav__link:hover::after,
.nav__link:focus-visible::after,
.nav__link[aria-current='true']::after { right: 0; }

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: flex-end;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.nav__toggle:hover i, .nav__toggle:focus-visible i { transform: scaleX(0.72); }
.nav__toggle i {
  display: block;
  width: 26px; height: 1px;
  background: currentColor;
  position: relative;
  transition: transform 0.4s var(--ease);
}
.nav__toggle i::before, .nav__toggle i::after {
  content: ''; position: absolute; left: 0; width: 26px; height: 1px;
  background: currentColor;
  transition: transform 0.4s var(--ease), opacity 0.3s ease;
}
.nav__toggle i::before { top: -7px; }
.nav__toggle i::after  { top: 7px; }
.nav.is-open .nav__toggle i { transform: rotate(45deg); }
.nav.is-open .nav__toggle i::before { transform: translateY(7px) rotate(-90deg); }
.nav.is-open .nav__toggle i::after  { opacity: 0; }

/* --- 6. Типографика --------------------------------------------------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  line-height: 1.6;
}
.eyebrow__txt { display: inline-flex; gap: 6px; }
.eyebrow__paren { color: var(--text-tertiary); }
.eyebrow__code { display: flex; gap: 3px; height: 10px; align-items: flex-end; }
.eyebrow__code i {
  display: block;
  width: var(--w, 4px);
  height: 10px;
  background: var(--text);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.5s var(--ease) var(--d, 0s);
}
.in-view .eyebrow__code i { transform: scaleY(1); }

.h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text);
}
.h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 1.7vw, 24px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}
.lead {
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
}
.body { color: var(--text-secondary); max-width: 62ch; }
.body + .body { margin-top: var(--sp-3); }
.small { font-size: 14px; line-height: 1.55; letter-spacing: 0; color: var(--text-secondary); }
.micro {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* смешанный акцент: ключевая фраза «загорается» после абзаца */
.key {
  color: var(--text);
  transition: color 0.8s var(--ease) 0.25s;
}
[data-reveal]:not(.in-view) .key { color: var(--text-secondary); }

/* --- 7. Кнопки и ссылки ----------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-text);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.6;
  letter-spacing: -0.02em;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn__label {
  position: relative;
  display: block;
  overflow: hidden;
  height: 1.6em;
}
.btn__label span {
  display: block;
  transition: transform 0.5s var(--ease);
}
.btn__label span::after {
  content: attr(data-label);
  position: absolute;
  left: 0;
  top: 100%;
}
.btn:hover .btn__label span,
.btn:focus-visible .btn__label span { transform: translateY(-100%); }

.btn__arrow {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  flex: none;
  border: 1px solid var(--border);
  color: var(--text);
  background: transparent;
  transition: background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) ease,
              transform var(--dur-fast) var(--ease);
}
.btn__arrow svg { transition: transform 0.4s var(--ease); }
.btn:hover .btn__arrow,
.btn:focus-visible .btn__arrow {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}
.btn:hover .btn__arrow svg { transform: translateX(3px); }
.btn:active .btn__arrow { transform: scale(0.96); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.btn[aria-disabled='true'] { color: var(--text-tertiary); pointer-events: none; opacity: 0.55; }

.invert .btn { color: var(--text-invert); }
.invert .btn__arrow { border-color: var(--rule-invert-strong); color: var(--text-invert); }
.invert .btn:hover .btn__arrow,
.invert .btn:focus-visible .btn__arrow {
  background: var(--text-invert);
  border-color: var(--text-invert);
  color: var(--bg-invert);
}

.link {
  color: var(--text);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.45s var(--ease), color var(--dur-fast) ease;
}
.link:hover, .link:focus-visible { background-size: 100% 1px; }
.link:active { color: var(--accent); }
.invert .link { color: var(--text-invert); }

.cta-line__hint { color: var(--text-secondary); }
.invert .cta-line__hint { color: var(--text-invert-secondary); }

/* --- 8. Метки / теги --------------------------------------------------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px dotted var(--rule);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: transparent;
  transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease;
}
.tag:hover { border-color: var(--border-hover); color: var(--text); }
.tag--live { color: var(--text); border-style: solid; border-color: var(--border); }
.tag--live .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.35); }
  70%  { box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}

/* --- 9. Hero ---------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  padding: 0 var(--pad);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--sp-3);
}
.hero__top {
  padding-top: var(--nav-h);
  align-items: center;
  min-height: calc(var(--nav-h) + 96px);
}
.hero__top > * { padding-top: var(--sp-4); }

.hero__clock { display: flex; flex-direction: column; gap: 2px; }
.hero__clock time { font-variant-numeric: tabular-nums; }

.barcode { display: flex; gap: 4px; align-items: flex-end; height: 56px; justify-content: flex-end; }
.barcode i {
  display: block;
  width: var(--w, 6px);
  height: var(--h, 100%);
  background: var(--text);
  transform: scaleY(0);
  transform-origin: bottom;
  animation: barIn 0.7s var(--ease) forwards var(--d, 0s);
}
@keyframes barIn { to { transform: scaleY(1); } }

.hero__mark {
  position: relative;
  padding: var(--sp-4) 0 var(--sp-2);
  /* параллакс: блок отстаёт от прокрутки; обновляется только на первом экране */
  transform: translateY(var(--y, 0px));
  will-change: transform;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  /* подгонка по ширине: делитель — отношение ширины набора «TRM®» к кеглю в Unbounded */
  font-size: max(40px, calc((100vw - 60px) / 3.45));
  line-height: 0.82;
  letter-spacing: -0.045em;
  color: var(--text);
  white-space: nowrap;
  margin: 0;
}
.wordmark span {
  display: inline-block;
  clip-path: inset(0 0 100% 0);
  transform: translateY(0.1em);
  animation: markIn 1.05s var(--ease) forwards var(--d, 0s);
}
@keyframes markIn {
  to { clip-path: inset(-0.2em 0 -0.08em 0); transform: translateY(0); }
}
.wordmark__frost {
  position: absolute;
  left: 0; right: 0;
  top: 50%; bottom: 0;
  background: var(--frost-tint);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 100%);
  mask-image: linear-gradient(to top, transparent 0%, #000 100%);
  opacity: 0;
  animation: frostIn 0.9s var(--ease) 0.75s forwards;
  pointer-events: none;
}
@keyframes frostIn { to { opacity: 1; } }

.hero__sub {
  font-size: clamp(18px, 1.75vw, 26px);
  line-height: 1.45;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--text-secondary);
  max-width: 46ch;
}
.hero__bottom {
  align-items: end;
  padding-bottom: var(--sp-5);
  min-height: 88px;
}
.hero__bottom > .span-2 { padding-right: var(--sp-5); }
.hero__cta { justify-self: end; }

/* --- 10. Диаграмма «четыре ракурса» ------------------------------------ */

.scope {
  position: relative;
  margin-top: var(--sp-7);
  --t: 0;
}
.scope__svg { width: 100%; height: auto; display: block; overflow: visible; }

.ray {
  fill: none;
  stroke: var(--text);
  stroke-width: 1;
  opacity: 0.28;
  stroke-dasharray: var(--len);
  stroke-dashoffset: calc(var(--len) * (1 - var(--t)));
  transition: opacity var(--dur-fast) var(--ease);
}
.ray.is-active { opacity: 1; }

.node {
  fill: var(--bg);
  stroke: var(--text);
  stroke-width: 1;
  transition: opacity var(--dur-fast) var(--ease);
}
.node-label {
  font-family: var(--font-text);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  fill: var(--text-secondary);
  transition: fill var(--dur-fast) var(--ease);
}
.scope-item.is-active .node-label { fill: var(--text); }

.core { transform-origin: center; }
.core__disc {
  fill: var(--text);
  transform: scale(calc(0.25 + 0.75 * var(--t)));
}
.core__ring {
  fill: none;
  stroke: var(--text);
  stroke-width: 1;
  stroke-dasharray: 2 5;
  opacity: calc(var(--t) * 0.5);
  transform: scale(calc(0.7 + 0.3 * var(--t)));
}

/* --- 11. Строки регистра ---------------------------------------------- */

.rows { margin-top: var(--sp-7); }
.row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
  gap: 0;
  padding: var(--sp-5) 3px;
  border-top: 1px dotted var(--rule);
  transition: background-color var(--dur) ease;
}
.rows > .row:last-child { border-bottom: 1px dotted var(--rule); }
.row::before {
  content: '';
  position: absolute;
  inset: 0 calc(var(--pad) * -1);
  background: var(--surface-hover);
  opacity: 0;
  transition: opacity var(--dur) ease;
  pointer-events: none;
  z-index: -1;
}
.row:hover::before, .row:focus-within::before { opacity: 1; }

/* «Образец» ракурса вместо стоковой фотографии: та же графика данных,
   что и вся страница, — см. DESIGN.md, раздел «Отличия от референса». */
.row__fig {
  width: 100%;
  aspect-ratio: 12 / 5;
  align-self: start;
  display: grid;
  place-items: center;
  padding: 20px 22px;
  border: 1px dotted var(--rule);
  background: var(--surface);
  transition: border-color var(--dur) ease;
}
.row:hover .row__fig { border-color: var(--border-hover); }

.spec { width: 100%; height: 100%; overflow: visible; }
.spec .u { fill: var(--rule-strong); transition: fill var(--dur) var(--ease); }
.spec .f { fill: var(--text); transition: fill var(--dur) var(--ease); }
.spec .frame { fill: none; stroke: var(--rule-strong); stroke-width: 1; stroke-dasharray: 2 4; }
.spec .ln { stroke: var(--rule-strong); stroke-width: 1; fill: none; transition: stroke var(--dur) var(--ease); }
.row:hover .spec .u { fill: var(--text-tertiary); }
.row:hover .spec .ln { stroke: var(--text-tertiary); }

.row__text { padding-right: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }
.row__index {
  justify-self: end;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 1.7vw, 24px);
  color: var(--text-tertiary);
  transition: color var(--dur) ease;
}
.row:hover .row__index { color: var(--text); }
.row__meta { display: flex; flex-wrap: wrap; gap: var(--sp-1); }

/* --- 12. Статистика ---------------------------------------------------- */

.stats { margin-top: var(--sp-7); }
.stat { display: flex; flex-direction: column; gap: var(--sp-3); padding-right: var(--sp-3); }
.stat__num {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 6vw, 88px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat__num small {
  align-self: flex-start;
  line-height: 1.15;
  font-size: 0.42em;
  letter-spacing: -0.02em;
  color: var(--text-tertiary);
}
.stat__val { font-variant-numeric: tabular-nums; }

/* --- 13. Шаги прогона -------------------------------------------------- */

.step {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: var(--sp-5) 3px;
  border-top: 1px dotted var(--rule);
  align-items: start;
}
.steps > .step:last-child { border-bottom: 1px dotted var(--rule); }
.step__n {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 1.7vw, 24px);
  color: var(--text-tertiary);
}
.step__t { padding-right: var(--sp-5); }
.step__d { color: var(--text-secondary); padding-right: var(--sp-5); }

/* --- 14. Инверсная секция --------------------------------------------- */

.invert {
  background: var(--bg-invert);
  color: var(--text-invert);
  border-top-color: var(--rule-invert);
}
.invert .h2, .invert .h3 { color: var(--text-invert); }
.invert .lead, .invert .body, .invert .small, .invert .micro,
.invert .eyebrow { color: var(--text-invert-secondary); }
.invert .eyebrow__paren { color: var(--text-invert-tertiary); }
.invert .eyebrow__code i { background: var(--text-invert); }
.invert .key { color: var(--text-invert); }
.invert [data-reveal]:not(.in-view) .key { color: var(--text-invert-secondary); }
.invert .hr, .invert .row, .invert .step { border-color: var(--rule-invert); }
.invert .tag { border-color: var(--rule-invert); color: var(--text-invert-secondary); }

.ledger { margin-top: var(--sp-6); display: flex; flex-direction: column; }
.ledger li {
  display: flex;
  gap: 12px;
  padding: var(--sp-3) 0;
  border-top: 1px dotted var(--rule-invert);
  color: var(--text-invert-secondary);
  transition: color var(--dur-fast) ease;
}
.ledger li:last-child { border-bottom: 1px dotted var(--rule-invert); }
.ledger li:hover { color: var(--text-invert); }
.ledger li b { font-weight: 400; color: var(--text-invert); flex: none; }

/* --- 15. FAQ ----------------------------------------------------------- */

.acc { display: flex; flex-direction: column; }
.acc { border-bottom: 1px dotted var(--rule); }
.acc__q {
  width: 100%;
  min-height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  padding: 18px 0;
  border: 0;
  border-top: 1px dotted var(--rule);
  background: none;
  font-family: var(--font-text);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: padding-left var(--dur-fast) var(--ease);
}
.acc__q:hover, .acc__q:focus-visible { padding-left: 6px; }
.acc__q .sign { position: relative; width: 14px; height: 14px; flex: none; }
.acc__q .sign::before, .acc__q .sign::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: currentColor;
  transition: transform 0.45s var(--ease);
}
.acc__q .sign::after { transform: rotate(90deg); }
.acc__q[aria-expanded='true'] .sign::after { transform: rotate(0deg); }
.acc__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--ease);
}
.acc__a > div { overflow: hidden; }
.acc__a p { padding-bottom: var(--sp-4); padding-right: var(--sp-5); color: var(--text-secondary); }
.acc__q[aria-expanded='true'] + .acc__a { grid-template-rows: 1fr; }

/* --- 16. Финальный CTA + футер ----------------------------------------- */

.outro {
  position: relative;
  padding: var(--sp-8) var(--pad) var(--sp-6);
  border-top: 1px dotted var(--rule);
  overflow: hidden;
}
.outro__mark { position: relative; }
.display-xl {
  font-family: var(--font-display);
  font-weight: 500;
  /* та же подгонка для «НАЧНЁМ.» */
  font-size: max(40px, calc((100vw - 60px) / 5.62));
  line-height: 0.86;
  letter-spacing: -0.045em;
  color: var(--text);
  white-space: nowrap;
  margin: 0;
}
.display-xl span {
  display: inline-block;
  clip-path: inset(0 0 100% 0);
  transform: translateY(0.1em);
  transition: clip-path 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--i, 0) * 45ms);
}
.in-view .display-xl span { clip-path: inset(-0.2em 0 -0.08em 0); transform: translateY(0); }
.outro__frost {
  position: absolute;
  left: 0; right: 0; top: 50%; bottom: 0;
  background: var(--frost-tint);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  -webkit-mask-image: linear-gradient(to top, transparent 0%, #000 100%);
  mask-image: linear-gradient(to top, transparent 0%, #000 100%);
  pointer-events: none;
}

.foot { padding: var(--sp-7) var(--pad) var(--sp-5); }
.foot__col { display: flex; flex-direction: column; gap: var(--sp-2); padding-right: var(--sp-3); }
.foot__col h3 { margin-bottom: var(--sp-2); }
.foot__contact {
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.5;
}
.foot__nav { gap: 0; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; }
.foot__bottom {
  margin-top: var(--sp-7);
  padding-top: var(--sp-3);
  border-top: 1px dotted var(--rule-invert);
  align-items: center;
}
.foot__bottom .micro { color: var(--text-invert-tertiary); }

/* --- 17. Reveal -------------------------------------------------------- */

[data-reveal] > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
[data-reveal].in-view > * { opacity: 1; transform: none; }


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

@media (max-width: 1024px) {
  .grid, .row, .step { grid-template-columns: repeat(2, 1fr); }
  .rails i:nth-child(3), .rails i:nth-child(4) { display: none; }
  .span-3, .span-2 { grid-column: span 2; }
  .row, .step { row-gap: var(--sp-3); }
  .row__text, .step__t, .step__d { padding-right: var(--sp-3); }
  .hero__bottom > .span-2 { padding-right: 0; }
  .nav__menu { gap: var(--sp-4); }
}

@media (max-width: 900px) {
  .nav__menu {
    position: fixed;
    inset: 0 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: calc(var(--nav-h) + var(--sp-2)) var(--pad) var(--sp-5);
    background: var(--surface-invert);
    color: var(--text-invert);
    transform: translateY(-100%);
    /* visibility, а не только transform: иначе Tab уводит фокус в закрытое меню */
    visibility: hidden;
    transition: transform 0.55s var(--ease), visibility 0s linear 0.55s;
    z-index: -3;
  }
  .nav.is-open .nav__menu {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.55s var(--ease), visibility 0s;
  }
  .nav.is-open { color: var(--text-invert); }
  .nav.is-open .nav__bg { transform: translateY(0); }
  .nav__menu .nav__link { font-size: 20px; min-height: 52px; }
  .nav__toggle { display: flex; }
}

@media (max-width: 767px) {
  :root { --sp-7: 64px; --sp-8: 96px; --pad: 16px; }
  .grid, .row, .step, .stats { grid-template-columns: 1fr; row-gap: var(--sp-3); }
  .rails i:nth-child(2) { display: none; }
  .span-2, .span-3 { grid-column: span 1; }
  .hero { min-height: auto; padding-bottom: var(--sp-6); }
  .hero__top { min-height: auto; }
  .hero__top > * { padding-top: var(--sp-3); }
  .barcode { justify-content: flex-start; height: 40px; }
  .wordmark { font-size: max(40px, calc((100vw - 44px) / 3.45)); }
  .wordmark__frost { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  .display-xl { font-size: max(40px, calc((100vw - 44px) / 5.62)); }
  .hero__bottom { align-items: start; gap: var(--sp-4); }
  .hero__cta { justify-self: start; }
  .row { padding: var(--sp-4) 3px; }
  .row__fig { aspect-ratio: 2 / 1; padding: 16px 18px; }
  .row__index { justify-self: start; }
  .stat { padding-right: 0; }
  .stats { gap: var(--sp-5); }
  .btn { font-size: 17px; gap: var(--sp-2); }
  .acc__q { font-size: 17px; }
  .acc__a p { padding-right: 0; }
  .foot__bottom { gap: var(--sp-2); }
}

/* --- 19. Reduced motion ------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .rails i { clip-path: none; }
  .wordmark span, .display-xl span { clip-path: none; transform: none; }
  .hero__mark { transform: none; }
  .wordmark__frost { opacity: 1; }
  .barcode i, .eyebrow__code i { transform: scaleY(1); }
  [data-reveal] > * { opacity: 1; transform: none; }
  .scope { --t: 1 !important; }
}

/* --- 20. Локальные рейки внутри инверсных секций ------------------------ */
/* Глобальные .rails лежат под контентом; тёмная секция их закрывает,
   поэтому внутри неё разлиновка рисуется своей копией. */

.rails--local {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.rails--local i {
  clip-path: none;
  animation: none;
  border-color: var(--rule-invert);
}
.invert > *:not(.rails--local) { position: relative; z-index: 1; }

/* --- 21. Подписи диаграммы (HTML-оверлей поверх SVG) -------------------- */

.scope__labels { position: absolute; inset: 0; pointer-events: none; }
.scope__label {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.scope__label.is-active { color: var(--text); }
.scope__label {
  left: var(--lx, 10%);
  top: var(--ly, 16%);
  transform: translate(-50%, var(--dy, -30px));
}
.scope__core {
  position: absolute;
  left: 50%;
  top: calc(var(--cy, 50%) + var(--cdy, 24%));
  transform: translate(-50%, 0);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
  opacity: calc(max(0, var(--t) * 2 - 1));
}
.scope__label b {
  width: 7px; height: 7px; border-radius: 50%;
  border: 1px solid currentColor;
  background: var(--bg);
  flex: none;
}
.scope__label.is-active b { background: var(--accent); border-color: var(--accent); }

@media (max-width: 767px) {
  .scope__label { font-size: 10px; letter-spacing: 0.04em; }
  .scope__core { font-size: 11px; }
}

/* --- 22. Финальный CTA: рабочее действие под гигантской надписью ---------- */

.outro__cta { margin-top: var(--sp-6); align-items: center; }
.outro__mail {
  font-family: var(--font-text);
  font-size: clamp(22px, 2.6vw, 38px);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.outro__cta .btn { justify-self: end; }

@media (max-width: 767px) {
  .outro__cta { margin-top: var(--sp-5); gap: var(--sp-4); }
  .outro__cta .btn { justify-self: start; }
}

/* --- 23. Сеть: сетка логотипов ------------------------------------------ */
/* Вертикальную разлиновку даёт глобальный .rails — своих боковых бордеров у
   ячеек нет намеренно: на позициях реек они легли бы вторым слоем поверх уже
   нарисованной линии и та стала бы плотнее соседних. Отсюда только border-top. */

.marks {
  margin-top: var(--sp-7);
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  /* Без отбивки 3px, которая есть у .grid: там она держит тонкие «1» и «І»
     от слипания с рейкой, а здесь у кромки ячейки текста нет — зато отбивка
     сносила границы ячеек мимо реечных линий. Референс тоже кладёт первую
     ячейку точно на линию. */
  border-top: 1px dotted var(--rule);
}
.mark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}

/* Белая карточка вырастает под логотипом — та же механика, что в референсе:
   opacity 0 → 1 и scale .855 → 1 (у них 111px внутри ячейки 130px). */
.mark__card {
  position: absolute;
  inset: 8%;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(var(--text-rgb), 0.04), 0 8px 24px rgba(var(--text-rgb), 0.06);
  opacity: 0;
  transform: scale(0.855);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

/* grayscale снимается на наведении: так настоящий цветной <img> оживает сам,
   без второго слоя. Для нынешних SVG-заглушек тот же эффект даёт currentColor. */
.mark__logo {
  position: relative;
  display: flex;
  /* Доля ячейки, а не фиксированные 72px: у референса контент упёрт в
     max-width: 1488px и логотип всегда 38.7% ячейки. Здесь страница
     полноширинная, ячейка на широком мониторе тянется — и фиксированный
     логотип в ней терялся. Потолок держит его от роста на 4K. */
  width: 40%;
  max-width: 96px;
  filter: grayscale(1);
  transition: filter var(--dur-fast) var(--ease);
}
.mark__logo > img,
.mark__logo > svg { width: 100%; height: auto; display: block; }

.mark:hover, .mark:focus-visible { color: var(--accent); }
.mark:hover .mark__card, .mark:focus-visible .mark__card { opacity: 1; transform: scale(1); }
.mark:hover .mark__logo, .mark:focus-visible .mark__logo { filter: grayscale(0); }

/* Колонок ровно вдвое больше, чем колонок у .rails на этом же брейкпоинте, —
   тогда между соседними рейками всегда стоит ровно два логотипа. Рейки гасят
   nth-child(3),(4) на 1024 и nth-child(2) на 767, оставаясь с 4 → 2 → 1
   колонкой; отсюда 8 → 4 → 2. Меняешь одно — пересчитывай второе. */
@media (max-width: 1024px) { .marks { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 767px) {
  .marks { grid-template-columns: repeat(2, 1fr); margin-top: var(--sp-6); }
  /* На этой ширине глобальная рейка остаётся одна: .rails гасит nth-child(2),
     и стык двух колонок логотипов повисает без линии. Референс на тех же 700px
     линию там держит (линии на 16 / 349.5 / 683 при ячейках 16 и 350), поэтому
     дорисовываем её локально — как это уже делает .rails--local в инверсиях. */
  .mark:nth-child(2n) { border-left: 1px dotted var(--rule); }
}

/* --- 24. Кто делает ------------------------------------------------------ */

.voices {
  margin-top: var(--sp-7);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 0 3px;
}
.voice {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-height: 340px;
  padding: var(--sp-5) var(--sp-5) var(--sp-5) 0;
  border-top: 1px dotted var(--rule);
}
.voice__n {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 1.7vw, 24px);
  color: var(--text-tertiary);
}
.voice__text {
  font-family: var(--font-text);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.6;
  letter-spacing: -0.02em;
  color: var(--text-secondary);
}
/* Подпись прижата к низу: карточки разной длины текста заканчиваются на одной линии. */
.voice__who { margin-top: auto; }
.voice__name {
  font-family: var(--font-text);
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.4;
  color: var(--text);
}
.voice__role {
  font-family: var(--font-text);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-tertiary);
}

@media (max-width: 1024px) { .voice { padding-right: var(--sp-3); } }
@media (max-width: 767px) {
  .voices { grid-template-columns: 1fr; margin-top: var(--sp-6); }
  .voice { grid-column: span 1; min-height: 0; padding: var(--sp-4) 0; }
}
