/* Лендинг: без внешних шрифтов и скриптов — CSP площадки разрешает только свои файлы.
   PT Serif и PT Sans есть в macOS, остальным достаются Georgia и системный гротеск. */

:root {
  --blue: #2b2fd9;
  --blue-deep: #1f22a8;
  --lemon: #f1f07a;
  --ink: #16183f;
  --muted: #555a85;
  --paper: #f7f7fc;
  --tint: #ecedfa;
  --line: #d6d8f0;
  --bubble: #ecedfb;
  --focus: #2b2fd9;
  --serif: "PT Serif", Georgia, "Noto Serif", serif;
  --sans: "PT Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8e9fb;
    --muted: #a9acd6;
    --paper: #11132f;
    --tint: #181b3f;
    --line: #2d3163;
    --focus: #f1f07a;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.55 var(--sans);
}

h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }

a { color: inherit; }

/* Рамка фокуса: синяя на светлом фоне, лимонная на ультрамарине и в тёмной теме. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.wrap--narrow { max-width: 780px; }

.top, .hero, .cta { --focus: var(--lemon); }

/* Только для скринридера: кто говорит в примере переписки. */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Шапка и первый экран — на ультрамарине. */

.top {
  background: var(--blue);
  color: #fff;
}
.top__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 1.125rem/1 var(--sans);
  text-decoration: none;
}
.brand__mark { width: 32px; height: 32px; flex: none; }
.top__link {
  font-size: 1rem;
  text-underline-offset: 4px;
}

.hero {
  background: var(--blue);
  color: #fff;
  padding: 48px 0 88px;
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.hero h1 {
  font: 700 clamp(2.5rem, 5.6vw, 4.5rem)/1.04 var(--serif);
  letter-spacing: -0.015em;
  text-wrap: balance;
}
/* Две фразы — две строки: так заголовок читается как разделение ролей. */
.hero h1 span { display: block; }
.hero__lead {
  max-width: 34em;
  margin-top: 28px;
  font-size: 1.25rem;
  line-height: 1.5;
  color: #dfe0ff;
}
.hero .button { margin-top: 36px; }
.hero__note {
  margin-top: 12px;
  font-size: 0.9375rem;
  color: #c5c7f7;
}

/* Страница 404 — один экран ультрамарина. */
.hero--full {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.button {
  display: inline-block;
  padding: 18px 28px;
  border-radius: 999px;
  background: var(--lemon);
  color: #16183f;
  font: 700 1.0625rem/1.2 var(--sans);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -10px rgba(10, 12, 60, 0.6);
}
.button:active { transform: translateY(0); }

/* Пример переписки: реплики появляются по очереди, последней — карточка контакта.
   Единственная анимация страницы; при prefers-reduced-motion всё видно сразу. */

.chat {
  justify-self: end;
  width: 100%;
  max-width: 400px;
}
.chat__phone {
  background: #fff;
  color: #16183f;
  border-radius: 32px;
  padding: 18px 16px 16px;
  box-shadow: 0 40px 80px -30px rgba(6, 8, 70, 0.75), 0 0 0 8px rgba(255, 255, 255, 0.08);
}
.chat__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px 14px;
  border-bottom: 1px solid #e7e8f6;
}
.chat__avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffd9c7;
  color: #7a3b1e;
  font: 700 1.0625rem/1 var(--sans);
}
.chat__who {
  display: flex;
  flex-direction: column;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.25;
}
.chat__status {
  font-weight: 400;
  font-size: 0.8125rem;
  color: #6b6f99;
}
.chat__log {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 2px 12px;
}
.msg {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.9375rem;
  line-height: 1.4;
  animation: appear 0.45s ease-out both;
}
.msg--them {
  align-self: flex-start;
  background: var(--bubble);
  border-bottom-left-radius: 6px;
}
.msg--us {
  align-self: flex-end;
  background: var(--blue);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.msg:nth-child(1) { animation-delay: 0.3s; }
.msg:nth-child(2) { animation-delay: 1.1s; }
.msg:nth-child(3) { animation-delay: 1.9s; }
.msg:nth-child(4) { animation-delay: 2.7s; }
.msg:nth-child(5) { animation-delay: 3.5s; }

.handoff {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--lemon);
  animation: handoff 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2) 4.4s both;
}
.handoff__title { font-weight: 700; font-size: 1rem; }
.handoff__line { font-size: 0.875rem; color: #3b3e66; }

.chat figcaption {
  margin-top: 16px;
  font-size: 0.875rem;
  color: #c5c7f7;
  text-align: center;
}

@keyframes appear {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes handoff {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .msg, .handoff { animation: none; }
  .button, .faq summary::after { transition: none; }
}

/* Разделы на бумаге. */

.section { padding: 96px 0; }
.section--tint { background: var(--tint); }
.section h2 {
  font: 700 clamp(1.875rem, 3.6vw, 2.625rem)/1.12 var(--serif);
  letter-spacing: -0.01em;
}
.section h3 {
  font: 700 1.1875rem/1.3 var(--sans);
}
.section p {
  margin-top: 8px;
  color: var(--muted);
}

/* Шаги — настоящая последовательность, поэтому с номерами и линией между ними. */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin-top: 48px;
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 72px;
  counter-increment: step;
}
.step::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font: 700 1.25rem/1 var(--serif);
}
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 24px;
  left: 64px;
  right: -16px;
  border-top: 2px dashed var(--line);
}

.gains {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 64px;
  margin-top: 48px;
}
.gains li {
  padding-top: 20px;
  border-top: 2px solid var(--ink);
}

.faq { margin-top: 32px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 22px 0;
  font: 700 1.1875rem/1.35 var(--sans);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  font: 400 1.75rem/1 var(--sans);
  color: var(--blue);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  margin: -6px 0 24px;
  max-width: 38em;
}
@media (prefers-color-scheme: dark) {
  .faq summary::after { color: var(--lemon); }
}

/* Финальный призыв и подвал. */

.cta {
  background: var(--blue);
  color: #fff;
  padding: 80px 0;
}
.cta__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px 48px;
}
.cta h2 {
  font: 700 clamp(1.875rem, 3.6vw, 2.625rem)/1.12 var(--serif);
  letter-spacing: -0.01em;
}
.cta p {
  margin-top: 12px;
  max-width: 32em;
  color: #dfe0ff;
}
.cta .button { flex: none; }

.foot {
  padding: 28px 0 36px;
  font-size: 0.9375rem;
  color: var(--muted);
}
.foot__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

/* Планшет и телефон. */

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .chat { justify-self: start; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
  .step:nth-child(2)::after { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .wrap { padding: 0 16px; }
  .top__link { font-size: 0.9375rem; }
  .hero { padding: 24px 0 64px; }
  .hero__lead { font-size: 1.125rem; margin-top: 20px; }
  .hero .button { margin-top: 28px; }
  .button { display: block; text-align: center; }
  .section { padding: 64px 0; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 36px; }
  .step { padding: 4px 0 0 68px; min-height: 48px; }
  .step:not(:last-child)::after { display: none; }
  .gains { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 36px; }
  .cta { padding: 64px 0; }
  .cta__row { flex-direction: column; align-items: stretch; }
}
