/* ============================================================
   БРИФ — оформление
   Стиль: Superpower (чёрный / белый / цинк + один коралловый акцент)
   Брейкпоинты: 700 (планшет), 1024 (десктоп), 1440 (широкий)
   ============================================================ */

:root {
  /* Цвета */
  --coral: #fc5f2b;
  --coral-dark: #e64f1d;
  --carbon: #18181b;
  --black: #000000;
  --zinc: #71717a;
  --ash: #a1a1aa;
  --mist: #e4e4e7;
  --fog: #f4f4f5;
  --paper: #ffffff;

  /* Шрифты */
  --font-sans: 'Inter Tight', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Радиусы */
  --r-card: 15px;
  --r-small: 5px;
  --r-pill: 9999px;

  /* Тени */
  --shadow-subtle: rgba(0, 0, 0, 0.05) 0px 2px 2px 0px;

  /* Сетка */
  --page-max: 1200px;
  --gutter: 16px;
  --nav-h: 76px;
  --topbar-h: 72px;
}

/* ------------------------------------------------------------
   База
   ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: -0.005em;
  color: var(--carbon);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app { flex: 1 0 auto; }

img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
a { color: inherit; }

.mono {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: -0.006em;
}

.container {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* Тонкий фокус-ринг для клавиатуры */
:focus-visible {
  outline: 2px solid var(--carbon);
  outline-offset: 3px;
}

/* ------------------------------------------------------------
   Прогресс и шапка
   ------------------------------------------------------------ */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 60;
  background: transparent;
}
.progress__bar {
  height: 100%;
  width: 0;
  background: var(--coral);
  transition: width .45s cubic-bezier(.2, .7, .2, 1);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px var(--gutter) 0;
  pointer-events: none;
}
.pill-nav {
  pointer-events: auto;
  max-width: var(--page-max);
  margin: 0 auto;
  background: var(--carbon);
  color: #fff;
  border-radius: var(--r-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 9px 9px 19px;
  box-shadow: var(--shadow-subtle);
}
.pill-nav__logo {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.012em;
  text-decoration: none;
  white-space: nowrap;
}
.pill-nav__logo span { color: rgba(255, 255, 255, .55); font-weight: 400; }
.pill-nav__counter {
  color: rgba(255, 255, 255, .7);
  white-space: nowrap;
}
.pill-nav__cta {
  background: #fff;
  color: var(--carbon);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.009em;
  border-radius: var(--r-pill);
  padding: 9px 16px;
  transition: background .15s;
}
.pill-nav__cta:hover { background: var(--fog); }

/* ------------------------------------------------------------
   Типографика
   ------------------------------------------------------------ */
.display {
  font-size: clamp(37px, 6vw, 66px);
  line-height: 1;
  letter-spacing: -0.025em;
  font-weight: 400;
  margin: 0 0 24px;
  text-wrap: balance;
}
.eyebrow {
  color: var(--zinc);
  margin: 0 0 20px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: 11px;
}
.lead {
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: -0.009em;
  color: var(--zinc);
  max-width: 480px;
  margin: 0 0 28px;
}
.lead--dark { color: var(--carbon); font-size: 19px; }

/* ------------------------------------------------------------
   Кнопки — всегда пилюли
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  padding: 13px 22px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.009em;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, transform .1s, opacity .15s;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn--lg { padding: 16px 28px; font-size: 17px; }
.btn--sm { padding: 10px 16px; font-size: 13px; }

.btn--primary { background: var(--carbon); color: #fff; }
.btn--primary:hover { background: var(--black); }

.btn--coral { background: var(--coral); color: #fff; }
.btn--coral:hover { background: var(--coral-dark); }

.btn--ghost { background: transparent; color: var(--carbon); border-color: var(--mist); }
.btn--ghost:hover { background: var(--fog); }

.btn--link {
  background: none;
  border: none;
  padding: 0;
  color: var(--zinc);
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.btn--link:hover { color: var(--carbon); }

.btn[disabled], .btn.is-busy {
  opacity: .55;
  cursor: default;
  pointer-events: none;
}

/* ------------------------------------------------------------
   Экраны
   ------------------------------------------------------------ */
.screen[hidden] { display: none; }
.screen {
  animation: rise .35s cubic-bezier(.2, .7, .2, 1);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Интро ---------- */
.intro {
  display: grid;
  gap: 40px;
  padding-block: 40px 60px;
}
.intro__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 28px;
}
.trust {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  color: var(--zinc);
  font-size: 13px;
}
.trust li { display: inline-flex; align-items: center; gap: 6px; }
.trust svg { width: 14px; height: 14px; color: var(--carbon); }

.intro__media {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--carbon);
  aspect-ratio: 3 / 4;
  max-width: 100%;
}
.intro__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}
.intro__overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 72px 24px 24px;
  color: #fff;
  background: linear-gradient(to top, rgba(24, 24, 27, .92) 0%, rgba(24, 24, 27, .6) 55%, rgba(24, 24, 27, 0) 100%);
}
.intro__overlay-title {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, .6);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .02em;
}
.intro__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 15px;
  letter-spacing: -0.009em;
}
.intro__list li { display: flex; gap: 12px; align-items: baseline; }
.intro__list .mono { color: rgba(255, 255, 255, .55); font-size: 11px; }

/* ---------- Этап ---------- */
.screen--step { padding-block: 28px 40px; }
.step { display: grid; gap: 28px; }

.step__num { margin: 0 0 12px; color: var(--zinc); }
.step__title {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.013em;
  font-weight: 400;
  margin: 0 0 12px;
  text-wrap: balance;
}
.step__title:focus { outline: none; }
.step__desc {
  color: var(--zinc);
  font-size: 15px;
  margin: 0;
  max-width: 44ch;
}

.step__body { min-width: 0; }

/* ---------- Вопрос ---------- */
.q + .q { margin-top: 40px; }
.q__label {
  display: block;
  font-size: 19px;
  line-height: 1.3;
  letter-spacing: -0.012em;
  margin: 0 0 8px;
  text-wrap: pretty;
}
.q__label .req { color: var(--coral); margin-left: 2px; }
.q__hint {
  color: var(--zinc);
  font-size: 15px;
  margin: 0 0 14px;
  max-width: 62ch;
}
.q__error {
  color: var(--coral);
  font-size: 13px;
  margin: 8px 0 0;
}
.badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  background: var(--coral);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: .03em;
  text-transform: uppercase;
  border-radius: var(--r-pill);
  padding: 5px 9px 4px;
  transform: translateY(-2px);
}

/* Поля */
.field {
  width: 100%;
  display: block;
  font-family: inherit;
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.009em;
  color: var(--carbon);
  background: var(--paper);
  border: 1px solid var(--mist);
  border-radius: var(--r-card);
  padding: 15px 19px;
  outline: none;
  margin: 0;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
.field::placeholder { color: var(--ash); }
.field:hover { border-color: var(--ash); }
.field:focus {
  border-color: var(--carbon);
  box-shadow: 0 0 0 3px rgba(24, 24, 27, .07);
}
.field--area {
  resize: none;
  overflow: hidden;
  min-height: 132px;
  field-sizing: content; /* браузеры с поддержкой растят поле сами, JS — запасной вариант */
}
.field--links { min-height: 100px; }

.q.is-invalid .field,
.q.is-invalid .check,
.q.is-invalid .dropzone {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(252, 95, 43, .12);
}

/* Чекбокс согласия */
.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 19px;
  border: 1px solid var(--mist);
  border-radius: var(--r-card);
  cursor: pointer;
  font-size: 15px;
  line-height: 1.45;
  transition: border-color .15s, box-shadow .15s;
}
.check:hover { border-color: var(--ash); }
.check input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  flex-shrink: 0;
  accent-color: var(--carbon);
  cursor: pointer;
}
.check a {
  color: var(--carbon);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Загрузка файлов */
.dropzone {
  border: 1.5px dashed var(--ash);
  border-radius: var(--r-card);
  padding: 32px 20px;
  text-align: center;
  color: var(--zinc);
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--carbon); }
.dropzone.is-over { border-color: var(--carbon); background: var(--fog); border-style: solid; }
.dropzone svg {
  width: 28px;
  height: 28px;
  margin: 0 auto 12px;
  color: var(--carbon);
}
.dropzone p { margin: 0; }
.dropzone strong { color: var(--carbon); font-weight: 700; }
.dropzone__meta { margin-top: 8px !important; color: var(--ash); }

.files {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 16px;
  border: 1px solid var(--mist);
  border-radius: 11px;
  background: var(--paper);
  min-width: 0;
}
.file__icon { width: 18px; height: 18px; color: var(--zinc); flex-shrink: 0; }
.file__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file__size { color: var(--zinc); white-space: nowrap; }
.file__remove {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: var(--r-pill);
  cursor: pointer;
  color: var(--zinc);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.file__remove:hover { background: var(--fog); color: var(--carbon); }
.file__remove svg { width: 14px; height: 14px; }

/* Панель ошибки отправки */
.notice {
  background: var(--fog);
  border-radius: var(--r-card);
  padding: 19px;
  margin: 0 0 28px;
  font-size: 15px;
}
.notice p { margin: 0; }
.notice p + p { margin-top: 10px; }
.notice--error { border: 1px solid rgba(252, 95, 43, .35); }
.notice__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* ---------- Навигация по этапам ---------- */
.wizard-nav {
  position: sticky;
  bottom: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--mist);
}
.wizard-nav[hidden] { display: none; }
.wizard-nav__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dots { display: flex; gap: 2px; }
.dot {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
}
.dot::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--mist);
  transition: width .25s cubic-bezier(.2, .7, .2, 1), background .2s;
}
.dot:hover::before { background: var(--ash); }
.dot.is-done::before { background: var(--carbon); }
.dot.is-error::before { background: var(--coral); }
.dot.is-active::before { width: 22px; background: var(--coral); }
.dot.is-active.is-done::before { background: var(--coral); }

/* ---------- Финал ---------- */
.final {
  display: grid;
  gap: 32px;
  padding-block: 40px 75px;
}
.final__media {
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--carbon);
  aspect-ratio: 4 / 3;
}
.final__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}
.final__subtitle {
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.012em;
  font-weight: 400;
  margin: 0 0 16px;
}
.timeline {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  border-top: 1px solid var(--mist);
}
.timeline li {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--mist);
}
.timeline__when { color: var(--zinc); padding-top: 3px; }
.timeline__what { font-size: 15px; }
.final__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.final__meta { color: var(--ash); font-size: 13px; margin: 0; }

/* ---------- Подвал ---------- */
.footer {
  border-top: 1px solid var(--mist);
  background: var(--fog);
  margin-top: auto;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
  padding-block: 28px;
}
.footer__brand { display: flex; flex-direction: column; gap: 2px; }
.footer__logo { font-weight: 700; letter-spacing: -0.012em; }
.footer__copy { color: var(--zinc); font-size: 11px; }
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  flex: 1;
}
.footer__links a {
  color: var(--zinc);
  font-size: 13px;
  text-decoration: none;
}
.footer__links a:hover { color: var(--carbon); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Тост ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-h) + 16px);
  transform: translate(-50%, 12px);
  opacity: 0;
  background: var(--carbon);
  color: #fff;
  padding: 11px 18px;
  border-radius: var(--r-pill);
  font-size: 13px;
  letter-spacing: -0.005em;
  z-index: 70;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------
   Документы (политика, согласие, оферта)
   ------------------------------------------------------------ */
.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px var(--gutter) 75px;
}
.doc h1 {
  font-size: clamp(30px, 5vw, 45px);
  line-height: 1.13;
  letter-spacing: -0.015em;
  font-weight: 400;
  margin: 0 0 8px;
}
.doc__meta { color: var(--zinc); margin: 0 0 40px; }
.doc h2 {
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.012em;
  font-weight: 400;
  margin: 40px 0 12px;
}
.doc p, .doc li { font-size: 15px; line-height: 1.6; }
.doc p { margin: 0 0 12px; }
.doc ul, .doc ol { padding-left: 22px; margin: 0 0 12px; }
.doc li { margin-bottom: 6px; }
.doc .placeholder {
  background: var(--fog);
  border-radius: var(--r-small);
  padding: 1px 6px;
  color: var(--carbon);
  font-family: var(--font-mono);
  font-size: 13px;
}
.doc__note {
  background: var(--fog);
  border-radius: var(--r-card);
  padding: 19px;
  color: var(--zinc);
  font-size: 13px;
  margin: 0 0 40px;
}
.doc__note p { margin: 0; font-size: 13px; }
.doc__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--zinc);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 28px;
}
.doc__back:hover { color: var(--carbon); }
.doc__back svg { width: 14px; height: 14px; }

/* ------------------------------------------------------------
   МОБИЛЬНЫЙ — до 700px
   Навигация закреплена внизу экрана
   ------------------------------------------------------------ */
@media (max-width: 699.98px) {
  .wizard-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
  }
  body.has-nav { padding-bottom: var(--nav-h); }
  body.has-nav .footer { display: none; } /* под закреплённой навигацией подвал не нужен */
  .btn--ghost#backBtn { padding-inline: 14px; }
  .btn--ghost#backBtn span { display: none; }
  .pill-nav__cta { display: none; }
  .final__actions .btn { width: 100%; }
}

/* ------------------------------------------------------------
   ПЛАНШЕТ — от 700px
   Две колонки на интро и финале
   ------------------------------------------------------------ */
@media (min-width: 700px) {
  :root { --gutter: 32px; }
  .intro {
    grid-template-columns: 1.15fr 1fr;
    align-items: center;
    gap: 48px;
    padding-block: 60px 75px;
  }
  .intro__media, .final__media { aspect-ratio: 4 / 5; }
  .final {
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
    gap: 48px;
    padding-block: 60px 90px;
  }
  .screen--step { padding-block: 40px 40px; }
  .step { gap: 36px; }
  .step__title { font-size: 37px; letter-spacing: -0.015em; }
}

/* ------------------------------------------------------------
   ДЕСКТОП — от 1024px
   Две колонки на каждом этапе, левая липкая
   ------------------------------------------------------------ */
@media (min-width: 1024px) {
  :root { --gutter: 40px; }
  .screen--step { padding-block: 60px 60px; }
  .step {
    grid-template-columns: minmax(280px, 380px) minmax(0, 720px);
    justify-content: space-between;
    gap: 60px;
    align-items: start;
  }
  .step__aside {
    position: sticky;
    top: calc(var(--topbar-h) + 28px);
  }
  .step__title { font-size: 45px; letter-spacing: -0.015em; line-height: 1.1; }
  .step__desc { font-size: 17px; line-height: 1.4; letter-spacing: -0.009em; }
  .q + .q { margin-top: 48px; }
  .q__label { font-size: 22px; }
  .lead { font-size: 19px; }
  .intro { grid-template-columns: minmax(0, 1fr) 440px; gap: 80px; padding-block: 75px; }
  .final { grid-template-columns: 420px minmax(0, 1fr); gap: 80px; padding-block: 75px 100px; align-items: start; }
  .final__media { position: sticky; top: calc(var(--topbar-h) + 28px); }
}

/* ------------------------------------------------------------
   ШИРОКИЙ — от 1440px
   Больше воздуха и шире левая колонка
   ------------------------------------------------------------ */
@media (min-width: 1440px) {
  :root { --gutter: 60px; --page-max: 1280px; }
  .screen--step { padding-block: 75px 75px; }
  .step {
    grid-template-columns: minmax(380px, 460px) minmax(0, 720px);
    gap: 100px;
  }
  .step__title { font-size: 56px; letter-spacing: -0.022em; line-height: 1.06; }
  .step__desc { font-size: 19px; max-width: 40ch; }
  .intro { grid-template-columns: minmax(0, 1fr) 480px; gap: 100px; }
  .final { grid-template-columns: 460px minmax(0, 1fr); gap: 100px; }
}

/* ------------------------------------------------------------
   Анимации — выключаем для тех, кто просил
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .screen { animation: none; }
  .progress__bar, .dot::before, .btn, .toast { transition: none; }
}
