/* ============================================================
   AVatar Сайты — направление D «Округлый гуманист»
   Дизайн-язык взят один-в-один из lp-avatar-findir-c (ДНК 16):
   cold · humanist-rounded (Rubik / Nunito Sans) · editorial-rail · светлый.
   Отличие D: сигнатура первого экрана — веер «три макета сайта»
   (метафора 3 направлений дизайна), перерисованная под светлый язык.
   ============================================================ */

/* ---------- Шрифты (self-hosted, кириллица + латиница раздельно) ---------- */

/* Rubik — display, округло-геометрический гротеск, родная кириллица (OFL).
   Вариативный файл (ось wght 300..900) — одно правило на подмножество,
   а не по файлу на начертание (файлы 500/600/700 были байт-идентичны). */
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('fonts/rubik-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('fonts/rubik-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2116, U+2122, U+2212;
}

/* Nunito Sans — body, округлый гуманист-гротеск (OFL, variable 400..700) */
@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/nunitosans-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Nunito Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/nunitosans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2116, U+2122, U+2212;
}
@font-face {
  font-family: 'Nunito Sans';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/nunitosans-cyrillic-italic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Nunito Sans';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/nunitosans-latin-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2116, U+2122, U+2212;
}

/* ---------- Токены (идентичны fin-c: единый дизайн-язык набора) ---------- */
:root {
  --bg:            #F2F4F8; /* 60% — прохладный off-white, сине-серый подтон */
  --surface:       #E6EAF1; /* 30% — чуть глубже фона, холодный светло-серый (карточки) */
  --ink:           #1A1D23; /* текст — холодный почти-чёрный, не #000 */
  --muted:         #4E5563; /* второстепенный текст — холодный графит */
  --accent:        #2F5878; /* 10% — спокойный сумеречный синий (не финтех-бирюза/зелень) */
  --accent-strong: #264862; /* hover / нажатие */
  --accent-wash:   #E2E9F1; /* холодная бледная заливка hover ghost-кнопки */

  --ring:        rgba(45, 72, 98, 0.22);
  --ring-accent: rgba(47, 88, 120, 0.55);

  --r-card: 16px;
  --r-ctrl: 12px;

  --shadow: 0 1px 2px rgba(38, 72, 98, 0.06), 0 14px 28px -12px rgba(38, 72, 98, 0.16);
  --shadow-lift: 0 2px 4px rgba(38, 72, 98, 0.08), 0 22px 40px -16px rgba(38, 72, 98, 0.22);

  --ff-display: 'Rubik', system-ui, sans-serif;
  --ff-body: 'Nunito Sans', system-ui, sans-serif;
  --fs-caption: 0.9375rem; /* 15px */
  --fs-body: 1.125rem;     /* 18px */
  --fs-lead: 1.40625rem;   /* 22.5px */
  --fs-h3: 1.7578rem;      /* 28.1px */
  --fs-h2: 2.1973rem;      /* 35.2px */
  --fs-h1: clamp(2.5rem, 1.6rem + 3.6vw, 3.4375rem); /* 40 → 55px */

  --measure: 65ch;
  --maxw: 1600px;
  --rail-w: 3.5rem;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Сброс / база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* якорный переход не должен заводить заголовок под липкую шапку */
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden; /* страховка от горизонтального переполнения */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--ff-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }

::selection { background: var(--accent); color: #FFFFFF; }

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

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

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

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  background: var(--accent);
  color: #FFFFFF;
  padding: 0.5rem 1rem;
  border-radius: var(--r-ctrl);
  z-index: 100;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0.5rem; color: #FFFFFF; }

/* ---------- Раскладка: editorial-rail ---------- */
.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 4rem);
}

.rail-grid {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 3rem);
  align-items: start;
}

.rail {
  position: sticky;
  top: 2rem;
  align-self: start;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: flex;
  align-items: center;
  gap: 1rem;
  height: fit-content;
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: var(--fs-caption);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.rail .rail-mark {
  color: var(--accent);
  font-weight: 700;
}
.rail::after {
  content: "";
  flex: 1;
  min-height: 5rem;
  border-radius: 999px;
  background: linear-gradient(var(--accent), transparent);
  opacity: 0.35;
  writing-mode: horizontal-tb;
  width: 2px;
}

/* ---------- Шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand .brand-glyph { color: var(--accent); flex: none; }
.header-spacer { flex: 1 1 auto; }

/* ---------- Навигация в шапке: якорные ссылки + бургер на мобиле ---------- */
.nav { display: inline-flex; align-items: center; gap: 1.75rem; }
.nav-link {
  font-family: var(--ff-body);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-radius: var(--r-ctrl);
  transition: color 0.2s var(--ease);
}
.nav-link:hover,
.nav-link:focus-visible { color: var(--accent); }
.nav-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

/* бургер — только на узком экране */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink);
  border-radius: var(--r-ctrl);
  box-shadow: inset 0 0 0 1.5px var(--ring);
  cursor: pointer;
  transition: color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.nav-toggle:hover { color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--ring-accent); }
.nav-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.nav-icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-icon-close { display: block; }

/* раскрывающаяся панель под шапкой */
.nav-panel { display: none; }
.nav-panel > .wrap {
  display: flex;
  flex-direction: column;
  /* панель лежит внутри .site-header — гасим align-items/gap строки шапки,
     иначе ссылки схлопнутся по центру вместо ровной колонки */
  align-items: stretch;
  gap: 0;
  padding-block: 0.25rem 0.75rem;
}
.nav-panel-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--ff-body);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.nav-panel-link:hover,
.nav-panel-link:focus-visible { color: var(--accent); }
.nav-panel-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Кнопки ---------- */
.btn {
  --pad-y: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  max-width: 100%;
  padding: var(--pad-y) 1.5rem;
  font-family: var(--ff-body);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  border: none;
  border-radius: var(--r-ctrl);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), transform 0.12s var(--ease);
}
.btn-primary { background: var(--accent); color: #FFFFFF; }
.btn-primary:hover { background: var(--accent-strong); color: #FFFFFF; }
.btn-primary:active { transform: scale(0.98); }
.btn-ghost {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 0 0 1.5px var(--ring-accent);
}
.btn-ghost:hover { background: var(--accent-wash); color: var(--accent-strong); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 8vh, 6rem) clamp(2.5rem, 6vh, 4.5rem); }
.hero-eyebrow {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: var(--fs-caption);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.hero-eyebrow b { color: var(--accent); font-weight: 700; }

.hero h1 { max-width: 18ch; margin-bottom: 1.5rem; }
.hero h1 .soft { color: var(--accent); }

.hero-lead {
  font-size: var(--fs-lead);
  line-height: 1.45;
  color: var(--muted);
  max-width: 54ch;
  margin-bottom: 2rem;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.875rem; align-items: center; }
.hero-cta .btn { flex: 0 1 auto; min-width: 0; }
.hero-cta .note { font-size: var(--fs-caption); color: var(--muted); max-width: 34ch; }

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-top: 2rem;
  font-size: var(--fs-caption);
  color: var(--muted);
}
.hero-facts span { display: inline-flex; align-items: baseline; gap: 0.4rem; min-width: 0; }
.hero-facts b { font-family: var(--ff-display); font-weight: 700; color: var(--accent); }

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

/* ---------- Сигнатура D: веер «три макета сайта» ---------- */
.decks {
  position: relative;
  min-width: 0;
  min-height: min(30rem, 82vw);
}
.deck {
  position: absolute;
  width: 60%;
  max-width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
  padding: clamp(0.9rem, 1.6vw, 1.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
/* мини-хром «браузерного окна» — читается как макет сайта */
.deck-chrome { display: flex; gap: 0.35rem; margin-bottom: 0.15rem; flex: none; }
.deck-chrome i { width: 8px; height: 8px; border-radius: 999px; background: var(--ring); }
.deck-tag {
  margin-top: auto;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* абстрактный «контент макета» */
.m-bar { display: block; height: 10px; border-radius: 999px; background: var(--ring); }
.m-title { height: 13px; width: 62%; background: rgba(45, 72, 98, 0.34); }
.m-line { display: block; height: 7px; border-radius: 999px; background: var(--ring); }
.m-line.short { width: 55%; }
.m-media {
  display: block;
  border-radius: 8px;
  background: var(--accent-wash);
  box-shadow: inset 0 0 0 1px var(--ring);
}
.m-pill {
  display: inline-block;
  height: 16px; width: 38%;
  border-radius: 999px;
  background: rgba(45, 72, 98, 0.30);
}

/* три РАЗНЫЕ композиции макета (не три одинаковых карточки) */
.mock { display: flex; flex-direction: column; gap: 0.55rem; flex: 1 1 auto; min-height: 0; }
/* I — центрированный лендинг */
.mock-centered { align-items: center; text-align: center; }
.mock-centered .m-title { width: 70%; }
.mock-centered .m-line { width: 82%; }
.mock-centered .m-line.short { width: 60%; }
.mock-centered .m-media { width: 100%; flex: 1 1 auto; margin-top: 0.2rem; }
/* II — сплит/асимметрия (медиа слева, текст справа) */
.mock-split { flex-direction: row; gap: 0.6rem; align-items: stretch; }
.mock-split .m-media { flex: 0 0 42%; align-self: stretch; }
.mock-split .m-col { display: flex; flex-direction: column; gap: 0.5rem; flex: 1 1 auto; min-width: 0; }
/* III — редакционный с крупным медиа (подсвечен) */
.mock-editorial .m-media { width: 100%; flex: 1 1 auto; margin-top: 0.15rem; }

/* раскладка веера */
.deck-a { top: 5%;  left: 3%;  transform: rotate(-6deg); opacity: 0.60; z-index: 1; }
.deck-b { top: 13%; left: 21%; transform: rotate(3.5deg); opacity: 0.72; z-index: 2; }
.deck-c {
  top: 1%; left: 37%;
  transform: rotate(-1deg);
  z-index: 3;
  box-shadow: var(--shadow-lift), inset 0 0 0 2px var(--ring-accent);
}
/* подсветка выбранного направления акцентом */
.deck-c .m-title { background: var(--accent); }
.deck-c .m-media { background: var(--accent); box-shadow: none; }
.deck-c .deck-tag { color: var(--accent); }
/* Подписи неподсвеченных плит убраны: плиты приглушены до opacity .60/.72,
   их подпись давала контраст ~2:1. Место под подпись сохраняем — силуэт веера
   не меняется; плиты декоративны (aria-hidden), смысл несёт aria-label .decks. */
.deck-a .deck-tag, .deck-b .deck-tag { visibility: hidden; }
.deck-lit {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--ink);
  line-height: 1.15;
}
.deck-lit .dot { width: 9px; height: 9px; border-radius: 999px; background: var(--accent); flex: none; }

/* ---------- Раздел «Как это работает» ---------- */
.section { padding-block: clamp(3rem, 8vh, 6rem); }
.section-head { max-width: var(--measure); margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head .eyebrow {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: var(--fs-caption);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.section-head h2 { font-size: var(--fs-h2); margin-bottom: 1rem; }
.section-head p { font-size: var(--fs-lead); line-height: 1.45; color: var(--muted); max-width: 52ch; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}
.step {
  min-width: 0;
  background: var(--surface);
  border-radius: var(--r-card);
  padding: clamp(1.5rem, 2.5vw, 2rem);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.step:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.step-num {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: var(--fs-caption);
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.step-num .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--accent); flex: none; }
.step h3 { font-size: var(--fs-h3); margin-bottom: 0.625rem; }
.step p { color: var(--muted); line-height: 1.55; }

/* ---------- Карточки (общий компонент: боли, отличия) ---------- */
.card {
  min-width: 0;
  background: var(--surface);
  border-radius: var(--r-card);
  padding: clamp(1.5rem, 2.5vw, 2rem);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.card h3 { font-size: var(--fs-h3); margin-bottom: 0.625rem; }
.card p { color: var(--muted); line-height: 1.55; }

/* «Боли → решение» — 3 карточки */
.pains {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

/* «Чем отличается» — 4 карточки (2×2, как .steps) */
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

/* ---------- «Что происходит за вашим диалогом»: редакционная лента ролей ----
   Секция длинная (10 подсекций), поэтому не карточная стена, а лента:
   три части-главы с тонким разделителем, внутри — двухколоночный реестр
   «роль | что делает». Без рамок, без новых радиусов и теней: вес секции
   даётся размером, нумерацией глав и воздухом, а не декором. */
.crew {
  display: flex;
  flex-direction: column;
  gap: clamp(2.75rem, 5vw, 4.5rem);
  /* лента живёт в своей полосе: колонка роли + гаттер + мера строки.
     Иначе разделитель главы уезжает далеко правее текста. */
  max-width: calc(13rem + clamp(1.5rem, 3vw, 2.5rem) + var(--measure));
}
.crew-part {
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 3vw, 2.5rem);
}
.crew-part-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  font-size: var(--fs-h3);
  padding-bottom: 1rem;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}
.crew-part-num {
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.crew-item {
  display: grid;
  grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
  gap: 0.5rem clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
  min-width: 0;
}
.crew-role {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 0;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: var(--fs-caption);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.35;
}
.crew-role .dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--accent);
  flex: none;
  transform: translateY(-1px);
}
.crew-body { min-width: 0; max-width: var(--measure); }
.crew-body h4 {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: var(--fs-lead);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.625rem;
  text-wrap: balance;
}
.crew-body p { color: var(--muted); line-height: 1.6; }
.crew-body > p + p { margin-top: 1rem; }

.crew-list {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
  line-height: 1.6;
}
.crew-list li { margin-bottom: 0.625rem; }
.crew-list li:last-child { margin-bottom: 0; }
.crew-list strong { color: var(--ink); font-weight: 700; }
.crew-list + p { margin-top: 1rem; }

/* ---------- «Что Вы получаете»: перечислимый список результата ----------
   Соседняя секция «Чем отличается» — залитые карточки; здесь намеренно
   другой ритм: два столбца отметок без заливки, чтобы список читался
   как перечень сделанного, а не как ещё одна карточная сетка. */
.gains {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.75rem, 3vw, 2.75rem) clamp(2rem, 4vw, 3.5rem);
}
.gain {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  min-width: 0;
}
.gain-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  flex: none;
  border-radius: 999px;
  background: var(--accent-wash);
  /* глубокий оттенок акцента: галочка на бледной заливке проходит APCA с запасом */
  color: var(--accent-strong);
}
.gain-body { min-width: 0; }
.gain-body h3 {
  font-size: var(--fs-lead);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.gain-body p { color: var(--muted); line-height: 1.55; }
.gain-body p + p { margin-top: 0.875rem; }

/* ---------- Возражения: вопрос — ответ ---------- */
.qa {
  display: flex;
  flex-direction: column;
  gap: clamp(1.75rem, 3.5vw, 2.75rem);
  max-width: var(--measure);
  margin: 0;
}
.qa-item { min-width: 0; }
.qa dt {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: var(--fs-h3);
  color: var(--ink);
  margin: 0 0 0.5rem;
  line-height: 1.2;
}
.qa dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 60ch;
}

/* ---------- Финальный CTA ---------- */
.cta-band { background: var(--accent-wash); }
.cta-wrap {
  max-width: 46rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}
.cta-band h2 { font-size: var(--fs-h2); max-width: 24ch; }
.cta-band p { font-size: var(--fs-lead); line-height: 1.45; color: var(--muted); max-width: 50ch; }
.cta-band .btn { margin-top: 0.25rem; max-width: 100%; }

/* ---------- Юр-страница /privacy/ ---------- */
.back-link {
  display: inline-flex;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: var(--fs-caption);
  color: var(--accent);
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}
.back-link:hover { color: var(--accent-strong); }
.legal-head h1 { font-size: var(--fs-h2); margin-bottom: 0; }
.legal-body { max-width: var(--measure); color: var(--muted); line-height: 1.6; }
.legal-body p { margin-bottom: 1.25rem; }
.legal-body p:last-child { margin-bottom: 0; }
.legal-body strong { color: var(--ink); font-weight: 700; }
.legal-body h2 {
  font-size: var(--fs-h3);
  color: var(--ink);
  margin-top: 2.5rem;
  margin-bottom: 0.875rem;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body ul { margin: 0 0 1.25rem 1.25rem; padding: 0; }
.legal-body li { margin-bottom: 0.5rem; }
.legal-body li:last-child { margin-bottom: 0; }
.legal-body em { color: var(--ink); font-style: normal; font-weight: 700; }

/* ---------- Подвал ---------- */
.site-footer {
  padding-block: clamp(2.5rem, 5vh, 4rem);
  border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  color: var(--muted);
  font-size: var(--fs-caption);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* ---------- Логин-модалка ---------- */
/* при открытой модалке фон не скроллится (класс ставит script.js) */
html.modal-open,
html.modal-open body { overflow: hidden; }
html.modal-open body { scrollbar-gutter: stable; }

.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  overflow-y: auto; /* фон заблокирован — прокручивается сама модалка */
  background: color-mix(in srgb, var(--ink) 42%, transparent);
}
.modal-card {
  width: min(26rem, 100%);
  background: var(--bg);
  border-radius: var(--r-card);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: var(--shadow-lift);
}
.modal-card h2 { font-size: var(--fs-h3); margin-bottom: 0.5rem; }
.modal-card .sub { color: var(--muted); font-size: var(--fs-caption); margin-bottom: 1.5rem; }
.modal-close {
  float: right;
  margin: -0.25rem -0.25rem 0 0;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: none; background: transparent; color: var(--muted);
  border-radius: var(--r-ctrl); cursor: pointer;
}
.modal-close:hover { background: var(--surface); color: var(--ink); }
.form-row { margin-bottom: 1rem; }
.form-row label { display: block; font-weight: 700; font-size: var(--fs-caption); margin-bottom: 0.375rem; }
.form-row input {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  font-family: var(--ff-body);
  font-size: 1.0625rem;
  color: var(--ink);
  background: var(--surface);
  border: none;
  box-shadow: inset 0 0 0 1.5px var(--ring);
  border-radius: var(--r-ctrl);
}
.form-row input:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); outline: none; }
.modal-card .btn-primary { width: 100%; margin-top: 0.5rem; }

/* согласие ПДн (152-ФЗ) — чекбокс, не предзаполнен */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}
.form-check input[type="checkbox"] {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 0.15rem;
  accent-color: var(--accent);
}
.form-check label {
  font-weight: 400;
  font-size: var(--fs-caption);
  line-height: 1.45;
  color: var(--muted);
}
.form-check label a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.form-check label a:hover { color: var(--accent-strong); }

/* ---------- Движение: один оркестрованный момент ---------- */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  animation: fade-up 0.55s var(--ease) both;
  animation-timeline: view();
  animation-range: entry 0% cover 26%;
}
.reveal-load { animation: fade-up 0.6s var(--ease) both; }
.steps .step,
.pains .card,
.cards .card,
.gains .gain,
.qa .qa-item { animation-delay: calc(var(--i, 0) * 70ms); }

/* веер собирается на загрузке: каждая плита «встаёт» на своё место */
@keyframes deck-settle {
  from { opacity: 0; transform: translateY(22px) rotate(0deg); }
}
.deck-a { animation: deck-settle 0.6s var(--ease) both; animation-delay: 0.05s; }
.deck-b { animation: deck-settle 0.6s var(--ease) both; animation-delay: 0.14s; }
.deck-c { animation: deck-settle 0.6s var(--ease) both; animation-delay: 0.23s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-load, .steps .step, .gains .gain,
  .deck-a, .deck-b, .deck-c,
  .btn, .step, .card { animation: none !important; transition: none !important; }
  .step:hover, .card:hover { transform: none; }
  /* сохраняем финальные трансформации веера без анимации */
  .deck-a { transform: rotate(-6deg); }
  .deck-b { transform: rotate(3.5deg); }
  .deck-c { transform: rotate(-1deg); }
}

/* ---------- Адаптив ---------- */
/* Веер сворачивается в один подсвеченный «кадр» уже с 900px: ниже этого порога
   hero-раскладка становится одноколоночной, и абсолютно спозиционированные плиты
   схлопнули бы высоту .decks в 0 (наезд на следующую секцию). */
@media (max-width: 900px) {
  .hero-layout { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .hero h1 { max-width: 100%; }
  .decks { min-height: auto; max-width: 30rem; }
  .pains { grid-template-columns: minmax(0, 1fr); }
  /* реестр ролей и список результата — в одну колонку заранее: при двух колонках
     на 721–900px строка становится короче комфортной меры */
  .crew-item { grid-template-columns: minmax(0, 1fr); gap: 0.625rem; }
  .gains { grid-template-columns: minmax(0, 1fr); }

  .deck {
    position: static;
    width: 100%;
    aspect-ratio: auto;
    transform: none !important;
    opacity: 1 !important;
    animation: none !important;
  }
  .deck-a, .deck-b { display: none; }
  .deck-c { box-shadow: var(--shadow-lift), inset 0 0 0 2px var(--ring-accent); }
  .deck-c .mock { min-height: 9rem; }
}

/* мобила: рельсы и сетки в одну колонку */
@media (max-width: 720px) {
  .rail-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rail {
    position: static;
    writing-mode: horizontal-tb;
    transform: none;
    flex-direction: row;
    margin-bottom: 1.5rem;
  }
  .rail::after { display: none; }
  .steps, .cards { grid-template-columns: minmax(0, 1fr); }

  .hero-cta .btn { width: 100%; } /* кнопка на всю ширину — гарантия отсутствия переполнения */
  .site-header .wrap { padding-inline: 1rem; gap: 0.75rem; }
  .brand { font-size: 1.0625rem; min-width: 0; }
  .brand .brand-glyph { width: 22px; height: 22px; }
  .site-header .btn { padding-inline: 1.05rem; }
  /* на узком экране ссылки сворачиваются в бургер рядом с «Войти» */
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-panel:not([hidden]) {
    display: block;
    border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  }
  .nav-panel > .wrap { padding-inline: 1rem; }
}

@media (max-width: 720px) and (prefers-reduced-motion: no-preference) {
  .nav-panel:not([hidden]) { animation: nav-panel-in 0.18s var(--ease) both; }
}
@keyframes nav-panel-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
