/* ===== ТЕМА: все цвета здесь ===== */
:root {
  --bg: #f6f7fb;
  --bg-alt: #eef0f7;
  --surface: #ffffff;
  --text: #141726;
  --muted: #5b6178;
  --line: #dde1ee;
  --accent: #5b5bf0;
  --accent-2: #19c3a6;
  --accent-text: #ffffff;
  --chat-bg: #e8edf6;
  --bubble-bot: #ffffff;
  --bubble-user: #d9f4ea;
  --shadow: 0 10px 30px rgba(20, 23, 38, .08);
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1020;
    --bg-alt: #14172b;
    --surface: #1a1e36;
    --text: #eef0fa;
    --muted: #a1a7c4;
    --line: #2a2f4d;
    --accent: #7c7cff;
    --accent-2: #2fe0c0;
    --chat-bg: #111427;
    --bubble-bot: #1f2442;
    --bubble-user: #1d3d38;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  }
}
:root[data-theme="dark"] {
  --bg: #0e1020; --bg-alt: #14172b; --surface: #1a1e36; --text: #eef0fa; --muted: #a1a7c4;
  --line: #2a2f4d; --accent: #7c7cff; --accent-2: #2fe0c0; --chat-bg: #111427;
  --bubble-bot: #1f2442; --bubble-user: #1d3d38; --shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

/* ===== БАЗА ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 "Manrope", system-ui, sans-serif;
  overflow-x: hidden;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.1rem; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.section { padding: 80px 0; }
.section--alt { background: var(--bg-alt); }
.sub { color: var(--muted); margin: 0 0 32px; }
.eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; margin: 0 0 12px; }
.accent { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.note { color: var(--muted); font-size: .92rem; border-left: 3px solid var(--accent-2); padding-left: 12px; }

/* ===== КНОПКИ ===== */
.btn {
  display: inline-block; background: var(--accent); color: var(--accent-text); border: 2px solid var(--accent);
  padding: 12px 22px; border-radius: 12px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--small { padding: 8px 16px; }

/* ===== ШАПКА ===== */
.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar__inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: var(--text); text-decoration: none; margin-right: auto; }
.logo small { color: var(--muted); font-weight: 500; }
.logo__dot { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.nav { display: flex; gap: 20px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--text); }
.burger { display: none; background: none; border: 0; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* ===== ГЛАВНЫЙ ЭКРАН ===== */
.hero { padding: 72px 0 80px; }
.hero__grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.lead { font-size: 1.15rem; color: var(--muted); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .9rem; }
.phone { background: var(--chat-bg); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); padding: 16px; height: 440px; display: flex; flex-direction: column; }
.phone__head { font-weight: 700; padding: 4px 8px 12px; border-bottom: 1px solid var(--line); }
.phone__feed { flex: 1; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding-top: 10px; }
.mini-lead { background: var(--bubble-bot); border-radius: 14px; padding: 10px 12px; font-size: .86rem; animation: pop .4s ease; }
.mini-lead b { color: var(--accent); }
.mini-lead small { display: block; color: var(--muted); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

/* ===== ДЕМО ===== */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tab { background: var(--surface); border: 1px solid var(--line); color: var(--text); padding: 10px 16px; border-radius: 12px; font: inherit; font-weight: 600; cursor: pointer; }
.tab.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.demo { display: grid; grid-template-columns: 420px 1fr; gap: 32px; align-items: start; }
.chat { background: var(--chat-bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; height: 520px; overflow: hidden; }
.chat__head { display: flex; gap: 10px; align-items: center; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.chat__head small { display: block; color: var(--muted); font-size: .8rem; }
.chat__avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--bg-alt); display: grid; place-items: center; }
.chat__body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 85%; padding: 9px 13px; border-radius: 14px; white-space: pre-line; font-size: .94rem; animation: pop .3s ease; }
.msg--bot { background: var(--bubble-bot); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg--user { background: var(--bubble-user); align-self: flex-end; border-bottom-right-radius: 4px; }
.msg--typing { color: var(--muted); font-style: italic; }
.chat__buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; background: var(--surface); border-top: 1px solid var(--line); }
.chat__buttons button { background: var(--bg-alt); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 9px; font: inherit; font-size: .9rem; cursor: pointer; }
.chat__buttons button:hover { border-color: var(--accent); }
.demo__info h3 { font-size: 1.4rem; }
.demo__info ul { padding-left: 20px; }
.demo__info .btn { margin-top: 12px; }

/* ===== ЛИД-РАДАР ===== */
.two { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.steps { padding-left: 20px; }
.steps li { margin-bottom: 8px; }
.leadcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; display: grid; gap: 6px; }
.leadcard__title { font-weight: 800; font-size: 1.1rem; }
.leadcard p { background: var(--bg-alt); border-radius: 12px; padding: 12px; margin: 8px 0; }
.leadcard__demo { color: var(--muted); }

/* ===== УСЛУГИ ===== */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__icon { font-size: 1.8rem; }
.card p { color: var(--muted); margin: 0; font-size: .94rem; }

/* ===== ЦЕНЫ ===== */
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.price { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; }
.price--hot { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.price__sum { font-size: 2rem; font-weight: 800; margin: 0 0 12px; }
.price__sum span { font-size: 1rem; color: var(--muted); font-weight: 500; }
.price ul { padding-left: 20px; margin: 0 0 24px; flex: 1; }
.price .btn { text-align: center; }
.badge { position: absolute; top: -12px; left: 24px; background: var(--accent); color: var(--accent-text); font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }

/* ===== КЕЙСЫ ===== */
.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.case { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.case__shot { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.case__shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .3s; }
a.case__shot:hover img { transform: scale(1.03); }
.case__body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.case__body > p { color: var(--muted); margin: 0 0 12px; }
.case__tag { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent) !important; margin: 0 0 6px !important; }
.case h3 { margin: 0 0 8px; font-size: 1.25rem; }
.case ul { padding-left: 20px; margin: 0 0 20px; flex: 1; }
.case li { margin-bottom: 6px; }
.case__actions { display: flex; flex-wrap: wrap; gap: 10px; }
/* широкая карточка: картинка слева, текст справа */
.case--wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.15fr 1fr; }
.case--wide .case__shot { aspect-ratio: auto; height: 100%; border-bottom: none; border-right: 1px solid var(--line); }
.case--wide .case__shot img { object-position: left top; }

/* ===== КАК РАБОТАЕМ ===== */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.flow > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.flow b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; margin-bottom: 12px; }
.flow p { color: var(--muted); margin: 0; }

/* ===== FAQ ===== */
details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 10px; }
summary { font-weight: 700; cursor: pointer; }
details p { color: var(--muted); margin: 10px 0 0; }

/* ===== ФОРМА ===== */
.form { display: grid; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.form label { display: grid; gap: 6px; font-weight: 600; }
.form input, .form textarea { font: inherit; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.form fieldset { border: 1px solid var(--line); border-radius: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; }
.form legend { font-weight: 600; padding: 0 6px; }
.form .check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.form__alt { color: var(--muted); margin: 0; text-align: center; }

/* ===== ПОДВАЛ ===== */
.footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); }
.footer__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ===== АДАПТИВ ===== */
@media (max-width: 960px) {
  .hero__grid, .two, .demo { grid-template-columns: 1fr; }
  .grid, .flow { grid-template-columns: repeat(2, 1fr); }
  .prices, .cases, .case--wide { grid-template-columns: 1fr; }
  .case--wide .case__shot { aspect-ratio: 16 / 9; border-right: none; border-bottom: 1px solid var(--line); }
  .phone { height: 360px; }
}
@media (max-width: 720px) {
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--surface); border-bottom: 1px solid var(--line); }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 16px; border-top: 1px solid var(--line); }
  .burger { display: block; }
  .topbar .btn--small { display: none; }
  .grid, .flow, .form fieldset { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .chat { height: 480px; }
}
