/* Общая основа трёх макетов: сброс, сетка, форма, контакты, подвал.
   Цвета и шрифты бренда приходят из /static/brand.css (--bg, --text,
   --primary, --accent, --font-heading, --font-body); облик каждого макета —
   в его собственном файле. */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
input, select, textarea, button { font: inherit; color: inherit; }
a { color: inherit; }
table { border-collapse: collapse; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

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

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  padding: 10px 16px; background: var(--primary); color: var(--bg);
  border-radius: 8px; text-decoration: none; font-weight: 700;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.wrap--narrow { max-width: 760px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }

/* Шапка */
.header__inner {
  display: flex; flex-wrap: wrap; gap: 12px 24px;
  align-items: center; justify-content: space-between;
  padding-top: 16px; padding-bottom: 16px;
}
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.logo__mark { flex: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; }
.logo__text { display: flex; flex-direction: column; line-height: 1.1; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: 15px; }
.nav a { text-decoration: none; }
.nav .phone { font-weight: 700; white-space: nowrap; }
@media (max-width: 559px) {
  .nav a:not(.phone) { display: none; }
}

/* Первый экран и кнопки */
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hero__inner { display: grid; gap: 32px; align-items: center; }
.hero__text { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.hero__title {
  font-family: var(--font-heading); font-weight: 800;
  font-size: clamp(30px, 6vw, 56px); line-height: 1.1;
  overflow-wrap: break-word;
}
.hero__lead { font-size: clamp(16px, 2.2vw, 19px); max-width: 34em; }
@media (min-width: 900px) {
  .hero__inner { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; }
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  border: 2px solid transparent; border-radius: 10px;
  font-weight: 700; font-size: 16px; text-decoration: none; text-align: center;
  cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
@media (max-width: 479px) { .actions .btn { flex: 1 1 100%; } }

/* Разделы */
.section-title {
  font-family: var(--font-heading); font-weight: 700;
  font-size: clamp(26px, 4vw, 38px); line-height: 1.15;
}
.section-lead { margin-top: 10px; max-width: 40em; }
.empty { margin-top: 24px; font-size: 17px; }
.note { margin-top: 16px; font-size: 14px; }

/* Форма заявки */
.form { display: flex; flex-direction: column; gap: 18px; margin-top: 28px; }
.form__grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .form__grid { grid-template-columns: 1fr 1fr; } }
.form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__alert { padding: 12px 16px; border-radius: 10px; font-weight: 600; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 0 14px;
  border: 1px solid; border-radius: 10px; font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.field select { padding-right: 36px; appearance: none; -webkit-appearance: none; background-repeat: no-repeat; background-position: right 14px center; background-size: 12px; }
.field textarea { min-height: 96px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.field__error { font-size: 14px; font-weight: 600; color: #E5484D; }
.field--error input, .field--error select, .field--error textarea { border-color: #E5484D; }

.consent { display: flex; flex-direction: column; gap: 6px; }
.consent__label { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.consent__label input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--primary); }
.form__submit { width: 100%; font-size: 17px; }
@media (min-width: 600px) { .form__submit { width: auto; align-self: flex-start; padding: 0 40px; } }

.sent { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 28px; padding: 28px; }
.sent__icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; }
.sent__text { font-size: 18px; font-weight: 600; }

/* Цены по классам */
.class-prices { width: 100%; }
.class-prices th { text-align: left; font-weight: 500; padding: 9px 0; }
.class-prices td { text-align: right; font-weight: 700; padding: 9px 0; white-space: nowrap; }

/* Контакты и карта */
.contacts__inner { display: grid; gap: 32px; }
@media (min-width: 900px) { .contacts__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); align-items: stretch; } }
.contacts__list { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.contacts__list dt { font-size: 14px; }
.contacts__list dd { font-weight: 600; font-size: 17px; }
.contacts__list .phone { text-decoration: none; }

.map {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; min-height: 260px; padding: 24px; text-align: center; text-decoration: none;
  overflow: hidden;
}
.map__pin { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; }
.map__address { font-weight: 700; font-size: 17px; }
.map__link { font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Подвал */
.footer { font-size: 14px; }
.footer__inner { display: flex; flex-direction: column; gap: 4px; padding-top: 24px; padding-bottom: 28px; text-align: center; }
.footer a { text-underline-offset: 3px; }
.footer__legal { opacity: .75; }

/* Документ (политика) и страница-сообщение */
.doc__inner { max-width: 780px; padding-top: 32px; padding-bottom: 72px; }
.doc__back a { text-decoration: none; font-weight: 600; }
.doc__title { margin-top: 20px; font-family: var(--font-heading); font-weight: 700; font-size: clamp(26px, 4.5vw, 40px); line-height: 1.15; }
.doc__meta { margin-top: 8px; font-size: 14px; opacity: .7; }
.doc h2 { margin-top: 32px; font-family: var(--font-heading); font-size: 20px; font-weight: 700; }
.doc p, .doc ul { margin-top: 12px; }
.doc ul { list-style: disc; padding-left: 22px; }
.doc li + li { margin-top: 4px; }

.message__inner { max-width: 640px; padding-top: 72px; padding-bottom: 96px; display: flex; flex-direction: column; gap: 20px; }
.message__title { font-family: var(--font-heading); font-weight: 800; font-size: clamp(28px, 5vw, 44px); line-height: 1.1; }
.message__text { font-size: 18px; }
