/* Страницы кейсов: стиль повторяет PDF-рассылку (Onest + JetBrains Mono, чёрный / молочный / салатовый) */
:root {
  --bg: #F5F4F0;
  --ink: #0D0D0B;
  --green: #9BF562;
  --card: #FFFFFF;
  --text: #2E2D2A;
  --muted: #6E6D68;
  --mono-muted: #8D8C87;
  --line: #CFCDC5;
  --redact: #5A5954;
  --avatar: #D7D4CD;
  --head: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
ol, ul { list-style: none; }
::selection { background: var(--green); color: var(--ink); }

.wrap {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Секции-слайды ---------- */
.slide { padding: 28px 0 80px; }
.s-dark { background: var(--ink); color: var(--bg); }
.s-green { background: var(--green); color: var(--ink); }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  margin-bottom: 56px;
}
.kicker { min-height: 0; margin: 0 0 20px; justify-content: flex-start; }
.kicker .lbl { text-align: left; }
.logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.logo b {
  font: 800 38px/1 var(--head);
  letter-spacing: -.02em;
}
.logo span { font: 400 16px/1 var(--mono); }
.lbl {
  font: 400 14px/1.3 var(--mono);
  color: var(--mono-muted);
  text-align: right;
}
.s-dark .lbl { color: #A9A79F; }
.s-green .lbl { color: rgba(13,13,11,.6); }

h1, h2 {
  font-family: var(--head);
  font-weight: 800;
  letter-spacing: -.045em;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(44px, 12.4vw, 88px); line-height: .98; }
h2 { font-size: clamp(32px, 8.8vw, 58px); line-height: 1.02; }
h2 + .lead, h1 + .lead { margin-top: 20px; }

h2.hl { line-height: 1.16; }
mark {
  background: var(--green);
  color: var(--ink);
  padding: 0 .1em;
  border-radius: .12em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.lead {
  font-size: clamp(18px, 4.9vw, 23px);
  line-height: 1.42;
  color: var(--text);
}
.s-dark .lead { color: #D9D7D0; }

.cap {
  margin: 40px 0 14px;
  font: 400 14px/1.3 var(--mono);
  color: var(--mono-muted);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  padding-bottom: 40px;
}
.hero .wrap { display: flex; flex-direction: column; }
.hero .top { margin-bottom: 64px; }
.hero-body { margin-top: auto; }
@media (min-height: 1000px) { .hero { min-height: 920px; } }

.stats {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 12px;
  margin-top: 44px;
}
.stat {
  padding: 22px 22px 20px;
  border-radius: 22px;
  background: var(--bg);
  color: var(--ink);
}
.stat.g { background: var(--green); }
.stat b {
  display: block;
  font: 800 clamp(44px, 13vw, 76px)/.95 var(--head);
  letter-spacing: -.05em;
  white-space: nowrap;
}
.stat span {
  display: block;
  margin-top: 10px;
  font-weight: 700;
  font-size: clamp(14px, 3.9vw, 18px);
  line-height: 1.25;
}

/* ---------- Путь клиента ---------- */
.flow > li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 22px 22px 20px;
  border-radius: 22px;
  background: var(--card);
}
.flow > li + li { margin-top: 44px; }
.flow > li + li::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -36px;
  width: 22px; height: 28px;
  margin-left: -11px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 28' fill='none' stroke='%238D8C87' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 3v21M4 17l7 7 7-7'/%3E%3C/svg%3E") center / contain no-repeat;
}
.flow .num {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink);
  color: #fff;
  font: 700 17px/1 var(--head);
}
.flow .num svg {
  width: 20px; height: 20px;
  fill: none; stroke: currentColor; stroke-width: 2.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.flow .body { flex: 1; min-width: 0; padding-top: 6px; }
.flow b {
  display: block;
  font: 700 clamp(19px, 5.2vw, 23px)/1.2 var(--head);
  letter-spacing: -.01em;
}
.flow small {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  line-height: 1.35;
  color: var(--muted);
}
.flow .dark { background: var(--ink); color: #fff; }
.flow .dark .num { background: var(--green); color: var(--ink); }
.flow .lost {
  background: transparent;
  border: 1.5px dashed var(--line);
}
.flow .lost .num {
  background: transparent;
  border: 1.5px solid var(--mono-muted);
  color: var(--mono-muted);
}
.flow .lost b { color: var(--mono-muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.flow .win { background: var(--green); align-items: center; }
.flow .win .body { padding-top: 0; }
.flow .win .num { background: var(--ink); color: #fff; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.chips span {
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  font-size: 15px;
  line-height: 1.3;
}

/* ---------- Диалоги ---------- */
.dialog + .dialog { margin-top: 72px; }
.dialog .cap { margin-top: 0; }
.msg-in {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 14px;
}
.ava {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--avatar);
}
.bubble {
  max-width: calc(100% - 56px);
  padding: 16px 20px 16px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid #E4E2DB;
  font-size: 17px;
  line-height: 1.45;
}
.bubble .rd { display: block; width: min(15em, 100%); height: 14px; margin: 2px 0 10px; background: var(--ink); }
.bot {
  padding: 20px 22px 22px;
  border-radius: 22px;
  background: var(--ink);
  color: #F5F4F0;
  font-size: 17px;
  line-height: 1.45;
}
.bot p + p { margin-top: 12px; }
.bot strong { color: var(--green); font-weight: 700; }
.meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font: 400 13px/1 var(--mono);
  color: #A9A79F;
}
.meta .rd { width: 9em; height: 14px; }
.rd {
  display: inline-block;
  width: var(--w, 6em);
  max-width: 100%;
  height: .95em;
  border-radius: 4px;
  background: var(--redact);
  vertical-align: -.1em;
}
.note {
  margin-top: 16px;
  padding: 20px 22px;
  border-radius: 22px;
  background: var(--green);
  font-weight: 700;
  font-size: clamp(17px, 4.6vw, 20px);
  line-height: 1.3;
}

/* ---------- Большая цифра ---------- */
.big {
  font: 800 clamp(128px, 42vw, 280px)/.82 var(--head);
  letter-spacing: -.07em;
  margin-left: -.04em;
}
.big + h2 { margin-top: 20px; }
.facts { margin-top: 64px; border-bottom: 1px solid var(--ink); }
.facts div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 18px 0;
  border-top: 1px solid var(--ink);
}
.facts dt { font-size: 17px; line-height: 1.3; }
.facts dd { font: 800 clamp(19px, 5.4vw, 26px)/1.15 var(--head); letter-spacing: -.02em; }

.case-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  padding: 16px 24px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  transition: transform .15s ease;
}
.case-link svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
}
.case-link:active { transform: scale(.98); }
@media (hover: hover) { .case-link:hover { transform: translateY(-2px); } }

/* ---------- Карточки (шаги, о боте) ---------- */
.cards > li {
  padding: 24px 26px;
  border-radius: 22px;
  background: var(--card);
}
.cards > li + li { margin-top: 12px; }
.cards b {
  display: block;
  font: 700 clamp(20px, 5.4vw, 24px)/1.2 var(--head);
  letter-spacing: -.01em;
}
.cards p {
  margin-top: 6px;
  font-size: 17px;
  line-height: 1.4;
  color: var(--text);
}
.cards .dark { background: var(--ink); color: #fff; }
.cards .dark p { color: #D9D7D0; }

.steps > li {
  display: grid;
  grid-template-columns: 3.1em 1fr;
  gap: 4px;
}
.steps .n {
  font: 800 clamp(26px, 7vw, 34px)/1 var(--head);
  letter-spacing: -.04em;
  padding-top: 1px;
}
.steps .dark .n { color: var(--green); }

/* ---------- Финальный CTA ---------- */
.final { padding-bottom: 40px; }
.final h2 { font-size: clamp(42px, 11.8vw, 84px); line-height: .98; }
.go {
  display: grid;
  gap: 12px;
  margin-top: 40px;
}
.go a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 16px 24px;
  border-radius: 22px;
  background: var(--bg);
  color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.go a:first-child { background: var(--green); }
.go a span { font: 400 15px/1 var(--mono); }
.go a b {
  font: 800 clamp(19px, 5.6vw, 28px)/1.1 var(--head);
  letter-spacing: -.02em;
  white-space: nowrap;
}
.go a:active { transform: scale(.98); }
@media (hover: hover) {
  .go a:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -16px rgba(155,245,98,.55); }
}

.foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 96px;
  padding-top: 28px;
  border-top: 1px solid rgba(245,244,240,.14);
}
.foot span {
  display: block;
  font: 400 14px/1 var(--mono);
  color: #A9A79F;
}
.foot b {
  display: block;
  margin-top: 10px;
  font: 700 clamp(17px, 4.8vw, 22px)/1.2 var(--head);
}
.legal {
  margin-top: 40px;
  font-size: 13px;
  line-height: 1.7;
  color: #8D8C87;
}
.legal a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Нижняя панель ---------- */
.dock {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 10;
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(13,13,11,.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 30px -10px rgba(13,13,11,.5);
  transform: translate(-50%, 140%);
  transition: transform .3s ease;
}
.dock.show { transform: translate(-50%, 0); }
.dock a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}
.dock a:first-child { background: var(--green); color: var(--ink); }
.dock svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- Появление ---------- */
.rise { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.rise.in { opacity: 1; transform: none; }

/* ---------- Десктоп ---------- */
@media (min-width: 720px) {
  .wrap { padding: 0 24px; }
  .slide { padding: 36px 0 120px; }
  .top { margin-bottom: 80px; }
  .kicker { margin-bottom: 24px; }
  .hero { padding-bottom: 56px; }
  .flow > li { padding: 26px 28px 26px 24px; }
  .cards > li { padding: 28px 32px; }
}

@media (max-width: 359px) {
  .wrap { padding: 0 16px; }
  .stats { grid-template-columns: 1fr; }
  .facts div { grid-template-columns: 1fr; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { opacity: 1; transform: none; transition: none; }
  .go a, .case-link, .dock { transition: none; }
}
