/* === tokens.css === */
/* РЕГЛАНТ — дизайн-токены. Палитра наследует ЛК v2 (Slate / Emerald), чтобы витрина и демо-стенд
   читались как один продукт. Тёмная тема: системная (data-theme="auto") или явный выбор посетителя. */
:root {
  --bg: #f8fafc;
  --bg-2: #f1f5f9;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #64748b;

  --accent: #059669;
  --accent-strong: #047857;
  --accent-weak: #ecfdf5;
  --accent-ring: rgba(5, 150, 105, .24);
  --on-accent: #ffffff;
  --signal: #f59e0b;            /* второй акцент: «сигнал» входящего обращения */
  --info: #2563eb;
  --danger: #dc2626;

  /* «чернильная» сцена hero / CTA — одинакова в обеих темах */
  --ink: #0b1220;
  --ink-2: #111a2b;
  --ink-line: rgba(148, 163, 184, .14);
  --ink-text: #e2e8f0;
  --ink-text-2: #94a3b8;

  --font: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Segoe UI Variable Display', 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', 'SFMono-Regular', Consolas, monospace;

  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --r-full: 9999px;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 24px -6px rgba(15, 23, 42, .08);
  --shadow-2: 0 24px 60px -20px rgba(15, 23, 42, .28);

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(64px, 9vw, 120px);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f17;
    --bg-2: #0f1621;
    --surface: #131b26;
    --border: #233044;
    --border-strong: #334155;
    --text: #f1f5f9;
    --text-2: #a3b1c4;
    --text-3: #8391a7;
    --accent: #10b981;
    --accent-strong: #34d399;
    --accent-weak: rgba(16, 185, 129, .12);
    --accent-ring: rgba(16, 185, 129, .32);
    --on-accent: #04261a;
    --info: #60a5fa;
    --danger: #f87171;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 24px -6px rgba(0, 0, 0, .4);
    --shadow-2: 0 24px 60px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b0f17;
  --bg-2: #0f1621;
  --surface: #131b26;
  --border: #233044;
  --border-strong: #334155;
  --text: #f1f5f9;
  --text-2: #a3b1c4;
  --text-3: #8391a7;
  --accent: #10b981;
  --accent-strong: #34d399;
  --accent-weak: rgba(16, 185, 129, .12);
  --accent-ring: rgba(16, 185, 129, .32);
  --on-accent: #04261a;
  --info: #60a5fa;
  --danger: #f87171;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 24px -6px rgba(0, 0, 0, .4);
  --shadow-2: 0 24px 60px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* === base.css === */
/* Базовый слой: сброс, типографика, общие примитивы блоков (.wrap, .sec, .btn, .chip, .shot). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  font: 400 17px/1.6 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-strong); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: var(--r-s); }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sec { padding: var(--section-y) 0; }
.sec--alt { background: var(--bg-2); }

.sec-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.sec-head--center { margin-inline: auto; text-align: center; }
.sec-head h2 { font-size: clamp(30px, 4.2vw, 46px); font-weight: 700; }
.sec-head p { margin-top: 16px; font-size: clamp(17px, 1.6vw, 19px); color: var(--text-2); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 13px/1 var(--font); letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-strong); margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }

/* кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px; border-radius: var(--r-full);
  font: 600 16px/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 10px 30px -10px var(--accent); }
.btn--primary:hover { background: var(--accent-strong); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-strong); }
.btn--on-ink { background: rgba(255, 255, 255, .06); color: var(--ink-text); border-color: rgba(255, 255, 255, .18); }
.btn--on-ink:hover { background: rgba(255, 255, 255, .12); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 15px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--r-full);
  font: 500 14px/1.2 var(--font); color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
}
.chip--accent { color: var(--accent-strong); background: var(--accent-weak); border-color: transparent; }

/* скриншот продукта в «окне» */
.shot {
  margin: 0; border-radius: var(--r-m); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-2);
}
.shot__bar { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.shot__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.shot img { width: 100%; cursor: zoom-in; }
.shot figcaption { padding: 12px 16px; font-size: 14px; color: var(--text-3); border-top: 1px solid var(--border); }

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 34px; color: var(--text-2); }
.ticks li b { color: var(--text); font-weight: 600; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-weak) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
}

.note { font-size: 14px; color: var(--text-3); }

/* появление при прокрутке (включает js/modules/reveal.js; без JS всё видно сразу) */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* лайтбокс скриншотов (js/modules/lightbox.js) */
.lb { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; background: rgba(2, 6, 23, .86); cursor: zoom-out; }
.lb img { max-height: 92vh; width: auto; border-radius: var(--r-m); box-shadow: var(--shadow-2); }

/* страница 404 */
.nf { min-height: 100vh; display: grid; place-content: center; gap: 18px; text-align: center; padding: 24px; }
.nf h1 { font-size: clamp(32px, 6vw, 56px); }
.nf p { color: var(--text-2); }

@media print {
  .js [data-reveal] { opacity: 1; transform: none; }
  .hdr { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* .split — «текст + скриншот», общий для блоков expert / knowledge / control */
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.split--rev .split__media { order: -1; }
.split__text h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 700; margin-bottom: 18px; }
.split__text > p { color: var(--text-2); font-size: 18px; margin-bottom: 26px; }
.split__media { position: relative; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split--rev .split__media { order: 0; }
}

/* === block: header === */
.hdr {
  position: fixed; inset: 0 0 auto; z-index: 50;
  color: var(--ink-text);
  transition: background .25s ease, box-shadow .25s ease, color .25s ease;
}
.hdr.is-solid {
  color: var(--text);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 var(--border);
}
.hdr__in { display: flex; align-items: center; gap: 24px; height: 68px; }

.logo { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.logo__mark { width: 32px; height: 32px; flex: none; }
.logo__word { font: 800 19px/1 var(--font-display); letter-spacing: .14em; }

.hdr__nav { display: flex; gap: 4px; margin-left: auto; }
.hdr__nav a {
  padding: 8px 12px; border-radius: var(--r-full);
  font: 500 15px/1 var(--font); color: inherit; opacity: .82; text-decoration: none;
}
.hdr__nav a:hover { opacity: 1; background: rgba(127, 127, 127, .12); }
.hdr__act { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; border: 0; background: transparent; color: inherit; cursor: pointer;
}
.icon-btn:hover { background: rgba(127, 127, 127, .14); }
.icon-btn svg { width: 20px; height: 20px; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .i-sun { display: none; }
  :root[data-theme="auto"] .i-moon { display: block; }
}
.hdr__burger { display: none; }

@media (max-width: 1020px) {
  .hdr__burger { display: inline-grid; }
  .hdr__nav {
    position: absolute; top: 68px; left: 12px; right: 12px;
    flex-direction: column; gap: 2px; padding: 10px;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--r-m); box-shadow: var(--shadow-2);
    display: none;
  }
  .hdr__nav a { padding: 14px 12px; border-radius: var(--r-s); font-size: 17px; }
  .hdr.is-open .hdr__nav { display: flex; }
}
@media (max-width: 520px) {
  .hdr__cta { display: none; }
}

/* === block: hero === */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: radial-gradient(1200px 600px at 78% 10%, rgba(16, 185, 129, .20), transparent 60%),
              radial-gradient(800px 500px at 0% 100%, rgba(37, 99, 235, .14), transparent 60%),
              var(--ink);
  color: var(--ink-text);
  padding: 140px 0 clamp(72px, 9vw, 120px);
}
.hero__grid {
  position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--ink-line) 1px, transparent 1px),
                    linear-gradient(90deg, var(--ink-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
}
.hero__in { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(32px, 4.5vw, 56px); align-items: center; }
.eyebrow--ink { color: #6ee7b7; }
.hero h1 { font-size: clamp(38px, 4.4vw, 58px); font-weight: 800; color: #fff; }
.grad { background: linear-gradient(100deg, #6ee7b7 0%, #34d399 45%, #a7f3d0 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { margin-top: 24px; max-width: 580px; font-size: clamp(18px, 1.8vw, 21px); color: var(--ink-text-2); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 32px 0 0; padding: 0; list-style: none; font-size: 15px; color: var(--ink-text-2); }
.hero__facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero__facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .18); }

/* сцена: телефон + плавающие плашки */
.hero__stage { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: center; min-height: 600px; }
.phone {
  position: relative; width: min(320px, 100%);
  padding: 12px; border-radius: 44px;
  background: #020617; box-shadow: 0 0 0 1px #334155, 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 120px -40px rgba(16, 185, 129, .55);
}
.phone__notch { position: absolute; top: 20px; left: 50%; width: 96px; height: 26px; margin-left: -48px; border-radius: 20px; background: #020617; z-index: 2; }
.phone__head {
  display: flex; align-items: center; gap: 10px;
  padding: 50px 16px 12px; border-radius: 34px 34px 0 0;
  background: #f8fafc; color: #0f172a; border-bottom: 1px solid #e2e8f0;
}
.phone__head b { display: block; font-size: 15px; }
.phone__head small { display: block; font-size: 12px; color: #059669; }
.phone__ava { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #10b981, #047857); color: #fff; font-weight: 800; }
.phone__chat {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 480px; padding: 14px 12px 18px; border-radius: 0 0 34px 34px;
  background: #e9eef4 radial-gradient(rgba(15, 23, 42, .05) 1px, transparent 1px) 0 0 / 14px 14px;
  font-size: 14px; line-height: 1.45; color: #0f172a;
}
.phone__day { align-self: center; padding: 3px 10px; border-radius: 10px; background: rgba(255, 255, 255, .8); font-size: 12px; color: #64748b; }
.msg { max-width: 86%; padding: 9px 12px; border-radius: 16px; box-shadow: 0 1px 1px rgba(15, 23, 42, .06); }
.msg--in { align-self: flex-end; background: #d1fae5; border-bottom-right-radius: 5px; }
.msg--out { align-self: flex-start; background: #fff; border-bottom-left-radius: 5px; }
.msg__keys { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg__keys span { padding: 5px 10px; border-radius: 10px; border: 1px solid #dbe3ec; color: #047857; font-weight: 600; font-size: 13px; }
.route {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 12px; background: #0f172a; color: #a7f3d0; font: 600 12.5px/1.2 var(--font);
}
.route svg { width: 14px; height: 14px; }
.typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; border-radius: 16px; background: #fff; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; animation: typing 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* шаги диалога: JS прячет и проигрывает по очереди; без JS всё видно */
.js [data-chat-demo] [data-step] { display: none; }
.js [data-chat-demo] [data-step].is-shown { display: block; animation: pop .35s ease both; }
.js [data-chat-demo] .route.is-shown { display: inline-flex; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* лента статусов слева от телефона: без JS горит вся, с JS — по ходу диалога (chat-demo.js) */
.hero__feed { position: relative; display: grid; gap: 14px; order: -1; }
.hero__feed::before { content: ""; position: absolute; left: 20px; top: 24px; bottom: 24px; width: 2px; background: linear-gradient(var(--signal), #34d399, #60a5fa); opacity: .35; }
.float {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 16px;
  background: rgba(15, 23, 42, .72); border: 1px solid rgba(148, 163, 184, .22);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .7);
  font-size: 14px; line-height: 1.3; color: #f1f5f9;
  transition: opacity .5s ease, transform .5s ease, border-color .5s ease;
}
.float b { display: block; font-weight: 600; }
.float small { display: block; color: var(--ink-text-2); font-size: 12.5px; }
.float__dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 5px rgba(52, 211, 153, .18); }
.float__dot--signal { background: var(--signal); box-shadow: 0 0 0 5px rgba(245, 158, 11, .2); }
.float__dot--info { background: #60a5fa; box-shadow: 0 0 0 5px rgba(96, 165, 250, .2); }
.js .hero__feed .float { opacity: .28; transform: translateX(-6px); }
.js .hero__feed .float.is-lit { opacity: 1; transform: none; border-color: rgba(52, 211, 153, .45); }

@media (max-width: 1180px) {
  .hero__stage { grid-template-columns: 1fr; justify-items: center; }
  .hero__feed { order: 0; width: min(420px, 100%); }
}
@media (max-width: 1020px) {
  .hero { padding-top: 112px; }
  .hero__in { grid-template-columns: 1fr; }
  .hero__stage { min-height: 0; padding-top: 16px; }
}

/* === block: proof === */
.proof { background: var(--surface); border-bottom: 1px solid var(--border); padding: 36px 0 22px; }
.proof__in { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.proof__item { display: grid; gap: 6px; padding-left: 18px; border-left: 2px solid var(--accent); }
.proof__item b { font: 800 clamp(30px, 3.4vw, 40px)/1 var(--font-display); letter-spacing: -.02em; color: var(--text); }
.proof__item b small { font-size: .5em; margin-left: 4px; color: var(--text-3); font-weight: 700; }
.proof__item span { font-size: 15px; color: var(--text-2); line-height: 1.4; }
.proof__note { margin-top: 18px; font-size: 13px; }
@media (max-width: 860px) { .proof__in { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .proof__in { grid-template-columns: 1fr; } }

/* === block: frontline === */
/* .card — общий примитив карточки возможностей; переиспользуется блоками profiles/trust */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card {
  position: relative; padding: 28px; border-radius: var(--r-l);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1);
  transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--accent-ring); }
.card--wide { grid-column: span 2; }
.card--full { grid-column: 1 / -1; }
.card--accent { background: linear-gradient(135deg, var(--accent-weak), var(--surface) 70%); }
.card__ico {
  display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 18px;
  border-radius: 14px; background: var(--accent-weak); color: var(--accent-strong);
}
.card__ico svg { width: 24px; height: 24px; }
.card h3 { font-size: 21px; font-weight: 700; margin-bottom: 10px; }
.card p { color: var(--text-2); font-size: 16px; }
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card--wide { grid-column: span 2; }
}
@media (max-width: 600px) {
  .cards { grid-template-columns: 1fr; }
  .card--wide, .card--full { grid-column: auto; }
}

/* === block: flow === */
.flow {
  --node: 52px;
  position: relative; list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px;
}
/* магистраль и бегущий по ней «сигнал» обращения */
.flow::before, .flow::after { content: ""; position: absolute; top: calc(var(--node) / 2); height: 2px; }
.flow::before { left: 8%; right: 8%; background: linear-gradient(90deg, var(--accent-ring), var(--accent), var(--accent-ring)); }
.flow::after {
  left: 8%; width: 14px; height: 14px; margin-top: -6px; border-radius: 50%;
  background: var(--signal); box-shadow: 0 0 0 6px rgba(245, 158, 11, .2), 0 0 24px rgba(245, 158, 11, .7);
  animation: flow-run 6s cubic-bezier(.6, 0, .4, 1) infinite;
}
@keyframes flow-run { 0% { left: 8%; opacity: 0; } 8% { opacity: 1; } 92% { opacity: 1; } 100% { left: 92%; opacity: 0; } }

.flow__step { position: relative; text-align: center; }
.flow__n {
  position: relative; z-index: 1; display: inline-grid; place-items: center;
  width: var(--node); height: var(--node); margin-bottom: 18px; border-radius: 50%;
  font: 700 15px/1 var(--mono); color: var(--accent-strong);
  background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 0 0 6px var(--bg-2);
}
.flow__step--ai .flow__n { background: var(--accent); color: var(--on-accent); }
.flow__step h3 { font-size: 19px; margin-bottom: 8px; }
.flow__step p { font-size: 15px; color: var(--text-2); }

@media (max-width: 900px) {
  .flow { grid-template-columns: 1fr; gap: 0; }
  .flow::before { left: calc(var(--node) / 2); right: auto; top: 10px; bottom: 10px; width: 2px; height: auto; background: linear-gradient(var(--accent-ring), var(--accent), var(--accent-ring)); }
  .flow::after { display: none; }
  .flow__step { display: grid; grid-template-columns: var(--node) 1fr; column-gap: 18px; text-align: left; padding-bottom: 26px; }
  .flow__n { grid-row: span 2; margin: 0; }
  .flow__step h3 { align-self: end; margin: 2px 0 4px; }
}

/* === block: expert === */
.shot--pip {
  position: absolute; right: -18px; bottom: -36px; width: 46%;
  border: 4px solid var(--surface); border-radius: var(--r-m);
}
#expert .split__media > .shot:first-child figcaption { padding-right: 48%; }
@media (max-width: 1100px) { .shot--pip { right: 0; } }
@media (max-width: 600px) {
  .shot--pip { display: none; }
  #expert .split__media > .shot:first-child figcaption { padding-right: 16px; }
}

/* === block: control === */
.control__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 36px; }
.control__row > div { display: grid; gap: 6px; padding: 20px; border-radius: var(--r-m); background: var(--bg-2); border: 1px solid var(--border); }
.control__row b { font-size: 17px; }
.control__row span { font-size: 15px; color: var(--text-2); }
@media (max-width: 900px) { .control__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .control__row { grid-template-columns: 1fr; } }

/* === block: case-apk === */
.case { background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.case__in { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.case__text h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 700; }
.case__text > p { margin: 18px 0 22px; color: var(--text-2); font-size: 18px; }
.case__laws { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.case__deal { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 30px; }
.case__deal > div { display: grid; gap: 6px; padding: 18px 20px; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--border); }
.case__deal > div:first-child { border-color: rgba(245, 158, 11, .5); background: linear-gradient(135deg, rgba(245, 158, 11, .1), var(--surface) 70%); }
.case__deal b { font-size: 20px; font-family: var(--font-display); }
.case__deal span { font-size: 14.5px; color: var(--text-2); line-height: 1.45; }
.case__media { position: sticky; top: 96px; display: grid; gap: 18px; justify-items: center; }
.case__phone { margin: 0; width: min(330px, 100%); filter: drop-shadow(0 30px 50px rgba(15, 23, 42, .28)); }
.case__phone img { cursor: zoom-in; }
.case__cards { width: 100%; }
@media (max-width: 900px) {
  .case__in { grid-template-columns: 1fr; }
  .case__media { position: static; }
}
@media (max-width: 560px) { .case__deal { grid-template-columns: 1fr; } }

/* === block: profiles === */
.profiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.prof { display: grid; align-content: start; gap: 10px; padding: 24px; border-radius: var(--r-l); background: var(--surface); border: 1px dashed var(--border-strong); }
.prof--live { border: 2px solid var(--accent); box-shadow: 0 20px 40px -24px var(--accent); }
.prof__tag { justify-self: start; padding: 4px 10px; border-radius: var(--r-full); font: 600 12px/1.2 var(--font); letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); background: var(--bg-2); }
.prof--live .prof__tag { color: var(--on-accent); background: var(--accent); }
.prof h3 { font-size: 19px; }
.prof p { font-size: 15px; color: var(--text-2); }
@media (max-width: 960px) { .profiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .profiles { grid-template-columns: 1fr; } }

/* === block: trust === */
.trust { background: var(--ink); color: var(--ink-text); }
.trust .sec-head h2 { color: #fff; }
.trust .sec-head p { color: var(--ink-text-2); }
.trust__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border-radius: var(--r-l); overflow: hidden; background: var(--ink-line); border: 1px solid var(--ink-line); }
.trust__item { display: grid; align-content: start; gap: 8px; padding: 28px; background: var(--ink-2); }
.trust__item b { position: relative; padding-left: 22px; font-size: 18px; color: #fff; }
.trust__item b::before { content: ""; position: absolute; left: 0; top: 7px; width: 10px; height: 10px; border-radius: 3px; background: #34d399; }
.trust__item span { font-size: 15px; color: var(--ink-text-2); }
@media (max-width: 900px) { .trust__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .trust__grid { grid-template-columns: 1fr; } }

/* === block: demo-cta === */
.democta__box {
  display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 32px; align-items: center;
  padding: clamp(28px, 5vw, 56px); border-radius: var(--r-l);
  background: radial-gradient(600px 300px at 100% 0%, var(--accent-weak), transparent 70%), var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-1);
}
.democta__box h2 { font-size: clamp(26px, 3.4vw, 38px); }
.democta__box p:not(.eyebrow) { margin-top: 14px; color: var(--text-2); max-width: 620px; }
.democta__act { display: grid; gap: 12px; }
@media (max-width: 860px) {
  .democta__box { grid-template-columns: 1fr; }
  .democta__act { justify-items: start; }
}

/* === block: contact === */
.contact { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.contact h2 { font-size: clamp(30px, 4vw, 44px); }
.contact__lead { margin-top: 16px; color: var(--text-2); font-size: 18px; max-width: 560px; }
.contact__ways { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.way {
  display: flex; align-items: center; gap: 14px; padding: 16px 22px 16px 16px;
  border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--border);
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 18px;
  transition: border-color .15s ease, transform .15s ease;
}
.way:hover { border-color: var(--accent); transform: translateY(-2px); }
.way svg { width: 40px; height: 40px; padding: 9px; flex: none; border-radius: 12px; background: var(--accent-weak); color: var(--accent-strong); }
.way small { display: block; font-size: 13px; font-weight: 500; color: var(--text-3); }
.req { padding: 28px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--border); }
.req h3 { font-size: 18px; margin-bottom: 16px; }
.req dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; font-size: 15px; }
.req dt { color: var(--text-3); }
.req dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

/* === block: footer === */
.ftr { padding: 44px 0; background: var(--ink); color: var(--ink-text); border-top: 1px solid var(--ink-line); }
.ftr__in { display: grid; grid-template-columns: auto 1fr auto; gap: 16px 32px; align-items: center; }
.ftr__claim { color: var(--ink-text-2); font-size: 15px; }
.ftr__nav { display: flex; flex-wrap: wrap; gap: 18px; }
.ftr__nav a { color: var(--ink-text); text-decoration: none; font-size: 15px; opacity: .85; }
.ftr__nav a:hover { opacity: 1; text-decoration: underline; }
.ftr__copy { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--ink-line); font-size: 13px; color: var(--ink-text-2); }
@media (max-width: 760px) { .ftr__in { grid-template-columns: 1fr; } }
