/* Капитайм — лендинг. Раскладка: одна колонка до 1120px, разделы с крупным
   ритмом; одно смелое место — тёмный блок героя с «живой» карточкой сделки.
   Цвета только через токены (ADR-010). Шрифты системные: CDN запрещён. */
:root {
  --bg: #f3f5f9;
  --surface: #ffffff;
  --ink: #121a2b;
  --muted: #5b6577;
  --line: #d8deea;
  --gold: #c98f12;       /* капитал */
  --gold-ink: #7a5407;
  --gold-soft: #fbf1d6;
  --time: #1c6f78;       /* время */
  --time-soft: #dcefef;
  --hero: #0f1a30;
  --hero-ink: #eef2f8;
  --hero-muted: #9fb0c8;
  --danger: #a83a2a;
  --ok: #1f7a3a;
  --font-body: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font-body);
  --radius: 14px;
  --maxw: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220; --surface: #121a2b; --ink: #e8ecf3; --muted: #9aa6ba; --line: #26324a;
    --gold: #e0a92a; --gold-ink: #f3cf7a; --gold-soft: #2a2410; --time: #4bb3bd; --time-soft: #0f2a2e;
    --hero: #070d1a; --hero-ink: #eef2f8; --hero-muted: #9fb0c8; --danger: #e07a6a; --ok: #5fc27a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1220; --surface: #121a2b; --ink: #e8ecf3; --muted: #9aa6ba; --line: #26324a;
  --gold: #e0a92a; --gold-ink: #f3cf7a; --gold-soft: #2a2410; --time: #4bb3bd; --time-soft: #0f2a2e;
  --hero: #070d1a; --hero-ink: #eef2f8; --hero-muted: #9fb0c8; --danger: #e07a6a; --ok: #5fc27a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--time); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5.2vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0; }
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 20px; }
.section { padding-block: clamp(48px, 8vw, 96px); }
.section + .section { border-top: 1px solid var(--line); }
.eyebrow { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 700; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 62ch; }
.stack { display: grid; gap: 18px; }
.num { font-variant-numeric: tabular-nums; }

/* Шапка */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.brand svg { width: 32px; height: 32px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.top nav a { text-decoration: none; color: var(--muted); padding: 10px 10px; border-radius: 8px; font-weight: 600; min-height: 40px; display: inline-flex; align-items: center; }
.top nav a:hover { color: var(--ink); background: var(--surface); }
.lang { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px !important; font-size: 0.9rem; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 1rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-family: inherit; transition: transform .08s ease, background .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: #1a1200; border-color: var(--gold); }
.btn-gold:hover { background: color-mix(in srgb, var(--gold) 85%, #000); }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-ghost:hover { background: color-mix(in srgb, currentColor 10%, transparent); }

/* Герой */
.hero { background: var(--hero); color: var(--hero-ink); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding-block: clamp(56px, 9vw, 120px); }
.hero .eyebrow { color: var(--gold); }
.hero .lead { color: var(--hero-muted); }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { color: var(--hero-muted); font-size: 0.95rem; }
.hero .btn-ghost { color: var(--hero-ink); }
.hero .deal .btn-ghost { color: var(--ink); border-color: var(--line); }
.hero .deal .btn-ghost:disabled { color: var(--muted); cursor: default; }

/* Живая карточка сделки */
.deal { background: var(--surface); color: var(--ink); border-radius: var(--radius); box-shadow: 0 30px 60px rgba(0,0,0,.35); overflow: hidden; min-width: 0; }
.deal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; background: var(--gold-soft); color: var(--gold-ink); font-weight: 700; font-size: 0.9rem; }
.deal-body { padding: 18px; display: grid; gap: 14px; }
.deal-title { font-size: 1.25rem; font-weight: 800; }
.deal-text { color: var(--muted); font-size: 0.98rem; }
.deal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.deal-cell { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.deal-cell .k { font-size: 0.75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.deal-cell .v { font-size: 1.15rem; font-weight: 800; }
.deal-cell.hidden-q .v { color: var(--time); }
.deal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.deal-foot small { color: var(--muted); }
.deal .btn { min-height: 44px; padding: 8px 16px; font-size: 0.95rem; }
.sig { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--muted); }
.sig .bar { flex: 1; height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.sig .bar i { display: block; height: 100%; background: var(--time); transition: width .35s ease; }

/* Сетки карточек */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.card .icon { width: 40px; height: 40px; color: var(--gold); }
.card h3 { margin-top: 4px; }
.card p { color: var(--muted); }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; background: var(--time-soft); color: var(--time); }
.pill-gold { background: var(--gold-soft); color: var(--gold-ink); }

/* Сравнение «было / стало» */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.compare .card { border-top: 4px solid var(--line); }
.compare .card.now { border-top-color: var(--gold); }
.compare ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--muted); }

/* Шаги */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { position: relative; padding-top: 10px; display: grid; gap: 8px; }
.step::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--time); color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; }
.step p { color: var(--muted); }

/* Форма */
.form-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 36px); display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.form-wrap .intro { display: grid; gap: 12px; align-content: start; }
.form-wrap .intro p { color: var(--muted); }
form { display: grid; gap: 14px; min-width: 0; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 0.95rem; }
.field .hint { font-size: 0.85rem; color: var(--muted); }
input, select, textarea { font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); min-height: 48px; width: 100%; }
textarea { min-height: 96px; resize: vertical; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.95rem; }
.check input { width: 22px; height: 22px; min-height: 0; margin-top: 2px; flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { border-radius: 10px; padding: 12px 14px; font-weight: 600; }
.msg-ok { background: color-mix(in srgb, var(--ok) 15%, var(--surface)); color: var(--ok); border: 1px solid var(--ok); }
.msg-err { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); border: 1px solid var(--danger); }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 760px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0; }
summary { cursor: pointer; font-weight: 700; padding: 16px 18px; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 48px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.4rem; color: var(--gold); line-height: 1; }
details[open] summary::after { content: "−"; }
details p { padding: 0 18px 16px; color: var(--muted); }

/* Подвал */
footer { border-top: 1px solid var(--line); padding-block: 36px; color: var(--muted); font-size: 0.92rem; }
footer .wrap { display: grid; gap: 14px; }
footer .links { display: flex; gap: 16px; flex-wrap: wrap; }
footer a { color: inherit; }

/* Правовые страницы */
.doc { max-width: 760px; }
.doc h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 18px; }
.doc h2 { font-size: 1.3rem; margin-top: 28px; margin-bottom: 10px; }
.doc p, .doc li { color: var(--ink); }
.doc ul { padding-left: 22px; display: grid; gap: 6px; }
.doc p + p { margin-top: 10px; }

/* Телефон — тем же селектором, что базовое правило, через медиа */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .grid-3, .steps { grid-template-columns: 1fr 1fr; }
  .form-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .grid-3, .grid-2, .compare, .steps, .row-2, .deal-grid { grid-template-columns: 1fr; }
  .top nav a:not(.lang):not(.btn) { display: none; }
  .deal { box-shadow: 0 16px 32px rgba(0,0,0,.3); }
}
