/* ============================================================
   Дмитрий Волынский — PPC автоматизация
   Дизайн-система: тёмная, технологичная, data-driven
   Type: Manrope (display/body, Cyrillic) + JetBrains Mono (data)
   ============================================================ */

:root {
  /* surfaces — холодный почти-чёрный */
  --bg:        oklch(0.155 0.012 255);
  --bg-elev:   oklch(0.185 0.013 255);
  --bg-card:   oklch(0.205 0.014 255);
  --bg-card-2: oklch(0.235 0.015 255);
  --line:      oklch(0.32 0.016 255);
  --line-soft: oklch(0.27 0.014 255);

  /* ink */
  --text:      oklch(0.97 0.004 255);
  --text-muted:oklch(0.72 0.012 255);
  --text-dim:  oklch(0.55 0.013 255);

  /* accent — задаётся через Tweaks (неон) */
  --accent:    #C6F24E;
  --accent-ink:#0d1505;            /* тёмный текст на акценте */
  --accent-glow: color-mix(in oklch, var(--accent) 38%, transparent);
  --accent-faint: color-mix(in oklch, var(--accent) 12%, transparent);
  --accent-line: color-mix(in oklch, var(--accent) 45%, var(--line));

  --radius:    14px;
  --radius-lg: 22px;
  --maxw:      1200px;

  --font-sans: "Manrope", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --font-display: "Manrope", system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  /* тонкая сетка + виньетка */
  background-image:
    radial-gradient(1100px 700px at 78% -10%, var(--accent-faint), transparent 60%),
    linear-gradient(to right, color-mix(in oklch, var(--line) 40%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklch, var(--line) 40%, transparent) 1px, transparent 1px);
  background-size: 100% 100%, 64px 64px, 64px 64px;
  background-attachment: fixed, fixed, fixed;
}

::selection { background: var(--accent); color: var(--accent-ink); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: clamp(64px, 9vw, 132px) 0; position: relative; }
.section-head { max-width: 720px; margin-bottom: 52px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--accent);
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.04; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h2.title { font-size: clamp(30px, 4.2vw, 52px); }
h3 { font-weight: 700; letter-spacing: -0.01em; }
p { text-wrap: pretty; }
.lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--text-muted); line-height: 1.55; }

.mono { font-family: var(--font-mono); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15.5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .2s, border-color .2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px -8px var(--accent-glow);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- nav ---------- */
header.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in oklch, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
header.nav.scrolled { border-color: var(--line-soft); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; font-size: 15px; }
.brand .mark {
  width: 36px; height: 36px; flex-shrink: 0;
  display: block; position: relative;
}
.brand .mark svg { width: 36px; height: 36px; overflow: visible; }
.brand .mark .glyph { filter: drop-shadow(0 0 6px var(--accent-glow)); }
/* logo variants — switch via body[data-logo] (Tweaks) */
.logo-mono, .logo-signal { display: none; }
body[data-logo="mono"] .logo-mono { display: block; }
body[data-logo="signal"] .logo-signal { display: block; }
.brand .who { display: flex; flex-direction: column; line-height: 1.15; }
.brand .who small { display: none; }
footer.foot .brand { font-size: 16px; }
footer.foot .brand .who small { display: block; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a { font-size: 14px; color: var(--text-muted); transition: color .2s; position: relative; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 10px; }

/* language switch */
.lang {
  display: flex; align-items: center;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 2px; gap: 0;
  font-family: var(--font-mono);
  height: 36px;
}
.lang button {
  border: 0; background: transparent; color: var(--text-dim);
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em;
  padding: 0 11px; height: 30px; border-radius: 999px; cursor: pointer;
  transition: color .18s, background .18s;
}
.lang button.active { background: var(--accent); color: var(--accent-ink); }
.lang button:not(.active):hover { color: var(--text); }

.nav-toggle { display: none; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 999px; background: transparent; place-items: center; cursor: pointer; flex-shrink: 0; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(48px, 7vw, 92px); padding-bottom: clamp(56px, 8vw, 104px); position: relative; overflow: clip; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
}
.hero h1 { font-size: clamp(40px, 6vw, 76px); }
.hero h1 .hl { color: var(--accent); }
.hero .lead { margin: 26px 0 34px; max-width: 540px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.metrics-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; margin-top: 48px;
  border-top: 1px solid var(--line-soft);
}
.metric { padding: 22px 18px 4px 0; }
.metric .num { font-family: var(--font-mono); font-weight: 700; font-size: clamp(26px, 3vw, 34px); color: var(--text); letter-spacing: -0.02em; }
.metric .num .suf { color: var(--accent); }
.metric .lbl { font-size: 12.5px; color: var(--text-dim); margin-top: 4px; line-height: 1.35; }

/* hero dashboard mock */
.dash {
  background: linear-gradient(180deg, var(--bg-card-2), var(--bg-card));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 40px 90px -50px rgba(0,0,0,0.9), inset 0 1px 0 color-mix(in oklch, #fff 6%, transparent);
  position: relative;
  overflow: hidden;
}
.dash::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px 200px at 90% -10%, var(--accent-faint), transparent 70%);
  pointer-events: none;
}
.dash-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.dash-top .dots { display: flex; gap: 6px; }
.dash-top .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: block; }
.dash-top .tag { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; color: var(--text-dim); text-transform: uppercase; display: flex; align-items: center; gap: 7px; }
.dash-top .tag .live { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent-glow); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 var(--accent-glow);} 70%{box-shadow:0 0 0 8px transparent;} 100%{box-shadow:0 0 0 0 transparent;} }

.dash-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.dash-tile { background: var(--bg-elev); border: 1px solid var(--line-soft); border-radius: 12px; padding: 13px 14px; }
.dash-tile .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.dash-tile .v { font-family: var(--font-mono); font-weight: 700; font-size: 22px; margin-top: 5px; letter-spacing: -0.02em; }
.dash-tile .v .up { color: var(--accent); font-size: 13px; }
.dash-tile .v .down { color: var(--accent); font-size: 13px; }

.dash-chart { background: var(--bg-elev); border: 1px solid var(--line-soft); border-radius: 12px; padding: 16px 16px 12px; }
.dash-chart .ch-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.dash-chart .ch-head .t { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.dash-chart .ch-head .d { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 96px; }
.bars .bar { flex: 1; border-radius: 5px 5px 2px 2px; background: var(--line); transition: height 1s var(--ease); }
.bars .bar.on { background: linear-gradient(180deg, var(--accent), color-mix(in oklch, var(--accent) 45%, var(--bg-elev))); box-shadow: 0 0 18px -4px var(--accent-glow); }

.dash-log { margin-top: 14px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); line-height: 1.9; }
.dash-log .row { display: flex; gap: 9px; align-items: center; }
.dash-log .row .ok { color: var(--accent); }

/* hero layout variant: centered / focus */
body[data-hero="focus"] .hero-grid { grid-template-columns: 1fr; text-align: center; max-width: 880px; margin: 0 auto; }
body[data-hero="focus"] .dash-col { display: none; }
body[data-hero="focus"] .hero .lead { margin-left: auto; margin-right: auto; }
body[data-hero="focus"] .hero-cta { justify-content: center; }
body[data-hero="focus"] .hero h1 { font-size: clamp(44px, 7vw, 88px); }
body[data-hero="focus"] .metrics-row { max-width: 760px; margin-left: auto; margin-right: auto; }
body[data-hero="focus"] .metric { text-align: center; padding-left: 0; }
body[data-hero="focus"] .metric .num { display: block; }

/* background grid toggle */
body[data-grid="off"] {
  background-image: radial-gradient(1100px 700px at 78% -10%, var(--accent-faint), transparent 60%);
}

/* ---------- trust strip ---------- */
.trust { border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 30px 0; }
.trust .wrap { display: flex; align-items: center; gap: 36px; flex-wrap: wrap; }
.trust .label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); }
.trust .logos { display: flex; gap: 14px 28px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.trust .logos span { font-weight: 700; color: var(--text-muted); font-size: 16px; letter-spacing: -0.01em; opacity: 0.85; transition: color .2s, opacity .2s; }
.trust .logos span:hover { color: var(--text); opacity: 1; }
.trust .logos .tool { font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; color: var(--text-dim); border: 1px solid var(--line-soft); border-radius: 999px; padding: 5px 13px; }

/* ---------- services ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .25s var(--ease), border-color .25s, background .25s;
  position: relative;
  overflow: hidden;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent-line); }
.card .idx { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); letter-spacing: 0.1em; }
.svc .ico {
  width: 46px; height: 46px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg-elev);
  display: grid; place-items: center; margin-bottom: 20px; color: var(--accent);
}
.svc .ico svg { width: 22px; height: 22px; }
.svc h3 { font-size: 20px; margin-bottom: 10px; }
.svc p { color: var(--text-muted); font-size: 15px; margin: 0; line-height: 1.55; }
.svc .tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.svc .tags span { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); border: 1px solid var(--line-soft); border-radius: 6px; padding: 3px 9px; }

/* ---------- cases ---------- */
.cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.case { display: flex; flex-direction: column; min-height: 260px; }
.case .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.case .brandname { font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.case .role { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.case .case-what { font-size: clamp(20px, 2.1vw, 25px); font-weight: 700; letter-spacing: -0.02em; color: var(--accent); line-height: 1.15; margin: auto 0 12px; text-wrap: balance; }
.case p { color: var(--text-muted); font-size: 14.5px; margin: 0; line-height: 1.55; }

/* ---------- process ---------- */
.process-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; counter-reset: step; }
.step { padding: 26px 22px 26px 0; border-top: 2px solid var(--line); position: relative; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-mono); font-weight: 700; font-size: 13px; color: var(--accent);
  position: absolute; top: -2px; left: 0; padding-top: 16px;
}
.step .pmark { position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.step h3 { font-size: 17px; margin: 44px 0 8px; }
.step p { font-size: 13.5px; color: var(--text-muted); margin: 0; line-height: 1.5; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 48px; align-items: start; }
.about-photo {
  border-radius: var(--radius-lg); border: 1px solid var(--line); overflow: hidden;
  aspect-ratio: 4/5; position: relative;
  background:
    repeating-linear-gradient(135deg, var(--bg-card) 0 14px, var(--bg-elev) 14px 28px);
  display: grid; place-items: center;
}
.about-photo .ph-note { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); text-align: center; padding: 20px; }
.about-body h2 { margin-bottom: 22px; }
.about-body p { color: var(--text-muted); margin: 0 0 16px; }
.about-body p strong { color: var(--text); font-weight: 700; }
.about-facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.about-facts span { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; }
.about-facts span b { color: var(--accent); font-weight: 700; }

/* ---------- faq ---------- */
.faq-wrap { max-width: 860px; }
.faq-item { border-top: 1px solid var(--line-soft); }
.faq-item:last-child { border-bottom: 1px solid var(--line-soft); }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  display: flex; align-items: center; gap: 18px; padding: 24px 4px; color: var(--text);
  font-size: clamp(16px, 1.8vw, 19px); font-weight: 600; letter-spacing: -0.01em;
}
.faq-q .plus { margin-left: auto; flex-shrink: 0; width: 22px; height: 22px; position: relative; transition: transform .3s var(--ease); }
.faq-q .plus::before, .faq-q .plus::after { content: ""; position: absolute; background: var(--accent); border-radius: 2px; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.faq-q .plus::before { width: 14px; height: 2px; }
.faq-q .plus::after { width: 2px; height: 14px; transition: transform .3s var(--ease); }
.faq-item.open .plus { transform: rotate(90deg); }
.faq-item.open .plus::after { transform: translate(-50%,-50%) scaleY(0); }
.faq-q .qn { font-family: var(--font-mono); font-size: 13px; color: var(--text-dim); flex-shrink: 0; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); }
.faq-a .inner { padding: 0 4px 24px 56px; color: var(--text-muted); font-size: 15.5px; line-height: 1.6; }

/* ---------- lead form / CTA ---------- */
.lead-section { position: relative; z-index: 0; }
.lead-card { z-index: 3; }
.lead-card {
  background: linear-gradient(180deg, var(--bg-card-2), var(--bg-card));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 64px);
  position: relative; overflow: hidden;
}
.lead-card::before {
  content: ""; position: absolute; top: -120px; right: -80px; width: 360px; height: 360px;
  background: radial-gradient(circle, var(--accent-glow), transparent 65%); opacity: .5; pointer-events: none;
}
.lead-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 52px; position: relative; }
.lead-intro h2 { font-size: clamp(28px, 3.6vw, 44px); margin-bottom: 18px; }
.lead-intro p { color: var(--text-muted); margin: 0 0 28px; }
.lead-perks { display: flex; flex-direction: column; gap: 14px; }
.lead-perks li { display: flex; gap: 12px; align-items: flex-start; list-style: none; font-size: 15px; color: var(--text-muted); }
.lead-perks { padding: 0; margin: 0; }
.lead-perks .ck { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-faint); border: 1px solid var(--accent-line); display: grid; place-items: center; color: var(--accent); margin-top: 1px; }
.lead-perks .ck svg { width: 12px; height: 12px; }

form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
form .field { margin-bottom: 14px; }
form label { display: block; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 7px; }
form label .req { color: var(--accent); }
form input, form textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--line);
  border-radius: 11px; padding: 13px 15px; color: var(--text);
  font-family: inherit; font-size: 15px; transition: border-color .2s, box-shadow .2s, background .2s;
}
form input::placeholder, form textarea::placeholder { color: var(--text-dim); }
form input:focus, form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-faint); background: var(--bg-elev); }
form input.invalid, form textarea.invalid { border-color: oklch(0.68 0.2 25); }
form textarea { resize: vertical; min-height: 96px; }
form .err { font-family: var(--font-mono); font-size: 11px; color: oklch(0.74 0.19 25); margin-top: 6px; display: none; }
form .field.bad .err { display: block; }
form .submit-row { display: flex; align-items: center; gap: 16px; margin-top: 22px; flex-wrap: wrap; }
form .submit-row .note { font-size: 12.5px; color: var(--text-dim); }
.btn-primary.full-mobile { }

.form-success {
  display: none; flex-direction: column; align-items: flex-start; justify-content: center;
  text-align: left; min-height: 380px;
}
.form-success.show { display: flex; }
.form-success .badge { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; margin-bottom: 22px; box-shadow: 0 0 40px -6px var(--accent-glow); }
.form-success .badge svg { width: 30px; height: 30px; }
.form-success h3 { font-size: 26px; margin-bottom: 12px; }
.form-success p { color: var(--text-muted); margin: 0; }
.form-wrap.hidden { display: none; }

/* ---------- footer ---------- */
footer.foot { border-top: 1px solid var(--line-soft); padding: 56px 0 40px; }
.foot-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; align-items: flex-start; }
.foot .brand { margin-bottom: 14px; }
.foot .desc { color: var(--text-dim); font-size: 14px; max-width: 320px; }
.foot-col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); margin: 0 0 16px; font-weight: 600; }
.foot-col a { display: block; color: var(--text-muted); font-size: 14.5px; margin-bottom: 10px; transition: color .2s; }
.foot-col a:hover { color: var(--accent); }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line-soft); font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }

/* ---------- reveal anim ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .dash { max-width: 480px; }
  .svc-grid, .cases-grid { grid-template-columns: 1fr 1fr; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo { max-width: 360px; aspect-ratio: 16/10; }
  .lead-grid { grid-template-columns: 1fr; gap: 36px; }
  .metrics-row { grid-template-columns: 1fr 1fr; }
  .metric { padding: 20px 18px; border-bottom: 1px solid var(--line-soft); }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; max-width: 100%; }
  /* nav: brand слева, гамбургер справа, ничего по центру */
  .nav-inner { gap: 10px; height: 56px; }
  .brand { flex-shrink: 0; }
  .nav-links { display: none; }
  .nav-right { margin-left: auto !important; gap: 0; }
  .nav-toggle { display: grid !important; }
  .nav-right .btn-primary,
  .nav-right .lang,
  .nav-right .mode-toggle { display: none !important; }
  .brand .who small { display: none; }
  .brand .who span:first-child { font-size: 14px; }
  .brand .mark, .brand .mark svg { width: 32px; height: 32px; }
  .svc-grid, .cases-grid, .process-grid { grid-template-columns: 1fr; }
  form .field-row { grid-template-columns: 1fr; }
  .trust .logos { margin-left: 0; }
  .foot-grid { flex-direction: column; }
  .hero h1 { font-size: clamp(32px, 9.5vw, 48px); word-break: break-word; }
  .hero-grid { gap: 28px; }
  .hero .lead { font-size: 15px; }
  .metrics-row { grid-template-columns: 1fr 1fr; gap: 0; }
  .metric { padding: 16px 12px; border-bottom: 1px solid var(--line-soft); }
  .metric .num { font-size: 22px; }
  .metric .lbl { font-size: 11.5px; }
  .section { padding: 56px 0; }
  .section-head { margin-bottom: 32px; }
  h2.title { font-size: clamp(26px, 7vw, 36px); }
  .lead, .section-head .lead { font-size: 15px; }
  .btn { padding: 12px 18px; font-size: 14px; }
  .hero-cta { gap: 8px; flex-direction: column; align-items: stretch; }
  .hero-cta .btn { justify-content: center; text-align: center; }
  .demo-cta { padding-left: 18px !important; }
  .attn-bot { width: 32px; height: 32px; top: -22px; right: -4px; }
  .lead-card { padding: 22px 18px; }
  .lead-grid { gap: 24px; }
  /* aurora не должна выпирать */
  .aurora, [class*="aurora"] { left: 0 !important; right: 0 !important; width: 100% !important; max-width: 100vw !important; }
  .hero-copy, .hero-copy * { max-width: 100%; }
}

/* ---------- mobile: Editorial ---------- */
@media (max-width: 760px) {
  body[data-theme="editorial"] .hero { padding-top: 32px; padding-bottom: 56px; }
  body[data-theme="editorial"] .hero h1 { font-size: clamp(38px, 11.5vw, 64px); line-height: 0.98; letter-spacing: -.02em; }
  body[data-theme="editorial"] .section { padding: 64px 0; }
  body[data-theme="editorial"] .section-head { margin-bottom: 36px; }
  body[data-theme="editorial"] h2.title { font-size: clamp(28px, 7.5vw, 40px); }
  body[data-theme="editorial"] .break-grid { grid-template-columns: 1fr; border-radius: 0; }
  body[data-theme="editorial"] .break { padding: 26px 22px; }
  body[data-theme="editorial"] .lead-card { padding: 28px 22px; }
  body[data-theme="editorial"] .metrics-row { grid-template-columns: 1fr 1fr; gap: 0; }
  body[data-theme="editorial"] .metric { padding: 18px 14px; border-bottom: 1px solid var(--line-soft); }
  body[data-theme="editorial"] .metric .num { font-size: 24px; }
  body[data-theme="editorial"] header.nav { backdrop-filter: blur(12px); }
  body[data-theme="editorial"] .nav-inner { height: 60px; }
  body[data-theme="editorial"] .brand .mark svg { width: 36px; height: 36px; }
  body[data-theme="editorial"] .brand .who span:first-child { font-size: 14.5px; }
  body[data-theme="editorial"] .mode-toggle { width: 38px; height: 38px; }
  body[data-theme="editorial"] .nav-toggle { width: 38px; height: 38px; }
  body[data-theme="editorial"] .hero-cta { gap: 10px; }
  body[data-theme="editorial"] .btn { padding: 12px 18px; font-size: 14px; }
  /* стек для калькуляторов и formula areas */
  body[data-theme="editorial"] .insight-grid { gap: 24px; }
  body[data-theme="editorial"] .chain { gap: 5px; }
  body[data-theme="editorial"] .chain .node { font-size: 11px; padding: 6px 9px; }
  body[data-theme="editorial"] .chain .arr { width: 16px; }
  body[data-theme="editorial"] .feat-grid { grid-template-columns: 1fr; }
  body[data-theme="editorial"] .cb-outs { grid-template-columns: 1fr; }
  body[data-theme="editorial"] .lead-perks li { font-size: 14px; }
  body[data-theme="editorial"] .faq-q { padding: 18px 4px; gap: 12px; font-size: 16px; }
  body[data-theme="editorial"] .faq-a .inner { padding-left: 36px; }
}

/* ---------- hider bot: «вырастает» из-за края блока (4 стадии: grip → pull → peek → rise) ---------- */
/* ---------- hider bot: висит ЗА блоком, выглядывает 4 стадии + sustain peek ---------- */
.hider-bot {
  position: absolute;
  width: 120px;
  height: 130px;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;   /* всё что ниже — за блоком */
}
.hider-bot.tr, .hider-bot.tl { /* координаты выставляет JS */ }

.hider-bot svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  transform: translateY(115px);   /* idle: полностью спрятан, видна только антенна */
  transition: transform .7s var(--ease);
  overflow: visible;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.35));
}

/* idle: антенна чуть выглядывает — намёк */
.hider-bot svg { transform: translateY(118px); }

/* PEEK: просто поднялся, глаза над краем, не вылезает в полный рост */
.hider-bot.bot-active svg {
  animation: hbPeek 2.4s var(--ease) forwards;
}
@keyframes hbPeek {
  0%   { transform: translateY(118px); }
  35%  { transform: translateY(55px); }    /* высовывается */
  50%  { transform: translateY(48px) rotate(-2deg); }  /* слегка наклонился */
  70%  { transform: translateY(48px) rotate(2deg); }   /* наклон в другую сторону */
  100% { transform: translateY(48px) rotate(0); }      /* остался на peek */
}

/* HAND GRIP wobble больше не нужен — рук нет */

/* PEEK behavior: зрачки стреляют влево/вправо — бот осматривается */
.hider-bot.bot-active .hb-pupil {
  animation: hbDart 2.4s ease-out forwards;
  transform-box: fill-box; transform-origin: center;
}
@keyframes hbDart {
  0%, 35% { transform: translate(0, 0); }
  45% { transform: translate(3px, 0); }
  60% { transform: translate(-3px, 0); }
  75% { transform: translate(2px, 1px); }
  100% { transform: translate(0, 0); }
}

/* HEAD TILT — включён в hbPeek выше */

/* ушли с блока — плавно прячется обратно */
.hider-bot:not(.bot-active) svg {
  transition: transform .9s var(--ease);
}

/* idle blink + sustain после подъёма */
.hider-bot .bot-eye {
  transform-box: fill-box; transform-origin: center;
  animation: hbBlinkIdle 6s 2s infinite;
}
@keyframes hbBlinkIdle { 0%, 95%, 100% { transform: scaleY(1); } 98% { transform: scaleY(.15); } }

/* scroll-fall */
.hider-bot.bot-falling svg {
  animation: hbFall 1.2s var(--ease) forwards !important;
}
@keyframes hbFall {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  20% { transform: translateY(-6px) rotate(-6deg); }
  100% { transform: translateY(120vh) rotate(45deg); opacity: 0; }
}

@media (max-width: 720px) { .hider-bot { display: none; } }

/* ---------- form watcher: бот СПРАВА НАД формой ---------- */
.lead-form-col { position: relative; }
.lead-form-col .form-wrap, .lead-form-col .form-success { padding-top: 72px; }
.form-watcher {
  position: absolute;
  top: 6px; right: 6px;
  width: 76px; height: 76px;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transform: translateY(-12px) rotate(-4deg);
  transition: opacity .4s var(--ease), transform .5s var(--ease);
}
.form-watcher.show {
  opacity: 1;
  transform: translateY(0) rotate(0);
}
.form-watcher svg { width: 100%; height: 100%; overflow: visible; display: block; }
.form-watcher .fw-pupil {
  transition: transform .18s ease-out;
  transform-box: fill-box;
  transform-origin: center;
}
.form-watcher.show .fw-body {
  transform-box: fill-box; transform-origin: bottom center;
  animation: fwSway 4s ease-in-out infinite;
}
.form-watcher.show .fw-eye {
  transform-box: fill-box; transform-origin: center;
  animation: fwBlink 4.2s infinite;
}
@keyframes fwSway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes fwBlink { 0%, 93%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@media (max-width: 720px) { .form-watcher { display: none; } }

/* ---------- demo CTA + attention bot ---------- */
.demo-cta { position: relative; padding-left: 18px !important; }
.demo-cta:hover .attn-bot { animation-play-state: paused; }
.attn-bot {
  position: absolute; top: -28px; right: -10px;
  width: 38px; height: 38px;
  pointer-events: none;
  animation: attnBob 3.4s var(--ease) infinite;
  transform-origin: bottom center;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.25));
}
.attn-bot svg { width: 100%; height: 100%; display: block; }
.attn-bot .ab-eye { transform-box: fill-box; transform-origin: center; animation: attnBlink 3.4s infinite; }
@keyframes attnBob {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  20% { transform: translateY(-6px) rotate(2deg) scale(1.05); }
  35% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-8px) rotate(6deg) scale(1.08); }
  65% { transform: translateY(0) rotate(-4deg); }
}
@keyframes attnBlink {
  0%, 88%, 100% { transform: scaleY(1); }
  92% { transform: scaleY(.15); }
}

/* добавим демо-ссылку в nav-links */
.nav-links .demo-link { color: var(--accent); font-weight: 700; }
.nav-links .demo-link::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); margin-right: 7px; vertical-align: middle;
  animation: dotPulse 2s ease-in-out infinite;
}
@keyframes dotPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* mobile nav drawer */
.m-drawer { display: none; }
.m-drawer.open { display: flex; flex-direction: column; gap: 4px; padding: 12px 28px 22px; border-bottom: 1px solid var(--line-soft); background: var(--bg-elev); }
.m-drawer a { padding: 12px 0; color: var(--text-muted); border-bottom: 1px solid var(--line-soft); font-size: 16px; }
.m-drawer .m-controls { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 4px; }
.m-drawer .m-controls .mode-toggle { display: grid !important; }
.m-drawer .m-controls .lang { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.m-drawer .m-controls .lang button { border: 0; background: transparent; color: var(--text-dim); font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 999px; cursor: pointer; font-family: var(--font-mono); }
.m-drawer .m-controls .lang button.active { background: var(--accent); color: var(--accent-ink); }
.nav-right .btn-primary { padding: 9px 18px; font-size: 14px; height: 36px; box-shadow: none; }
.nav-toggle { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 999px; background: transparent; place-items: center; cursor: pointer; }
.nav-toggle svg { width: 17px; height: 17px; color: var(--text); }
