/* ============================================================
   CAUTIO — tokens.css
   Единый источник дизайн-токенов: палитра, типографика, шкала,
   базовый reset и общие утилиты shell. Все шаблоны опираются сюда.
   Правка палитры/шрифтов — ТОЛЬКО здесь.
   ============================================================ */

:root {
  /* ── Палитра ── */
  --paper:      #F5F2EC;  /* тёплый бумажный фон — «досье» */
  --paper-dk:   #ECE7DC;  /* блок-подложка */
  --ink:        #141A1F;  /* графит-чернила, основной текст, shell */
  --ink-soft:   #3D4954;  /* вторичный текст */
  --steel:      #2A4759;  /* сине-стальной — «навигатор», доверие, ссылки */
  --risk:       #C2410C;  /* сигнальный янтарь — риск/акцент/CTA */
  --risk-dk:    #9A330A;  /* тёмный риск для hover */
  --rule:       #D4CDBE;  /* линовка, границы, разделители */
  --ok:         #3F6B4E;  /* «зелёная зона» риска (виджет ИНН) */
  --warn:       #B8860B;  /* «жёлтая зона» риска (виджет ИНН) */

  /* ── Типографика ── */
  --font-display: 'Cormorant', Georgia, serif;
  --font-body:    'Inter Tight', system-ui, -apple-system, Arial, sans-serif;
  --font-mono:    'JetBrains Mono', Consolas, monospace;

  /* ── Типографическая шкала ── */
  --h1: clamp(46px, 5.6vw, 82px);
  --h2: clamp(34px, 3.4vw, 46px);
  --h3: clamp(22px, 2vw, 25px);
  --body: 18px;
  --small: 14px;
  --eyebrow: 12px;

  /* ── Раскладка ── */
  --maxw: 1360px;
  --pad-x: 40px;
  --pad-x-mobile: 20px;
}

/* ── Reset ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--risk); color: var(--paper); }
img { max-width: 100%; height: auto; }
a { color: var(--steel); }

/* ── Типографика по умолчанию ── */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.08; }
h1 { font-size: var(--h1); line-height: 1.0; }
h2 { font-size: var(--h2); color: var(--steel); }
h3 { font-size: var(--h3); }
p  { font-size: var(--body); line-height: 1.62; }
.eyebrow, .section-tag {
  font-family: var(--font-mono); font-size: var(--eyebrow);
  letter-spacing: 0.08em; color: var(--risk); font-weight: 500;
}
.mono { font-family: var(--font-mono); }
.data { font-family: var(--font-mono); font-weight: 500; }

/* ── Контейнер ── */
.container { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }

/* ── Кнопки (общие) ── */
.btn-primary {
  display: inline-block; background: var(--risk); color: var(--paper);
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
  letter-spacing: 0.02em; padding: 15px 28px; text-decoration: none;
  border: none; cursor: pointer; transition: background 0.2s;
}
.btn-primary:hover { background: var(--risk-dk); }
.btn-ghost {
  font-family: var(--font-body); font-size: 15px; font-weight: 500;
  color: var(--ink); text-decoration: none;
  border-bottom: 2px solid var(--ink); padding-bottom: 3px;
  transition: color 0.2s, border-color 0.2s;
}
.btn-ghost:hover { color: var(--risk); border-color: var(--risk); }

/* ── Breadcrumbs ── */
.breadcrumb { font-family: var(--font-mono); font-size: 12px; color: var(--ink-soft); padding: 16px 0; }
.breadcrumb a { color: var(--steel); text-decoration: none; }
.breadcrumb a:hover { color: var(--risk); }
.breadcrumb span { margin: 0 8px; color: var(--rule); }

/* ── Блок «связанные материалы» / перелинковка ── */
.related { border-top: 1px solid var(--rule); margin-top: 40px; padding-top: 28px; }
.related h3 { margin-bottom: 16px; }
.related ul { list-style: none; }
.related li { margin-bottom: 10px; }
.related a { color: var(--steel); text-decoration: none; border-bottom: 1px solid var(--rule); }
.related a:hover { color: var(--risk); border-color: var(--risk); }

/* ── CTA-блок (низ информационных страниц) ── */
.cta-inline {
  background: var(--ink); color: var(--paper); padding: 40px;
  margin: 40px 0; display: flex; justify-content: space-between;
  align-items: center; gap: 24px; flex-wrap: wrap;
}
.cta-inline h3 { color: var(--paper); }
.cta-inline .btn-primary { background: var(--risk); }

/* ── Author card ── */
.author-card { display: flex; align-items: center; gap: 16px; margin: 32px 0; padding: 20px 0; border-top: 1px solid var(--rule); }
.monogram {
  width: 46px; height: 46px; background: var(--paper-dk); border: 1px solid var(--rule);
  font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--steel);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ── Доступность ── */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--risk); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ── Мобильные контейнеры ── */
@media (max-width: 760px) {
  .container { padding-left: var(--pad-x-mobile); padding-right: var(--pad-x-mobile); }
  .cta-inline { flex-direction: column; align-items: flex-start; padding: 28px 20px; }
}

/* ============================================================
   КОМПОНЕНТНЫЕ КЛАССЫ (перенос из инлайн-стилей шаблонов, J)
   ============================================================ */

/* ── Hero ── */
.hero { padding: 56px 0 48px; }
.hero .lede, .lede {
  font-size: 18px; line-height: 1.62; color: var(--ink-soft);
  margin-top: 22px; max-width: 620px;
}
.hero-actions { margin-top: 32px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

/* ── Секционный блок ── */
.block { padding: 44px 0; border-top: 1px solid var(--rule); }
.block h2 { margin-bottom: 18px; }
.block p { margin-bottom: 14px; }

/* ── Placeholder (Phase 1 заглушки) ── */
.placeholder {
  color: var(--ink-soft); font-style: italic;
  padding: 16px; background: var(--paper-dk); border-left: 3px solid var(--rule);
}

/* ── Списки шагов ── */
.steps-list { list-style: none; counter-reset: step; }
.steps-list li {
  counter-increment: step; padding: 16px 0 16px 52px; position: relative;
  border-top: 1px solid var(--rule); font-size: 17px;
}
.steps-list li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 16px;
  font-family: var(--font-mono); color: var(--risk); font-weight: 500;
}

/* ── FAQ ── */
.faq { margin-top: 40px; }
.faq h2 { margin-bottom: 20px; }
.faq-item { border-top: 1px solid var(--rule); padding: 18px 0; }
.faq-item h3 { font-size: 18px; margin-bottom: 8px; }
.faq-item p { font-size: 16px; color: var(--ink-soft); }

/* ── BLUF-лид ── */
.bluf { font-size: 20px; line-height: 1.6; color: var(--ink); margin-bottom: 24px; }
.bluf::first-letter {
  font-family: var(--font-display); font-size: 52px; font-weight: 700;
  float: left; line-height: 0.9; margin: 4px 8px 0 0; color: var(--risk);
}

/* ── article/legal body ── */
.article-body { max-width: 760px; }
.article-body h2 { margin: 32px 0 14px; }
.article-body p { margin-bottom: 16px; }
.legal-body { max-width: 760px; }
.legal-body h1 { margin-bottom: 24px; }

/* ── Сетки хабов/команды ── */
.hub-grid, .team-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--rule); border: 1px solid var(--rule); margin-top: 40px;
}
.hub-grid > *, .team-grid > * { background: var(--paper); padding: 30px 26px; }
.team-grid .member-name { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin: 12px 0 4px; }
.team-grid .member-role { font-family: var(--font-mono); font-size: 11px; color: var(--risk); margin-bottom: 12px; }
.team-grid .member-bio { font-size: 13px; color: var(--ink-soft); line-height: 1.55; }

/* ── Полоса последствий ── */
.stakes-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--rule); border: 1px solid var(--rule); margin: 44px 0;
}
.stakes-strip > * { background: var(--paper); padding: 26px 24px; }

/* ── Виджет проверки ИНН (перенос из инлайна) ── */
.inn-widget { background: var(--ink); color: var(--paper); padding: 32px; max-width: 560px; }
.rw-field { display: flex; gap: 8px; margin-bottom: 16px; }
.rw-field input {
  flex: 1; background: rgba(245,242,236,.06); border: 1px solid rgba(245,242,236,.22);
  color: var(--paper); font-family: var(--font-mono); font-size: 15px; padding: 13px 14px; outline: none;
}
.rw-field input:focus { border-color: var(--risk); }
.rw-field button {
  background: var(--risk); color: var(--paper); border: none; padding: 0 20px;
  font-weight: 600; cursor: pointer; font-family: var(--font-body);
}
.rw-field button:hover { background: var(--risk-dk); }
.rw-scale-track { height: 8px; background: rgba(245,242,236,.12); position: relative; }
.rw-scale-fill {
  position: absolute; top: 0; left: 0; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--warn), var(--risk)); transition: width .9s cubic-bezier(.2,.7,.3,1);
}
.rw-scale-legend { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: rgba(245,242,236,.5); margin-top: 8px; }
.rw-result { font-family: var(--font-mono); font-size: 12px; margin-top: 12px; min-height: 16px; }
.rw-note { font-size: 11px; color: rgba(245,242,236,.4); margin-top: 14px; line-height: 1.5; }

/* ── Форма заявки ── */
.lead-form { max-width: 560px; display: flex; flex-direction: column; gap: 14px; }
.lead-form input, .lead-form textarea {
  font-family: var(--font-body); font-size: 15px; padding: 13px 14px;
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink); outline: none;
}
.lead-form input:focus, .lead-form textarea:focus { border-color: var(--risk); }
.consent { font-size: 13px; color: var(--ink-soft); display: flex; gap: 8px; align-items: flex-start; }
.consent a { color: var(--steel); }

/* ── Responsive для компонентов ── */
@media (max-width: 1024px) {
  .hub-grid, .team-grid { grid-template-columns: repeat(2, 1fr); }
  .stakes-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .hub-grid, .team-grid, .stakes-strip { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 32px; }
  .article-body, .legal-body, .lead-form, .inn-widget { max-width: 100%; }
}
