/* =========================================================
   Avtodev — лендинг
   Фирменные цвета и шрифты — в переменных ниже.
   ========================================================= */

:root {
  /* Палитра */
  --ink: #0F1B2D;          /* Графит: текст, тёмные секции */
  --ink-deep: #0B1422;     /* Футер */
  --primary: #1F4FD1;      /* Кобальт: кнопки, ссылки */
  --primary-hover: #163A9E;
  --primary-soft: #EAF0FD; /* Выделение полей */
  --primary-on-dark: #7FA2F5;
  --accent: #F2A53A;       /* Янтарь: только на тёмном фоне */
  --accent-on-light: #E0902B;
  --success: #1E7A4E;
  --ground: #F4F6F9;       /* Туман: фон секций */
  --line: #E3E7EE;         /* Рамки */
  --line-strong: #C9D1DD;
  --text-2: #3D4757;       /* Сланец: второстепенный текст */
  --text-3: #4A5568;
  --on-dark-2: #C5CEDB;

  /* Шрифты */
  --font-display: "Manrope", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Формы */
  --radius-btn: 8px;
  --radius-card: 12px;
  --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }

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

h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -0.02em; }
h1 { font-weight: 800; font-size: clamp(34px, 5vw, 58px); line-height: 1.08; letter-spacing: -0.025em; }
h2 { font-weight: 800; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; }
h3 { font-weight: 700; font-size: 20px; line-height: 1.3; }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-btn);
}
.skip-link:focus { top: 12px; color: #fff; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 880px; }
.stack { display: flex; flex-direction: column; gap: 40px; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--text-3); }
.small { font-size: 13px; }

.eyebrow {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-3);
}
.lead { font-size: 19px; color: var(--text-2); max-width: 560px; }
.section-head { display: flex; flex-direction: column; gap: 12px; }
.section-sub { font-size: 17px; color: var(--text-2); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px; border-radius: var(--radius-btn);
  font: 600 15px/1.2 var(--font-body); text-decoration: none; text-align: center;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 17px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--ink); color: var(--ink); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1c2c44; color: #fff; }
.btn-accent { background: var(--accent); color: var(--ink); font-weight: 700; }
.btn-accent:hover { background: #f5b65e; color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(6px);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.logo {
  font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -0.03em;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.logo:hover { color: var(--ink); }
.logo-dev { color: var(--primary); }
.logo-cursor { color: var(--accent-on-light); }
.logo-light { color: #fff; font-size: 22px; }
.logo-light .logo-dev { color: var(--primary-on-dark); }
.logo-light .logo-cursor { color: var(--accent); }

.header-menu { display: flex; align-items: center; gap: 32px; }
.nav { display: flex; gap: 24px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--primary); }
.header-actions { display: flex; gap: 12px; }

.menu-toggle {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line-strong); border-radius: var(--radius-btn);
  color: var(--ink); cursor: pointer;
}

@media (max-width: 1020px) {
  .menu-toggle { display: inline-flex; }
  .header-menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 20px;
    padding: 20px 24px 24px; background: #fff; border-bottom: 1px solid var(--line);
  }
  .header-menu.is-open { display: flex; }
  .nav { flex-direction: column; gap: 4px; }
  .nav a { padding: 10px 0; font-size: 17px; }
  .header-actions { flex-direction: column; }
}

/* ---------- Первый экран ---------- */
.hero { background: var(--ground); border-bottom: 1px solid var(--line); }
.hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 72px; padding-bottom: 80px; }
.hero-text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }

.checks { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 15px; color: var(--text-2); }
.checks li { display: flex; align-items: center; gap: 10px; }
.checks svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--success); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.app-window {
  flex: 1 1 460px; min-width: 0; position: relative;
  background: #fff; border: 1px solid #D5DCE6; border-radius: var(--radius-card);
  overflow: hidden; box-shadow: 0 1px 2px rgba(15,27,45,.06);
}
.app-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #FAFBFC; }
.app-title { font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.app-body { display: flex; flex-wrap: wrap; }
.app-fields { flex: 1 1 180px; padding: 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.app-label { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.app-doc { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.chip { padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: 13px; background: #fff; }
.chip-active { border: 2px solid var(--primary); background: var(--primary-soft); font-weight: 600; }
.app-canvas { flex: 2 1 240px; padding: 16px; background: var(--ground); }
.paper { background: #fff; border: 1px solid #D5DCE6; border-radius: 6px; padding: 18px; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.paper-head { display: flex; justify-content: space-between; align-items: center; }
.paper-title { font-weight: 700; font-size: 15px; }
.paper-logo { width: 44px; height: 22px; border-radius: 4px; background: var(--line); }
.slot { padding: 1px 6px; background: var(--primary-soft); border: 1px dashed var(--primary); border-radius: 4px; }
.slot-active { border: 2px solid var(--primary); font-weight: 600; }
.slot-empty { background: #fff; border-color: #9AA6B8; color: var(--text-3); font-weight: 500; }
.rule { height: 1px; background: var(--line); }
.paper-table { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; color: var(--text-3); }
.paper-table i { height: 8px; margin-top: 6px; background: var(--line); border-radius: 3px; }
.paper-total { text-align: right; font-weight: 700; }
.app-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); }
.app-build { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; }

.play-btn {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 22px 0 10px;
  border: 0; border-radius: 999px; background: var(--ink); color: #fff; cursor: pointer;
  font: 600 15px/1.2 var(--font-body); white-space: nowrap;
  box-shadow: 0 4px 16px rgba(15,27,45,.25); transition: transform .15s;
}
.play-btn:hover { transform: translate(-50%, -50%) scale(1.03); }
.play-icon { width: 40px; height: 40px; border-radius: 999px; background: var(--accent); display: inline-flex; align-items: center; justify-content: center; }
.play-icon svg { width: 16px; height: 16px; fill: var(--ink); }

/* ---------- Секции ---------- */
.section { padding: 88px 0; }
.section-tint { background: var(--ground); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--ink); color: #fff; }
.section-dark p { color: var(--on-dark-2); }
.section-dark a:not(.btn) { color: var(--accent); }

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .hero-row { padding-top: 48px; padding-bottom: 56px; gap: 40px; }
}

/* Таблица сравнения */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-card); }
.compare { width: 100%; min-width: 560px; border-collapse: collapse; }
.compare th, .compare td { text-align: left; padding: 18px 24px; }
.compare th { background: var(--ground); color: var(--text-3); font-weight: 600; width: 50%; }
.compare th.compare-us { background: var(--ink); color: #fff; }
.compare td { border-top: 1px solid var(--line); }
.compare td:first-child { color: var(--text-2); }
.compare td:last-child { font-weight: 600; }

/* Карточки */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.cards-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cards-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.card p { color: var(--text-2); font-size: 15px; }
.step-num { font-family: var(--font-mono); font-size: 14px; color: var(--primary); font-weight: 500; }

.example { border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; }
.example-img, .example img { height: 170px; width: 100%; object-fit: cover; background: var(--ground); display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: 13px; }
.example p { padding: 18px 20px; font-weight: 600; }

.features { gap: 32px; }
.features li { display: flex; flex-direction: column; gap: 10px; }
.features svg { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.features h3 { font-size: 19px; }
.features p { font-size: 15px; }

/* Для специалистов */
.split { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.split-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.pro-list { flex: 1 1 380px; min-width: 0; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--radius-card); }
.pro-list li { display: flex; gap: 14px; align-items: flex-start; padding: 20px 24px; }
.pro-list li + li { border-top: 1px solid var(--line); }
.arrow { font-family: var(--font-mono); color: var(--primary); font-size: 14px; padding-top: 2px; }

/* Цены */
.price { gap: 14px; }
.price h3 { font-size: 18px; }
.price-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.price-value { font-family: var(--font-display); font-size: 36px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink) !important; }
.price-main { border: 2px solid var(--primary); }
.badge { font-size: 12px; font-weight: 600; color: #fff; background: var(--primary); padding: 4px 10px; border-radius: 999px; }
.guarantee { display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card); padding: 24px 28px; font-size: 17px; }
.guarantee svg { flex: none; width: 24px; height: 24px; margin-top: 2px; fill: none; stroke: var(--success); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary {
  cursor: pointer; list-style: none; font-weight: 600; font-size: 18px;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); font-size: 22px; color: var(--primary); flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 12px; color: var(--text-2); }

/* Финальный призыв */
.cta { padding: 80px 0; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; }
.cta-row > div { flex: 1 1 480px; display: flex; flex-direction: column; gap: 12px; }
.cta p { font-size: 17px; }

/* Футер */
.site-footer { background: var(--ink-deep); color: #9FABBD; font-size: 14px; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 24px; padding-top: 40px; padding-bottom: 40px; }
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-nav a { color: var(--on-dark-2); }
.footer-nav a:hover { color: #fff; }

/* Видео */
.video-dialog { border: 0; padding: 0; background: transparent; max-width: min(960px, 92vw); width: 100%; }
.video-dialog::backdrop { background: rgba(11,20,34,.82); }
.video-box { position: relative; background: #000; border-radius: var(--radius-card); overflow: hidden; aspect-ratio: 16 / 9; }
.video-box video, .video-box iframe { width: 100%; height: 100%; border: 0; }
.video-close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 44px; height: 44px;
  border: 0; border-radius: 999px; background: rgba(255,255,255,.92); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.video-close svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }

/* Cookie */
.cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; margin: 0 auto; max-width: 720px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 16px 20px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card);
  box-shadow: 0 8px 24px rgba(15,27,45,.12); font-size: 14px; color: var(--text-2);
}
.cookie[hidden] { display: none; }
.cookie p { flex: 1 1 320px; }
