/* ─── Тема: тёмная по умолчанию, светлая — по настройкам ОС ─────────────────── */
:root {
  --bg: #0b0f17;
  --bg-2: #111725;
  --card: #131b2b;
  --border: rgba(255, 255, 255, 0.08);
  --fg: #f2f5fb;
  --muted: #9aa6bd;
  --brand: #2b7fff;
  --brand-2: #7b61ff;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --glow: rgba(43, 127, 255, 0.18);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f8fd;
    --bg-2: #eef2fa;
    --card: #ffffff;
    --border: rgba(15, 23, 42, 0.08);
    --fg: #0c1220;
    --muted: #5b6678;
    --shadow: 0 18px 50px rgba(43, 76, 140, 0.12);
    --glow: rgba(43, 127, 255, 0.12);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
/* Амбиентные блики на фоне */
body::before {
  content: '';
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 60vh;
  background: radial-gradient(45% 60% at 30% 0%, var(--glow), transparent 70%),
              radial-gradient(40% 55% at 80% 10%, rgba(123, 97, 255, 0.16), transparent 70%);
  z-index: -1;
  pointer-events: none;
}
a { color: var(--brand); text-decoration: none; transition: opacity 0.15s, color 0.15s; }
a:hover { opacity: 0.85; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.doc { max-width: 760px; }

/* Header */
header { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom: 1px solid var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-right { display: flex; align-items: center; gap: 20px; }
.navlink { color: var(--muted); font-weight: 600; font-size: 15px; }
.navlink:hover { color: var(--fg); opacity: 1; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; color: var(--fg); }
.logo .mark { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); display: grid; place-items: center; color: #fff; font-weight: 800; box-shadow: 0 6px 16px var(--glow); }
.btn { display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(135deg, var(--brand), #3a6dff); color: #fff; font-weight: 600; padding: 12px 22px; border-radius: 12px; transition: transform 0.18s cubic-bezier(.2,.8,.2,1), box-shadow 0.18s, opacity 0.15s; border: 0; cursor: pointer; font-size: 15px; box-shadow: 0 8px 22px var(--glow); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px var(--glow); opacity: 1; }
.btn:active { transform: translateY(0); }
.btn.ghost { background: var(--bg-2); border: 1px solid var(--border); color: var(--fg); box-shadow: none; }

/* Hero — минимализм */
.hero { text-align: center; padding: 100px 0 76px; }
.hero h1 { font-size: clamp(34px, 6.2vw, 60px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.hero h1 .grad { background: linear-gradient(120deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { max-width: 600px; margin: 22px auto 34px; font-size: clamp(16px, 2.4vw, 20px); color: var(--muted); }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Sections */
.section { padding: 60px 0; }
.section h2 { font-size: clamp(26px, 4vw, 40px); font-weight: 800; letter-spacing: -0.02em; text-align: center; margin-bottom: 12px; }
.section .sub { text-align: center; color: var(--muted); max-width: 580px; margin: 0 auto 44px; font-size: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 26px; transition: transform 0.25s cubic-bezier(.2,.8,.2,1), box-shadow 0.25s, border-color 0.25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); }
.card .ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 23px; margin-bottom: 16px; }
.card h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 15px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.step { background: var(--bg-2); border: 1px solid var(--border); border-radius: 18px; padding: 24px; transition: transform 0.25s, box-shadow 0.25s; }
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.step .n { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 700; display: grid; place-items: center; margin-bottom: 14px; box-shadow: 0 6px 16px var(--glow); }
.step h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 15px; }

/* CTA band */
.band { text-align: center; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 16%, transparent), color-mix(in srgb, var(--brand-2) 16%, transparent)); border: 1px solid var(--border); border-radius: 26px; padding: 56px 24px; margin: 28px 0; }

/* Pricing */
.seg { display: flex; width: max-content; margin: 0 auto 22px; padding: 5px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px; gap: 4px; }
.seg button { border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 15px; padding: 9px 20px; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: background 0.18s, color 0.18s; }
.seg button.on { background: linear-gradient(135deg, var(--brand), #3a6dff); color: #fff; box-shadow: 0 6px 16px var(--glow); }
.seg-badge { font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.22); }
.seg button:not(.on) .seg-badge { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); }

.calc { max-width: 640px; margin: 0 auto 30px; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 22px 24px; }
.calc-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.calc-turnover { font-size: 20px; font-weight: 800; color: var(--fg); letter-spacing: -0.02em; }
.calc-slider { width: 100%; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 999px; background: var(--bg-2); outline: none; cursor: pointer; }
.calc-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 4px 12px var(--glow); cursor: pointer; }
.calc-slider::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--brand); box-shadow: 0 4px 12px var(--glow); cursor: pointer; }
.calc-out { margin-top: 16px; }
.calc-line { font-size: 16px; }
.calc-line b { color: var(--fg); }
.calc-save { margin-top: 6px; font-size: 13.5px; color: #12b76a; font-weight: 600; }

.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.plan { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 28px 24px; transition: transform 0.25s cubic-bezier(.2,.8,.2,1), box-shadow 0.25s, border-color 0.25s; }
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.plan.featured { border-color: color-mix(in srgb, var(--brand) 55%, var(--border)); box-shadow: 0 18px 50px var(--glow); }
.plan-badge { position: absolute; top: -12px; left: 24px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; box-shadow: 0 6px 16px var(--glow); }
.plan-name { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.plan-tag { color: var(--muted); font-size: 14px; margin-top: 2px; }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin-top: 18px; }
.plan-price .amount { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; }
.plan-price .per { color: var(--muted); font-size: 15px; }
.plan-sub { color: #12b76a; font-size: 13px; margin-top: 5px; font-weight: 600; }
.plan-note { color: var(--muted); font-size: 13.5px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.plan-feats { list-style: none; margin: 14px 0 20px; display: grid; gap: 9px; }
.plan-feats li { position: relative; padding-left: 26px; font-size: 14.5px; color: var(--fg); }
.plan-feats li::before { content: "✓"; position: absolute; left: 0; top: -1px; color: var(--brand); font-weight: 800; }
.plan-cta { width: 100%; justify-content: center; }
.pricing-foot { text-align: center; color: var(--muted); font-size: 13px; margin: 22px auto 0; max-width: 680px; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 38px 0; color: var(--muted); font-size: 14px; }
.foot { display: flex; flex-wrap: wrap; gap: 18px 28px; justify-content: space-between; align-items: center; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--fg); }
.foot .links { display: flex; flex-wrap: wrap; gap: 18px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s cubic-bezier(.2,.8,.2,1), transform 0.7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Doc pages */
.doc h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; margin: 44px 0 6px; }
.doc .upd { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.doc h2 { font-size: 20px; font-weight: 700; margin: 28px 0 10px; }
.doc p, .doc li { color: var(--fg); font-size: 15.5px; margin-bottom: 10px; }
.doc ul, .doc ol { padding-left: 22px; margin-bottom: 12px; }
.doc a.back { display: inline-block; margin: 28px 0; }
