/* ============================================================
   Дозвон — лендинг-витрина. Стили.
   Тема: тёмная/светлая через prefers-color-scheme.
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f0f3f9;
  --text: #101828;
  --text-muted: #667085;
  --border: #e4e8f0;
  --accent: #0a84ff;
  --accent-strong: #0066d6;
  --accent-soft: #e7f1ff;
  --success: #12b76a;
  --shadow: 0 6px 24px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 20px 50px rgba(16, 24, 40, 0.14);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f1a;
    --bg-alt: #0f1524;
    --surface: #141a2b;
    --surface-2: #1b2338;
    --text: #eef2fb;
    --text-muted: #98a2b8;
    --border: #26304a;
    --accent: #3d9bff;
    --accent-strong: #5aa9ff;
    --accent-soft: #16233d;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 3.1rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 0 0 1rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }

.accent { color: var(--accent); }
.muted { color: var(--text-muted); font-weight: 400; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

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

/* --- Кнопки --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: var(--radius-sm); font-weight: 600; font-size: 1rem;
  border: 1.5px solid transparent; cursor: pointer; transition: all .15s ease; text-decoration: none;
  font-family: inherit;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-strong); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { padding: 9px 16px; font-size: .92rem; }
.btn--block { width: 100%; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700;
  color: var(--accent); margin: 0 0 .8rem;
}

/* --- Шапка --- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header__inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--text); font-size: 1.2rem; }
.brand:hover { text-decoration: none; }
.brand__mark { color: var(--accent); font-size: 1.4rem; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--text-muted); font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav__cta { margin-left: 8px; }

@media (max-width: 860px) {
  .nav { display: none; }
  .nav__cta { margin-left: auto; }
}

/* --- Hero --- */
.hero { padding: 64px 0 40px; background:
    radial-gradient(1200px 500px at 80% -10%, var(--accent-soft), transparent 60%); }
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.lead { font-size: 1.15rem; color: var(--text-muted); max-width: 560px; }
.lead strong { color: var(--text); }
.hero__actions { display: flex; gap: 14px; margin: 28px 0 14px; flex-wrap: wrap; }
.hero__note { font-size: .9rem; color: var(--text-muted); margin: 0; }

.hero__card { display: flex; justify-content: center; }
.chat-preview {
  width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
}
.chat-preview__head, .demo-widget__head {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
  font-weight: 600; font-size: .9rem;
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 25%, transparent); }
.chat-preview__body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.bubble { padding: 10px 14px; border-radius: 14px; font-size: .95rem; max-width: 85%; }
.bubble--in { background: var(--surface-2); align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble--out { background: var(--accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }

@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding: 40px 0 24px; }
}

/* --- Полоса цифр --- */
.stats { padding: 8px 0 40px; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.stat__num { font-size: 2.1rem; font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: 8px; }
.stat__label { font-size: .92rem; color: var(--text-muted); }
.stats__source { font-size: .78rem; color: var(--text-muted); margin-top: 16px; }
@media (max-width: 860px) { .stats__grid { grid-template-columns: repeat(2, 1fr); } }

/* --- Секции --- */
.section { padding: 64px 0; }
.section--alt { background: var(--bg-alt); }
.section__intro { color: var(--text-muted); font-size: 1.1rem; max-width: 720px; margin: 0 0 32px; }

/* --- Карточки --- */
.cards { display: grid; gap: 20px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow);
}
.card__icon { font-size: 1.8rem; margin-bottom: 12px; }
.card p { color: var(--text-muted); margin: 0; }
@media (max-width: 780px) { .cards--3 { grid-template-columns: 1fr; } }

/* --- Шаги --- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); }
.step { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.step__num {
  flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); font-weight: 800; display: grid; place-items: center; font-size: 1.1rem;
}
.step p { color: var(--text-muted); margin: 0; }
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } }

/* --- Сравнение --- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.compare__col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.compare__col--us { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.ticklist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.ticklist li { position: relative; padding-left: 28px; color: var(--text-muted); }
.ticklist li strong { color: var(--text); }
.ticklist--yes li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 800; }
.ticklist--neutral li::before { content: "•"; position: absolute; left: 6px; color: var(--text-muted); font-weight: 800; }
.callout {
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--text); padding: 18px 22px; border-radius: var(--radius); font-size: 1.05rem; margin: 0;
}
@media (max-width: 780px) { .compare { grid-template-columns: 1fr; } }

/* --- Битрикс блок --- */
.bitrix { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.bitrix__flow { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.flow-node {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 18px; text-align: center; font-weight: 600; box-shadow: var(--shadow);
}
.flow-node--accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.flow-arrow { text-align: center; color: var(--text-muted); font-size: 1.2rem; }
@media (max-width: 780px) { .bitrix { grid-template-columns: 1fr; } }

/* --- Демо-виджет --- */
.demo-widget {
  max-width: 620px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
}
.demo-widget__log {
  padding: 18px; min-height: 220px; max-height: 360px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
}
.demo-widget__form { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--border); background: var(--surface-2); }
.demo-widget__form input {
  flex: 1; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-family: inherit; font-size: 1rem;
}
.demo-widget__form input:focus { outline: none; border-color: var(--accent); }
.demo-widget__hints { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; background: var(--surface-2); }
.hint-chip {
  background: var(--bg); border: 1px solid var(--border); color: var(--text-muted);
  padding: 7px 12px; border-radius: 999px; font-size: .85rem; cursor: pointer; transition: all .15s;
}
.hint-chip:hover { border-color: var(--accent); color: var(--accent); }
.typing { font-style: italic; color: var(--text-muted); }

/* --- Тарифы --- */
.pricing { align-items: start; }
.price-card { position: relative; display: flex; flex-direction: column; }
.price-card--featured { border-color: var(--accent); box-shadow: var(--shadow-lg); }
.price-card__badge {
  position: absolute; top: -12px; right: 20px; background: var(--accent); color: #fff;
  font-size: .78rem; font-weight: 700; padding: 4px 12px; border-radius: 999px;
}
.price-card__price { font-size: 2rem; font-weight: 800; margin: 6px 0 12px; }
.price-card__price span { font-size: .95rem; font-weight: 500; color: var(--text-muted); }
.price-card .ticklist { flex: 1; margin-bottom: 20px; }

/* --- CTA --- */
.cta { background:
    radial-gradient(900px 400px at 10% 0%, var(--accent-soft), transparent 60%); }
.cta__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.cta__text p { color: var(--text-muted); font-size: 1.1rem; }
.lead-form {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-lg);
}
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field input[type="text"], .field input[type="tel"] {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-family: inherit; font-size: 1rem;
}
.field input:focus { outline: none; border-color: var(--accent); }
.field input.invalid { border-color: #f04438; }
.req { color: #f04438; margin-left: 2px; }
.field--consent { margin-top: 4px; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .88rem; color: var(--text-muted); cursor: pointer; }
.checkbox input { margin-top: 3px; flex: none; width: 18px; height: 18px; accent-color: var(--accent); }
.lead-form__status { font-size: .9rem; margin: 12px 0 0; min-height: 1.2em; }
.lead-form__status.ok { color: var(--success); }
.lead-form__status.err { color: #f04438; }
.lead-form__fineprint { font-size: .78rem; color: var(--text-muted); margin: 12px 0 0; }
@media (max-width: 780px) { .cta__inner { grid-template-columns: 1fr; } }

/* --- Подвал --- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 44px 0; }
.footer__inner { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 30px; }
.footer__brand { display: flex; flex-direction: column; gap: 4px; }
.footer__brand .brand__mark { font-size: 1.4rem; }
.footer__brand .brand__name { font-weight: 800; font-size: 1.2rem; }
.footer__tagline { color: var(--text-muted); font-size: .9rem; margin: 6px 0 0; }
.footer__links { display: flex; flex-direction: column; gap: 8px; }
.footer__links a { color: var(--text-muted); font-size: .9rem; }
.footer__legal { font-size: .82rem; color: var(--text-muted); }
.footer__copy { margin-top: 12px; }
@media (max-width: 780px) { .footer__inner { grid-template-columns: 1fr; } }

/* --- Cookie-баннер --- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 100;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); max-width: 720px; margin: 0 auto;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner__inner { display: flex; gap: 18px; align-items: center; padding: 18px 20px; flex-wrap: wrap; }
.cookie-banner__text { margin: 0; font-size: .88rem; color: var(--text-muted); flex: 1; min-width: 260px; }
.cookie-banner__actions { display: flex; gap: 10px; }
@media (max-width: 520px) { .cookie-banner__actions { width: 100%; } .cookie-banner__actions .btn { flex: 1; } }
