/* ============================================================
   rayprism — v3 «тёплый бордо + liquid glass» (откат с v4)
   Manrope + Space Grotesk · обе темы (тёмная по умолчанию)
   ============================================================ */

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

:root {
  --bg: #f4eee7;
  --bg-soft: #faf6f1;
  --card: #ffffff;
  --ink: #2b2226;
  --ink-2: #6e635b;
  --ink-3: #736861;
  --line: #e8dfd6;
  --line-2: #f2ece5;
  --brand: #b03a52;
  --brand-dark: #8e2f44;
  --brand-soft: #f9ecef;
  --ok: #1f7a4d;
  --ok-soft: #e3f2ea;
  --warn: #9a6a10;
  --warn-soft: #f7eeda;
  --err: #b03232;
  --err-soft: #fae8e8;
  --info: #2e5f9e;
  --info-soft: #e7eff9;
  --sale: #c2571f;

  --r: 16px;
  --r-sm: 10px;
  --shadow-sm: 0 10px 30px -18px rgba(43,34,38,.35);
  --shadow-md: 0 18px 44px -22px rgba(43,34,38,.45);

  --header-bg1: #2b2226;
  --header-bg2: #241c20;
  --header-ink: #f3eee9;

  /* стекло */
  --card-glass: rgba(255,255,255,.62);
  --glass-border: rgba(43,34,38,.10);
  --glass-blur: 18px;
  --glass-glow: rgba(176,58,82,.14);

  --grad-brand: linear-gradient(90deg, var(--brand), #d6647e);
}

html.dark-theme {
  --bg: #151214;
  --bg-soft: #1d191c;
  --card: #211c1f;
  --ink: #efe7e0;
  --ink-2: #b7a89f;
  --ink-3: #87796f;
  --line: #2b2427;
  --line-2: #241e21;
  --brand: #d6647e;
  --brand-dark: #e07a92;
  --brand-soft: rgba(214,100,126,.16);
  --ok: #5cc292;
  --ok-soft: rgba(82,180,130,.16);
  --warn: #d9a44c;
  --warn-soft: rgba(217,164,76,.15);
  --err: #e07a7a;
  --err-soft: rgba(224,122,122,.15);
  --info: #7aa7dd;
  --info-soft: rgba(122,167,221,.15);

  --shadow-sm: 0 12px 34px -20px rgba(0,0,0,.7);
  --shadow-md: 0 20px 50px -24px rgba(0,0,0,.8);

  --header-bg1: #0e0b0d;
  --header-bg2: #151113;

  --card-glass: rgba(33,28,31,.60);
  --glass-border: rgba(239,231,224,.10);
  --glass-glow: rgba(214,100,126,.16);
}

html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Manrope', -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--brand); color: #fff; }
img, svg { display: block; }
a { color: inherit; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 28px); }
section { scroll-margin-top: 76px; }

.ic {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

/* ---------- живой фон: mesh + grain ---------- */
.bg-mesh {
  position: fixed; inset: 0;
  z-index: -1; overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(64px); opacity: .55;
  will-change: transform;
}
.blob-brand { width: 520px; height: 520px; background: rgba(176,58,82,.30); top: -12%; left: -10%; animation: float1 23s ease-in-out infinite alternate; }
.blob-info  { width: 460px; height: 460px; background: rgba(46,95,158,.24); top: 30%; right: -12%; animation: float2 27s ease-in-out infinite alternate; }
.blob-sale  { width: 420px; height: 420px; background: rgba(194,87,31,.18); bottom: -14%; left: 26%; animation: float3 31s ease-in-out infinite alternate; }
html.dark-theme .blob { opacity: .35; }
.bg-mesh::after {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  opacity: .5;
}
@keyframes float1 { from { transform: translate(0,0) scale(1); } to { transform: translate(90px,60px) scale(1.15); } }
@keyframes float2 { from { transform: translate(0,0) scale(1.1); } to { transform: translate(-80px,-70px) scale(.95); } }
@keyframes float3 { from { transform: translate(0,0) scale(.95); } to { transform: translate(60px,-50px) scale(1.12); } }

/* курсор-свечение */
.cursor-glow {
  position: fixed; left: 0; top: 0;
  width: 520px; height: 520px;
  margin: -260px 0 0 -260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glass-glow), transparent 65%);
  pointer-events: none; z-index: 40;
  opacity: 0; transition: opacity .4s ease;
}
@media (pointer: coarse) { .cursor-glow { display: none; } }

/* прогресс чтения */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--grad-brand);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 120;
}

/* ---------- шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 90;
  background: linear-gradient(135deg, var(--header-bg1), var(--header-bg2));
  color: var(--header-ink);
  border-bottom: 1px solid rgba(240,233,226,.08);
  transition: box-shadow .25s ease;
}
.top.scrolled { box-shadow: 0 10px 30px -18px rgba(0,0,0,.65); }
.topbar {
  display: flex; align-items: center; gap: 18px;
  height: 56px;
  padding: 0 clamp(16px, 4vw, 32px);
  transition: height .25s ease;
}
.top.scrolled .topbar { height: 46px; }

.brand { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name {
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
  font-weight: 700; font-size: 21px; letter-spacing: -.015em;
  color: inherit; text-decoration: none; white-space: nowrap;
}
.brand-beta {
  font-family: 'Manrope', sans-serif;
  font-size: 10px; font-weight: 800; letter-spacing: 0;
  color: #d6647e; background: rgba(214,100,126,.18);
  padding: 1px 6px; border-radius: 999px;
  margin-left: 6px; vertical-align: super; line-height: 1.4;
}
.brand small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .55; white-space: nowrap; }

nav {
  display: flex; align-items: center; gap: clamp(12px, 2vw, 22px);
  margin-left: auto;
}
nav a {
  font-size: 13px; font-weight: 600;
  color: rgba(243,238,233,.75);
  text-decoration: none; white-space: nowrap;
  transition: color .2s ease;
}
nav a:hover { color: #fff; }

.theme-btn {
  width: 30px; height: 30px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 999px; cursor: pointer;
  background: transparent; color: #efe7df;
  border: 1px solid rgba(240,233,226,.25);
  transition: background .2s ease;
}
.theme-btn:hover { background: rgba(255,255,255,.07); }
.theme-btn .ic { width: 15px; height: 15px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 999px;
  padding: 10px 22px;
  font-family: inherit; font-size: 14px; font-weight: 700;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn.primary {
  background: var(--brand); color: #fff;
  box-shadow: 0 8px 22px -10px rgba(176,58,82,.65);
}
.btn.primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn.ghost {
  background: transparent; color: var(--brand);
  border-color: var(--line);
}
.btn.ghost:hover { border-color: var(--brand); }
.btn.small { padding: 6px 13px; font-size: 12.5px; }
.btn.big { padding: 14px 30px; font-size: 15.5px; }
.btn .ic { width: 15px; height: 15px; }

/* ---------- бейджи ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  padding: 5px 11px; border-radius: 999px;
  white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.brand { background: var(--brand-soft); color: var(--brand); }
.badge.ok    { background: var(--ok-soft); color: var(--ok); }
.badge.info  { background: var(--info-soft); color: var(--info); }
.badge.warn  { background: var(--warn-soft); color: var(--warn); }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 9vw, 96px) 0 44px; }
.page-head { max-width: 760px; }
.hero-badge::before { animation: pulseDot 2.2s ease-in-out infinite; }
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(.72); }
}
.hero-h1 {
  margin: 18px 0 0;
  font-size: clamp(34px, 5.6vw, 54px);
  line-height: 1.06; font-weight: 800; letter-spacing: -.02em;
}
.hero-accent {
  background: linear-gradient(90deg, var(--brand), #d6647e, var(--brand));
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: heroHue 7s linear infinite alternate;
}
@keyframes heroHue { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
.hero-sub { margin: 18px 0 0; max-width: 640px; font-size: 17px; color: var(--ink-2); }
.page-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------- карточки-стекло ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 46px; }
.card {
  position: relative; overflow: hidden;
  background: var(--card-glass);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { box-shadow: var(--shadow-md); }
/* блик */
.card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,.30), transparent 42%);
  opacity: .5;
}
html.dark-theme .card::after { background: linear-gradient(120deg, rgba(255,255,255,.06), transparent 42%); }
/* spotlight под курсором */
.card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  opacity: 0; transition: opacity .25s ease;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), var(--glass-glow), transparent 70%);
}
.card:hover::before { opacity: 1; }
.card > * { position: relative; z-index: 1; }

.kpi-num { font-size: 30px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi-label { margin-top: 4px; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.kpi-ic {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  margin-bottom: 12px;
}
.tone-brand { background: var(--brand-soft); color: var(--brand); }
.tone-ok    { background: var(--ok-soft); color: var(--ok); }
.tone-warn  { background: var(--warn-soft); color: var(--warn); }
.tone-info  { background: var(--info-soft); color: var(--info); }

/* ---------- секции ---------- */
.section, .pipeline, .pricing, .faq-sec, .cta-sec { padding: clamp(48px, 7vw, 76px) 0; }
#sections, #faq { background: var(--bg-soft); }
.section-head { max-width: 720px; margin-bottom: 30px; }
.eyebrow {
  display: block; margin-bottom: 10px;
  font-size: 12.5px; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand);
}
.section-head h2 {
  margin: 0; font-size: clamp(26px, 3.6vw, 36px);
  line-height: 1.15; font-weight: 800; letter-spacing: -.015em;
}
.section-head p { margin: 10px 0 0; font-size: 15.5px; color: var(--ink-2); }

/* ---------- разделы платформы ---------- */
.srv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 14px; }
.srv-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.srv-top .kpi-ic { margin-bottom: 0; }
.srv-title { margin: 0 0 8px; font-size: 17px; font-weight: 800; }
.srv-card p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; }

/* ---------- схема системы ---------- */
.flow {
  display: grid;
  grid-template-columns: 1fr auto 1.35fr auto 1fr auto 1fr;
  gap: 10px; align-items: stretch;
  margin-top: 8px;
}
.flow-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.flow-stage span {
  display: block; margin-bottom: 2px;
  font-size: 11px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3);
}
.flow-node {
  padding: 11px 13px;
  border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600; line-height: 1.35;
  background: var(--card-glass);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}
.flow-core .flow-node {
  background: linear-gradient(160deg, rgba(176,58,82,.16), rgba(176,58,82,.05));
  border-color: rgba(176,58,82,.35);
}
html.dark-theme .flow-core .flow-node {
  background: linear-gradient(160deg, rgba(214,100,126,.18), rgba(214,100,126,.06));
  border-color: rgba(214,100,126,.4);
}
.flow-arrow { align-self: center; color: var(--brand); opacity: .7; }
.flow-arrow .ic { width: 20px; height: 20px; }
.flow-loop {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px dashed var(--line);
  text-align: center; font-size: 12.5px; color: var(--ink-3);
}
.flow-loop span { display: inline-block; max-width: 720px; }

/* ---------- зачем это вам ---------- */
.insight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.insight-card { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; }
.insight-ic {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
}
.insight-ic .ic { width: 19px; height: 19px; }
.insight-label {
  font-size: 11.5px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 4px;
}
.insight-text { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }

/* ---------- кейсы ---------- */
.cases-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.case-card { display: flex; flex-direction: column; }
.case-top { margin-bottom: 10px; }
.case-title { margin: 0 0 8px; font-size: 17px; font-weight: 800; }
.case-card p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.case-metrics {
  margin-top: auto; padding-top: 12px;
  border-top: 1px dashed var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 22px;
}
.metric b {
  display: block;
  font-size: 20px; font-weight: 800;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
html.dark-theme .metric b { color: var(--brand); }
.metric span { font-size: 12px; color: var(--ink-3); }

/* ---------- тарифы ---------- */
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 16px; align-items: stretch;
  perspective: 1400px;
}
.price-card { display: flex; flex-direction: column; transition: transform .18s ease, box-shadow .2s ease; }
.price-card.featured { border-color: var(--brand); box-shadow: 0 18px 44px -22px rgba(176,58,82,.5); }
.price-card.featured::before {
  content: ''; position: absolute;
  top: 0; left: 10%; right: 10%; height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  opacity: .85;
}
.price-card.featured::after {
  content: 'популярный';
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: #fff;
  font-size: 10.5px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px;
  box-shadow: 0 6px 16px -8px rgba(176,58,82,.7);
  white-space: nowrap;
}
.price-head .badge { margin-bottom: 12px; }
.price-cost { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; }
.price-cost em { font-style: normal; font-size: 15px; color: var(--ink-2); }
.price-cost b { font-size: 32px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.price-unit { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.price-period { margin-top: 6px; font-size: 12.5px; color: var(--ink-3); }
.price-list { list-style: none; margin: 16px 0 18px; padding: 0; display: flex; flex-direction: column; gap: 9px; flex-grow: 1; }
.price-list li { position: relative; padding-left: 26px; font-size: 14px; color: var(--ink-2); }
.price-list li::before {
  content: ''; position: absolute; left: 0; top: 2px;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--ok-soft);
}
.price-list li::after {
  content: ''; position: absolute; left: 4.5px; top: 6.5px;
  width: 5px; height: 8px;
  border-right: 2px solid var(--ok);
  border-bottom: 2px solid var(--ok);
  transform: rotate(45deg);
}
.price-cta { width: 100%; }

/* ---------- сравнение ---------- */
.compare-table {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--card-glass);
  -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
}
.compare-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; }
.compare-row:not(.compare-head) { border-top: 1px solid var(--line-2); transition: background .15s ease; }
.compare-row:not(.compare-head):hover { background: var(--bg-soft); }
.compare-col { padding: 13px 16px; font-size: 13.5px; line-height: 1.45; display: flex; gap: 8px; align-items: flex-start; }
.compare-col .ic { margin-top: 2px; }
.compare-task { font-weight: 700; }
.compare-task .ic { color: var(--brand); }
.compare-you { color: var(--ink-3); }
.compare-you .ic { color: var(--err); opacity: .75; }
.compare-us { color: var(--ok); font-weight: 600; }
.compare-us .ic { color: var(--ok); }
.compare-head { background: var(--bg-soft); }
.compare-head .compare-col { padding: 10px 16px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.compare-foot { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-top: 14px; }
.stack h3, .sla h3 {
  margin: 0 0 10px;
  font-size: 13px; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-3);
}
.stack-items { display: flex; flex-wrap: wrap; gap: 8px; }
.stack-item {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12.5px; font-weight: 600;
  color: var(--ink-2);
  background: var(--card);
}
.stack-item .ic { width: 14px; height: 14px; color: var(--brand); }
.sla p { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.sla { background: var(--bg-soft); border-radius: var(--r); padding: 16px 18px; border: 1px solid var(--line-2); }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-glass);
  -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
  overflow: hidden;
}
.faq-item + .faq-item { margin-top: 10px; }
.faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 18px;
  font-size: 15px; font-weight: 700;
  cursor: pointer; list-style: none;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q .ic { width: 18px; height: 18px; color: var(--brand); transition: transform .25s ease; }
.faq-item[open] .faq-q .ic { transform: rotate(90deg); }
.faq-a { padding: 0 18px 16px; }
.faq-a p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.6; }

/* ---------- CTA ---------- */
.cta-sec { padding-bottom: clamp(64px, 9vw, 110px); }
.cta-card {
  position: relative; overflow: hidden;
  text-align: center;
  padding: clamp(36px, 6vw, 60px) 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--brand), #6e2438);
  color: #fff;
  box-shadow: 0 30px 70px -30px rgba(142,47,68,.65);
}
.cta-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px circle at 20% 0%, rgba(255,255,255,.16), transparent 55%);
}
.cta-card > * { position: relative; z-index: 1; }
.cta-card h2 { margin: 0 0 12px; font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -.015em; line-height: 1.15; }
.cta-card p { margin: 0 auto 24px; max-width: 540px; font-size: 15.5px; color: rgba(255,255,255,.85); }
.cta-card .btn.primary { background: #fff; color: var(--brand-dark); box-shadow: 0 14px 34px -14px rgba(0,0,0,.5); }
.cta-card .btn.primary:hover { background: #f7ede9; }

/* ---------- футер ---------- */
.foot { border-top: 1px solid var(--line); padding: 22px 0 30px; }
.foot .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px;
  font-size: 13px; color: var(--ink-3);
}
.foot-beta { color: var(--brand); font-style: normal; margin-left: 4px; }

/* ---------- модалка заявки ---------- */
.lead-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 18px; }
.lead-modal[hidden] { display: none !important; }
.lead-overlay {
  position: absolute; inset: 0;
  background: rgba(21,18,20,.55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.lead-card {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 26px 24px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.55);
}
.lead-x {
  position: absolute; top: 12px; right: 12px;
  width: 30px; height: 30px;
  border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line);
  background: transparent; color: var(--ink-2);
  font-size: 13px;
}
.lead-x:hover { color: var(--ink); }
.lead-card h3 { margin: 0 0 6px; font-size: 20px; font-weight: 800; }
.lead-note { margin: 0 0 16px; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.lead-field { display: block; margin-bottom: 12px; }
.lead-field span { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.lead-field input, .lead-field select, .lead-field textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--bg-soft);
  color: var(--ink);
  font-family: inherit; font-size: 14px;
}
.lead-field textarea { resize: vertical; min-height: 70px; }
.lead-field input:focus, .lead-field select:focus, .lead-field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.lead-submit { width: 100%; margin-top: 6px; }
#lead-bot-link { width: 100%; margin-top: 10px; }
#lead-done[hidden] { display: none; }

/* ---------- появление секций ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s cubic-bezier(.2,.7,.3,1), transform .6s cubic-bezier(.2,.7,.3,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .flow { grid-template-columns: 1fr; gap: 12px; }
  .flow-col { flex-direction: row; flex-wrap: wrap; }
  .flow-stage { width: 100%; }
  .flow-node { flex: 1 1 44%; }
  .flow-arrow { justify-self: center; }
  .flow-arrow .ic { transform: rotate(90deg); }
}

@media (max-width: 900px) {
  nav a:not(.btn) { font-size: 12.5px; }
}

@media (max-width: 720px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: 8px;
    height: auto;
    min-height: 52px;
    padding: 10px clamp(14px, 4vw, 20px);
  }
  .top.scrolled .topbar { height: auto; }
  .theme-btn { justify-self: end; }
  nav {
    grid-column: 1 / -1;
    flex-wrap: nowrap;
    overflow-x: auto;
    min-width: 0;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  nav::-webkit-scrollbar { display: none; }
  nav a { white-space: nowrap; }
  .hero-sub { font-size: 15.5px; }
}

@media (max-width: 600px) {
  .compare-row { grid-template-columns: 1fr 1fr; }
  .compare-task {
    grid-column: 1 / -1;
    padding-bottom: 0;
    border-bottom: none;
  }
  .compare-head { display: none; }
  .compare-row:not(.compare-head) { border-top: 1px solid var(--line-2); }
  .compare-row:first-child { border-top: none; }
  .compare-col { font-size: 13px; }
  .compare-foot { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .cards { gap: 12px; }
  .price-cost b { font-size: 28px; }
  .page-actions .btn { width: 100%; }
  .case-metrics { gap: 8px 18px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .cursor-glow { display: none; }
}
