/* ============================================================
   Лендинг: списание долгов через МФЦ
   Верстка mobile-first. Макет Figma: мобильный фрейм 430px.
   ============================================================ */

:root {
  /* Цвета из макета */
  --c-gold:        #C9A277;   /* фон хедера */
  --c-gold-dark:   #B08D63;
  --c-red:         #E8452F;   /* акцент, кнопка */
  --c-red-hover:   #D63A25;
  --c-brown:       #5C3A2E;   /* логотип */
  --c-text:        #333333;
  --c-text-soft:   #4A4A4A;
  --c-muted:       #9A9A9A;   /* плейсхолдеры */
  --c-input:       #EAEAEA;   /* фон полей */
  --c-input-focus: #E2E2E2;
  --c-page:        #E4E4E4;   /* фон вокруг карточки на десктопе */
  --c-white:       #FFFFFF;

  /* Метрики */
  --radius-field:  10px;
  --radius-card:   20px;
  --gutter:        20px;
  --max-width:     430px;     /* ширина мобильного фрейма Figma */

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
          'Helvetica Neue', Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-page);
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

/* Колонка-«карточка» */
.page {
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--c-white);
  min-height: 100vh;
  overflow: hidden;
}

@media (min-width: 520px) {
  .page {
    margin-block: 24px;
    min-height: 0;
    border-radius: var(--radius-card);
    box-shadow: 0 8px 40px rgba(0, 0, 0, .12);
  }
}

/* ================= ХЕДЕР ================= */

.header {
  background: var(--c-gold);
  padding: 14px var(--gutter);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--c-white);
}

.brand__logo,
.brand__logo-img { flex: 0 0 auto; display: block; }

.brand__text {
  font-size: 12px;
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: .1px;
}

.header__contact {
  text-align: right;
  color: var(--c-white);
  flex: 0 0 auto;
}

.header__contact-label {
  display: block;
  font-size: 9.5px;
  line-height: 1.2;
  opacity: .95;
  margin-bottom: 2px;
}

.header__phone {
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.header__phone:hover { text-decoration: underline; }

/* ================= ПЕРВЫЙ ЭКРАН ================= */

/* Композиция из библиотеки: фон-подложка МФЦ + вырезанная фигура
   с декоративными формами. Пропорции фрейма Figma — 430 × 290. */
.hero {
  position: relative;
  aspect-ratio: 430 / 290;
  background: #FCFAF7;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__person {
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 100%;
  width: auto;
  max-width: none;
  transform: translateX(-50%);
}

/* Плашки — готовые PNG из библиотеки, тень запечена внутрь картинки.
   Сама карточка занимает 78 из 118 px, вокруг запас под тень
   (слева/справа 20, сверху 10, снизу 30). Проценты ниже посчитаны так,
   чтобы на своём месте оказалась карточка, а не край картинки:
   карточка 89 из 430, левая — 59/40, правая — отступы 54 справа и 26 снизу. */
.badge {
  position: absolute;
  width: 31.31%;     /* 134.6 из 430 — это ширина PNG вместе с тенью */
  height: auto;
}

.badge--left  { left: 8.41%;  top: 9.86%; }
.badge--right { right: 7.25%; bottom: -2.84%; }

/* ================= ФОРМА ================= */

.lead {
  padding: 26px var(--gutter) 30px;
}

.lead__title {
  margin: 0 0 26px;
  font-size: 26px;
  line-height: 1.22;
  font-weight: 400;
  text-align: center;
  color: var(--c-text);
  letter-spacing: -.2px;
}

.lead__title-accent {
  display: block;
  color: var(--c-red);
  font-weight: 700;
  margin-bottom: 2px;
}

.field { margin-bottom: 18px; }

.field__label {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
  line-height: 1.2;
  color: var(--c-text-soft);
}

.field__input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-field);
  background: var(--c-input);
  font-family: inherit;
  font-size: 16px;   /* 16px — чтобы iOS не зумил при фокусе */
  color: var(--c-text);
  outline: none;
  transition: border-color .15s, background-color .15s;
  appearance: none;
  -webkit-appearance: none;
}

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

.field__input:focus {
  border-color: var(--c-gold);
  background: var(--c-input-focus);
}

.field__input.is-invalid { border-color: var(--c-red); }

/* Селект */
.field__select-wrap { position: relative; }

.field__input--select {
  padding-right: 46px;
  color: var(--c-text);
  cursor: pointer;
}

/* Пока не выбрано значение — цвет плейсхолдера */
.field__input--select:invalid,
.field__input--select.is-placeholder { color: var(--c-muted); }

.field__chevron {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  pointer-events: none;
  line-height: 0;
}

.field__error {
  display: none;
  margin-top: 6px;
  font-size: 13px;
  color: var(--c-red);
}

.field__error.is-visible { display: block; }

/* Выбор канала связи — декоративный блок */
.choice {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
}

.choice__legend {
  padding: 0;
  margin-bottom: 14px;
  font-size: 17px;
  line-height: 1.2;
  color: var(--c-text-soft);
}

.choice__item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 13px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.choice__item:last-child { margin-bottom: 0; }

.choice__input {
  position: relative;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 2px solid #B9B9B9;
  border-radius: 50%;
  background: var(--c-white);
  cursor: pointer;
  transition: border-color .15s;
  appearance: none;
  -webkit-appearance: none;
}

.choice__input::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--c-text);
  transform: scale(0);
  transition: transform .12s;
}

.choice__input:checked { border-color: var(--c-text); }
.choice__input:checked::after { transform: scale(1); }

.choice__text {
  font-size: 16px;
  line-height: 1.3;
  color: var(--c-text);
}

/* Согласие с политикой — обязательная галочка */
.field--agree { margin-bottom: 0; }

.agree {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.agree__input {
  position: relative;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 2px solid #B9B9B9;
  border-radius: 5px;
  background: var(--c-white);
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
  appearance: none;
  -webkit-appearance: none;
}

.agree__input::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid var(--c-white);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform .12s;
}

.agree__input:checked {
  background: var(--c-text);
  border-color: var(--c-text);
}

.agree__input:checked::after { transform: rotate(45deg) scale(1); }

.agree__input.is-invalid { border-color: var(--c-red); }

.agree__text {
  font-size: 14px;
  line-height: 1.35;
  color: var(--c-text);
}

.agree__text a { color: var(--c-text); text-decoration: underline; }

.agree__req { color: var(--c-red); }

.choice__input:focus-visible,
.agree__input:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 2px;
}

/* Honeypot */
.hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* Кнопка */
.btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 62px;
  margin-top: 24px;
  padding: 16px 18px;
  border: 0;
  border-radius: var(--radius-field);
  background: var(--c-red);
  color: var(--c-white);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .15s, transform .08s;
}

.btn:hover  { background: var(--c-red-hover); }
.btn:active { transform: scale(.99); }

.btn:disabled { opacity: .75; cursor: default; }

.btn__spinner {
  display: none;
  width: 18px;
  height: 18px;
  margin-left: 10px;
  border: 2.5px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

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

@keyframes spin { to { transform: rotate(360deg); } }

.form__consent {
  margin: 14px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: #8C8C8C;
  text-align: center;
}

.form__consent a { color: #8C8C8C; text-decoration: underline; }

.form__status {
  display: none;
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius-field);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.form__status.is-visible { display: block; }

.form__status.is-success {
  background: #E8F5EA;
  color: #256B34;
}

.form__status.is-error {
  background: #FDECE9;
  color: #B32D18;
}

/* ================= ФУТЕР ================= */

.footer {
  padding: 22px var(--gutter) 28px;
  border-top: 1px solid #EDEDED;
  text-align: center;
  color: #9A9A9A;
  font-size: 11px;
  line-height: 1.5;
}

.footer p { margin: 0 0 8px; }

.footer__links a { color: #9A9A9A; }

.footer__copy { margin-bottom: 0; }

/* ================= ЮРИДИЧЕСКИЕ СТРАНИЦЫ ================= */
/* policy.html и остальные политики
   personal-data.html — пользовательское соглашение
   Обе страницы используют ту же мобильную колонку .page, что и лендинг. */

.container { padding-inline: var(--gutter); }

.legal { padding: 24px 0 30px; }

.legal h1 {
  margin: 0 0 18px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--c-text);
}

.legal h2 {
  margin: 26px 0 10px;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--c-text);
}

.legal p,
.legal li {
  font-size: 14px;
  line-height: 1.55;
  color: var(--c-text-soft);
}

.legal p  { margin: 0 0 10px; }
.legal ul { margin: 0 0 12px; padding-left: 18px; }
.legal li { margin-bottom: 6px; }
.legal ul ul { margin: 6px 0 0; }

.legal strong { color: var(--c-text); font-weight: 600; }

/* Длинные ссылки на яндексовые документы не должны рвать колонку */
.legal a { color: var(--c-red); overflow-wrap: anywhere; }

/* Блоки «цель / категории / субъекты» во втором разделе политики */
.legal__group {
  margin: 0 0 14px;
  padding: 14px 16px;
  background: #F7F5F2;
  border-radius: 12px;
}

.legal__group p:last-child { margin-bottom: 0; }

.lbl {
  margin: 12px 0 4px;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--c-gold-dark);
}

.lbl:first-child { margin-top: 0; }

/* Перекрёстные ссылки между юридическими документами */
.legal__nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #EDEDED;
}

.legal__nav a,
.legal__nav-current {
  font-size: 14px;
  line-height: 1.35;
}

.legal__nav a { color: var(--c-red); text-decoration: none; }
.legal__nav a:hover { text-decoration: underline; }

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

.legal__back {
  display: inline-block;
  margin: 18px 16px 0 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-red);
  text-decoration: none;
}

.legal__back:hover { text-decoration: underline; }

.site-footer { border-top: 1px solid #EDEDED; }

.disclaimer { padding: 18px 0 24px; }

.disclaimer__inner {
  font-size: 11px;
  line-height: 1.5;
  color: #9A9A9A;
  text-align: center;
}

/* ================= МЕЛОЧИ ================= */

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Очень узкие экраны (iPhone SE и меньше) */
@media (max-width: 359px) {
  :root { --gutter: 16px; }
  .lead__title { font-size: 23px; }
}
