/* =============================================================
   MGS-Tuning — стили сайта. Подробно о выборе — в DESIGN.md.
   Характер: мастеровой, точный, взрослый. Настроение: техкарта мастерской —
   светлый бокс, серый BMW, чёрный и красный из логотипа MGS.
   Сначала стили для телефона (от 360px), ниже — дополнения для экранов шире.
   ============================================================= */

/* Шрифты лежат на сайте (assets/fonts, лицензия OFL), браузер качает только нужный набор букв.
   Exo 2 (наклонный, 700 и 800) — заголовки и цены, Inter — текст. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(../fonts/inter-cyrillic.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: 400 700; font-display: swap;
  src: url(../fonts/inter-latin.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; }
@font-face { font-family: "Exo 2"; font-style: italic; font-weight: 800; font-display: swap;
  src: url(../fonts/exo-2-cyrillic-800-italic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Exo 2"; font-style: italic; font-weight: 800; font-display: swap;
  src: url(../fonts/exo-2-latin-800-italic.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; }
@font-face { font-family: "Exo 2"; font-style: italic; font-weight: 700; font-display: swap;
  src: url(../fonts/exo-2-cyrillic-700-italic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Exo 2"; font-style: italic; font-weight: 700; font-display: swap;
  src: url(../fonts/exo-2-latin-700-italic.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; }

:root {
  /* Светлый бокс, чёрный и красный из логотипа MGS */
  --c-bg: #f3f3f1;
  --c-bg-alt: #e9e9e6;
  --c-surface: #ffffff;
  --c-surface-2: #ffffff;
  --c-line: #dcdcd8;
  --c-line-2: #b4b4ae;
  --c-led: #111113;
  --c-accent: #d71920;          /* красный MGS: главная кнопка, черта, зоны на схеме */
  --c-accent-text: #b3141b;     /* красный для текста на светлом */
  --c-accent-on-dark: #ff4a50;  /* красный для текста на чёрном */
  --c-on-accent: #ffffff;       /* на красном — белый: контраст 5,2:1 */

  /* Шапка, подвал и блок «10 зон» — чёрные. Те же имена использует admin.css */
  --c-dark: #111113;
  --c-dark-2: #1b1b1f;
  --c-dark-line: #2e2f35;
  --c-on-dark: #f2f2f2;
  --c-on-dark-muted: #a9abb2;
  --c-text: #111113;
  --c-text-2: #393a3f;
  --c-muted: #5d5f66;
  --c-input-bg: #ffffff;
  --c-input-line: #85878e;
  --c-placeholder: #6d6f76;

  --c-error: #c62828;
  --c-error-bg: #fbe9e7;
  --c-error-text: #8e1c1c;
  --c-success: #1e8a5a;
  --c-success-bg: #e3f4ea;

  /* Заглушки [ЗАМЕНИТЬ] */
  --c-stub-bg: #fff3cd;
  --c-stub-text: #7a5300;
  --c-stub-line: #d9a400;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Exo 2", "Arial Black", system-ui, sans-serif;
  --font-mono: "Exo 2", "Arial Black", system-ui, sans-serif;
  --radius: 10px;
  --radius-sm: 8px;
  --header-h: 64px;
  --container: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::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) + 16px);   /* чтобы шапка не закрывала заголовок блока */
  color-scheme: light;
  scrollbar-color: #b9b3c7 var(--c-bg);
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
body.menu-open, body.lightbox-open { overflow: hidden; }

::selection { background: rgba(215, 25, 32, .45); color: var(--c-text); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--c-bg); }
::-webkit-scrollbar-thumb { border: 2px solid var(--c-bg); border-radius: 6px; background: #c9c3d8; }
::-webkit-scrollbar-thumb:hover { background: #868d93; }

h1, h2, h3 { margin: 0; line-height: 1.2; }
p, figure, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--c-accent-text); text-underline-offset: 3px; }
svg { flex-shrink: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }

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

.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;
}

.demo-bar {
  margin: 0;
  padding: 7px 20px;
  background: #111113;
  border-bottom: 1px solid #2e2f35;
  color: #ffd2d3;
  font-size: 13.5px;
  line-height: 1.4;
  text-align: center;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--c-led); color: var(--c-on-accent);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.stub-demo { color: var(--c-muted); font-style: italic; }

.stub {
  display: inline-block;
  padding: 0 .45em;
  border: 1px dashed var(--c-stub-line);
  border-radius: 3px;
  background: var(--c-stub-bg);
  color: var(--c-stub-text);
  font-family: var(--font);
  font-size: .82em;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: 0;
  text-transform: none;
}

.label {
  color: var(--c-muted);
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 500;
  letter-spacing: .04em; text-transform: uppercase;
}
.h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5.6vw, 52px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: .01em;
  text-transform: uppercase;
}

/* Светодиодная полоса: тонкая линия, ярче в середине */
.hero::after, .footer::before {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(238, 243, 246, .55) 50%, transparent);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 650; line-height: 1.2; letter-spacing: .01em;
  text-align: center; text-decoration: none;
  cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--c-accent); color: var(--c-on-accent); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.btn--primary:hover { background: #ef2a31; box-shadow: 0 0 0 1px var(--c-accent), 0 10px 28px -8px rgba(215, 25, 32, .7); }
.btn--ghost, .btn--outline { border-color: var(--c-line-2); background: transparent; color: var(--c-text); }
.btn--ghost:hover, .btn--outline:hover { border-color: var(--c-accent); color: var(--c-accent-text); }
.btn--lg { min-height: 54px; padding: 14px 28px; font-size: 17px; }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .7; cursor: progress; transform: none; box-shadow: none; }

.link {
  display: inline-flex; align-items: center; gap: 6px;
  border-bottom: 1px solid rgba(215, 25, 32, .35);
  color: var(--c-accent-text);
  font-weight: 600;
  text-decoration: none;
  transition: border-color .2s;
}
.link:hover { border-color: var(--c-accent); }
.link svg { transition: transform .2s var(--ease); }
.link:hover svg { transform: translateX(3px); }

.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--c-dark);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.header.is-scrolled { border-bottom-color: var(--c-dark-line); }
.header__inner { display: flex; align-items: center; gap: 12px; height: var(--header-h); }

.logo {
  margin-right: auto;
  color: var(--c-on-dark);
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700; letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
}
.logo { color: var(--c-accent); font-size: 21px; letter-spacing: .04em; text-transform: uppercase; }
.logo span { margin-left: .28em; color: var(--c-on-dark); }

.header__phone { display: none; }
.header__cta { display: none; }

.burger {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--c-line-2); border-radius: var(--radius-sm);
  background: transparent; color: var(--c-on-dark);
  cursor: pointer;
}
.burger .icon--close,
.header.is-open .burger .icon--menu { display: none; }
.header.is-open .burger .icon--close { display: block; }

/* Меню на телефоне — панель под шапкой */
.nav {
  position: absolute; top: 100%; left: 0; right: 0;
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 4px 20px 28px;
  background: var(--c-dark);
  border-bottom: 1px solid var(--c-dark-line);
  visibility: hidden; opacity: 0; transform: translateY(-6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s linear .2s;
}
.header.is-open .nav {
  visibility: visible; opacity: 1; transform: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.nav__list { display: flex; flex-direction: column; }
.nav__link {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-dark-line);
  color: var(--c-on-dark);
  font-size: 18px; font-weight: 600;
  text-decoration: none;
}
.nav__extra { display: grid; gap: 14px; margin-top: 22px; }
.nav__contact { justify-self: center; padding: 4px 0; color: var(--c-accent-text); font-weight: 600; text-decoration: none; }

.hero { position: relative; overflow: hidden; padding: 92px 0 0; }

.hero__grid { display: grid; gap: 32px; }
.hero__title {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: clamp(40px, 9.4vw, 80px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: .005em;
  text-transform: uppercase;
}
.hero__lead { max-width: 34em; margin-top: 20px; color: var(--c-text-2); font-size: 17.5px; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; margin-top: 30px; }
.hero__photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 65%;
  border: 1px solid var(--c-line);
  border-radius: 2px;
}
.hero__photo figcaption { margin-top: 10px; color: var(--c-muted); font-size: 13.5px; }

.facts { margin-top: 36px; padding: 8px 0 28px; border-top: 1px solid var(--c-line); }
.facts__item { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: baseline; gap: 12px; padding: 10px 0; }
.facts dd { font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.facts dt { color: var(--c-muted); font-size: 13.5px; line-height: 1.35; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; }

.section { padding: 72px 0; }
.section--alt { background: var(--c-bg-alt); }
.head { display: grid; gap: 12px; margin-bottom: 32px; }
.head__note { max-width: 34em; color: var(--c-muted); }

.svc-grid { display: grid; gap: 16px; }
.svc {
  position: relative;
  display: flex; flex-direction: column;
  padding: 26px 22px;
  border: 1px solid var(--c-line); border-radius: var(--radius);
  background: var(--c-surface);
}
.svc--main::before { content: ""; position: absolute; top: -1px; left: 24px; right: 24px; height: 1px; background: linear-gradient(90deg, transparent, rgba(238, 243, 246, .7) 50%, transparent); }
.svc__sub { color: var(--c-accent-text); font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.svc__title { margin-top: 8px; font-family: var(--font-display); font-size: 21px; font-weight: 700; }
.svc--main .svc__title { font-size: clamp(22px, 3vw, 28px); }
.svc__text { max-width: 34em; margin-top: 12px; color: var(--c-text-2); }
.prices { margin: 22px 0 20px; border-top: 1px solid var(--c-line); }
.prices__row { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; padding: 12px 0; border-bottom: 1px solid var(--c-line); }
.prices__name { color: var(--c-text-2); font-size: 15.5px; }
a.prices__name { border-bottom: 1px dashed rgba(215, 25, 32, .45); color: var(--c-accent-text); text-decoration: none; }
.prices__price { font-family: var(--font-mono); font-size: 14px; font-weight: 500; white-space: nowrap; }
.svc__more { align-self: flex-start; margin-top: auto; }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.gallery__item--big { grid-column: span 2; }
.gallery__link { display: block; overflow: hidden; border-radius: 2px; background: var(--c-surface); cursor: zoom-in; }
.gallery__link img {
  width: 100%; height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: brightness(.9);
  transition: filter .4s var(--ease);
}
.gallery__link:hover img, .gallery__link:focus-visible img { filter: brightness(1.06); }   /* как будто включили свет */

.lightbox {
  width: 100%; height: 100%;
  max-width: none; max-height: none;
  margin: 0; padding: 56px 12px 64px;
  border: 0;
  background: #060708;
  color: var(--c-text);
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: #060708; }
.lightbox__img { max-width: min(100%, 1280px); max-height: calc(100vh - 140px); width: auto; height: auto; border-radius: 2px; object-fit: contain; }
.lightbox__caption { position: absolute; left: 0; right: 0; bottom: 22px; padding: 0 70px; color: var(--c-muted); font-size: 14px; text-align: center; }
.lightbox__btn {
  position: absolute;
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border: 1px solid var(--c-line-2); border-radius: var(--radius-sm);
  background: var(--c-surface); color: var(--c-text);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.lightbox__btn:hover { border-color: var(--c-accent); color: var(--c-accent); }
.lightbox__btn--close { top: 10px; right: 10px; }
.lightbox__btn--prev { left: 10px; bottom: 10px; }
.lightbox__btn--next { right: 10px; bottom: 10px; }

.about { display: grid; gap: 40px; align-items: start; }
.about__photo {
  display: grid; place-items: center;
  aspect-ratio: 3 / 2;
  margin-top: 26px; padding: 24px;
  border: 1px dashed var(--c-line-2); border-radius: var(--radius);
  background: var(--c-surface);
  text-align: center;
}
.about__story { margin-top: 18px; color: var(--c-text-2); }
.about__facts { border-top: 1px solid var(--c-line); }
.about__fact { display: grid; gap: 4px; padding: 20px 0; border-bottom: 1px solid var(--c-line); }
.about__fact dt { color: var(--c-led); font-family: var(--font-display); font-size: 19px; font-weight: 700; }
.about__fact dd { color: var(--c-text-2); }

.order { display: grid; gap: 40px; }
.order__lead { max-width: 30em; margin-top: 16px; color: var(--c-text-2); }
.order__steps-title { margin-top: 34px; }
.steps { counter-reset: step; margin-top: 12px; border-top: 1px solid var(--c-line); }
.step { counter-increment: step; display: grid; grid-template-columns: 34px minmax(0, 1fr); padding: 12px 0; border-bottom: 1px solid var(--c-line); }
.step::before { content: counter(step, decimal-leading-zero); grid-row: span 2; padding-top: 2px; color: var(--c-accent-text); font-family: var(--font-mono); font-size: 13px; }
.step__title { font-weight: 600; }
.step__text { color: var(--c-text-2); }
.order__avito { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 26px; color: var(--c-text-2); }

.form-card {
  position: relative;
  padding: 24px 20px;
  border: 1px solid var(--c-line); border-radius: var(--radius);
  background: var(--c-surface);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9);
}
.form-card::before { content: ""; position: absolute; top: -1px; left: 24px; right: 24px; height: 1px; background: linear-gradient(90deg, transparent, rgba(238, 243, 246, .7) 50%, transparent); }
.form__row { display: grid; gap: 0 16px; }
.field { margin-bottom: 18px; }
.field__label { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 600; }
.field__opt { color: var(--c-muted); font-weight: 400; }
.field__req { color: var(--c-accent-text); }

.input {
  display: block;
  width: 100%; min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--c-input-line); border-radius: var(--radius-sm);
  background: var(--c-input-bg); color: var(--c-text);
  font-size: 16px; line-height: 1.4;              /* 16px — иначе iPhone увеличивает страницу */
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--c-placeholder); }
.input:hover { border-color: #7a8592; }
.input:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(215, 25, 32, .2); }
.input[aria-invalid="true"] { border-color: var(--c-error); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(255, 138, 128, .18); }
select.input {
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e99a5' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  cursor: pointer;
}
select.input option { background: var(--c-surface); color: var(--c-text); }
textarea.input { min-height: 116px; resize: vertical; }

.field__meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.field__error { margin-top: 6px; color: var(--c-error); font-size: 14px; font-weight: 600; }
.field__error:empty { display: none; }
.field__count { margin-top: 6px; margin-left: auto; color: var(--c-muted); font-size: 13px; white-space: nowrap; }

.check { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.5; cursor: pointer; }
.check input { flex-shrink: 0; width: 22px; height: 22px; margin: 0; accent-color: var(--c-accent); cursor: pointer; }
.check input[aria-invalid="true"] { outline: 2px solid var(--c-error); outline-offset: 2px; }

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

.form__status { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; }
.form__status:empty { display: none; }
.form__status--error { background: var(--c-error-bg); color: var(--c-error-text); }
.form__note { margin-top: 14px; color: var(--c-muted); font-size: 13.5px; }

.form-success { padding: 28px 0 12px; text-align: center; }
.form-success__icon {
  display: grid; place-items: center;
  width: 72px; height: 72px; margin: 0 auto 18px;
  border: 1px solid rgba(95, 211, 160, .4); border-radius: 50%;
  color: var(--c-success);
}
.form-success__title { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.form-success__title:focus { outline: none; }
.form-success__text { max-width: 26em; margin: 10px auto 24px; color: var(--c-text-2); }

.faq-layout { display: grid; gap: 24px; }
.faq-layout__head .head__note { margin-top: 12px; }
.faq { border-top: 1px solid var(--c-line); }
.faq__item { border-bottom: 1px solid var(--c-line); }
.faq__q {
  position: relative;
  display: block;
  padding: 20px 44px 20px 0;
  font-size: 17px; font-weight: 600; line-height: 1.45;
  list-style: none;
  cursor: pointer;
  transition: color .2s;
}
.faq__q:hover { color: var(--c-accent-text); }
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {                      /* плюс; при открытии поворачивается в крестик */
  content: "";
  position: absolute; top: 50%; right: 6px;
  width: 14px; height: 14px; margin-top: -7px;
  background:
    linear-gradient(var(--c-accent), var(--c-accent)) center / 14px 1.5px no-repeat,
    linear-gradient(var(--c-accent), var(--c-accent)) center / 1.5px 14px no-repeat;
  transition: transform .3s var(--ease);
}
.faq__item[open] .faq__q::after { transform: rotate(45deg); }
.faq__a { max-width: 40em; padding: 0 44px 22px 0; color: var(--c-text-2); }
/* Плавное раскрытие ответа — там, где браузер это умеет; в остальных просто открывается */
@supports (interpolate-size: allow-keywords) {
  .faq__item { interpolate-size: allow-keywords; }
  .faq__item::details-content {
    height: 0;
    overflow: clip;
    transition: height .3s var(--ease), content-visibility .3s allow-discrete;
  }
  .faq__item[open]::details-content { height: auto; }
}

.contacts { display: grid; gap: 36px; }
.contacts__address { margin: 18px 0 16px; color: var(--c-led); font-family: var(--font-display); font-size: clamp(19px, 2.6vw, 26px); font-weight: 700; line-height: 1.35; }
.contacts__list { border-top: 1px solid var(--c-line); }
.contacts__list > div { display: grid; gap: 10px; padding: 20px 0; border-bottom: 1px solid var(--c-line); }
.contacts__list dt { color: var(--c-muted); font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.contacts__list dd { font-size: 16.5px; }
.metro li { display: flex; align-items: center; gap: 10px; }
.metro li + li { margin-top: 6px; }
.metro__line {                        /* кружок с номером линии, как на схеме метро */
  display: inline-grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--c-line-2); color: #fff;
  font-size: 11.5px; font-weight: 700; line-height: 1;
}
.metro__line--1 { background: #da2128; }
.metro__line--2 { background: #2a9a3c; }
.metro__line--3 { background: #0072ba; }
.metro__line--4 { background: #0099cc; }
.metro__line--5 { background: #8d5b2d; }
.metro__line--6 { background: #f07e24; }
.metro__line--7 { background: #943e90; }
.metro__line--8 { background: #ffcd1c; color: #0b0d10; }
.metro__line--9 { background: #a1a2a3; color: #0b0d10; }
.metro__line--10 { background: #b1d332; color: #0b0d10; }
.metro__line--11 { background: #29b1a6; }
.metro__line--12 { background: #acbfe1; color: #0b0d10; }
.metro__line--13 { background: #2c87c5; }
.metro__line--14 { background: #e4402d; }
.metro__line--15 { background: #de64a1; }
.metro__line--21 { background: #f6a600; color: #0a0a0c; }   /* МЦД-1…МЦД-5 */
.metro__line--22 { background: #df467c; }
.metro__line--23 { background: #ea5b1c; }
.metro__line--24 { background: #3fb17f; }
.metro__line--25 { background: #81bc41; color: #0a0a0c; }
.contacts__note { margin-top: 10px; color: var(--c-muted); font-size: 14px; }
.contacts__tg { margin-top: 12px; }
.contacts__phone { display: inline-block; margin-top: 8px; color: var(--c-text); font-weight: 600; text-decoration: none; }

.footer { position: relative; padding: 48px 0 24px; background: var(--c-dark); color: var(--c-on-dark-muted); font-size: 15px; }
.footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; }
.footer__grid { display: grid; gap: 32px; }
.footer__about p { max-width: 28em; margin-top: 14px; }
.footer__title { margin-bottom: 12px; color: var(--c-on-dark); font-size: 12.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.footer__list li + li { margin-top: 8px; }
.footer a:not(.logo) { color: var(--c-on-dark); text-decoration: none; transition: color .2s; }
.footer a:not(.logo):hover { color: var(--c-accent-text); }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  margin-top: 36px; padding-top: 20px;
  border-top: 1px solid var(--c-dark-line);
  font-size: 14px;
}

.sticky-cta { display: none; }

.page-head { padding: 44px 0 36px; border-bottom: 1px solid var(--c-dark-line); background: var(--c-dark); }
.page-head__title { font-family: var(--font-display); font-size: clamp(24px, 4vw, 34px); font-weight: 700; line-height: 1.25; }
.page-head__meta { margin-top: 10px; color: var(--c-muted); }
.doc { max-width: 800px; padding-block: 40px 72px; }
.doc__note {
  margin-bottom: 28px; padding: 14px 16px;
  border-left: 3px solid var(--c-stub-line);
  background: var(--c-stub-bg); color: var(--c-stub-text);
  font-size: 15px;
}
.doc h2 { margin: 36px 0 12px; font-size: 20px; }
.doc p, .doc li { color: var(--c-text-2); }
.doc p + p { margin-top: 10px; }
.doc ul { margin: 10px 0; padding-left: 1.3em; list-style: disc; }
.doc li + li { margin-top: 6px; }

/* На странице 404 цифры светятся контуром, как светодиодная трубка */
.message { padding: 72px 0 104px; text-align: center; }
.message__code {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--c-led);
  font-family: var(--font-display);
  font-size: clamp(96px, 24vw, 180px); font-weight: 700; line-height: 1;
  text-shadow: 0 0 24px rgba(215, 25, 32, .35);
}
.message__title { margin-top: 18px; font-family: var(--font-display); font-size: clamp(22px, 4vw, 30px); font-weight: 700; }
.message__text { max-width: 30em; margin: 12px auto 28px; color: var(--c-text-2); }

@media (min-width: 560px) {
  .form__row { grid-template-columns: 1fr 1fr; }
  .facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 22px 0 36px; }
  .facts__item { flex-direction: column-reverse; justify-content: flex-end; align-items: flex-start; gap: 4px; padding: 0; }
  .facts dd { font-size: clamp(18px, 3.4vw, 28px); }
  .about__fact { grid-template-columns: 130px minmax(0, 1fr); gap: 20px; }
}

@media (min-width: 640px) {
  .header__cta { display: inline-flex; }
  .contacts__list > div { grid-template-columns: 190px minmax(0, 1fr); }
}

@media (min-width: 768px) {
  .container { padding-inline: 32px; }
  .section { padding: 104px 0; }
  .hero { padding-top: 132px; }
  .head { grid-template-columns: minmax(0, 1fr) minmax(0, 26em); align-items: end; gap: 40px; margin-bottom: 44px; }
  .svc { padding: 30px 28px; }
  .svc--main { padding: 36px 34px; }
  .form-card { padding: 34px; }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .gallery__item--big { grid-row: span 2; }
  .gallery__item--big .gallery__link { height: 100%; }
  .gallery__item--big .gallery__link img { aspect-ratio: auto; }
  .footer__grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .lightbox { padding: 64px 90px; }
  .lightbox__btn--prev, .lightbox__btn--next { top: 50%; bottom: auto; transform: translateY(-50%); }
  .lightbox__btn--prev { left: 20px; }
  .lightbox__btn--next { right: 20px; }
}

@media (min-width: 900px) {
  .svc-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .svc--main { grid-row: span 2; }
  .about { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; }
  .about__facts { margin-top: 62px; }
  .contacts { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 72px; align-items: start; }
}

@media (min-width: 960px) {
  /* Шапка: меню в строку, бургер не нужен */
  .header__inner { gap: 24px; }
  .logo { margin-right: 8px; }
  .nav {
    position: static;
    margin-right: auto; padding: 0;
    max-height: none; overflow: visible;
    background: none; border: 0;
    visibility: visible; opacity: 1; transform: none;
    transition: none;
  }
  .nav__list { flex-direction: row; gap: 2px; }
  .nav__link { padding: 8px 12px; border: 0; color: var(--c-on-dark-muted); font-size: 15px; font-weight: 500; transition: color .2s; }
  .nav__link:hover { color: var(--c-on-dark); }
  .nav__extra { display: none; }
  .header__phone { display: inline; color: var(--c-on-dark); font-weight: 600; text-decoration: none; white-space: nowrap; }
  .burger { display: none; }

  .hero__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: 56px; }
  .order { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 64px; align-items: start; }
  .faq-layout { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
  .faq-layout__head { position: sticky; top: calc(var(--header-h) + 32px); }
}

@media (min-width: 1000px) {
  .gallery { grid-template-columns: repeat(4, 1fr); }
}

/* На телефоне главная кнопка всегда под рукой: появляется, когда кнопка первого экрана ушла вверх,
   и прячется, когда на экране форма (main.js ставит класс is-on) */
@media (max-width: 767px) {
  .js .sticky-cta {
    position: fixed; z-index: 40;
    left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    display: flex; align-items: center; justify-content: center;
    min-height: 52px;
    border-radius: var(--radius-sm);
    background: var(--c-accent); color: var(--c-on-accent);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .7);
    text-transform: uppercase; letter-spacing: .06em;
    font-weight: 700; text-decoration: none;
    visibility: hidden; transform: translateY(140%);
    transition: transform .3s var(--ease), visibility 0s linear .3s;
  }
  .js .sticky-cta.is-on { visibility: visible; transform: none; transition: transform .3s var(--ease); }
  .js .footer { padding-bottom: 92px; }
}

/* ---------- MGS-Tuning: наклонные заголовки, красная черта, схема «10 зон» на чёрном ---------- */

.h2 { font-family: var(--font-display); font-size: clamp(28px, 4.4vw, 44px); font-style: italic; font-weight: 800; line-height: 1.08; letter-spacing: -.005em; text-transform: uppercase; }
.label { position: relative; padding-left: 34px; font-family: var(--font); font-weight: 700; letter-spacing: .12em; }
.label::before { content: ""; position: absolute; left: 0; top: 50%; width: 24px; height: 3px; background: var(--c-accent); }
.btn--primary { font-family: var(--font-display); font-style: italic; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.btn--primary:hover { background: #ef2a31; box-shadow: 0 12px 26px -12px rgba(215, 25, 32, .8); }
.btn--ghost:hover { background: #fff; }

.logo { color: var(--c-on-dark); font-family: var(--font-display); font-size: 24px; font-style: italic; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.logo span { margin-left: .1em; color: var(--c-accent-on-dark); }
.nav__contact { color: var(--c-accent-on-dark); }
.footer a:not(.logo):hover { color: var(--c-accent-on-dark); }

/* Первый экран: заголовок наклонным шрифтом, под ним красная черта «прочерчивается» слева направо */
.hero { padding-top: 56px; }
.hero__title {
  position: relative;
  margin-top: 16px; padding-bottom: 22px;
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 60px); font-style: italic; font-weight: 800;
  line-height: 1.04; letter-spacing: -.01em; text-transform: uppercase;
}
.hero__title::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 120px; height: 6px;
  background: var(--c-accent);
  transform-origin: left center;
  animation: line-draw .9s .2s var(--ease) both;
}
@keyframes line-draw { from { transform: scaleX(0); } }
.hero__lead { color: var(--c-text-2); }
.hero__photo img { aspect-ratio: 4 / 3; object-position: 60% 50%; border: 0; border-radius: var(--radius); }
.facts { border-top-color: var(--c-line); }
.facts dd { font-family: var(--font-display); font-size: 26px; font-style: italic; font-weight: 800; letter-spacing: 0; text-transform: none; }
.facts__item:first-child dd { color: var(--c-accent-text); }

/* 10 зон — чёрный «бокс», на нём серая машина, зоны плёнки горят красным */
.section--zone { background: var(--c-dark); color: var(--c-on-dark); }
.zone__lead { max-width: 34em; margin-top: 12px; color: var(--c-on-dark-muted); }
.zmap {
  display: grid; gap: 20px;
  grid-template-areas: "car" "list" "card";
  margin-top: 28px;
}
.zmap__car { grid-area: car; margin: 0; }
.car { display: block; width: 100%; height: auto; overflow: visible; }
.car__ground { stroke: #34353b; stroke-width: 2; stroke-dasharray: 4 8; }
.car__body { fill: #27282d; stroke: #55575f; stroke-width: 2; }
.car__glass { fill: #131418; stroke: #44464d; stroke-width: 1.5; }
.car__line { fill: none; stroke: #45474e; stroke-width: 1.5; }
.car__wheel circle { fill: #0b0b0d; stroke: #3c3e45; stroke-width: 2; }
.car__wheel .car__rim { fill: #2c2d33; }
.car__wheel .car__hub { fill: #5a5c63; }
.car__scan { fill: #ff3b42; opacity: 0; }
.car__zone path {
  fill: rgba(255, 255, 255, .05); stroke: rgba(255, 255, 255, .28); stroke-width: 1.5;
  transition: fill .25s var(--ease), stroke .25s var(--ease);
}
.car__zone.is-on path { fill: rgba(215, 25, 32, .45); stroke: #ff3b42; }
.zmap.has-focus .car__zone.is-on:not(.is-focus) path { fill: rgba(215, 25, 32, .16); stroke: rgba(255, 59, 66, .45); }
.zmap .car__zone.is-focus path { fill: rgba(255, 70, 76, .85); stroke: #fff; stroke-width: 2.5; }
.zmap:has(input[value="part"]:checked) .car__zone { cursor: pointer; }
.zmap:has(input[value="part"]:checked) .car__zone.is-focus:not(.is-on) path { fill: rgba(255, 255, 255, .28); stroke: #fff; }

/* Первый показ: красная линия проходит по машине от носа к корме, зоны загораются по очереди */
.zmap.is-wait .car__zone, .zmap.is-wait .zbtn { opacity: .15; }
.zmap.is-intro .car__scan { animation: scan 1.7s .15s ease-in-out both; }
.zmap.is-intro .car__zone { animation: zone-in .6s var(--ease) both; }
.zmap.is-intro .zbtn { animation: zbtn-in .45s var(--ease) both; }
@keyframes scan { 0% { opacity: 0; transform: translateX(960px); } 12% { opacity: .9; } 88% { opacity: .9; } 100% { opacity: 0; transform: translateX(40px); } }
@keyframes zone-in { from { opacity: .15; } 55% { opacity: 1; filter: brightness(1.7); } }
@keyframes zbtn-in { from { opacity: .15; transform: translateX(-8px); } }

/* Список зон: номер, название, отметка «включено» */
.zmap__list { grid-area: list; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.zbtn {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--c-dark-line); border-radius: 10px;
  background: transparent; color: var(--c-on-dark-muted);
  font: inherit; font-size: 16px; font-weight: 600; text-align: left;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.zbtn__num { min-width: 26px; color: #6b6d75; font-family: var(--font-display); font-size: 17px; font-style: italic; font-weight: 800; }
.zbtn__note { margin-left: auto; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 12.5px; font-weight: 600; }
.zbtn[aria-pressed="true"] { border-color: rgba(255, 59, 66, .45); color: var(--c-on-dark); }
.zbtn[aria-pressed="true"] .zbtn__num { color: #ff3b42; }
.zbtn.is-focus { background: rgba(255, 255, 255, .07); border-color: #ff3b42; color: #fff; }
.zbtn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Телефон и планшет: машина прилипает под шапкой, чтобы подсветку было видно при нажатии на нижние зоны */
@media (max-width: 999px) {
  .zmap__car { position: sticky; top: var(--header-h); z-index: 2; padding: 8px 0; background: var(--c-dark); }
  .zbtn { gap: 8px; min-height: 52px; padding: 8px 10px; font-size: 14.5px; line-height: 1.25; }
  .zbtn__num { min-width: 20px; font-size: 15px; }
  .zbtn { flex-wrap: wrap; row-gap: 0; }
  .zbtn__title { flex: 1; }
  .zbtn__note { flex-basis: 100%; margin: 0 0 0 28px; padding: 0; background: none; font-size: 12px; }
}

/* Карточка цены: «Всё сразу / Частями». Нужную половину показывает CSS по отмеченной радиокнопке */
.zcard {
  grid-area: card;
  padding: 22px 20px;
  border-radius: var(--radius);
  background: var(--c-surface); color: var(--c-text);
}
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 10px; background: var(--c-bg-alt); }
.seg__opt { position: relative; }
.seg__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg__opt span {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px; border-radius: 8px;
  color: var(--c-text-2); font-weight: 700; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.seg__opt input:checked + span { background: var(--c-dark); color: #fff; }
.seg__opt input:focus-visible + span { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.zcard__all, .zcard__part { margin-top: 18px; }
.zcard__part { display: none; }
.zmap:has(input[value="part"]:checked) .zcard__all { display: none; }
.zmap:has(input[value="part"]:checked) .zcard__part { display: block; animation: price-in .35s var(--ease) both; }
.zmap:has(input[value="all"]:checked) .zcard__all { animation: price-in .35s var(--ease) both; }
@keyframes price-in { from { opacity: 0; transform: translateY(8px); } }
.zcard__label { color: var(--c-muted); font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.zcard__price { margin-top: 4px; font-family: var(--font-display); font-size: clamp(36px, 8vw, 48px); font-style: italic; font-weight: 800; line-height: 1.05; }
.zcard__text { margin-top: 10px; color: var(--c-text-2); font-size: 15.5px; }
.zcard__count { margin-top: 12px; padding: 10px 12px; border-left: 4px solid var(--c-accent); background: var(--c-bg-alt); font-size: 15px; }
.zcard__count b { font-family: var(--font-display); font-size: 20px; font-style: italic; }
.zcard__note { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--c-line); color: var(--c-muted); font-size: 14px; }
.zcard__guarantee { margin-top: 6px; font-size: 15px; font-weight: 700; }
.zcard .btn { margin-top: 18px; }

/* Как записаться: четыре шага, номер — наклонным шрифтом */
.flow { display: grid; gap: 10px; margin-top: 28px; counter-reset: none; }
.flow__item {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 14px; align-content: start;
  padding: 18px 18px 18px 14px;
  border: 1px solid var(--c-line); border-top: 3px solid var(--c-text); border-radius: 0 0 var(--radius) var(--radius);
  background: var(--c-surface);
}
.flow__num { grid-row: span 2; color: var(--c-accent); font-family: var(--font-display); font-size: 36px; font-style: italic; font-weight: 800; line-height: 1; }
.flow__title { font-size: 17px; }
.flow__text { color: var(--c-text-2); font-size: 15px; }

.svc { background: var(--c-surface); }
.svc__title { font-family: var(--font-display); font-style: italic; font-weight: 800; }
.prices__price { font-family: var(--font-display); font-style: italic; font-weight: 700; }
.gallery__link img { filter: none; }
.gallery__link:hover img, .gallery__link:focus-visible img { filter: brightness(1.08); }
.about__fact dt { font-family: var(--font-display); font-style: italic; font-weight: 800; }
.about__more { margin-top: 18px; }
.form-card { box-shadow: 0 24px 50px -32px rgba(17, 17, 19, .45); }
.form-success__title, .message__title, .page-head__title { font-family: var(--font-display); font-style: italic; font-weight: 800; }
.faq__q:hover { color: var(--c-accent-text); }

/* Где мы */
.addr { margin-top: 20px; }
.addr__line { margin-bottom: 8px; font-size: clamp(18px, 2.3vw, 22px); font-weight: 700; line-height: 1.35; }
.addr__src { display: block; color: var(--c-muted); font-size: 13px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.metro__note { margin-top: 8px; color: var(--c-muted); font-size: 14px; }

.sticky-cta { font-family: var(--font-display) !important; font-style: italic; }

@media (min-width: 560px) {
  .zcard { padding: 28px 26px; }
  .flow { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  /* Крупное фото не растягивает ряды: занимает ровно две строки маленьких */
  .gallery__item--big .gallery__link { position: relative; }
  .gallery__item--big .gallery__link img { position: absolute; inset: 0; }
  .hero { padding-top: 84px; }
  .about__fact { grid-template-columns: 130px minmax(0, 1fr); }
}
@media (min-width: 900px) {
  .svc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (min-width: 1000px) {
  .zmap { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); grid-template-areas: "car card" "list card"; column-gap: 40px; row-gap: 12px; }
  .zcard { align-self: start; position: sticky; top: calc(var(--header-h) + 24px); }
  .flow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .flow__item { grid-template-columns: 1fr; row-gap: 10px; padding: 20px 18px 22px; }
  .flow__num { grid-row: auto; font-size: 44px; }
}

/* Тем, кто попросил систему уменьшить движение, — без анимаций */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
