:root {
  --bg: #F5F5F1;
  --surface: #FFFFFF;
  --ink: #111316;
  --ink-2: #30343A;
  --text-2: #3A3F46;
  --muted: #4A4F57;
  --line: #DDDDD6;
  --line-2: #E6E6E0;
  --line-3: #C9C9C1;
  --field: #A8A89F;
  --bubble: #ECECE6;
  --dark-text: #F2F2EE;
  --dark-2: #C4C8CE;
  --dark-muted: #A9AEB6;
  --dark-bubble: #2A2E35;
  --dark-line: #33373E;
  --accent: #1D3FBF;
  --accent-hover: #142C86;

  --sans: 'Golos Text', 'Segoe UI', system-ui, sans-serif;
  --serif: 'Literata', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --gutter: clamp(20px, 4vw, 40px);
  --section-gap: clamp(64px, 9vw, 120px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
}

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

h1, h2, h3, p, ul, ol { margin: 0; }

button { font: inherit; }

input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 10;
  background: var(--ink); color: #fff; padding: 10px 16px;
}
.skip-link:focus { top: 8px; color: #fff; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.mono { font-family: var(--mono); }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; color: var(--muted); }
.serif { font-family: var(--serif); font-weight: 500; }
.lead { color: var(--text-2); max-width: 520px; }

.h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(34px, 4vw, 52px); line-height: 1.1; letter-spacing: -0.01em; text-wrap: balance;
}

.tag {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  border: 1px solid var(--line); padding: 2px 8px; white-space: nowrap;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px;
  text-decoration: none; font-weight: 500; cursor: pointer;
}
.btn-outline { border: 1.5px solid var(--ink); color: var(--ink); font-size: 15px; background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-primary { min-height: 52px; padding: 0 28px; background: var(--accent); color: #fff; border: 0; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-link { min-height: 44px; color: var(--ink); font-weight: 500; text-underline-offset: 4px; display: inline-flex; align-items: center; }

/* ---------- Шапка ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap {
  padding-top: 18px; padding-bottom: 18px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo-mark {
  width: 28px; height: 28px; border: 1.5px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
}
.logo-mark::after { content: ''; width: 10px; height: 10px; background: var(--accent); }
.logo-name { font-weight: 600; font-size: 17px; letter-spacing: 0.02em; }
.nav { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 15px; }
.nav a { color: var(--ink-2); text-decoration: none; }
.nav a:hover { color: var(--accent); }

/* ---------- Первый экран ---------- */
.hero {
  padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(56px, 7vw, 96px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr));
  gap: 56px; align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 28px; }
.hero h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(40px, 5vw, 66px); line-height: 1.06; letter-spacing: -0.015em; text-wrap: balance;
}
.hero-lead { font-size: 19px; color: var(--text-2); max-width: 570px; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.hero-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 16px; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 8px;
}
.fact { display: flex; flex-direction: column; gap: 4px; }
.fact b { font-weight: 600; }
.fact span { font-size: 14px; color: var(--muted); }

/* Окно чата на первом экране */
.chat {
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 24px 60px -32px rgba(17, 19, 22, 0.28);
  display: flex; flex-direction: column;
}
.chat-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 22px; border-bottom: 1px solid var(--line-2);
}
.chat-who { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 32px; height: 32px; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600;
}
.chat-title { display: flex; flex-direction: column; line-height: 1.25; }
.chat-title b { font-weight: 600; font-size: 15px; }
.chat-title span { font-size: 13px; color: var(--muted); }
.chat-body { display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.msg-user { align-self: flex-end; max-width: 80%; background: var(--bubble); padding: 12px 16px; font-size: 15px; }
.msg-bot {
  max-width: 88%; background: var(--bg); border: 1px solid var(--line-2);
  padding: 14px 16px; font-size: 15px; display: flex; flex-direction: column; gap: 12px;
}
.file-chip {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-family: var(--mono); font-size: 12px; color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line-3); padding: 4px 10px; margin-bottom: 8px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 16px; font-size: 14px;
  border: 1.5px solid var(--field); background: var(--surface); color: var(--ink);
}
.chip-on { border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 500; }
.chat-action {
  display: grid; grid-template-columns: 22px 1fr; gap: 10px;
  padding: 16px 22px; background: var(--ink); color: #E6E7E9;
}
.chat-action svg { margin-top: 3px; }
.chat-action div { display: flex; flex-direction: column; gap: 2px; }
.chat-action .mono { font-size: 12px; color: var(--dark-muted); }
.chat-action span:last-child { font-size: 14px; }

/* ---------- Полоса каналов ---------- */
.band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.band .wrap {
  padding-top: 28px; padding-bottom: 28px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); gap: 20px 56px;
}
.band-col { display: flex; flex-direction: column; gap: 8px; }
.band-col > span { font-size: 14px; color: var(--muted); }
.band-list { display: flex; flex-wrap: wrap; gap: 6px 22px; font-family: var(--mono); font-size: 15px; font-weight: 500; }
.band-list .soon { color: var(--muted); font-weight: 400; }

/* ---------- Секции ---------- */
.section { padding-top: var(--section-gap); }
.section-head {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: 24px 56px; align-items: end;
}
.section-head > div, .section-title { display: flex; flex-direction: column; gap: 16px; }
.section-title { max-width: 760px; }

/* Как работает */
.steps3 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 16px; margin-top: 48px;
}
.card { background: var(--surface); border: 1px solid var(--line); padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.card-dark { background: var(--ink); color: var(--dark-text); border-color: var(--ink); }
.card-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.card-dark .card-top { color: var(--dark-muted); }
.card h3 { font-family: var(--serif); font-weight: 500; font-size: 26px; }
.card p { color: var(--text-2); font-size: 16px; }
.card-dark p { color: var(--dark-2); }
.ok-accent { color: var(--accent); }

/* Возможности — вкладки */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.tab {
  min-height: 46px; padding: 0 20px; font-size: 15px; cursor: pointer;
  border: 1.5px solid var(--line-3); background: transparent; color: var(--ink);
}
.tab:hover { border-color: var(--ink); }
.tab[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; font-weight: 500; }

.panel {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr));
  gap: 24px; margin-top: 24px;
}
.panel[hidden] { display: none; }
.panel-list { background: var(--surface); border: 1px solid var(--line); padding: clamp(24px, 3vw, 40px); }
.panel-list h3 { font-family: var(--serif); font-weight: 500; font-size: 30px; margin-bottom: 8px; }
.panel-list > p { color: var(--text-2); margin-bottom: 20px; }
.numlist { list-style: none; padding: 0; display: flex; flex-direction: column; counter-reset: num; }
.numlist li {
  display: grid; grid-template-columns: 36px 1fr; gap: 8px; padding: 14px 0;
  border-top: 1px solid var(--line-2); counter-increment: num;
}
.numlist li::before {
  /* у li с display:grid счётчик list-item браузер не ведёт — нужен свой */
  content: counter(num, decimal-leading-zero);
  font-family: var(--mono); font-size: 13px; color: var(--accent); padding-top: 3px;
}

.dialog {
  background: var(--ink); color: var(--dark-text); padding: clamp(24px, 3vw, 40px);
  display: flex; flex-direction: column; gap: 16px;
}
.dialog-label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--dark-muted); }
.d-user {
  align-self: flex-end; max-width: 85%; background: var(--dark-bubble); padding: 14px 18px;
  display: flex; flex-direction: column; gap: 4px;
}
.d-bot {
  max-width: 92%; background: var(--bg); color: var(--ink); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 4px;
}
.d-who { font-family: var(--mono); font-size: 12px; color: var(--dark-muted); }
.d-bot .d-who { color: var(--accent); }
.d-result {
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--dark-line);
  display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--dark-2);
}
.d-result svg { flex: 0 0 auto; margin-top: 2px; }

/* Эффект */
.grid6 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 48px;
}
.cell { background: var(--bg); padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.cell .mono { font-size: 13px; color: var(--accent); }
.cell h3 { font-family: var(--serif); font-weight: 500; font-size: 25px; line-height: 1.25; }
.cell p { color: var(--text-2); font-size: 16px; }

.case {
  margin-top: 32px; background: var(--surface); border: 1px solid var(--line);
  padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 28px;
}
.case-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; align-items: baseline; }
.case-head h3 { font-size: 19px; font-weight: 600; }
.case-head .mono { font-size: 13px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 24px 40px; }
.stat { display: flex; flex-direction: column; gap: 6px; border-top: 2px solid var(--ink); padding-top: 16px; }
.stat b { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1.1; color: var(--accent); }
.stat span { color: var(--text-2); font-size: 16px; }
.case-note { font-size: 14px; color: var(--muted); max-width: 820px; }

/* Управление */
.control { margin-top: var(--section-gap); background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.control > .wrap { padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(56px, 8vw, 104px); display: flex; flex-direction: column; gap: 64px; }
.control-top {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
  gap: 48px 72px; align-items: center;
}
.control-top .lead { max-width: 480px; }
.modes { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.mode { display: grid; grid-template-columns: 96px 1fr; gap: 12px; font-size: 15px; color: var(--text-2); }
.mode b { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--ink); padding-top: 2px; }

.settings { background: var(--bg); border: 1px solid var(--line); }
.settings-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 16px 22px; border-bottom: 1px solid var(--line);
}
.settings-head b { font-weight: 600; font-size: 15px; }
.settings-head .tag { border-color: var(--line-3); }
.row {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 8px 16px; padding: 14px 22px; border-bottom: 1px solid var(--line-2); font-size: 15px;
}
.row:last-child { border-bottom: 0; }
.pill { font-size: 13px; font-weight: 500; padding: 4px 10px; }
.pill-self { background: #E3E8F8; color: #14286E; }
.pill-confirm { background: #FFEBCC; color: #6B3D00; }
.pill-no { background: #E4E4E0; color: var(--ink-2); }

.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 36px 40px; border-top: 1px solid var(--line); padding-top: 48px;
}
.feature { display: flex; flex-direction: column; gap: 10px; }
.feature svg { color: var(--accent); }
.feature h3 { font-size: 18px; font-weight: 600; }
.feature p { color: var(--text-2); font-size: 16px; }

/* Внедрение */
.process {
  list-style: none; margin-top: 48px; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 32px;
}
.process li { border-top: 2px solid var(--ink); padding-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.process .mono { font-size: 14px; color: var(--accent); }
.process h3 { font-family: var(--serif); font-weight: 500; font-size: 25px; }
.process p { color: var(--text-2); font-size: 16px; }

/* Вопросы */
.faq {
  padding-top: var(--section-gap); padding-bottom: var(--section-gap);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
  gap: 32px 72px; align-items: start;
}
.faq-list { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 0; font-size: 19px; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq-plus { font-size: 26px; font-weight: 300; line-height: 1; transition: transform 0.2s; }
.faq details[open] .faq-plus { transform: rotate(45deg); }
.faq details p { margin: 0 0 22px; color: var(--text-2); max-width: 640px; }

/* Заявка */
.contact { background: var(--ink); color: var(--dark-text); }
.contact .wrap {
  padding-top: clamp(56px, 8vw, 104px); padding-bottom: clamp(56px, 8vw, 104px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: 48px 72px; align-items: start;
}
.contact-copy { display: flex; flex-direction: column; gap: 20px; }
.contact-copy p { color: var(--dark-2); max-width: 480px; }
.contact-links { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; font-size: 16px; }
.contact-links a { color: var(--dark-text); }

.form { background: var(--bg); color: var(--ink); padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column; gap: 18px; }
.form-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; }
.field input, .field textarea {
  min-height: 48px; padding: 0 14px; border: 1px solid var(--field); background: var(--surface);
  font: inherit; font-size: 16px; color: var(--ink); border-radius: 0;
}
.field textarea { padding: 12px 14px; resize: vertical; }
.field [aria-invalid="true"] { border-color: #B00020; }
.form .btn-primary { width: 100%; }
.form .btn-primary[disabled] { opacity: 0.6; cursor: progress; }
.form-note { font-size: 13px; color: var(--muted); }
.form-status { font-size: 15px; min-height: 0; }
.form-status:empty { display: none; }
.form-status.is-ok { color: #0F6B3C; }
.form-status.is-err { color: #B00020; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.site-footer { background: var(--ink); color: var(--dark-muted); border-top: 1px solid var(--dark-bubble); }
.site-footer .wrap {
  padding-top: 28px; padding-bottom: 28px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; font-size: 14px;
}

[data-cfg-empty] { display: none !important; }
