/* ==========================================================================
   ТСМ ДВ – стили лендинга. Mobile-first.
   Брейкпоинты: 480 / 640 / 768 / 1080 / 1180 (меню в строку)
   ========================================================================== */

/* ---------- Шрифт Inter (OFL), локально ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Нужен ради знака ₽ (U+20BD) */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Палитра А «Графит + красный» ---------- */
:root {
  --graphite:     #1F2328; /* шапка, подвал, тёмные секции, основной текст */
  --graphite-2:   #2B3036; /* карточки на тёмном фоне */
  --bg:           #F3F4F6; /* фон светлых секций */
  --surface:      #FFFFFF; /* карточки на светлом фоне */
  --text:         #1F2328;
  --text-muted:   #5F6670;
  --border:       #D9DCE1;
  --accent:       #C4122F; /* кнопки, ссылки, акценты */
  --accent-hover: #A30F27;
  --on-dark:      #FFFFFF;

  /* Производные */
  --on-dark-muted: rgba(255, 255, 255, 0.72);
  --line-dark:     rgba(255, 255, 255, 0.12);
  --border-strong: #B9BEC6;

  --radius:    4px;
  --radius-lg: 6px;
  --container: 1200px;
  --gutter:    16px;
  --header-h:  64px;
  --ease:      0.2s ease;
}

@media (min-width: 768px) {
  :root { --gutter: 24px; }
}

/* ---------- База ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

body.is-locked { overflow: hidden; }

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

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p { margin: 0; }

a { color: var(--accent); transition: color var(--ease); }
a:hover { color: var(--accent-hover); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.header :focus-visible,
.hero :focus-visible,
.section--dark :focus-visible,
.footer :focus-visible,
.lightbox :focus-visible { outline-color: var(--on-dark); }
.section--dark .form :focus-visible { outline-color: var(--accent); }

.icon {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.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;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 16px;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}
.btn--lg { min-height: 52px; padding: 14px 28px; font-size: 1rem; }

.btn--primary { background: var(--accent); color: var(--on-dark); }
.btn--primary:hover { background: var(--accent-hover); color: var(--on-dark); }

.btn--ghost { border-color: rgba(255, 255, 255, 0.4); background: transparent; color: var(--on-dark); }
.btn--ghost:hover { border-color: var(--on-dark); background: rgba(255, 255, 255, 0.06); color: var(--on-dark); }

.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Шапка ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--graphite);
  color: var(--on-dark);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--on-dark);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--on-dark); }
.brand__logo { width: 44px; height: 40px; }

.header__actions { display: flex; align-items: center; gap: 8px; }

.header__phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  color: var(--on-dark);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.header__phone:hover { color: var(--on-dark); opacity: 0.8; }
.header__phone-text { display: none; }

.header__cta { display: none; }

.burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: transparent;
  color: var(--on-dark);
  cursor: pointer;
  transition: border-color var(--ease);
}
.burger:hover { border-color: rgba(255, 255, 255, 0.5); }
.burger .icon { width: 22px; height: 22px; }

/* Мобильное меню – панель под шапкой */
.nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  right: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  padding: 8px var(--gutter) 32px;
  background: var(--graphite);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.nav.is-open { display: block; }

.nav__list { margin: 0; padding: 0; list-style: none; }

.nav__link {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-dark);
  color: var(--on-dark);
  font-size: 1.125rem;
  font-weight: 500;
  text-decoration: none;
}
.nav__link:hover { color: var(--on-dark); opacity: 0.8; }

.nav__extra { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.nav__phone { color: var(--on-dark); font-size: 1.25rem; font-weight: 600; text-decoration: none; }
.nav__phone:hover { color: var(--on-dark); }

@media (min-width: 640px) {
  .header__phone-text { display: inline; }
  .header__phone { margin-right: 8px; }
}

@media (min-width: 768px) {
  .header__cta { display: inline-flex; }
  .nav__extra { display: none; }
}

@media (min-width: 1180px) {
  .burger { display: none; }

  .nav {
    display: block;
    position: static;
    overflow: visible;
    padding: 0;
    background: none;
    border: 0;
  }
  .nav__list { display: flex; gap: 24px; }
  .nav__link {
    padding: 8px 0;
    border: 0;
    color: var(--on-dark-muted);
    font-size: 0.9375rem;
  }
  .nav__link:hover { color: var(--on-dark); opacity: 1; }
  .header__inner { gap: 32px; }
  .brand { margin-right: 0; }
  .header__actions { margin-left: auto; gap: 16px; }
  .header__phone { margin-right: 0; }
}

/* ---------- Секции ---------- */
.section { padding-block: 56px; }
.section--light { background: var(--bg); }
.section--dark { background: var(--graphite); color: var(--on-dark); }

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

.section__head { max-width: 720px; margin-bottom: 32px; }
.section__title { font-size: clamp(1.625rem, 1.25rem + 1.5vw, 2.25rem); }
.section__title::before {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin-bottom: 16px;
  background: var(--accent);
}
.section__lead { margin-top: 12px; color: var(--text-muted); font-size: 1.0625rem; }
.section--dark .section__lead { color: var(--on-dark-muted); }

@media (min-width: 768px) {
  .section__head { margin-bottom: 40px; }
}

/* ---------- Первый экран ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 56px;
  background: var(--graphite);
  color: var(--on-dark);
}

/* Тонкая «чертёжная» сетка */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(90deg, transparent 15%, #000 85%);
  mask-image: linear-gradient(90deg, transparent 15%, #000 85%);
  pointer-events: none;
}

/* Вариант фона с фото работ: <section class="hero hero--photo"> */
.hero--photo {
  background-image:
    linear-gradient(90deg, rgba(31, 35, 40, 0.94) 0%, rgba(31, 35, 40, 0.78) 100%),
    url("../assets/photos/02-kuzov-bortovoy-1280.jpg");
  background-image:
    linear-gradient(90deg, rgba(31, 35, 40, 0.94) 0%, rgba(31, 35, 40, 0.78) 100%),
    image-set(url("../assets/photos/02-kuzov-bortovoy-1280.webp") type("image/webp"), url("../assets/photos/02-kuzov-bortovoy-1280.jpg") type("image/jpeg"));
  background-position: center;
  background-size: cover;
}
.hero--photo::before { display: none; }

.hero__inner { position: relative; }

.hero__eyebrow {
  margin-bottom: 16px;
  color: var(--on-dark-muted);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero__title {
  max-width: 880px;
  font-size: clamp(1.75rem, 1.2rem + 2.8vw, 3.25rem);
  line-height: 1.12;
  overflow-wrap: break-word;
  hyphens: auto;
}

.hero__lead {
  max-width: 680px;
  margin-top: 20px;
  color: var(--on-dark-muted);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero__actions .btn { flex: 1 1 100%; }

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin: 48px 0 0;
  padding: 24px 0 0;
  list-style: none;
  border-top: 1px solid var(--line-dark);
  color: var(--on-dark-muted);
  font-size: 0.9375rem;
}
.hero__facts li { display: flex; align-items: center; gap: 10px; }
.hero__facts .icon { color: var(--on-dark); }

@media (min-width: 480px) {
  .hero__actions .btn { flex: 0 0 auto; }
}

@media (min-width: 768px) {
  .hero { padding: 104px 0 72px; }
  .hero__facts { margin-top: 72px; }
}

/* ---------- Карточки услуг ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.card:hover { border-color: var(--border-strong); box-shadow: 0 2px 10px rgba(31, 35, 40, 0.06); }

.services { display: grid; gap: 16px; }

.service { display: flex; flex-direction: column; padding: 24px; }
.service__photo { display: block; margin-bottom: 16px; }
.service__photo img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
}
.service__title { font-size: 1.125rem; }
.service__desc { margin: 8px 0 24px; color: var(--text-muted); }

.service__meta { margin: auto 0 24px; border-top: 1px solid var(--border); }
.service__meta div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.service__meta dt { color: var(--text-muted); font-size: 0.875rem; }
.service__meta dd { margin: 0; font-weight: 600; text-align: right; }

.service__btn { width: 100%; }

@media (min-width: 640px) {
  .services { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (640px <= width < 1080px) {
  /* Нечётная последняя карточка – на всю ширину, чтобы ряд не обрывался */
  .service:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
/* Две карточки резки в первом ряду, остальные три – во втором */
@media (min-width: 1080px) {
  .services { grid-template-columns: repeat(6, 1fr); }
  .service { grid-column: span 2; }
  .service:nth-child(-n+2) { grid-column: span 3; }
}

/* ---------- Оборудование ---------- */
.equipment { display: grid; gap: 16px; }

.spec-card {
  padding: 24px;
  background: var(--graphite-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
}
.spec-card__title { margin-bottom: 16px; font-size: 1.125rem; }

.spec-list { margin: 0; }
.spec-list div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line-dark);
}
.spec-list dt { color: var(--on-dark-muted); }
.spec-list dd { margin: 0; font-weight: 600; text-align: right; }

/* По 3 карточки в ряд, неполный последний ряд растягивается */
@media (min-width: 768px) {
  .equipment { grid-template-columns: repeat(6, 1fr); gap: 20px; }
  .spec-card { grid-column: span 2; }
  .spec-card:nth-last-child(2):nth-child(3n+1),
  .spec-card:last-child:nth-child(3n+2) { grid-column: span 3; }
  .spec-card:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
}

/* ---------- Как заказать ---------- */
.steps { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }

.step {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.step__num { color: var(--accent); font-size: 0.875rem; font-weight: 700; letter-spacing: 0.08em; }
.step__title { margin-top: 12px; font-size: 1.125rem; }
.step__text { margin-top: 8px; color: var(--text-muted); }

.note {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-top: 32px;
  padding: 20px 24px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  background: var(--bg);
}
.note__text { max-width: 760px; }

@media (min-width: 640px) {
  .steps { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (min-width: 768px) {
  .note { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; }
  .note .btn { flex: none; }
}
@media (min-width: 1080px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Галерея ---------- */
.gallery { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }

.gallery__figure {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.gallery__link {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #E2E5E9;
  cursor: zoom-in;
}
.gallery__link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery__link--top img { object-position: 50% 40%; }
.gallery__link:hover img { transform: scale(1.03); }

.gallery__caption { padding: 14px 16px 16px; font-size: 0.9375rem; }

@media (min-width: 768px) {
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

/* ---------- Почему мы ---------- */
.features { display: grid; gap: 24px; margin: 0; padding: 0; list-style: none; }

.feature { display: flex; align-items: flex-start; gap: 16px; }
.feature__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--accent);
}
.feature__icon .icon { width: 22px; height: 22px; }
.feature__text { padding-top: 11px; font-weight: 500; }

.stats { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }
.stats[hidden] { display: none; }
.stat__value { display: block; color: var(--accent); font-size: 2.5rem; font-weight: 700; line-height: 1; }
.stat__label { display: block; margin-top: 8px; color: var(--text-muted); }

@media (min-width: 640px) {
  .features { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}
@media (min-width: 1080px) {
  .features { grid-template-columns: repeat(4, 1fr); }
  .feature { flex-direction: column; }
  .feature__text { padding-top: 0; }
}

/* ---------- Заявка ---------- */
.order { display: grid; gap: 32px; }

.order__contacts { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.order__contacts li { display: flex; align-items: center; gap: 12px; }
.order__contacts a { color: var(--on-dark); font-weight: 600; text-decoration: none; }
.order__contacts a:hover { color: var(--on-dark); text-decoration: underline; }
.order__contacts .icon { color: var(--on-dark-muted); }

@media (min-width: 1080px) {
  .order { grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; }
}

.form {
  display: grid;
  gap: 20px;
  padding: 24px 16px;
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-lg);
}

.form__row { display: grid; gap: 20px; }

@media (min-width: 480px) {
  .form { padding: 24px; }
}
@media (min-width: 640px) {
  .form__row { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .form { padding: 32px; }
}

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__label { font-size: 0.875rem; font-weight: 600; }
.field__req { color: var(--accent); }
.field__optional { color: var(--text-muted); font-weight: 400; }

.field__input {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.field__input:hover { border-color: var(--border-strong); }
.field__input:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px rgba(31, 35, 40, 0.12); }
.field__input[aria-invalid="true"] { border-color: var(--accent); }
.field__input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(196, 18, 47, 0.15); }
.field__input::placeholder { color: #9AA0A8; }

.field__select {
  padding-right: 40px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235F6670' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 18px;
  cursor: pointer;
}

.field__textarea { min-height: 112px; resize: vertical; }

.field__hint { color: var(--text-muted); font-size: 0.8125rem; }
.field__error { color: var(--accent); font-size: 0.8125rem; font-weight: 500; }
.field__error[hidden] { display: none; }

/* Загрузка файлов */
.dropzone {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  transition: border-color var(--ease), background-color var(--ease);
}
.dropzone:hover,
.dropzone.is-dragover { border-color: var(--accent); background: var(--surface); }
.dropzone .icon { width: 22px; height: 22px; color: var(--accent); }
.dropzone__text { display: flex; flex-direction: column; }
.dropzone__title { font-weight: 600; }
.dropzone__sub { color: var(--text-muted); font-size: 0.8125rem; }
.field input[type="file"]:focus-visible + .dropzone { outline: 2px solid var(--accent); outline-offset: 2px; }
.field input[type="file"][aria-invalid="true"] + .dropzone { border-color: var(--accent); }

.file-list { display: grid; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.file-list[hidden] { display: none; }
.file-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
}
.file-list .icon { width: 16px; height: 16px; color: var(--text-muted); }
.file-list__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list__size { flex: none; color: var(--text-muted); }
.file-list__remove {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--ease), background-color var(--ease);
}
.file-list__remove:hover { background: var(--bg); color: var(--accent); }
.file-list .file-list__total { justify-content: flex-end; padding: 0; border: 0; color: var(--text-muted); font-size: 0.8125rem; }

/* Ловушка для ботов */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Чекбокс согласия */
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 0.875rem; line-height: 1.5; cursor: pointer; }
.check__input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); cursor: pointer; }
.check__input[aria-invalid="true"] { outline: 2px solid var(--accent); outline-offset: 1px; }

.form__submit { justify-self: start; }
@media (max-width: 479px) {
  .form__submit { justify-self: stretch; }
}

.form__status {
  padding: 14px 16px;
  border-left: 3px solid var(--graphite);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--bg);
  font-size: 0.9375rem;
}
.form__status[hidden] { display: none; }
.form__status.is-error { border-left-color: var(--accent); }
.form__status strong { display: block; margin-bottom: 2px; }

/* ---------- Контакты ---------- */
.contacts { display: grid; gap: 32px; }

.contact-list { display: grid; gap: 20px; margin: 0 0 32px; padding: 0; list-style: none; }
.contact-list li { display: flex; align-items: flex-start; gap: 14px; }
.contact-list .icon { margin-top: 3px; color: var(--accent); }
.contact-list__label { display: block; color: var(--text-muted); font-size: 0.8125rem; }
.contact-list__value { color: var(--text); font-weight: 600; text-decoration: none; }
a.contact-list__value:hover { color: var(--accent); }

.map {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #E2E5E9;
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (min-width: 1080px) {
  .contacts { grid-template-columns: 5fr 7fr; gap: 64px; }
  .map { min-height: 460px; }
}

/* ---------- Подвал ---------- */
.footer {
  padding-top: 48px;
  background: var(--graphite);
  color: var(--on-dark-muted);
  font-size: 0.9375rem;
}
.footer a { color: var(--on-dark); text-decoration: none; }
.footer a:hover { color: var(--on-dark); text-decoration: underline; }

.footer__grid { display: grid; gap: 32px; }
.footer__brand img { width: 62px; height: 56px; }
.footer__name { max-width: 300px; margin-top: 16px; color: var(--on-dark); font-weight: 600; }

.footer__contacts { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.footer__legal { display: grid; gap: 4px; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 40px;
  padding-block: 20px;
  border-top: 1px solid var(--line-dark);
  font-size: 0.875rem;
}

.footer--compact { padding-top: 0; }
.footer--compact .footer__bottom { margin-top: 0; border-top: 0; }

@media (min-width: 768px) {
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

/* ---------- Лайтбокс ---------- */
.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 56px 16px 80px;
  border: 0;
  background: transparent;
  color: var(--on-dark);
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(15, 17, 20, 0.92); }

.lightbox__figure { display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 100%; max-height: 100%; margin: 0; }
.lightbox__img { width: auto; max-width: 100%; height: auto; max-height: calc(100vh - 180px); max-height: calc(100dvh - 180px); border-radius: var(--radius); object-fit: contain; }
.lightbox__caption { color: var(--on-dark-muted); font-size: 0.9375rem; text-align: center; }

.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(31, 35, 40, 0.7);
  color: var(--on-dark);
  cursor: pointer;
  transition: border-color var(--ease), background-color var(--ease);
}
.lightbox__btn:hover { border-color: rgba(255, 255, 255, 0.6); background: var(--graphite); }
.lightbox__btn .icon { width: 24px; height: 24px; }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { bottom: 16px; left: calc(50% - 56px); }
.lightbox__next { bottom: 16px; right: calc(50% - 56px); }

@media (min-width: 768px) {
  .lightbox { padding: 56px 88px; }
  .lightbox__img { max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); }
  .lightbox__prev,
  .lightbox__next { top: 50%; bottom: auto; transform: translateY(-50%); }
  .lightbox__prev { left: 20px; }
  .lightbox__next { right: 20px; }
}

/* ---------- Страница политики ---------- */
.doc { padding-block: 48px 72px; }
.doc__inner { max-width: 820px; }
.doc__back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 24px; font-size: 0.9375rem; text-decoration: none; }
.doc h1 { margin-bottom: 8px; font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); }
.doc h2 { margin: 40px 0 12px; font-size: 1.25rem; }
.doc p,
.doc li { color: var(--text); }
.doc p + p { margin-top: 12px; }
.doc ul,
.doc ol { margin: 12px 0 0; padding-left: 22px; }
.doc li + li { margin-top: 6px; }
.doc ul + p,
.doc ol + p { margin-top: 12px; }
.doc__meta { color: var(--text-muted); }

/* ---------- Уменьшение движения ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { transition: none !important; }
}
