/* ============================================================
   Военный юрист — премиальный лендинг (демо)
   ============================================================ */

:root {
  --navy: #0F1F3D;
  --ink: #111418;
  --gold: #C9A227;
  --gold-ink: #412402;
  --grey-bg: #F5F6F8;
  --border: #E3E6EB;

  --white: #FFFFFF;
  --navy-light: #1B2E54;
  --demo-bg: #7A2E00;

  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container-width: 1140px;
  --radius: 4px;
  --shadow-card: 0 12px 32px rgba(15, 31, 61, 0.08);
}

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

/* Гарантируем, что el.hidden = true всегда скрывает элемент, даже если
   другое правило задаёт display: flex/block с той же специфичностью
   (например .mobile-bar__btn, .header__messengers .btn). */
[hidden] {
  display: none !important;
}

html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

button {
  font: inherit;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

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

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   Демо-полоса
   ------------------------------------------------------------ */

.demo-banner {
  background: var(--demo-bg);
  color: var(--white);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 8px 16px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  border: 1.5px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}

.btn--gold {
  background: var(--gold);
  color: var(--gold-ink);
}

.btn--gold:hover {
  background: #b8931f;
}

.btn--outline-gold {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold);
}

.btn--outline-gold:hover {
  background: rgba(201, 162, 39, 0.12);
}

.btn--navy {
  background: var(--navy);
  color: var(--white);
}

.btn--navy:hover {
  background: var(--navy-light);
}

.btn--outline-navy {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}

.btn--outline-navy:hover {
  background: rgba(15, 31, 61, 0.06);
}

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

.btn--sm {
  padding: 10px 14px;
  font-size: 13px;
}

/* ------------------------------------------------------------
   Шапка
   ------------------------------------------------------------ */

.header {
  background: var(--navy);
  padding: 20px 0 24px;
}

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

.header__logo {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
  /* Между логотипом и адресом воздуха вдвое меньше, чем между остальными
     элементами шапки (те держат общий gap: 16px у .header__inner). */
  margin-bottom: -8px;
}

.header__logo-main {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 22px;
  color: var(--white);
  white-space: nowrap;
}

.header__logo-sub {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}

.header__address {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--white);
  font-size: 13px;
  text-align: left;
}

.header__address .icon {
  color: var(--gold);
}

.header__address span {
  flex: 1;
}

.icon--chevron {
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.6);
}

/* Три кнопки одной ширины (flex: 1) — иконка сверху, подпись снизу,
   тот же приём, что и в липкой нижней панели, чтобы ряд помещался
   на 360px без переноса и обрезки. */
.header__actions {
  display: flex;
  gap: 8px;
}

.header__action {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 4px;
  border: 1.5px solid var(--gold);
  border-radius: var(--radius);
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.header__action:hover {
  background: rgba(201, 162, 39, 0.12);
}

.header__action--gold {
  background: var(--gold);
  color: var(--gold-ink);
}

.header__action--gold:hover {
  background: #b8931f;
}

/* Крупный номер телефона под кнопками — текст-ссылка, не кнопка:
   визуально не дублирует золотую «Позвонить» выше. */
.header__phone {
  display: block;
  text-align: center;
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.01em;
}

.header__phone:hover {
  color: var(--gold);
}

@media (min-width: 768px) {
  .header__inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }

  .header__logo {
    order: 1;
  }

  .header__address {
    order: 3;
    width: auto;
    flex: 1 1 100%;
  }

  .header__actions {
    order: 2;
  }

  .header__action {
    flex: 0 0 auto;
    flex-direction: row;
    padding: 12px 20px;
  }

  .header__phone {
    order: 4;
    flex: 1 1 100%;
    text-align: right;
  }
}

@media (min-width: 1100px) {
  .header__inner {
    flex-wrap: nowrap;
  }

  .header__address {
    order: 2;
    flex: 1 1 auto;
  }

  .header__actions {
    order: 3;
  }

  .header__phone {
    order: 4;
    flex: 0 0 auto;
    text-align: left;
  }
}

/* ------------------------------------------------------------
   Секции — общее
   ------------------------------------------------------------ */

.section {
  padding: 56px 0;
}

@media (min-width: 768px) {
  .section {
    padding: 88px 0;
  }
}

.section--white {
  background: var(--white);
}

.section--navy {
  background: var(--navy);
  color: var(--white);
}

.section--grey {
  background: var(--grey-bg);
}

.section__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  text-align: center;
  color: var(--navy);
}

.section__title--light {
  color: var(--white);
}

.section__underline {
  width: 26px;
  height: 2px;
  background: var(--gold);
  margin: 16px auto 40px;
}

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

.hero {
  background: var(--navy);
  color: var(--white);
  padding: 56px 0;
}

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

.hero__inner {
  max-width: 720px;
  text-align: center;
}

.hero__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  line-height: 1.25;
  margin-bottom: 24px;
}

.hero__text {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 16px;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}

@media (min-width: 560px) {
  .hero__actions {
    flex-direction: row;
    justify-content: center;
  }
}

/* ------------------------------------------------------------
   Что мы делаем
   ------------------------------------------------------------ */

.checklist {
  max-width: 720px;
  margin: 0 auto;
}

.checklist__item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
}

.checklist__item:last-child {
  border-bottom: none;
}

.icon--check {
  color: var(--gold);
  margin-top: 2px;
}

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

.steps {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.steps__item {
  display: flex;
  align-items: center;
  gap: 20px;
}

.steps__number {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 2.5rem;
  color: var(--gold);
  line-height: 1;
  flex-shrink: 0;
  min-width: 48px;
}

.steps__text {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
}

.hours-note {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 640px;
  margin: 48px auto 0;
  padding: 20px 22px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: var(--radius);
}

.hours-note .icon {
  color: var(--gold);
}

.hours-note p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}

/* ------------------------------------------------------------
   Отзывы
   ------------------------------------------------------------ */

.reviews-stub {
  max-width: 480px;
  margin: 40px auto 32px;
  padding: 32px 24px;
  background: var(--grey-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
}

.reviews-viewport {
  overflow: hidden;
  width: 100%;
  margin: 40px 0 32px;
}

.reviews-track {
  display: flex;
  gap: 16px;
  width: max-content;
  padding-left: max(20px, calc((100vw - var(--container-width)) / 2 + 20px));
  animation: reviews-scroll 32s linear infinite;
}

.reviews-track:hover,
.reviews-track:focus-within {
  animation-play-state: paused;
}

@keyframes reviews-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reviews-track {
    animation: none;
  }
}

.review-card {
  flex: 0 0 225px;
  background: var(--grey-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.review-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.review-card__quote {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}

.review-card__author {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

.reviews-cta {
  text-align: center;
}

.reviews-cta .btn {
  white-space: normal;
}

/* ------------------------------------------------------------
   Форма заявки
   ------------------------------------------------------------ */

.lead-form {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-status {
  margin-top: -4px;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.form-status--success {
  background: rgba(201, 162, 39, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.35);
}

.form-status--error {
  background: rgba(224, 122, 95, 0.12);
  border: 1px solid rgba(224, 122, 95, 0.4);
}

.fallback-contacts {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 13px;
}

.fallback-contacts a {
  color: var(--gold-ink);
  font-weight: 600;
  text-decoration: underline;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

.form-field label,
.form-field__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

.form-field input[type="text"],
.form-field input[type="tel"],
.form-field textarea {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--ink);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #9aa1ab;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.form-field textarea {
  resize: vertical;
}

.form-field__error {
  color: #C0362C;
  font-size: 12px;
}

.is-invalid {
  border-color: #C0362C !important;
}

.time-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.time-option {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: 10px 8px;
  font-size: 13px;
  color: var(--white);
  text-align: center;
}

.time-option.is-active {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.15);
  color: var(--gold);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: rgba(17, 20, 24, 0.7);
}

.consent input {
  margin-top: 3px;
}

.consent a {
  color: var(--gold-ink);
  text-decoration: underline;
}

/* Тёмный фон (например, секция «Оставить заявку») — светлые поля вместо тёмных */
.section--navy .form-field label,
.section--navy .form-field__label {
  color: rgba(255, 255, 255, 0.85);
}

.section--navy .form-field input[type="text"],
.section--navy .form-field input[type="tel"],
.section--navy .form-field textarea {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.section--navy .form-field input::placeholder,
.section--navy .form-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.section--navy .consent {
  color: rgba(255, 255, 255, 0.75);
}

.section--navy .consent a {
  color: var(--gold);
}

.section--navy .fallback-contacts a {
  color: var(--gold);
}

/* ------------------------------------------------------------
   Квиз
   ------------------------------------------------------------ */

.quiz {
  max-width: 640px;
  margin: 0 auto;
}

.quiz__card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 28px 20px;
}

@media (min-width: 640px) {
  .quiz__card {
    padding: 40px;
  }
}

.quiz__progress {
  margin-bottom: 32px;
}

.quiz__progress-track {
  position: relative;
  height: 2px;
  background: var(--border);
  margin: 0 14px 14px;
}

.quiz__progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width 0.25s ease;
}

.quiz__progress-steps {
  display: flex;
  justify-content: space-between;
}

.quiz__progress-step {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #9aa1ab;
  background: var(--white);
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.quiz__progress-step.is-active {
  border-color: var(--gold);
  color: var(--gold-ink);
  background: var(--gold);
}

.quiz__progress-step.is-done {
  border-color: var(--navy);
  color: var(--white);
  background: var(--navy);
}

.quiz__step {
  display: none;
  border: none;
  margin: 0;
  padding: 0;
}

.quiz__step.is-active {
  display: block;
}

.quiz__question {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy);
  margin: 0 0 20px;
  padding: 0;
}

.quiz__options {
  display: grid;
  gap: 12px;
  margin-bottom: 8px;
}

@media (min-width: 480px) {
  .quiz__options {
    grid-template-columns: repeat(2, 1fr);
  }
}

.quiz__option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.quiz__option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.quiz__option::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.quiz__option.is-checked {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.08);
}

.quiz__option.is-checked::before {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: inset 0 0 0 3px var(--white);
}

.quiz__option:focus-within {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.quiz .form-field {
  margin-bottom: 20px;
}

.quiz__step-error {
  color: #C0362C;
  font-size: 13px;
  margin: -8px 0 16px;
}

.quiz__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

/* Кнопки квиза наследуют white-space: nowrap от .btn — на 360–390px
   «Назад» + «Получить консультацию» вместе шире карточки квиза и не
   могут сжаться (flex-item min-width: auto по умолчанию), из-за чего
   вся страница получала горизонтальный скролл. Разрешаем тексту
   переноситься внутри кнопки вместо распирания ряда. */
.quiz__actions .btn {
  white-space: normal;
  text-align: center;
}

.quiz__success {
  text-align: center;
  padding: 20px 0;
}

.quiz__success .fallback-contacts {
  justify-content: center;
}

.quiz__success .icon {
  width: 40px;
  height: 40px;
  color: var(--gold);
  margin: 0 auto 16px;
}

.quiz__success p {
  font-size: 16px;
  color: var(--navy);
}

/* ------------------------------------------------------------
   Контакты
   ------------------------------------------------------------ */

.contacts-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 860px) {
  .contacts-grid {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }
}

/* Тот же фон и радиус остаются под iframe — если виджет заблокирован
   (например, недоступен yandex.ru), контейнер всё равно выглядит
   аккуратно, а не как сломанная страница. */
.map-placeholder {
  background: var(--grey-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.map-placeholder iframe {
  display: block;
  width: 100%;
  height: 260px;
  border: 0;
}

@media (min-width: 860px) {
  .map-placeholder iframe {
    height: 340px;
  }
}

.contact-card {
  background: var(--grey-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-card__row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.contact-card__row .icon {
  color: var(--gold);
}

.contact-card__row span:first-of-type {
  flex: 1;
}

.contact-card__address {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  background: var(--white);
  flex-shrink: 0;
  margin-left: 32px;
}

.copy-btn .icon {
  width: 14px;
  height: 14px;
}

.contact-card__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 420px) {
  .contact-card__actions {
    flex-direction: row;
  }

  .contact-card__actions .btn {
    flex: 1;
  }
}

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

.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.6);
  padding: 32px 0;
  font-size: 13px;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.footer__links a {
  text-decoration: underline;
}

@media (min-width: 640px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ------------------------------------------------------------
   Липкая панель снизу (моб.)
   ------------------------------------------------------------ */

.mobile-bar {
  display: none;
}

@media (max-width: 767px) {
  body {
    padding-bottom: 68px;
  }

  .mobile-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: var(--white);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px rgba(15, 31, 61, 0.08);
  }

  .mobile-bar__btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 4px 12px;
    font-size: 11px;
    color: var(--navy);
  }

  .mobile-bar__btn .icon {
    width: 20px;
    height: 20px;
    color: var(--navy);
  }

  .mobile-bar__btn--gold .icon {
    color: var(--gold);
  }
}

/* ------------------------------------------------------------
   Страница «Политика конфиденциальности»
   ------------------------------------------------------------ */

.legal-header__inner {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.legal-back-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
}

.legal-back-link:hover {
  text-decoration: underline;
}

.legal {
  max-width: 760px;
}

.legal__title {
  text-align: left;
}

.legal .section__underline {
  margin-left: 0;
}

.legal__updated {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 28px;
}

.legal p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 16px;
}

.legal__h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy);
  margin: 40px 0 16px;
}

.legal__list {
  margin: 0 0 16px;
  padding-left: 0;
}

.legal__list li {
  position: relative;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 8px;
}

.legal__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}
