/* ============================================
   Лендинг: ремонт компьютеров на дому
   Аудитория 35+: крупный шрифт, высокий контраст,
   минимум анимаций, мобильный приоритет
   ============================================ */

:root {
  --navy-900: #0b1f3a;
  --navy-800: #12305c;
  --navy-700: #1a4480;
  --blue-600: #1d5fa8;
  /* затемнённый оранжевый: контраст с белым текстом ≥ 5:1 (WCAG AA) */
  --orange-600: #c2410c;
  --orange-700: #9a3412;
  --green-600: #1a7f37;
  --white: #ffffff;
  --gray-50: #f4f7fb;
  --gray-200: #d9e2ec;
  --gray-700: #33415c;
  --text: #14213d;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(11, 31, 58, 0.12);
  --font: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  /* место под нижнюю панель мессенджеров на мобильном */
  padding-bottom: 72px;
}

img, svg { max-width: 100%; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  border: none;
  border-radius: var(--radius);
  padding: 14px 24px;
  min-height: 52px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.btn--lg { font-size: 20px; padding: 16px 32px; min-height: 60px; }
.btn--primary { background: var(--orange-600); color: var(--white); }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--orange-700); }
.btn--outline {
  background: var(--white);
  color: var(--navy-800);
  border: 3px solid var(--navy-800);
}
.btn--outline:hover, .btn--outline:focus-visible { background: var(--gray-50); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--blue-600);
  outline-offset: 2px;
}

/* ---------- Шапка ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
  flex-wrap: wrap;
}
.header__brand { display: flex; align-items: center; gap: 10px; }
.header__logo { color: var(--navy-800); flex-shrink: 0; }
.header__name { display: flex; flex-direction: column; line-height: 1.25; }
.header__name strong { font-size: 18px; color: var(--navy-900); }
.header__name span { font-size: 15px; color: var(--gray-700); }
.header__contacts { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.header__phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--navy-900);
  text-decoration: none;
  white-space: nowrap;
}
.header__phone:hover { color: var(--blue-600); }
/* на мобильном мессенджеры дублируются нижней панелью — в шапке прячем */
.header__messengers { display: none; gap: 8px; }
@media (min-width: 700px) {
  .header__messengers { display: flex; }
}

.msgr {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--white);
  border-radius: 8px;
  padding: 10px 14px;
  min-height: 44px;
}
.msgr--wa { background: #1faa53; }
.msgr--wa:hover { background: #178a43; }
.msgr--tg { background: #2381c0; }
.msgr--tg:hover { background: #1c6da3; }
.msgr--max { background: #6d28d9; }
.msgr--max:hover { background: #5b21b6; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: var(--white);
  padding: 48px 0 56px;
}
.hero__inner { max-width: 820px; }
.hero__title {
  font-size: 34px;
  line-height: 1.25;
  font-weight: 800;
  margin-bottom: 16px;
}
.hero__subtitle {
  font-size: 21px;
  font-weight: 600;
  color: #dbe7f5;
  margin-bottom: 28px;
}
.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.hero__actions .btn--outline { border-color: var(--white); }
.hero__bullets {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  font-size: 18px;
  font-weight: 600;
}
.hero__bullets li { display: flex; align-items: center; gap: 12px; }
.hero__bullets svg { color: #7fc97f; flex-shrink: 0; }

/* ---------- Секции ---------- */
.section { padding: 56px 0; }
.section--muted { background: var(--gray-50); }
.section--dark { background: var(--navy-800); color: var(--white); }
.section__title {
  font-size: 30px;
  line-height: 1.3;
  font-weight: 800;
  color: var(--navy-900);
  text-align: center;
  margin-bottom: 16px;
}
.section--dark .section__title { color: var(--white); }
.section__note {
  text-align: center;
  font-size: 18px;
  color: var(--gray-700);
  margin-bottom: 28px;
}
.section__cta { text-align: center; margin-top: 32px; }

/* ---------- О мастере ---------- */
.master__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}
.master__photo {
  margin: 0;
  justify-self: center;
}
.master__photo img {
  width: 260px;
  height: 260px;
  object-fit: cover;
  border-radius: 16px;
  border: 4px solid var(--white);
  box-shadow: 0 6px 24px rgba(11, 31, 58, 0.22);
  display: block;
}
/* фото ещё не загружено (нет файла) — прячем колонку, текст на всю ширину */
.master__photo--empty { display: none; }
.master__text h2 {
  font-size: 28px;
  color: var(--navy-900);
  margin-bottom: 14px;
}
.master__text p {
  font-size: 18px;
  color: var(--gray-700);
  margin-bottom: 12px;
}
.master__points {
  list-style: none;
  margin: 18px 0 24px;
  display: grid;
  gap: 10px;
}
.master__points li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--navy-900);
}
.master__points svg { color: var(--green-600); flex-shrink: 0; }

@media (min-width: 800px) {
  .master__inner { grid-template-columns: 320px 1fr; gap: 40px; align-items: center; }
  .master__photo img { width: 320px; height: 320px; }
  .master__text h2 { font-size: 32px; }
  /* нет фото — убираем пустую колонку, текст на всю ширину */
  .master__inner:has(.master__photo--empty) { grid-template-columns: 1fr; }
}

/* ---------- Карточки преимуществ ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 32px;
}
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card__icon { color: var(--blue-600); margin-bottom: 14px; }
.card h3 { font-size: 20px; color: var(--navy-900); margin-bottom: 8px; }
.card p { font-size: 17px; color: var(--gray-700); }

/* ---------- Таблица цен ---------- */
.price-table-wrap { overflow-x: auto; }
.price-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 18px;
}
.price-table th, .price-table td {
  text-align: left;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
}
.price-table th {
  background: var(--navy-800);
  color: var(--white);
  font-size: 18px;
}
.price-table tbody tr:nth-child(even) { background: var(--gray-50); }
.price-table tbody tr:last-child td { border-bottom: none; }
.price-table__price {
  font-weight: 700;
  color: var(--navy-900);
  white-space: nowrap;
}

/* ---------- Шаги ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 32px;
  counter-reset: step;
}
.step {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  text-align: center;
}
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--orange-600);
  color: var(--white);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 14px;
}
.step h3 { font-size: 20px; color: var(--navy-900); margin-bottom: 8px; }
.step p { font-size: 17px; color: var(--gray-700); }

/* ---------- Отзывы ---------- */
.review {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.review__head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.review__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy-700);
  color: var(--white);
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}
.review__head strong { font-size: 18px; color: var(--navy-900); display: block; }
.review__meta { font-size: 15px; color: var(--gray-700); }
.review__stars { color: #e8a013; font-size: 20px; letter-spacing: 2px; margin-bottom: 10px; }
.review p { font-size: 17px; color: var(--text); }

/* ---------- Форма ---------- */
.form-section { max-width: 640px; }
.form-section__note {
  text-align: center;
  font-size: 18px;
  color: #cdd9ea;
  margin-bottom: 28px;
}
.lead-form {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 24px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.lead-form__field { display: flex; flex-direction: column; gap: 8px; }
.lead-form__field label, .lead-form__problems legend {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy-900);
}
.lead-form__optional { font-weight: 400; color: var(--gray-700); }
.required { color: #c0311a; }
.lead-form input[type="text"],
.lead-form input[type="tel"],
.lead-form textarea {
  font-family: inherit;
  font-size: 18px;
  color: var(--text);
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  padding: 13px 14px;
  min-height: 52px;
  width: 100%;
}
.lead-form textarea { min-height: 64px; resize: vertical; margin-top: 10px; }
.lead-form input:focus, .lead-form textarea:focus {
  border-color: var(--blue-600);
  outline: none;
}
.lead-form input[aria-invalid="true"] { border-color: #c0311a; }
.lead-form__error { font-size: 16px; color: #c0311a; font-weight: 600; }
.lead-form__problems { border: none; }
.checks { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  cursor: pointer;
  padding: 10px 14px;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  min-height: 48px;
}
.check:has(input:checked) { border-color: var(--blue-600); background: #eef4fb; }
.check input { width: 22px; height: 22px; accent-color: var(--blue-600); flex-shrink: 0; cursor: pointer; }
.check--consent { border: none; padding: 0; align-items: flex-start; font-size: 16px; }
.check--consent input { margin-top: 3px; }
.check--consent a { color: var(--blue-600); }
.lead-form__submit { width: 100%; }
.lead-form__submit[disabled] { opacity: 0.6; cursor: default; }
.lead-form__hint {
  text-align: center;
  font-size: 16px;
  color: var(--gray-700);
}

/* ---------- Футер ---------- */
.footer {
  background: var(--navy-900);
  color: #cdd9ea;
  padding: 40px 0;
  font-size: 17px;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.footer__col { display: flex; flex-direction: column; gap: 8px; }
.footer strong { color: var(--white); font-size: 18px; }
.footer a { color: var(--white); }
.footer__phone {
  font-size: 24px;
  font-weight: 800;
  text-decoration: none;
}
.footer__phone:hover { color: #8fb8e8; }
.footer__legal {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  font-size: 14px;
  color: #8ea6c4;
}

/* ---------- Плавающие кнопки мессенджеров ---------- */
.float-msgrs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  box-shadow: 0 -2px 10px rgba(11, 31, 58, 0.15);
  padding-bottom: env(safe-area-inset-bottom);
}
.float-msgrs__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  color: var(--white);
  min-height: 60px;
  padding: 8px;
}
.float-msgrs__btn--wa { background: #1faa53; }
.float-msgrs__btn--tg { background: #2381c0; }
.float-msgrs__btn--max { background: #6d28d9; }

/* ---------- Попап "Спасибо" ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(11, 31, 58, 0.6); }
.modal__box {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 28px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}
.modal__icon { color: var(--green-600); }
.modal__box h3 { font-size: 24px; color: var(--navy-900); }
.modal__box p { font-size: 18px; color: var(--gray-700); }

/* ============================================
   Планшет и десктоп
   ============================================ */
@media (min-width: 700px) {
  body { padding-bottom: 0; }

  .hero__title { font-size: 42px; }
  .hero__bullets { grid-template-columns: 1fr 1fr; }

  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .footer__inner { grid-template-columns: repeat(3, 1fr); }

  /* мессенджеры: компактный столбик справа снизу вместо панели */
  .float-msgrs {
    left: auto;
    right: 20px;
    bottom: 20px;
    flex-direction: column;
    gap: 10px;
    background: none;
    border: none;
    box-shadow: none;
    padding-bottom: 0;
  }
  .float-msgrs__btn {
    flex: none;
    border-radius: 999px;
    min-height: 52px;
    padding: 12px 20px;
    box-shadow: 0 4px 14px rgba(11, 31, 58, 0.3);
    justify-content: flex-start;
  }
}

@media (min-width: 1000px) {
  .hero { padding: 72px 0 80px; }
  .hero__title { font-size: 48px; }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .section__title { font-size: 36px; }
}
