/* QAExpert — лендинг. Мобильная раскладка — «20 · Макет 390» (до 1023 px),
   desktop — «10 · Макет 1440» (с 1024 px). Правила ширин — доска «Ширины 1024–1920». */

/* ---------- База ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--color-page);
  color: var(--color-ink);
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 22px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.menu-open {
  overflow: hidden;
}

.page {
  overflow-x: clip;
  position: relative;
}

h1,
h2,
h3,
h4,
p,
ol,
ul,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

img,
svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--color-cta);
  outline-offset: 2px;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: var(--color-cta);
  color: var(--color-on-cta);
  font-weight: 600;
}

.skip-link:focus {
  top: 8px;
}

.container {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 0 var(--layout-gutter);
}

.narrow {
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .container {
    max-width: 1264px;
  }

  .narrow {
    max-width: 792px;
  }
}

/* ---------- Типографика: стили display/* · body/* · button/* ---------- */

.t-h1 {
  font-size: 32px;
  line-height: 38px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.t-h2 {
  font-size: 26px;
  line-height: 32px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.t-h3 {
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
}

.t-h4 {
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
}

.t-lg {
  font-size: 17px;
  line-height: 26px;
}

.t-md {
  font-size: 15px;
  line-height: 22px;
}

.t-sm {
  font-size: 13px;
  line-height: 18px;
}

.t-label {
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
}

@media (min-width: 1024px) {
  .t-h1 {
    font-size: 56px;
    line-height: 64px;
    letter-spacing: -1px;
  }

  .t-h2 {
    font-size: 40px;
    line-height: 48px;
    letter-spacing: -0.6px;
  }

  .t-h3 {
    font-size: 22px;
    line-height: 30px;
  }

  .t-h4 {
    font-size: 18px;
    line-height: 24px;
  }

  .t-lg {
    font-size: 20px;
    line-height: 30px;
  }

  .t-md {
    font-size: 17px;
    line-height: 26px;
  }

  .t-sm {
    font-size: 14px;
    line-height: 20px;
  }

  .t-label {
    font-size: 14px;
    line-height: 20px;
  }
}

.c-muted {
  color: var(--color-ink-muted);
}

.c-faint {
  color: var(--color-ink-faint);
}

.c-legal {
  color: var(--color-ink-legal);
}

.center {
  text-align: center;
}

/* ---------- Кнопка (компонент «Button») ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--size-control);
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius-button);
  background: var(--color-cta);
  color: var(--color-on-cta);
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease);
}

.btn:hover {
  background: var(--color-cta-hover);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 2px solid var(--color-cta);
  outline-offset: 2px;
}

.btn--sm {
  min-height: var(--size-control-sm);
  padding: 0 16px;
  border-radius: var(--radius-button-sm);
  font-size: 14px;
  line-height: 18px;
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn:disabled {
  cursor: default;
  transform: none;
}

.btn:disabled:not(.is-loading) {
  background: var(--color-nest);
  color: var(--color-ink-faint);
}

.btn.is-loading,
.btn.is-loading:hover {
  background: var(--color-cta);
}

.btn__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn.is-loading .btn__spinner {
  display: block;
}

@keyframes spin {
  to {
    rotate: 360deg;
  }
}

/* ---------- Логотип «Logo / 1 · Плитка-галочка» ---------- */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-ink);
  font-size: 20px;
  line-height: 24px;
  font-weight: 600;
  letter-spacing: -0.2px;
}

.logo__mark {
  width: 22px;
  height: 22px;
  flex: none;
}

.logo--lg {
  gap: 12px;
  font-size: 30px;
  line-height: 36px;
  letter-spacing: -0.3px;
}

.logo--lg .logo__mark {
  width: 33px;
  height: 33px;
}

/* ---------- Шапка (компонент «Header») ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: var(--color-surface-alt);
  /* линия внутри, как обводка в Figma: не отнимает высоту, строка по центру 64/56 */
  box-shadow: inset 0 -1px 0 var(--color-line);
}

.header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header__nav,
.header__cta {
  display: none;
}

.header__burger {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-right: -8px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-ink);
}

.header__burger svg {
  width: 24px;
  height: 24px;
}

.header__burger .icon-close,
.menu-open .header__burger .icon-menu {
  display: none;
}

.menu-open .header__burger .icon-close {
  display: block;
}

@media (min-width: 1024px) {
  .header__nav {
    display: flex;
    gap: 32px;
  }

  .header__nav a {
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    color: var(--color-ink);
    transition: color 0.2s var(--ease);
  }

  .header__nav a:hover {
    color: var(--color-cta);
  }

  .header__cta {
    display: inline-flex;
  }

  .header__burger {
    display: none;
  }
}

/* ---------- Меню 390 (B01.4) ---------- */

.menu {
  position: fixed;
  z-index: 39;
  inset: var(--header-h) 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 36px;
  overflow-y: auto;
  padding: 24px 0;
  background: var(--color-page);
}

.menu[hidden] {
  display: none;
}

.menu__inner {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 36px;
}

.menu__nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.menu__nav a {
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
}

.menu__nav a:hover {
  color: var(--color-cta);
}

.menu__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-top: auto;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  text-align: center;
}

.menu__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
}

.menu__brand img {
  width: 20px;
  height: 20px;
}

.menu__top {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 1024px) {
  .menu {
    display: none !important;
  }
}

/* ---------- Секции ---------- */

.section {
  position: relative;
  padding: var(--layout-section) 0;
}

.section > .container {
  position: relative;
  z-index: 1;
}

.section__head {
  margin-bottom: var(--layout-head);
  text-align: center;
}

/* ---------- 02 · Первый экран ---------- */

.hero {
  padding: 48px 0;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.hero__head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero__title {
  color: var(--color-ink);
}

.hero__lead {
  color: var(--color-ink-muted);
}

.checks {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  list-style: none;
  text-align: left;
}

.checks__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  line-height: 22px;
}

.checks__item img {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  flex: none;
}

/* «Ветвление шагов»: зелёная линия через галочки */
.checks__item + .checks__item::before {
  content: "";
  position: absolute;
  left: 9px;
  bottom: 11px;
  width: 2px;
  height: 40px;
  background: var(--color-success);
}

.hero__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.hero__note {
  color: var(--color-ink-faint);
  font-size: 14px;
  line-height: 20px;
}

@media (min-width: 1024px) {
  .hero {
    padding: 96px 0;
  }

  .hero__inner {
    gap: 32px;
  }

  .hero__head {
    gap: 16px;
    max-width: 792px;
  }

  .checks {
    flex-direction: row;
    gap: 40px;
  }

  .checks__item {
    gap: 8px;
    padding: 12px 20px 12px 16px;
    border-radius: var(--radius-full);
    background: var(--color-surface);
    font-size: 17px;
    line-height: 26px;
    white-space: nowrap;
  }

  .checks__item + .checks__item::before {
    left: -40px;
    bottom: auto;
    top: 50%;
    width: 40px;
    height: 2px;
    margin-top: -1px;
  }

  .hero__cta {
    width: auto;
  }

  .hero__cta .btn {
    width: auto;
  }

  .hero__note {
    font-size: 17px;
    line-height: 26px;
  }
}

/* ---------- 03 · Услуги ---------- */

.services__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 5px 16px 5px 15px;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  font-size: 14px;
  line-height: 18px;
  font-weight: 600;
}

.chip img {
  width: 14px;
  height: 14px;
}

.price {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: var(--radius-lg);
  background: var(--color-page);
  /* обводка внутри, как в макете: не меняет размеры строк */
  outline: 1px solid var(--color-line);
  outline-offset: -1px;
}

.price__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: var(--color-surface);
}

.price__name {
  flex: 1;
  font-size: 15px;
  line-height: 22px;
}

.price__term {
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  white-space: nowrap;
}

.price__more {
  padding: 24px;
  background: var(--color-surface);
}

@media (min-width: 1024px) {
  .price__row {
    padding: 16px 24px;
  }

  .price__name {
    font-size: 17px;
    line-height: 26px;
  }

  .price__term {
    font-size: 14px;
    line-height: 20px;
  }
}

/* ---------- 04 · Почему QAExpert ---------- */

.why__grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.why__main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 24px 16px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.why__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.why__extra {
  display: flex;
  flex-direction: column;
  gap: 16px;
  list-style: none;
}

.benefit {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.benefit__tile {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 12px;
  background: var(--decor-violet-10);
}

.benefit__tile img {
  width: 24px;
  height: 24px;
}

.benefit__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Схема «Ревью ТЗ → Тест-кейсы → Баг-репорты ← Регресс» */
.scheme {
  display: grid;
  place-items: center;
  height: 140px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
}

.scheme__grid {
  display: grid;
  grid-template-columns: auto 28px auto;
  grid-template-rows: 36px 28px 36px;
  align-items: center;
  justify-items: center;
}

.scheme__chip {
  display: flex;
  align-items: center;
  justify-self: stretch;
  gap: 6px;
  height: 36px;
  padding: 0 12px 0 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.scheme__chip img {
  width: 16px;
  height: 16px;
}

.scheme__chip--done {
  border-color: var(--color-success-line);
  background: var(--color-success-soft);
  color: var(--color-success-ink);
}

.scheme__chip--now {
  background: var(--color-cta);
  color: var(--color-on-cta);
}

.scheme__chip--next {
  border: 1px dashed var(--color-placeholder);
  background: var(--color-surface-alt);
  color: var(--color-ink-faint);
}

.scheme__chip--now .scheme__sign {
  animation: pulse 2.4s var(--ease-in-out) infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.55;
  }
}

.scheme__arrow {
  width: 16px;
  height: 8px;
}

.scheme__arrow--down {
  width: 8px;
  height: 16px;
}

@media (min-width: 1024px) {
  .why__grid {
    display: grid;
    grid-template-columns: 620fr 556fr;
    gap: 24px;
  }

  .why__main {
    gap: 24px;
    padding: 32px 32px 24px;
  }

  .why__extra {
    gap: 24px;
  }

  .benefit {
    flex: 1;
    gap: 24px;
    padding: 24px;
  }

  .benefit__tile {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .scheme {
    flex: 1;
    min-height: 214px;
  }

  .scheme__grid {
    grid-template-columns: auto 42px auto;
    grid-template-rows: 54px 42px 54px;
  }

  .scheme__chip {
    gap: 9px;
    height: 54px;
    padding: 0 18px 0 15px;
    border-radius: var(--radius-md);
    font-size: 19.5px;
    line-height: 24px;
  }

  .scheme__chip img {
    width: 24px;
    height: 24px;
  }

  .scheme__arrow {
    width: 24px;
    height: 12px;
  }

  .scheme__arrow--down {
    width: 12px;
    height: 24px;
  }
}

/* ---------- 05 · Как мы работаем ---------- */

.steps__grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
  list-style: none;
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
}

.step__term {
  font-size: 26px;
  line-height: 32px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.step__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.step__title {
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
}

.step__text {
  font-size: 15px;
  line-height: 22px;
  color: var(--color-ink-muted);
}

.step--done {
  border-color: var(--color-success-line);
  background: var(--color-success-soft);
}

.step--now {
  border: 0;
  background: var(--color-cta);
  color: var(--color-on-cta);
}

.step--now .step__text {
  color: var(--color-on-cta);
}

.step--next {
  border: 1px dashed var(--color-placeholder);
  background: var(--color-page);
}

.step--next .step__term,
.step--next .step__title {
  color: var(--color-ink-faint);
}

.step__tick {
  position: absolute;
  top: 17px;
  right: 24px;
  width: 28px;
  height: 28px;
}

/* стрелка к следующему шагу */
.step__arrow {
  position: absolute;
  left: 32px;
  top: 100%;
  width: 16px;
  height: 40px;
  margin-top: 1px;
}

.step__arrow--h {
  display: none;
}

.steps__total {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.steps__total-label {
  flex: 1;
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
}

.steps__total-value {
  font-size: 26px;
  line-height: 32px;
  font-weight: 700;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

@media (min-width: 1024px) {
  .steps__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .step {
    gap: 16px;
    padding: 24px;
  }

  .step__term {
    font-size: 22px;
    line-height: 30px;
    font-weight: 600;
    letter-spacing: 0;
  }

  .step__copy {
    gap: 8px;
  }

  .step__title {
    font-size: 18px;
    line-height: 24px;
  }

  .step__text {
    font-size: 17px;
    line-height: 26px;
  }

  .step__tick {
    top: 24px;
  }

  .step__arrow--v {
    display: none;
  }

  .step__arrow--h {
    display: block;
    left: 100%;
    top: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 4px;
  }

  /* 1024–1199: сетка 3 + 2, стрелки только внутри ряда */
  .step:nth-child(3) .step__arrow--h {
    display: none;
  }

  .steps__total {
    justify-content: space-between;
    margin-top: 24px;
    padding: 24px 32px;
  }

  .steps__total-label {
    flex: none;
    font-size: 22px;
    line-height: 30px;
  }

  .steps__total-value {
    font-size: 40px;
    line-height: 48px;
    letter-spacing: -0.6px;
  }
}

@media (min-width: 1200px) {
  .steps__grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .step:nth-child(3) .step__arrow--h {
    display: block;
  }
}

/* ---------- Карточки стопкой: язычок + пунктирная рамка ---------- */

.stack {
  position: relative;
}

.tab {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-weight: 600;
}

.tab--success {
  /* блочный flex: строка вокруг inline-flex добавляла 0,75 px; ярлык заходит на карточку на 1 px, как в макете */
  display: flex;
  width: fit-content;
  height: 26px;
  margin-left: 24px;
  margin-bottom: -1px;
  padding: 0 12px 0 10px;
  border: 1.5px dashed var(--decor-green-24);
  border-bottom: 0;
  background: var(--color-success-soft);
  color: var(--color-success-ink);
  font-size: 12px;
  line-height: 15px;
}

.tab--success img {
  width: 12px;
  height: 12px;
}

.tab--accent {
  padding: 6px 12px;
  background: var(--color-accent-soft);
  color: var(--color-accent-ink);
  font-size: 13px;
  line-height: 16px;
  letter-spacing: 0.26px;
}

.stack__back {
  position: absolute;
  z-index: 0;
  inset: 40px 16px -12px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: var(--color-surface-alt);
}

/* ---------- 06 · Полоса призыва ---------- */

.cta-band {
  padding: 49px 0 60px;
}

.cta-band__card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  /* в макете 390 обводка не входит в поля карточки — компенсируем 1,5 px */
  padding: 30.5px 22.5px 22.5px;
  border: 1.5px dashed var(--decor-green-24);
  border-radius: var(--radius-lg);
  background: var(--color-success-soft);
  text-align: center;
}

.cta-band__copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cta-band__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.cta-band__note {
  color: var(--color-ink-faint);
  font-size: 14px;
  line-height: 20px;
}

.cta-band .stack__back {
  inset: 37px 16px -12px;
}

@media (min-width: 1024px) {
  .cta-band {
    padding: 96px 0 108px;
  }

  .cta-band__card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 48px;
    text-align: left;
  }

  .cta-band__copy {
    max-width: 690px;
  }

  .cta-band__action {
    align-items: flex-end;
  }

  .cta-band__action .btn {
    width: auto;
  }
}

/* ---------- 07 · FAQ (компонент «FAQ item») ---------- */

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq__item {
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary span {
  transition: color 0.2s var(--ease);
}

.faq__item summary:hover span {
  color: var(--color-cta);
}

.faq__icon {
  width: 24px;
  height: 24px;
  flex: none;
  transition: rotate 0.25s var(--ease);
}

.faq__item[open] .faq__icon {
  rotate: 45deg;
}

.faq__answer {
  padding: 0 24px 16px;
  margin-top: -8px;
  color: var(--color-ink-muted);
  font-size: 15px;
  line-height: 22px;
}

@media (min-width: 1024px) {
  .faq__list {
    gap: 12px;
  }

  .faq__item summary {
    padding: 24px 32px;
  }

  .faq__answer {
    margin-top: -12px;
    padding: 0 32px 24px;
    font-size: 17px;
    line-height: 26px;
  }
}

/* ---------- 08 · Финальный призыв + форма ---------- */

.final {
  padding-bottom: 48px;
}

.final__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
  text-align: center;
}

.final .stack {
  padding-bottom: 12px;
}

.final .stack__back {
  inset: 40px 16px 0;
  background: var(--color-page-alt);
}

.form-card {
  position: relative;
  z-index: 1;
  border: 1.5px dashed var(--decor-violet-24);
  border-radius: 0 var(--radius-lg) var(--radius-lg);
  background: var(--color-surface-alt);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* 24 − 1,5 px обводки карточки: поля 294 на 390 и 540 на 1440, как в макете */
  padding: 22.5px;
}

.form[hidden] {
  display: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field__label {
  color: var(--color-ink-muted);
  font-size: 13px;
  line-height: 18px;
}

.field__control {
  width: 100%;
  min-height: var(--size-field);
  padding: 15px 16px;
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-page);
  color: var(--color-ink);
  font-size: 15px;
  line-height: 22px;
  outline: none;
  transition: border-color 0.2s var(--ease);
  appearance: none;
}

input.field__control {
  height: var(--size-field);
  padding-top: 0;
  padding-bottom: 0;
}

textarea.field__control {
  height: 100px;
  resize: none;
}

.field__control::placeholder {
  color: var(--color-ink-faint);
  opacity: 1;
}

.field__control:hover {
  border-color: var(--color-placeholder);
}

.field__control:focus {
  border-color: var(--color-cta);
  caret-color: var(--color-cta);
}

.field__error,
.consent__error,
.form__error {
  color: var(--color-danger);
  font-size: 13px;
  line-height: 18px;
}

.field__error[hidden],
.consent__error[hidden],
.form__error[hidden] {
  display: none;
}

.form__error a {
  color: var(--color-accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form__error a:hover {
  color: var(--color-cta);
}

.field.is-error .field__control {
  border-color: var(--color-danger);
}

.field__control:disabled {
  border-color: var(--color-line);
  background: var(--color-surface);
  color: var(--color-placeholder);
  -webkit-text-fill-color: var(--color-placeholder);
}

.field__control:disabled::placeholder {
  color: var(--color-placeholder);
}

.form.is-sending .field__label {
  color: var(--color-ink-faint);
}

.consent {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.consent__row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--color-ink-muted);
  font-size: 13px;
  line-height: 18px;
}

.consent__box {
  position: relative;
  width: 20px;
  height: 20px;
  flex: none;
}

.consent__box input {
  position: absolute;
  inset: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1.5px solid var(--color-ink-faint);
  border-radius: 4px;
  background: var(--color-surface-alt);
  appearance: none;
  cursor: pointer;
}

.consent__box input:checked {
  border-color: var(--color-cta);
  background: var(--color-cta);
}

.consent__box svg {
  position: absolute;
  inset: 0;
  display: none;
  pointer-events: none;
}

.consent__box input:checked + svg {
  display: block;
}

.consent__box input:focus-visible {
  outline: 2px solid var(--color-cta);
  outline-offset: 2px;
}

.consent.is-error .consent__box input {
  border-color: var(--color-danger);
}

.consent__box input:disabled {
  cursor: default;
}

.consent__row a {
  color: var(--color-accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent__row a:hover {
  color: var(--color-cta);
}

.form__submit {
  margin-top: 0;
}

.success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 72px 24px;
  text-align: center;
}

.success[hidden] {
  display: none;
}

.success__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-success);
}

.success__title {
  color: var(--color-success-ink);
}

@media (min-width: 1024px) {
  .final {
    padding-bottom: 96px;
  }

  .final__head {
    gap: 12px;
    margin-bottom: 48px;
  }

  .final .stack {
    max-width: 636px;
    margin: 0 auto;
    padding: 0 24px 12px;
  }

  .final .stack__back {
    inset: 32px 40px 0;
  }

  .field__label,
  .consent__row,
  .field__error,
  .consent__error,
  .form__error {
    font-size: 14px;
    line-height: 20px;
  }

  .field__control {
    font-size: 17px;
    line-height: 26px;
  }

  textarea.field__control {
    padding: 15px 16px;
  }
}

/* ---------- 09 · Подвал ---------- */

.footer {
  position: relative;
  padding: 48px 0;
}

.footer__inner,
.footer__columns {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer__divider {
  height: 1px;
  border: 0;
  margin: 0;
  background: var(--color-line);
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}

.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}

.footer a {
  transition: color 0.2s var(--ease);
}

.footer a:hover {
  color: var(--color-cta);
}

.footer__contact {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer__contact img {
  width: 24px;
  height: 24px;
  flex: none;
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer__requisites {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--color-ink-legal);
  font-size: 13px;
  line-height: 18px;
  font-style: normal;
}

.footer__docs {
  display: none;
}

@media (min-width: 390px) {
  .footer__col--docs a {
    white-space: nowrap;
  }
}

@media (min-width: 1024px) {
  .footer {
    padding: 96px 0;
  }

  .footer__inner {
    gap: 32px;
  }

  .footer__columns {
    display: grid;
    grid-template-columns: 384px 1fr 1fr;
    gap: 64px;
  }

  .footer__brand .t-md {
    color: var(--color-ink-muted);
  }

  .footer__col {
    gap: 16px;
  }

  .footer__col ul {
    gap: 16px;
  }

  .footer__col--docs,
  .footer__columns > .footer__divider {
    display: none;
  }

  .footer__requisites {
    font-size: 14px;
    line-height: 20px;
  }

  .footer__docs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    list-style: none;
    color: var(--color-ink-muted);
    font-size: 14px;
    line-height: 20px;
  }
}

@media (min-width: 1200px) {
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    gap: 24px;
  }

  .footer__docs {
    flex-wrap: nowrap;
    white-space: nowrap;
  }
}

/* ---------- Cookie (компонент «Cookie bar») ---------- */

.cookie {
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 12px 24px;
  border-top: 1px solid var(--color-line);
  background: var(--color-page);
  font-size: 13px;
  line-height: 18px;
}

.cookie[hidden] {
  display: none;
}

.cookie__text a:hover {
  color: var(--color-cta);
  text-decoration: underline;
}

.cookie__ok {
  min-height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--color-cta);
  color: var(--color-on-cta);
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
}

.cookie__ok:hover {
  background: var(--color-cta-hover);
}

@media (min-width: 1024px) {
  .cookie {
    left: 50%;
    right: auto;
    bottom: 16px;
    width: min(1200px, calc(100% - 64px));
    padding: 12px 12px 12px 24px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    font-size: 17px;
    line-height: 26px;
    transform: translateX(-50%);
  }

  .cookie__emoji {
    margin-right: 6px;
  }

  .cookie__ok {
    font-size: 17px;
    line-height: 26px;
  }
}

/* ---------- «Наверх» (компонент «To top») ---------- */

.totop {
  position: fixed;
  z-index: 31;
  right: 12px;
  bottom: 16px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-full);
  background: var(--color-surface-alt);
  color: var(--color-ink-muted);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
}

.totop.show {
  opacity: 1;
  visibility: visible;
}

.totop svg {
  width: 11px;
  height: 12px;
  overflow: visible;
}

.cookie-visible .totop {
  bottom: 76px;
}

@media (min-width: 1024px) {
  .totop {
    right: max(32px, calc(50% - 600px));
    background: var(--color-surface);
    color: var(--color-ink);
  }

  .cookie-visible .totop {
    bottom: 94px;
  }
}

/* ---------- Знаки-декор (Sign / *) ---------- */

.sign {
  --cx: var(--x);
  --cy: var(--y);
  position: absolute;
  z-index: 0;
  top: calc(var(--cy) - var(--s) / 2);
  left: clamp(16px, calc(50% + var(--cx) - var(--s) / 2), calc(100% - 16px - var(--s)));
  width: var(--s);
  height: var(--s);
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
  rotate: var(--r, 0deg);
  --fy: calc(4.1px + 0.5px * var(--k, 0.5));
  --fx: calc(1.5px + 1px * var(--k, 0.5));
  --fr: calc(3deg + 0.5deg * var(--k, 0.5));
  animation:
    float-y var(--ty, 4s) var(--ease-in-out) var(--dy, 0s) infinite alternate,
    float-x var(--tx, 5s) var(--ease-in-out) var(--dx, 0s) infinite alternate,
    float-r var(--tr, 5.5s) var(--ease-in-out) var(--dr, 0s) infinite alternate;
}

@keyframes float-y {
  from {
    translate: 0 calc(var(--fy) * -1);
  }
  to {
    translate: 0 var(--fy);
  }
}

@keyframes float-x {
  from {
    transform: translateX(calc(var(--fx) * -1));
  }
  to {
    transform: translateX(var(--fx));
  }
}

@keyframes float-r {
  from {
    rotate: calc(var(--r, 0deg) - var(--fr));
  }
  to {
    rotate: calc(var(--r, 0deg) + var(--fr));
  }
}

.sign--h,
.sign--d {
  display: none;
}

@media (min-width: 1024px) {
  .sign {
    --cx: var(--xd, var(--x));
    --cy: var(--yd, var(--y));
    --fy: calc(5.5px + 2.5px * var(--k, 0.5));
    --fx: calc(3px + 2px * var(--k, 0.5));
    --fr: calc(3.5deg + 2deg * var(--k, 0.5));
  }

  .sign--m {
    display: none;
  }

  .sign--h {
    display: block;
    scale: 0.75;
    transform-origin: top left;
  }

  .sign--h.sign--right {
    transform-origin: top right;
  }

  .sign--h.sign--near-checks {
    display: none;
  }
}

@media (min-width: 1280px) {
  /* без масштаба поворот снова вокруг центра, как в макете */
  .sign--h,
  .sign--h.sign--right {
    scale: none;
    transform-origin: 50% 50%;
  }

  .sign--h.sign--near-checks,
  .sign--d {
    display: block;
  }
}

/* ---------- Появление блоков при прокрутке ---------- */

.js .reveal {
  opacity: 0;
  translate: 0 16px;
  transition:
    opacity 0.7s var(--ease),
    translate 0.8s var(--ease-reveal);
}

.js .reveal.in {
  opacity: 1;
  translate: none;
}

/* ---------- Документы ---------- */

.doc {
  padding: 48px 0;
}

.doc__column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.doc__list {
  padding-left: 24px;
  color: var(--color-ink-muted);
}

.doc__back {
  color: var(--color-accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc__back:hover {
  color: var(--color-cta);
}

@media (min-width: 1024px) {
  .doc {
    padding: 96px 0;
  }
}

/* ---------- 404 ---------- */

.e404 {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-h));
}

.e404__body {
  position: relative;
  flex: 1;
  padding: 96px 0 48px;
}

.e404__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.e404__head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.e404__copy {
  padding: 0 0 24px;
  color: var(--color-ink-legal);
  text-align: center;
}

@media (min-width: 1024px) {
  .e404__body {
    padding: 96px 0;
  }

  .e404__inner .btn {
    width: auto;
  }
}

/* ---------- Reduced motion — последним, чтобы перебить правила компонентов ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .sign {
    animation: none;
  }

  .js .reveal {
    opacity: 1;
    translate: none;
    transition: none;
  }

  .scheme__chip--now .scheme__sign {
    animation: none;
    opacity: 1;
  }

  .btn,
  .faq__icon,
  .totop,
  .cookie__ok {
    transition: none;
  }

  .btn:active {
    transform: none;
  }
}
