@import url("../fonts/fonts.css");

/* ==========================================================================
   ДОНУЛЯ — лендинг «Ждёт вас славная судьба»
   --------------------------------------------------------------------------
   Идея макета: строгий «документ» (спокойная сетка, бумага, почти-чёрный
   текст) и поверх него второй слой — детский красный маркер: стрелки,
   обводки, короны. Детский слой комментирует взрослый. Он же выполняет
   работу: стрелки указывают на кнопки, подписи переводят юридический язык.

   Палитра снята пипеткой с утверждённого референса (референс.png).
   ========================================================================== */

:root {
  /* — Цвет ————————————————————————————————————— */
  --paper:        #f8f8f7;   /* фон страницы, с референса */
  --paper-pure:   #ffffff;   /* карточки */
  --paper-warm:   #f2f1ee;   /* чередующиеся секции */
  --note:         #f9f6e0;   /* стикер, с референса */
  --note-edge:    #ece6c4;

  --ink:          #0b0b0f;   /* заголовки, с референса */
  --ink-body:     #3a3a42;   /* основной текст */
  --ink-muted:    #74747f;   /* подписи */
  --hair:         #e6e5e2;   /* линейки и рамки */

  --red:          #c71518;   /* бренд + действие, с референса */
  --red-deep:     #a5090c;   /* hover / pressed */
  --red-ghost:    #fdf0f0;   /* заливка-подложка */
  --red-tint:     rgba(199, 21, 24, 0.10);

  --ok:           #1b7a4b;
  --warn:         #9a6a00;

  /* — Тип ————————————————————————————————————— */
  --sans: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --hand: 'Caveat', var(--sans);

  /* — Ритм ————————————————————————————————————— */
  --gut:   clamp(1.25rem, 5vw, 2.5rem);
  --bay:   clamp(3.5rem, 9vw, 7rem);      /* вертикальный отбив секций */
  --wide:  1320px;                        /* под ширину референса (1672) */
  --read:  62ch;

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;

  /* Тени тёплые, а не серые — иначе «бумага» выглядит грязной */
  --lift-1: 0 1px 2px rgba(28, 22, 18, .04), 0 2px 8px rgba(28, 22, 18, .04);
  --lift-2: 0 2px 4px rgba(28, 22, 18, .05), 0 12px 28px rgba(28, 22, 18, .07);
  --lift-3: 0 4px 8px rgba(28, 22, 18, .06), 0 24px 56px rgba(28, 22, 18, .10);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
}

/* ==========================================================================
   Сброс
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Заголовок липкий — якоря не должны уезжать под него */
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-body);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.04;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }

a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-deep); }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

::selection { background: var(--red); color: #fff; }

/* ==========================================================================
   Раскладка
   ========================================================================== */

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.section { padding-block: var(--bay); position: relative; }
.section--warm { background: var(--paper-warm); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--red);
  border-radius: 2px;
}

.section__title {
  font-size: clamp(1.75rem, 4.6vw, 3rem);
  max-width: 20ch;
}
.section__lede {
  margin-top: 1.125rem;
  max-width: 54ch;
  font-size: clamp(1rem, 2vw, 1.1875rem);
  color: var(--ink-muted);
}

/* ==========================================================================
   Детский слой: рукописный маркер
   --------------------------------------------------------------------------
   .hand      — подпись почерком
   .doodle    — контейнер SVG-каракуль, всегда декоративный (aria-hidden)
   .is-drawn  — вешает JS, когда каракуля въехала в экран: линия «рисуется»
   ========================================================================== */

.hand {
  font-family: var(--hand);
  font-weight: 700;
  color: var(--red);
  letter-spacing: .01em;
  line-height: 1.15;
}
.hand--ink { color: var(--ink); }

.doodle {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  color: var(--red);
}
.doodle svg { overflow: visible; width: 100%; height: auto; }
.doodle path,
.doodle line,
.doodle polyline {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Самоотрисовка. Длину пути задаёт JS (--len), иначе dash не совпадёт
   с реальной длиной кривой и хвост дёрнется. */
.doodle--draw path,
.doodle--draw polyline {
  stroke-dasharray: var(--len, 400);
  stroke-dashoffset: var(--len, 400);
}
.doodle--draw.is-drawn path,
.doodle--draw.is-drawn polyline {
  animation: draw .9s var(--ease) forwards;
  animation-delay: var(--draw-delay, 0s);
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Обводка слова маркером */
.circled { position: relative; display: inline-block; }
.circled > .doodle {
  inset: -18% -7%;
  width: 114%;
  height: 136%;
}

/* Красный мазок-подложка под текстом */
.swash {
  position: relative;
  display: inline-block;
  padding: .1em .55em .18em;
  color: #fff;
  isolation: isolate;
}
.swash::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--red);
  /* Неровные края — мазок, а не прямоугольник */
  border-radius: 40% 60% 55% 45% / 55% 45% 60% 40%;
  transform: rotate(-1.2deg) scaleX(1.02);
}

/* ==========================================================================
   Кнопки
   ========================================================================== */

.btn {
  --btn-bg: var(--red);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 56px;                 /* палец, не курсор */
  padding: .95rem 1.6rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -.01em;
  text-decoration: none;
  text-align: center;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
              background-color .18s var(--ease);
  box-shadow: var(--lift-1);
}
.btn:hover {
  --btn-bg: var(--red-deep);
  color: var(--btn-fg);
  transform: translateY(-2px);
  box-shadow: var(--lift-2);
}
.btn:active { transform: translateY(0); box-shadow: var(--lift-1); }

.btn__arrow { transition: transform .22s var(--ease-back); flex: none; }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--red);
  border: 1.5px solid var(--red);
  box-shadow: none;
}
.btn--ghost:hover {
  --btn-bg: var(--red-ghost);
  --btn-fg: var(--red-deep);
  border-color: var(--red-deep);
}

.btn--quiet {
  --btn-bg: transparent;
  --btn-fg: var(--ink-muted);
  min-height: 44px;
  padding: .5rem .9rem;
  font-weight: 500;
  box-shadow: none;
}
.btn--quiet:hover { --btn-fg: var(--ink); background: rgba(11,11,15,.05); transform: none; box-shadow: none; }

.btn--lg { min-height: 62px; padding: 1.1rem 2rem; font-size: 1.125rem; }
.btn--block { width: 100%; }

.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .42;
  pointer-events: none;
}

/* ==========================================================================
   Шапка
   ========================================================================== */

.hdr {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Полупрозрачный фон + лёгкий блюр. Блюр держим небольшим (8px, без
     saturate): тяжёлый backdrop-filter на липкой шапке перерисовывается
     каждый кадр скролла и даёт джанк на слабых мобилах — а это основной
     трафик. Фон достаточно плотный (.9), чтобы читалось и без блюра. */
  background: rgba(248, 248, 247, .9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.hdr.is-stuck { border-bottom-color: var(--hair); }

.hdr__in {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  min-height: 76px;
}

.hdr__logo { flex: none; display: block; line-height: 0; }
.hdr__logo img { width: 130px; height: auto; }

.hdr__nav {
  display: none;
  gap: clamp(1rem, 2.2vw, 2rem);
  margin-inline: auto;
}
.hdr__nav a {
  color: var(--ink-body);
  text-decoration: none;
  font-size: .9375rem;
  font-weight: 500;
  white-space: nowrap;
  padding: .4rem 0;
  border-bottom: 2px solid transparent;
  transition: color .18s, border-color .18s;
}
.hdr__nav a:hover { color: var(--ink); border-bottom-color: var(--red); }

/* Пока квиз на экране, пункты меню прячутся (ставит app.js):
   человек начал отвечать — не предлагаем ему уйти. visibility, а не
   display — чтобы телефон и кнопка не прыгали по ширине. */
.hdr.is-quiz .hdr__nav {
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s var(--ease);
}
.hdr__nav { transition: opacity .25s var(--ease); }

.hdr__tel { display: none; text-align: right; flex: none; line-height: 1.25; }
.hdr__tel-num {
  display: flex; align-items: center; gap: .5rem;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
}
.hdr__tel-num svg { color: var(--red); flex: none; }
.hdr__tel-sub { font-size: .75rem; color: var(--ink-muted); }

.hdr__cta { flex: none; }
/* До 900px меню и телефон скрыты — без распорки кнопка липнет к логотипу
   и справа зияет пустота. Прижимаем её к правому краю. */
@media (max-width: 899.98px) { .hdr__cta { margin-left: auto; } }
.hdr .btn { min-height: 46px; padding: .55rem 1.2rem; font-size: .9375rem; }

@media (min-width: 900px)  { .hdr__nav { display: flex; } }
@media (min-width: 1080px) { .hdr__tel { display: block; } }

/* ==========================================================================
   Герой
   ========================================================================== */

/* Вертикальный ритм снят с референса: там на 941 px высоты помещаются
   и стикер, и заголовок, и обе кнопки, и плашки доверия. Отбивы тесные
   намеренно — герой обязан отработать на один экран. */
.hero {
  position: relative;
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
  /* Низ героя = --bay, как у всех секций: тогда отбив от героя до
     «Кому подходит» такой же, как между остальными блоками (112px). */
  padding-bottom: var(--bay);
  overflow: hidden;
}

/* Тёплое красное свечение справа — с референса */
.hero::after {
  content: "";
  position: absolute;
  top: -12%;
  right: -18%;
  width: min(70vw, 900px);
  aspect-ratio: 1;
  background: radial-gradient(circle at 60% 45%,
              rgba(199, 21, 24, .13) 0%,
              rgba(199, 21, 24, .05) 42%,
              transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.hero__in {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
}

.hero__copy { position: relative; }

/* Стикер с детским рисунком — цельный ассет (рисунок + текст + стрелка) */
.hero__note {
  display: block;
  width: clamp(280px, 40vw, 400px);
  margin-bottom: clamp(1rem, 2.5vw, 1.75rem);
  transform: rotate(-1.4deg);
}

/* Разрывы строк расставлены вручную через .line — по референсу.
   text-wrap: balance (наследуется от общего правила h1) здесь вредит:
   он балансирует КАЖДУЮ .line отдельно и рвёт «Приходите в ДОНУЛЯ —»
   пополам. Отключаем и подбираем кегль так, чтобы строка влезала. */
.hero__h1 {
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -.04em;
  text-wrap: initial;
}
.hero__h1 .red { color: var(--red); }
.hero__h1 .line { display: block; }

.hero__lede {
  margin-top: clamp(1rem, 2vw, 1.25rem);
  max-width: 34ch;
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  color: var(--ink-muted);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: .875rem;
  margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
}
/* На мобиле кнопки тянутся во всю ширину, на десктопе встают в строку.
   Кегль здесь обычный, не --lg: с --lg пара не влезает в колонку и
   вторая кнопка падает под первую. */
.hero__cta .btn { flex: 1 1 auto; }
@media (min-width: 480px) { .hero__cta .btn { flex: 0 1 auto; } }

/* Соц. доказательство */
.hero__proof {
  display: flex;
  align-items: center;
  gap: .875rem;
  margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
}
.hero__proof-heart { color: var(--red); flex: none; }
.hero__faces { flex: none; width: clamp(96px, 14vw, 120px); height: auto; }
.hero__proof-txt { font-size: .9375rem; line-height: 1.35; }
.hero__proof-txt b { display: block; color: var(--ink); font-weight: 700; }
.hero__proof-txt span { color: var(--ink-muted); }

/* Правая колонка: готовая композиция заказчика (фон, дудлы и красный
   мазок запечены в картинку) — просто скруглённая карточка с тенью. */
.hero__art {
  position: relative;
  align-self: center;
  min-height: 260px;
}
.hero__photo {
  display: block;
  width: 100%;
  max-width: 660px;
  margin-inline: auto;
  border-radius: var(--r-lg);
  box-shadow: var(--lift-2);
}

@media (min-width: 940px) {
  .hero__in {
    /* Текстовой колонке нужно ~685px, иначе «ждёт вас славная судьба»
       не встаёт в строку на максимальном кегле. */
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    align-items: center;
  }
  .hero__art { min-height: 520px; }
}

/* Плашки доверия под героем */
.trustbar {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  margin-top: clamp(1.5rem, 3vw, 2rem);
}
@media (min-width: 720px) { .trustbar { grid-template-columns: repeat(3, 1fr); } }

.tcard {
  display: flex;
  align-items: flex-start;
  gap: .95rem;
  padding: 1.25rem 1.35rem;
  background: var(--paper-pure);
  border: 1px solid var(--hair);
  border-radius: var(--r);
  box-shadow: var(--lift-1);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.tcard:hover { transform: translateY(-3px); box-shadow: var(--lift-2); }
.tcard svg { flex: none; color: var(--red); margin-top: 2px; }
.tcard b { display: block; color: var(--ink); font-weight: 700; font-size: 1rem; margin-bottom: .2rem; }
.tcard span { font-size: .875rem; color: var(--ink-muted); line-height: 1.45; }

/* ==========================================================================
   Кому подходит — «Шутка смешная. Ситуация — не детская.»
   ========================================================================== */

.pains__in {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}
@media (min-width: 940px) {
  .pains__in { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); align-items: center; }
}

/* — Левая колонка: заголовок — */
.pains__copy { position: relative; }

.pains__doodle {
  width: clamp(150px, 20vw, 190px);
  margin-bottom: 1rem;
  transform: rotate(-2deg);
}

.pains__h2 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: -.035em;
}
.pains__h2 .red { color: var(--red); }

/* Рукописное подчёркивание под заголовком */
.pains__underline {
  display: block;
  width: clamp(180px, 26vw, 280px);
  height: 14px;
  margin: .6rem 0 0 .2rem;
  color: var(--red);
}
.pains__underline path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }

.pains__lede {
  margin-top: 1.5rem;
  max-width: 46ch;
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--ink-body);
  line-height: 1.6;
}
.pains__lede b { color: var(--red); font-weight: 700; }

/* Красная плашка-щит */
.pains__shield {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.75rem;
  padding: 1.25rem 1.4rem;
  background: var(--red-ghost);
  border: 1px solid #f6dede;
  border-radius: var(--r);
}
.pains__shield img { flex: none; width: 46px; height: 46px; }
.pains__shield p { font-size: .9375rem; line-height: 1.5; color: var(--ink-body); }
.pains__shield b { color: var(--ink); font-weight: 700; }

/* — Правая колонка: карточки боли — */
.pains__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 519px) { .pains__cards { grid-template-columns: 1fr; } }

.pain-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.3rem;
  background: var(--paper-pure);
  border: 1px solid var(--hair);
  border-radius: var(--r);
  box-shadow: var(--lift-1);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.pain-card:hover { transform: translateY(-3px); box-shadow: var(--lift-2); }
/* Пятая карточка шире — на всю строку, как на референсе */
.pain-card--wide { grid-column: 1 / -1; }
@media (max-width: 519px) { .pain-card--wide { grid-column: auto; } }

.pain-card__ico {
  flex: none;
  display: grid;
  place-content: center;
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--red-ghost);
}
.pain-card__ico img { width: 38px; height: 38px; }
.pain-card p { font-size: 1rem; font-weight: 600; color: var(--ink); line-height: 1.3; letter-spacing: -.01em; }

/* ==========================================================================
   Квиз
   ========================================================================== */

.quiz { position: relative; }

.quiz__shell {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
  background: var(--paper-pure);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  box-shadow: var(--lift-3);
  overflow: hidden;
}

/* Прогресс — детская линия, а не полоска из бутстрапа */
.quiz__progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 2.25rem);
  border-bottom: 1px solid var(--hair);
  background: var(--paper);
}
.quiz__track {
  position: relative;
  flex: 1;
  height: 10px;
}
.quiz__track-line,
.quiz__track-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.quiz__track-line path { stroke: var(--hair); stroke-width: 3; fill: none; stroke-linecap: round; }
.quiz__track-fill path {
  stroke: var(--red);
  stroke-width: 3.5;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: var(--track-len, 300);
  stroke-dashoffset: calc(var(--track-len, 300) - var(--track-len, 300) * var(--p, 0));
  transition: stroke-dashoffset .5s var(--ease);
}
.quiz__count {
  flex: none;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.quiz__count b { color: var(--red); }

.quiz__body { padding: clamp(1.75rem, 5vw, 3rem) clamp(1.25rem, 4vw, 2.75rem); }

.quiz__step { display: none; }
.quiz__step.is-active { display: block; animation: stepIn .38s var(--ease) both; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.quiz__q {
  font-size: clamp(1.375rem, 3.6vw, 1.875rem);
  margin-bottom: .5rem;
}
.quiz__hint {
  font-size: .9375rem;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}

.quiz__opts { display: grid; gap: .75rem; }
@media (min-width: 560px) { .quiz__opts--pair { grid-template-columns: 1fr 1fr; } }

.opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 62px;
  padding: 1rem 1.25rem;
  text-align: left;
  background: var(--paper-pure);
  border: 1.5px solid var(--hair);
  border-radius: var(--r-sm);
  font-weight: 500;
  font-size: 1.0625rem;
  color: var(--ink);
  transition: border-color .16s, background-color .16s, transform .12s var(--ease);
}
/* :hover только на устройствах с мышью. На тач-экране hover «залипает»:
   после тапа подсветка переносится на вариант в той же позиции на
   следующем шаге — и он выглядит уже выбранным. */
@media (hover: hover) {
  .opt:hover { border-color: var(--red); background: var(--red-ghost); }
}
.opt:active { transform: scale(.985); }
.opt.is-picked { border-color: var(--red); background: var(--red-ghost); }
.opt.is-picked .opt__mark { opacity: 1; transform: scale(1); }

.opt__mark {
  flex: none;
  color: var(--red);
  opacity: 0;
  transform: scale(.5);
  transition: opacity .18s, transform .22s var(--ease-back);
}

.quiz__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.75rem;
  min-height: 44px;
}
.quiz__back { visibility: hidden; }
.quiz__back.is-on { visibility: visible; }

/* — Форма контактов — */
.field { display: block; margin-bottom: 1.1rem; }
.field__label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: .45rem;
}
.field__input {
  width: 100%;
  min-height: 58px;
  padding: 1rem 1.15rem;
  background: var(--paper-pure);
  border: 1.5px solid var(--hair);
  border-radius: var(--r-sm);
  font-size: 1.0625rem;
  color: var(--ink);
  transition: border-color .16s, box-shadow .16s;
}
.field__input::placeholder { color: #b3b3bc; }
.field__input:hover { border-color: #d2d1cd; }
.field__input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 4px var(--red-tint);
}
.field__input[aria-invalid="true"] { border-color: var(--red); background: var(--red-ghost); }

.field__err {
  display: none;
  margin-top: .45rem;
  font-size: .8125rem;
  font-weight: 500;
  color: var(--red);
}
.field__err.is-on { display: block; }

.consent {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  margin: 1.25rem 0 1.5rem;
  cursor: pointer;
}
.consent input {
  flex: none;
  width: 22px; height: 22px;
  margin: 1px 0 0;
  accent-color: var(--red);
  cursor: pointer;
}
.consent span { font-size: .8125rem; line-height: 1.5; color: var(--ink-muted); }
.consent a { color: var(--ink-body); text-decoration: underline; }
.consent a:hover { color: var(--red); }

.formnote {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  margin-top: 1.25rem;
  font-size: .8125rem;
  color: var(--ink-muted);
  line-height: 1.5;
}
.formnote svg { flex: none; color: var(--ok); margin-top: 1px; }

/* — Мягкий отказ (<300 тыс.) — */
.bail { text-align: center; padding-block: .5rem; }
.bail__art { color: var(--red); margin: 0 auto 1.5rem; width: 92px; }
.bail h3 { font-size: clamp(1.375rem, 3.4vw, 1.75rem); margin-bottom: .85rem; }
.bail p { max-width: 46ch; margin-inline: auto; color: var(--ink-muted); }
.bail__acts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
  margin-top: 1.75rem;
}

/* ==========================================================================
   Почему доверяют
   ========================================================================== */

.stats {
  display: grid;
  gap: 1px;
  margin-top: clamp(2rem, 4vw, 3rem);
  background: var(--hair);
  border: 1px solid var(--hair);
  border-radius: var(--r);
  overflow: hidden;
}
/* auto-fit, а не фиксированные колонки: при 5 плитках любой ряд
   заполняется без пустых ячеек (иначе на фоне-разделителе зияет дыра).
   minmax(180px) держит максимум 5 в ряд на широком экране. */
.stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
@media (max-width: 400px) { .stats { grid-template-columns: 1fr; } }

.stat {
  position: relative;
  padding: 1.75rem 1.4rem;
  background: var(--paper-pure);
  text-align: center;
}
.stat__num {
  display: block;
  font-size: clamp(1.75rem, 3.4vw, 2.375rem);
  font-weight: 800;
  letter-spacing: -.045em;
  color: var(--red);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;   /* «>1 млрд ₽» и «127-ФЗ» не должны рваться */
}
.stat__lbl {
  display: block;
  margin-top: .5rem;
  font-size: .875rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

.steps {
  display: grid;
  gap: 1rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  counter-reset: step;
}
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); } }

.step {
  position: relative;
  display: flex;
  gap: 1.1rem;
  padding: 1.5rem;
  background: var(--paper-pure);
  border: 1px solid var(--hair);
  border-radius: var(--r);
}
.step__n {
  counter-increment: step;
  flex: none;
  display: grid;
  place-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--red-ghost);
  color: var(--red);
  font-weight: 800;
  font-size: 1.0625rem;
  font-variant-numeric: tabular-nums;
}
.step__n::before { content: counter(step); }
.step h3 { font-size: 1.0625rem; margin-bottom: .35rem; letter-spacing: -.02em; }
.step p { font-size: .9375rem; color: var(--ink-muted); line-height: 1.5; }

/* Честный блок: что списывается, а что нет */
.honest {
  display: grid;
  gap: 1rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}
@media (min-width: 760px) { .honest { grid-template-columns: 1fr 1fr; } }

.honest__col {
  padding: 1.6rem;
  border-radius: var(--r);
  border: 1px solid var(--hair);
  background: var(--paper-pure);
}
.honest__col h3 {
  display: flex; align-items: center; gap: .55rem;
  font-size: 1.0625rem; margin-bottom: 1rem; letter-spacing: -.02em;
}
.honest__col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .65rem; }
.honest__col li {
  display: flex; gap: .6rem; align-items: flex-start;
  font-size: .9375rem; line-height: 1.45;
}
.honest__col li svg { flex: none; margin-top: 3px; }
.honest--yes h3 { color: var(--ok); }
.honest--yes li svg { color: var(--ok); }
.honest--no h3 { color: var(--ink); }
.honest--no li svg { color: var(--ink-muted); }
.honest--no li { color: var(--ink-muted); }

/* ==========================================================================
   Финальный CTA
   ========================================================================== */

.final {
  position: relative;
  background: var(--ink);
  color: rgba(255,255,255,.72);
  overflow: hidden;
}
.final::before {
  content: "";
  position: absolute;
  bottom: -35%; left: 50%;
  transform: translateX(-50%);
  width: min(120vw, 1100px);
  aspect-ratio: 2 / 1;
  background: radial-gradient(ellipse at center,
              rgba(199, 21, 24, .40) 0%,
              rgba(199, 21, 24, .10) 45%,
              transparent 70%);
  pointer-events: none;
}
.final__in { position: relative; z-index: 1; text-align: center; }
.final h2 {
  color: #fff;
  font-size: clamp(1.875rem, 5.2vw, 3.25rem);
  max-width: 18ch;
  margin-inline: auto;
}
.final__lede {
  margin: 1.25rem auto 0;
  max-width: 46ch;
  font-size: clamp(1rem, 2vw, 1.125rem);
}
.final__hand {
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(1.375rem, 3.4vw, 1.875rem);
  color: #fff;
  margin-top: 2.25rem;
}
.final__acts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .875rem;
  margin-top: 1.5rem;
}
.final .btn--ghost {
  --btn-fg: #fff;
  border-color: rgba(255,255,255,.35);
}
.final .btn--ghost:hover {
  --btn-bg: rgba(255,255,255,.1);
  --btn-fg: #fff;
  border-color: #fff;
}
.final__micro {
  margin-top: 1.5rem;
  font-size: .8125rem;
  color: rgba(255,255,255,.45);
}

/* ==========================================================================
   Подвал
   ========================================================================== */

.ftr {
  background: var(--paper-warm);
  border-top: 1px solid var(--hair);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  font-size: .875rem;
}
.ftr__top {
  display: grid;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--hair);
}
@media (min-width: 780px) { .ftr__top { grid-template-columns: 1.2fr 1fr 1fr; } }

.ftr__logo img { width: 118px; margin-bottom: 1rem; }
.ftr p { color: var(--ink-muted); line-height: 1.55; }
.ftr h4 { font-size: .8125rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted); font-weight: 600; margin-bottom: .9rem; }
.ftr ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .55rem; }
.ftr ul a, .ftr__tel {
  color: var(--ink-body);
  text-decoration: none;
  transition: color .16s;
}
.ftr ul a:hover, .ftr__tel:hover { color: var(--red); }
.ftr__tel { display: block; font-size: 1.125rem; font-weight: 700; color: var(--ink); margin-bottom: .3rem; }

.ftr__req {
  margin-top: 2rem;
  color: var(--ink-muted);
  font-size: .75rem;
  line-height: 1.6;
  display: grid;
  gap: .75rem;
}
.ftr__req p { font-size: inherit; }
.ftr__req b { color: var(--ink-body); font-weight: 600; }

/* ==========================================================================
   Отзывы (ВАРИАНТ 3): процесс + видеоплеер Rutube
   ========================================================================== */

.reviews__head {
  display: grid;
  gap: 1.25rem 2.5rem;
  align-items: end;
}
@media (min-width: 860px) {
  .reviews__head { grid-template-columns: 1.4fr 1fr; }
}
.reviews__title { font-size: clamp(1.75rem, 4.4vw, 2.875rem); }
.reviews__title .red { color: var(--red); }
.reviews__sub { color: var(--ink-muted); font-size: clamp(1rem, 2vw, 1.125rem); max-width: 34ch; }

/* — 4 шага процесса — */
.process {
  display: grid;
  gap: 1.25rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  counter-reset: pr;
}
@media (min-width: 720px) { .process { grid-template-columns: repeat(4, 1fr); } }

.pstep {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  text-align: left;
}
@media (min-width: 720px) {
  .pstep { flex-direction: column; align-items: flex-start; gap: .9rem; }
  /* Пунктирный коннектор между шагами */
  .pstep:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 31px; left: calc(62px + 1rem); right: -1rem;
    border-top: 2px dashed #e0c9ca;
  }
}
.pstep__ico {
  flex: none;
  display: grid;
  place-content: center;
  width: 62px; height: 62px;
  border-radius: 50%;
  background: var(--paper-pure);
  border: 1px solid var(--hair);
  box-shadow: var(--lift-1);
  z-index: 1;
}
.pstep__ico img { width: 34px; height: 34px; }
.pstep p { font-size: .9375rem; color: var(--ink-body); font-weight: 500; line-height: 1.4; }
.pstep p b { display: block; color: var(--ink); font-weight: 700; }

/* — Плитка отзывов — */
.reviews__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 1.5rem;
}
.reviews__bar h3 { font-size: clamp(1.25rem, 3vw, 1.625rem); letter-spacing: -.02em; }
.reviews__bar h3 span { color: var(--red); }
.reviews__all {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--red); font-weight: 600; font-size: .9375rem; text-decoration: none;
  white-space: nowrap;
}
.reviews__all:hover { color: var(--red-deep); }
.reviews__all svg { transition: transform .2s var(--ease-back); }
.reviews__all:hover svg { transform: translateX(3px); }

.reviews-grid {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) { .reviews-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 940px) { .reviews-grid { grid-template-columns: repeat(3, 1fr); } }

.review {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--hair);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--ink);
  box-shadow: var(--lift-1);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.review:hover { transform: translateY(-3px); box-shadow: var(--lift-2); }

.review__frame {
  display: block;              /* был inline-span: абсолютный оверлей плеера
                                 схлопывался в 0 ширины и уезжал с центра */
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}
.review__poster {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.review__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.28));
  transition: background .2s;
}
.review:hover .review__play { background: linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.36)); }
.review__play span {
  display: grid; place-content: center;
  width: 62px; height: 62px;
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  box-shadow: 0 6px 20px rgba(0,0,0,.28);
  transition: transform .2s var(--ease-back);
}
.review:hover .review__play span { transform: scale(1.08); }
.review__play svg { margin-left: 3px; color: var(--red); }

.review__dur {
  position: absolute;
  right: .6rem; bottom: .6rem;
  padding: .15rem .5rem;
  border-radius: 6px;
  background: rgba(0,0,0,.78);
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.review__cap {
  display: block;
  padding: .85rem 1rem;
  background: var(--paper-pure);
  font-size: .875rem;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
}
.review iframe { width: 100%; height: 100%; border: 0; display: block; }

.reviews__note {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: 1.5rem;
  font-size: .875rem;
  color: var(--ink-muted);
}
.reviews__note img { width: 22px; height: 22px; flex: none; }

/* ==========================================================================
   Модалка реквизитов
   ========================================================================== */

.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: var(--gut);
}
.modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(11, 11, 15, .55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fade .2s var(--ease);
}
.modal__box {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  padding: clamp(1.5rem, 4vw, 2rem);
  background: var(--paper-pure);
  border-radius: var(--r-lg);
  box-shadow: var(--lift-3);
  animation: pop .28s var(--ease-back);
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }

.modal__close {
  position: absolute;
  top: .9rem; right: .9rem;
  width: 38px; height: 38px;
  display: grid; place-content: center;
  border-radius: 50%;
  color: var(--ink-muted);
  transition: background .16s, color .16s;
}
.modal__close:hover { background: rgba(11,11,15,.06); color: var(--ink); }

.modal__box h2 { font-size: 1.25rem; margin-bottom: .35rem; }
.modal__box > p { font-size: .875rem; color: var(--ink-muted); margin-bottom: 1.25rem; }

.req {
  margin: 0;
  display: grid;
  gap: 0;
}
.req div {
  display: grid;
  gap: .1rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--hair);
}
.req div:last-child { border-bottom: 0; }
.req dt { font-size: .75rem; color: var(--ink-muted); letter-spacing: .02em; }
.req dd {
  margin: 0;
  font-size: .9375rem;
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.req .copy {
  flex: none;
  font-size: .75rem; font-weight: 600;
  color: var(--red);
  padding: .2rem .5rem;
  border-radius: 6px;
}
.req .copy:hover { background: var(--red-ghost); }
.req .copy.is-done { color: var(--ok); }

.ftr__reqbtn {
  background: none;
  color: var(--ink-body);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: inherit;
  font-weight: 600;
}
.ftr__reqbtn:hover { color: var(--red); }

/* ==========================================================================
   Липкий CTA на мобиле
   --------------------------------------------------------------------------
   Reels-трафик — это большой палец на 375px. Кнопка должна быть в зоне
   большого пальца всегда, но не перекрывать сам квиз.
   ========================================================================== */

.sticky {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  padding: .7rem var(--gut) calc(.7rem + env(safe-area-inset-bottom));
  background: rgba(248, 248, 247, .93);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--hair);
  transform: translateY(110%);
  transition: transform .3s var(--ease);
}
.sticky.is-on { transform: none; }
.sticky .btn { width: 100%; }
@media (min-width: 940px) { .sticky { display: none; } }

/* ==========================================================================
   Страницы /verify и /thanks
   ========================================================================== */

.mini {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.mini__main {
  display: grid;
  place-items: center;
  padding: clamp(2rem, 6vw, 4rem) var(--gut);
}

.card {
  position: relative;
  width: 100%;
  max-width: 480px;
  padding: clamp(1.75rem, 5vw, 2.75rem);
  background: var(--paper-pure);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  box-shadow: var(--lift-3);
  text-align: center;
}
.card h1 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: .75rem; }
.card > p { color: var(--ink-muted); font-size: .9375rem; }

.card__phone {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: .5rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* — Ввод SMS-кода — */
.code {
  display: flex;
  justify-content: center;
  gap: .6rem;
  margin: 1.75rem 0 .5rem;
  direction: ltr;
}
.code__cell {
  width: clamp(46px, 15vw, 60px);
  height: clamp(58px, 18vw, 72px);
  padding: 0;
  text-align: center;
  font-size: clamp(1.5rem, 5vw, 1.875rem);
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--hair);
  border-radius: var(--r-sm);
  font-variant-numeric: tabular-nums;
  transition: border-color .16s, box-shadow .16s, background-color .16s;
}
.code__cell:focus {
  outline: none;
  border-color: var(--red);
  background: var(--paper-pure);
  box-shadow: 0 0 0 4px var(--red-tint);
}
.code__cell.is-filled { border-color: var(--ink); background: var(--paper-pure); }
.code.is-bad { animation: shake .4s; }
.code.is-bad .code__cell { border-color: var(--red); background: var(--red-ghost); }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}

.code__msg {
  min-height: 1.5rem;
  font-size: .875rem;
  font-weight: 500;
  color: var(--red);
}
.code__msg.is-ok { color: var(--ok); }

.resend { margin-top: 1.25rem; font-size: .875rem; color: var(--ink-muted); }
.resend button {
  color: var(--red);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.resend button[disabled] { color: var(--ink-muted); text-decoration: none; cursor: default; }
.resend__timer { font-variant-numeric: tabular-nums; }

.card__alt {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hair);
  font-size: .8125rem;
  color: var(--ink-muted);
}
.card__alt a { color: var(--ink-body); }

/* Кнопка «Изменить номер» — как ссылка */
.card__editbtn {
  color: var(--red);
  font-weight: 600;
  font-size: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.card__editbtn:hover { color: var(--red-deep); }

/* Инлайн-форма смены номера */
.phoneedit {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hair);
  text-align: left;
}
.phoneedit[hidden] { display: none; }
.phoneedit .field__label { display: block; margin-bottom: .45rem; }
.phoneedit .field__err { margin: .5rem 0 0; }
.phoneedit__row { display: flex; gap: .6rem; margin-top: 1rem; }
.phoneedit__row .btn { flex: 1; min-height: 50px; padding-inline: .75rem; }

/* — Спасибо — */
.done__art { width: 96px; margin: 0 auto 1.5rem; color: var(--red); }
.done__next {
  margin-top: 1.75rem;
  padding: 1.25rem;
  text-align: left;
  background: var(--paper);
  border-radius: var(--r);
  border: 1px solid var(--hair);
}
.done__next h2 { font-size: .8125rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-muted); font-weight: 600; margin-bottom: .9rem; }
.done__next ol { margin: 0; padding: 0; list-style: none; display: grid; gap: .8rem; counter-reset: dn; }
.done__next li {
  display: flex; gap: .75rem; align-items: flex-start;
  font-size: .9375rem; line-height: 1.45;
  counter-increment: dn;
}
.done__next li::before {
  content: counter(dn);
  flex: none;
  display: grid; place-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--red); color: #fff;
  font-size: .75rem; font-weight: 700;
}

/* ==========================================================================
   Служебное
   ========================================================================== */

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }

/* Появление секций при скролле.
   --------------------------------------------------------------------------
   Прячем ТОЛЬКО когда JS жив: класс .js ставит инлайн-скрипт в <head>.
   Без этой оговорки opacity:0 живёт в таблице стилей, а снимает его
   скрипт — и любой сбой JS оставляет пол-лендинга невидимым. Трафик из
   Reels идёт через встроенный браузер соцсети, где JS ломается чаще
   всего, так что цена ошибки — вся страница. */
.js .rise { opacity: 0; transform: translateY(18px); }
.js .rise.is-in {
  opacity: 1; transform: none;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: var(--rise-delay, 0s);
}

/* Уважаем системную настройку: motion — это украшение, а не смысл */
@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 .rise выше,
     иначе правило проигрывает и контент остаётся скрытым. */
  .js .rise { opacity: 1; transform: none; }
  .doodle--draw path,
  .doodle--draw polyline { stroke-dashoffset: 0; }
  .sticky { transition: none; }
}
