/* Дизайн-система лендинга bitrixindustry.autero.ru.
   Тема взята из приложения Autero (партнёрский раздел /partner):
   светлый фон gray-50, карточки white rounded-xl, первичный синий #2563eb
   (primary-600), подписи полей капсом, семантика success/error. */

:root {
  --bg: #f9fafb;            /* gray-50 */
  --card: #ffffff;
  --text: #0f172a;          /* slate-900 */
  --text-soft: #1e293b;     /* slate-800 */
  --body: #334155;          /* slate-700 — основной текст */
  --muted: #64748b;         /* slate-500 */
  --link: #2563eb;          /* primary-600 — только ссылки */
  --accent: #111827;        /* кнопки: почти чёрный (как в партнёрке) */
  --accent-hover: #1e293b;  /* slate-800 */
  --line: #e5e7eb;          /* gray-200 */
  --line-strong: #cbd5e1;   /* slate-300 */
  --ok: #10b981;
  --danger: #ef4444;
  --radius-card: 16px;
  --radius-btn: 12px;
  --radius-input: 8px;
  --shadow-card: 0 4px 6px -1px rgb(0 0 0 / 0.06), 0 2px 4px -2px rgb(0 0 0 / 0.04);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); }
a:hover { text-decoration: underline; }

.page { max-width: 860px; margin: 0 auto; padding: 28px 18px 48px; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.brand {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-soft);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.nav { display: flex; flex-wrap: wrap; gap: 14px; font-size: 14px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--link); }

h1 {
  margin: 0 0 14px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
h2 {
  margin: 24px 0 10px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
h3 { margin: 18px 0 8px; font-size: 18px; font-weight: 600; }
p, li { color: var(--body); }

p.lead {
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}

ul { padding-left: 1.2em; }
ul li { margin-bottom: 4px; }

.contact-line { margin: 0; color: var(--text); font-weight: 500; }

/* Блок скачивания файла */
.download-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 0 0 12px;
}
.download-card .file-meta { margin: 0; font-size: 13px; color: var(--muted); }
.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-btn);
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
}
.download-btn:hover { background: var(--accent-hover); text-decoration: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-btn);
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.primary:disabled { opacity: 0.65; cursor: not-allowed; }
.btn.block { width: 100%; }

/* Форма (подписи полей капсом — как в приложении) */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-input);
  background: var(--card);
  font-size: 15px;
  font-family: inherit;
}
.field input:focus {
  outline: 2px solid rgb(37 99 235 / 0.25);
  border-color: var(--accent);
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.45;
}
.consent input { margin-top: 3px; flex-shrink: 0; accent-color: var(--accent); }
.consent a { color: var(--link); text-decoration: none; }

.form-error {
  display: none;
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--danger);
}
.form-error.show { display: block; }
.form-box.hide { display: none; }

.success-box { display: none; }
.success-box.show { display: block; }
.success-box p { color: var(--ok); font-weight: 600; }

/* Таблица воронки продаж */
.funnel {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: var(--card);
  border-radius: 10px;
  overflow: hidden;
}
.funnel th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.funnel td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--body);
  vertical-align: top;
}
.funnel td:first-child {
  font-weight: 600;
  color: var(--text-soft);
}
.funnel tr:last-child td { border-bottom: none; }
.funnel tr:hover td { background: #f8fafc; }

/* Правовые страницы */
.legal p { margin: 0 0 12px; }
.legal .center-title {
  text-align: center;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 20px;
}

.site-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: #94a3b8;
}

@media (max-width: 640px) {
  .funnel th, .funnel td { padding: 8px 10px; }
  .download-card { flex-direction: column; align-items: flex-start; }
}

/* Hero: центрирование заголовка и подзаголовка */
.hero {
  text-align: center;
  padding: 8px 0 4px;
}
.hero h1 {
  margin: 0 0 12px;
}
.hero .lead {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

/* Заголовок секции вне карточки */
.section-title {
  margin: 28px 0 14px;
}

/* Повторный CTA «Запросить демо» внизу страницы */
.card.cta {
  text-align: center;
}
.card.cta p {
  color: var(--body);
}
.card.cta .btn {
  margin-top: 6px;
}

/* «Что входит»: единая карточка, секции разделены тонкими линиями */
section.feature h3 { margin: 0 0 10px; }
hr.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}

/* Таблица: стадии не переносятся, столбец шире */
.funnel th:first-child,
.funnel td:first-child {
  width: 30%;
  white-space: nowrap;
}

/* Блок скачивания: по центру */
.card.download {
  text-align: center;
}
.card.download .download-card {
  justify-content: center;
}
.card.download .file-meta {
  max-width: 520px;
  margin: 0 auto;
}

/* Модальное окно «Запросить демо» */
body.modal-open {
  overflow: hidden;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(15 23 42 / 0.45);
  z-index: 1000;
  padding: 16px;
}
.modal-overlay[hidden] {
  display: none;
}
.modal {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 24px;
  max-width: 460px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover {
  color: var(--text);
  background: var(--bg);
}