/* =========================================================
   EDS-Motors — публичный сайт
   Токены, база, компоненты
   ========================================================= */

/* ---------- прогресс загрузки и прокрутки ---------- */

.progress {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 55;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), #ffb27a 60%, var(--accent));
  transition: transform 0.12s linear;
  pointer-events: none;
}
/* Пока данные грузятся — бегущий индикатор вместо пустого экрана. */
.progress[data-loading='true'] {
  transform: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent) 35%,
    #ffc79b 50%,
    var(--accent) 65%,
    transparent 100%
  );
  background-size: 45% 100%;
  background-repeat: no-repeat;
  animation: progress-run 1.1s ease-in-out infinite;
}
@keyframes progress-run {
  0% {
    background-position: -45% 0;
  }
  100% {
    background-position: 145% 0;
  }
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/manrope-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

:root {
  --ink: #14181c;
  --ink-soft: #22282f;
  --graphite: #2b323a;
  --muted: #5c6673;
  --muted-2: #6b7580;
  --line: #e5e8ec;
  --line-dark: #3a4149;
  --bg: #f5f6f8;
  --card: #ffffff;
  --accent: #ff6a13;
  --accent-dark: #e3560a;
  --accent-soft: #fff2e8;
  --green: #15914f;
  --green-soft: #e9f7ef;
  --red: #d33a3a;
  --red-soft: #fdecec;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(16, 20, 26, 0.05), 0 6px 18px rgba(16, 20, 26, 0.05);
  --shadow-md: 0 10px 34px rgba(16, 20, 26, 0.1);
  --shadow-lg: 0 24px 60px rgba(16, 20, 26, 0.18);
  --maxw: 1180px;
  --header-h: 72px;

  /* поверхности и полупрозрачные слои: единственное, что меняется в тёмной теме */
  --surface: #ffffff;
  --surface-2: #f5f6f8;
  --surface-3: #e9ecef;
  --header-bg: rgba(255, 255, 255, 0.92);
  --bar-bg: rgba(255, 255, 255, 0.96);
  --accent-contrast: #ffffff;
  --color-scheme: light;

  /* «глубокие» блоки (первый экран, подвал, тёмные секции) остаются тёмными
     в обеих темах: это не фон страницы, а контрастная подложка */
  --deep: #14181c;
  --deep-2: #22282f;
  --on-deep: #ffffff;
  --on-deep-muted: #c3cad2;
  --on-deep-dim: #a7b0ba;
  --deep-line: rgba(255, 255, 255, 0.1);
}

/* Тёмная тема: включается либо системной настройкой, либо переключателем (data-theme). */
:root[data-theme='dark'] {
  --ink: #eef1f4;
  --ink-soft: #d7dce2;
  --graphite: #c3cad2;
  --muted: #a7b0ba;
  --muted-2: #8b949f;
  --line: #2b323a;
  --line-dark: #3a4149;
  --bg: #101417;
  --card: #171c21;
  --surface: #171c21;
  --surface-2: #101417;
  --surface-3: #232a31;
  --header-bg: rgba(16, 20, 23, 0.9);
  --bar-bg: rgba(16, 20, 23, 0.96);
  --accent: #ff7a2b;
  --accent-dark: #ff8f4d;
  --accent-soft: #35241a;
  --green: #3cc47c;
  --green-soft: #14301f;
  --red: #f0736f;
  --red-soft: #34191a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 18px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 34px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
  --color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --ink: #eef1f4;
    --ink-soft: #d7dce2;
    --graphite: #c3cad2;
    --muted: #a7b0ba;
    --muted-2: #8b949f;
    --line: #2b323a;
    --line-dark: #3a4149;
    --bg: #101417;
    --card: #171c21;
    --surface: #171c21;
    --surface-2: #101417;
    --surface-3: #232a31;
    --header-bg: rgba(16, 20, 23, 0.9);
    --bar-bg: rgba(16, 20, 23, 0.96);
    --accent: #ff7a2b;
    --accent-dark: #ff8f4d;
    --accent-soft: #35241a;
    --green: #3cc47c;
    --green-soft: #14301f;
    --red: #f0736f;
    --red-soft: #34191a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 18px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 34px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
    --color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  color-scheme: var(--color-scheme);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: 'Manrope', 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body.is-locked {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--deep);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 12px;
}

:focus-visible {
  outline: 3px solid rgba(255, 106, 19, 0.55);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  text-align: center;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 106, 19, 0.28);
}
.btn--primary:hover {
  background: var(--accent-dark);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover {
  border-color: var(--ink);
}

.btn--dark {
  background: var(--deep);
  color: #fff;
}
.btn--dark:hover {
  background: var(--graphite);
}

.btn--light {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.btn--light:hover {
  border-color: var(--ink);
}

.btn--outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}
.btn--outline-light:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.06);
}

.btn--sm {
  min-height: 44px;
  padding: 0 16px;
  font-size: 15px;
  border-radius: 12px;
}

.btn--block {
  width: 100%;
}

.btn--icon {
  padding: 0 16px;
  gap: 8px;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

/* ---------- шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--deep);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
}

.logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.logo__name {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.logo__tag {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background 0.2s, color 0.2s;
}
.site-nav a:hover {
  background: var(--bg);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 4px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.header-phone svg {
  color: var(--accent);
  flex-shrink: 0;
}
.header-phone:hover {
  color: var(--accent-dark);
}

/* ---------- переключатель темы ---------- */

.theme-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.theme-toggle:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--surface-2);
}

/* ---------- подсказка о теме ---------- */

.theme-hint {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px);
  z-index: 60;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: min(460px, calc(100vw - 32px));
  padding: 14px 14px 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.theme-hint.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.theme-hint__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.theme-hint__body {
  min-width: 0;
  flex: 1;
}
.theme-hint__title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 2px;
}
.theme-hint__text {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}
.theme-hint__action {
  margin-top: 4px;
  padding: 8px 0;
  min-height: 36px;
  border: 0;
  background: none;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-align: left;
}
.theme-hint__close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
}
.theme-hint__close:hover {
  background: var(--surface-2);
  color: var(--ink);
}

@media (min-width: 721px) {
  .theme-hint {
    bottom: 24px;
  }
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--surface);
  overflow-x: auto;
  scrollbar-width: none;
}
.mobile-nav::-webkit-scrollbar {
  display: none;
}
.mobile-nav__list {
  display: flex;
  gap: 8px;
  padding: 10px 20px;
  min-width: max-content;
}
.mobile-nav__list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--deep);
  color: #fff;
  padding: 64px 0 72px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 480px at 78% -10%, rgba(255, 106, 19, 0.28), transparent 62%),
    radial-gradient(700px 420px at 8% 110%, rgba(255, 106, 19, 0.1), transparent 60%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 100% 64px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 64px 100%;
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 48px;
  align-items: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
  font-weight: 600;
  color: var(--on-deep-muted);
  margin-bottom: 22px;
}
.hero__eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(21, 145, 79, 0.2);
}

.hero h1 {
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 20px;
  max-width: 15ch;
}
.hero h1 .accent {
  color: var(--accent);
}

.hero__sub {
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.55;
  color: var(--on-deep-muted);
  max-width: 52ch;
  margin-bottom: 30px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 34px;
}

.hero__badges {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  max-width: 620px;
}

.badge-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  color: var(--on-deep-muted);
  line-height: 1.4;
}
.badge-item svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent);
}

/* карточка ближайшего окна */
.slot-card {
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.slot-card__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.slot-card__label .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}
.slot-card__time {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}
.slot-card__date {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 20px;
}
.slot-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.chip--accent {
  background: var(--accent-soft);
  color: #b34706;
}
.slot-card__note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.slot-card__skeleton {
  height: 132px;
  border-radius: 14px;
  background: linear-gradient(90deg, #eef0f3 25%, #f6f7f9 37%, #eef0f3 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

/* ---------- секции ---------- */

.section {
  padding: 76px 0;
}
.section--tight {
  padding: 56px 0;
}
.section--white {
  background: var(--surface);
}
.section--dark {
  background: var(--deep);
  color: #fff;
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.section__title {
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 800;
  max-width: 22ch;
}

.section__lead {
  margin-top: 12px;
  color: var(--muted);
  font-size: 16.5px;
  max-width: 62ch;
}

.section__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--accent-dark);
  white-space: nowrap;
  padding: 10px 0;
}
.section__link:hover {
  color: var(--accent);
}

/* ---------- услуги ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #d5dae0;
}

.service-card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  margin-bottom: 16px;
}

.service-card__title {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.service-card__desc {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
  margin-bottom: 18px;
}

.service-card__meta {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  margin-bottom: 16px;
}

.service-card__price {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.service-card__price span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-right: 4px;
  letter-spacing: 0;
}
.service-card__duration {
  font-size: 13.5px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.services-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 22px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--muted);
}
.services-note svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--muted-2);
}

/* ---------- портфолио ---------- */

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.work-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.work-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.work-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--surface-3);
  overflow: hidden;
}
.work-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

/* ---------- карусель фото ---------- */

.carousel {
  position: absolute;
  inset: 0;
}

.carousel__viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: pan-y;
  /* без этого перетаскивание картинки запускает нативный drag-and-drop и обрывает свайп */
  -webkit-user-drag: none;
  user-select: none;
}
.carousel__viewport:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.carousel__track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.carousel__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  pointer-events: none;
}

.carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 24, 28, 0.62);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  backdrop-filter: blur(4px);
}
.carousel__nav--prev {
  left: 10px;
}
.carousel__nav--next {
  right: 10px;
}
.carousel:hover .carousel__nav,
.carousel:focus-within .carousel__nav {
  opacity: 1;
}
.carousel__nav:hover {
  background: rgba(20, 24, 28, 0.85);
}

.carousel__dots {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  display: flex;
  gap: 0;
  padding: 2px 4px;
  border-radius: 999px;
  background: rgba(20, 24, 28, 0.5);
  backdrop-filter: blur(4px);
}
.carousel__dot {
  /* сама точка 8 px, но зона нажатия 32×32 — пальцем попасть легко */
  position: relative;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.carousel__dot::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: background 0.2s ease, transform 0.2s ease;
}
.carousel__dot[aria-selected='true']::before {
  background: #fff;
  transform: scale(1.35);
}

.carousel__counter {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(20, 24, 28, 0.62);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

@media (max-width: 720px) {
  /* на телефоне стрелки не нужны: свайп и точки */
  .carousel__nav {
    display: none;
  }
  /* на телефоне точка чуть крупнее, но зона нажатия та же — 32×32 */
  .carousel__dot::before {
    width: 9px;
    height: 9px;
    margin: -4.5px 0 0 -4.5px;
  }
}

@media (hover: none) {
  .carousel__nav {
    display: none;
  }
}
/* фото в карусели не масштабируем при наведении: оно вылезает за границы слайда */
.work-card:hover .carousel__slide img {
  transform: none;
}
.work-card__tag {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(20, 24, 28, 0.82);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.work-card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.work-card__title {
  font-size: 17.5px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-bottom: 8px;
}
.work-card__desc {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}
.work-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  font-size: 13px;
  color: var(--muted-2);
  flex-wrap: wrap;
}
.work-card__meta .sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted-2);
}

.empty-state {
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface);
}

.works-cta {
  margin-top: 36px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.work-card__desc--full {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.work-card__thumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.work-card__thumbs img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
}

/* ---------- шаги ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  counter-reset: step;
}

.step-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.step-card__num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--deep);
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  margin-bottom: 18px;
}
.step-card:nth-child(2) .step-card__num {
  background: var(--accent);
}
.step-card__title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}
.step-card__text {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

/* ---------- почему ---------- */

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.why-item {
  display: flex;
  gap: 14px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
}
.why-item svg {
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 2px;
}
.why-item__title {
  font-weight: 700;
  font-size: 16.5px;
  margin-bottom: 4px;
}
.why-item__text {
  color: var(--on-deep-dim);
  font-size: 14.5px;
  line-height: 1.5;
}

.section--dark .section__lead {
  color: var(--on-deep-dim);
}

/* ---------- отзывы ---------- */

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.reviews-summary__score {
  display: flex;
  align-items: center;
  gap: 10px;
}
.reviews-summary__value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.reviews-summary__caption {
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
}

.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--line);
  vertical-align: middle;
}
.stars__star.is-full {
  color: #f5a623;
}

.review-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.review-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.review-card__avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
}
.review-card__who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.review-card__author {
  font-weight: 800;
  font-size: 14.5px;
  line-height: 1.2;
}
.review-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.review-card__date {
  font-size: 12.5px;
  color: var(--muted-2);
}
.review-card__text {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-line;
}
.review-card__answer {
  margin-top: auto;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--surface-2);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}
.review-card__answer-label {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 3px;
}

.reviews-footnote {
  margin-top: 18px;
  font-size: 13px;
  color: var(--muted-2);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* скелетон загрузки */
.review-card--skeleton {
  gap: 12px;
}
.skeleton-line {
  display: block;
  height: 11px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
.skeleton-line--short {
  width: 40%;
  height: 14px;
}
.skeleton-line--mid {
  width: 70%;
}

@media (max-width: 720px) {
  .reviews-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- контакты ---------- */

.contacts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: stretch;
}

.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.contact-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.contact-row__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  flex-shrink: 0;
}
.contact-row__label {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-2);
  font-weight: 700;
  margin-bottom: 3px;
}
.contact-row__value {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}
.contact-row__value a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.contact-row__value a:hover {
  color: var(--accent-dark);
}
.contact-row__hint {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 3px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.map-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-3);
  min-height: 360px;
  position: relative;
}
.map-card iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
}
.map-card__fallback {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 360px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14.5px;
}

.contacts-note {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--muted);
}
.contacts-note svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent);
}

/* ---------- подвал ---------- */

.site-footer {
  background: var(--deep);
  color: var(--on-deep-dim);
  padding: 56px 0 32px;
  font-size: 14.5px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line-dark);
}

.footer-brand .logo__mark {
  background: var(--accent);
}
.footer-brand .logo__name {
  color: #fff;
}
.footer-brand .logo__tag {
  color: #7e8894;
}
.footer-brand p {
  margin-top: 14px;
  max-width: 34ch;
  line-height: 1.55;
}

.footer-col h3 {
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  font-weight: 700;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-col li > a,
.footer-col li > span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 2px 0;
}
.footer-col a:hover {
  color: var(--on-deep);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  font-size: 13px;
  color: var(--on-deep-dim);
  flex-wrap: wrap;
}
.footer-bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}
.footer-bottom a:hover {
  color: #fff;
}

/* ---------- мобильная панель ---------- */

.mobile-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--bar-bg);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  gap: 8px;
}
.mobile-bar .btn {
  flex: 1 1 0;
  /* min-width: 0 обязателен: без него кнопки не сжимаются меньше своего
     текста и три кнопки в панели вылезают за экран на 360 px. */
  min-width: 0;
  min-height: 50px;
  padding: 0 10px;
  font-size: 14.5px;
  gap: 6px;
}
.mobile-bar .btn svg {
  flex-shrink: 0;
}
@media (max-width: 380px) {
  .mobile-bar .btn {
    font-size: 13.5px;
    padding: 0 6px;
  }
  .mobile-bar .btn--ghost svg {
    display: none;
  }
}

/* ---------- модальное окно записи ---------- */

.modal {
  width: min(660px, calc(100vw - 32px));
  max-height: min(92vh, 900px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  background: var(--surface);
  color: var(--ink);
  overflow: hidden;
}
.modal::backdrop {
  background: rgba(12, 15, 18, 0.55);
  backdrop-filter: blur(2px);
}
.modal[open] {
  animation: modal-in 0.22s ease;
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal__scroll {
  max-height: min(92vh, 900px);
  overflow-y: auto;
  padding: 28px;
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 6px;
}
.modal__title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.modal__sub {
  color: var(--muted);
  font-size: 14.5px;
  margin-top: 6px;
}
.modal__close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  flex-shrink: 0;
}
.modal__close:hover {
  background: var(--bg);
}

/* ---------- форма ---------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.field__label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-soft);
}
.field__label .req {
  color: var(--accent);
}
.field__hint {
  font-size: 12.5px;
  color: var(--muted-2);
}
.field__error {
  font-size: 13px;
  color: var(--red);
  font-weight: 600;
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea {
  min-height: 84px;
  resize: vertical;
}
.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 106, 19, 0.14);
}
.input[aria-invalid='true'],
.textarea[aria-invalid='true'] {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(211, 58, 58, 0.1);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* выбор даты */

.date-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.date-chip {
  flex: 0 0 auto;
  min-width: 74px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.date-chip:hover:not([disabled]) {
  border-color: #c9cfd6;
}
.date-chip__dow {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-2);
  font-weight: 700;
}
.date-chip__day {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  margin: 2px 0;
}
.date-chip__mon {
  font-size: 11.5px;
  color: var(--muted-2);
}
.date-chip__free {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--green);
  margin-top: 4px;
}
.date-chip[aria-pressed='true'] {
  border-color: var(--deep);
  background: var(--deep);
  color: #fff;
}
.date-chip[aria-pressed='true'] .date-chip__dow,
.date-chip[aria-pressed='true'] .date-chip__mon {
  color: var(--on-deep-dim);
}
.date-chip[aria-pressed='true'] .date-chip__free {
  color: #7ee2a8;
}
.date-chip[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--bg);
}
.date-chip[disabled] .date-chip__free {
  color: var(--muted-2);
}

/* слоты */

.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px;
  margin-top: 4px;
}

.slot {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.slot:hover:not([disabled]) {
  border-color: var(--accent);
  color: var(--accent-dark);
}
.slot[aria-pressed='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.slot[disabled] {
  color: var(--muted-2);
  background: var(--bg);
  text-decoration: line-through;
  cursor: not-allowed;
}

.slots-state {
  font-size: 14px;
  color: var(--muted);
  padding: 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  text-align: center;
}

.alt-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.alt-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.alt-btn:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

/* согласие */

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  margin: -4px -12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
  cursor: pointer;
}
.check:hover {
  background: var(--surface-2);
}
.check input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.check a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-error {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--red-soft);
  color: #a12626;
  font-size: 14px;
  font-weight: 600;
}

/* успех */

.success {
  text-align: center;
  padding: 16px 8px 8px;
}
.success__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
}
.success__title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.success__text {
  color: var(--muted);
  max-width: 44ch;
  margin: 0 auto 18px;
}
.success__number {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--bg);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}
.success__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
/* Что именно записано: услуга, дата, длительность */
.success__summary {
  display: grid;
  gap: 6px;
  max-width: 360px;
  margin: 0 auto 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg);
  text-align: left;
}
.success__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}
.success__row span {
  color: var(--muted);
}
.success__row strong {
  font-weight: 700;
  text-align: right;
}
.success__hint {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}
.success__hint a {
  color: var(--accent-dark);
  font-weight: 600;
}

/* ---------- уведомления после записи ---------- */

.notify {
  max-width: 420px;
  margin: 20px auto 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
  text-align: left;
}
.notify__title {
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 4px;
}
.notify__hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.notify__hint--error {
  color: var(--danger, #d64545);
}
.notify__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  margin-top: 10px;
}
.notify__label {
  display: grid;
  gap: 2px;
}
.notify__state {
  color: var(--muted);
  font-size: 12px;
}
.notify__badge {
  color: var(--green);
  font-weight: 800;
}
.notify__btn {
  padding: 8px 12px;
  font-size: 13px;
}
.notify__vk {
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(127, 127, 127, 0.08);
}
.notify__code-label {
  font-size: 12px;
  color: var(--muted);
}
.notify__code {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 2px 0 10px;
}
.notify__code-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.notify__check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- плашка «доступно обновление» в приложении ---------- */

.app-update {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--ink, #14181c);
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  font-size: 14px;
}
.app-update span {
  flex: 1;
}

/* ---------- страница приложения ---------- */

.app-hero {
  padding-top: 40px;
}
.app-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
}
.app-hero__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.app-hero__meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}
.app-hero__qr {
  margin: 0;
  text-align: center;
}
.app-hero__qr img {
  border-radius: 16px;
  background: #fff;
  padding: 10px;
}
.app-hero__qr figcaption {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}
.app-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.app-feature {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.app-feature svg {
  color: var(--green);
  margin-bottom: 8px;
}
.app-feature h3 {
  font-size: 16px;
  margin-bottom: 4px;
}
.app-feature p {
  color: var(--muted);
  font-size: 14px;
}
.app-steps {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding-left: 22px;
}
.app-steps li {
  color: var(--muted);
}
.app-steps strong {
  color: inherit;
}
.app-note {
  color: var(--muted);
  font-size: 14px;
  margin-top: 12px;
}
@media (max-width: 720px) {
  .app-hero__inner {
    grid-template-columns: 1fr;
  }
  .app-hero__qr {
    justify-self: start;
  }
}

/* ---------- статус заявки ---------- */

.status-card {
  margin: 22px 0 18px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.status-card--ok {
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
}
.status-card--bad {
  border-color: color-mix(in srgb, #d9534f 40%, var(--line));
}
.status-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.status-card__icon {
  font-size: 30px;
  line-height: 1;
}
.status-card__title {
  font-size: 20px;
  font-weight: 800;
}
.status-card__number {
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.status-card__rows {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
}
.status-card__rows > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.status-card__rows dt {
  color: var(--muted);
}
.status-card__rows dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}
.status-card__comment {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg);
  font-size: 14px;
  margin-bottom: 14px;
}
.status-card__hint {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}
.status-help {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}
.status-help .contact-actions {
  margin-top: 12px;
}

/* Компактная модалка для короткой формы обратного звонка */
.modal--compact .modal__scroll {
  max-width: 460px;
}

/* Фолбэк для браузеров без <dialog> (iOS < 15.4): модалка как обычный блок.
   Без этого на старых iPhone кнопка «Записаться» просто ничего не делала. */
.modal.modal--fallback {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: block;
  width: min(660px, calc(100vw - 32px));
  max-height: 92vh;
  margin: auto;
  overflow: auto;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(12, 15, 18, 0.55);
}
.modal--fallback .modal__scroll {
  max-height: none;
}

/* ---------- частые вопросы ---------- */

.faq-list {
  display: grid;
  gap: 10px;
  max-width: 820px;
}
.faq-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: 0 18px;
  transition: border-color 0.2s ease;
}
.faq-item[open] {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}
.faq-item__q {
  cursor: pointer;
  list-style: none;
  padding: 16px 30px 16px 0;
  font-weight: 700;
  font-size: 16px;
  position: relative;
}
.faq-item__q::-webkit-details-marker {
  display: none;
}
.faq-item__q::after {
  content: '';
  position: absolute;
  right: 2px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.faq-item[open] .faq-item__q::after {
  transform: rotate(-135deg);
  margin-top: -2px;
}
.faq-item__a {
  padding: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 72ch;
}

/* ---------- утилиты ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- адаптив ---------- */

@media (max-width: 1024px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
    gap: 32px;
  }
  .contacts {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}

@media (max-width: 1100px) {
  /* телефон остаётся кликабельным, но без текста — иначе шапка не влезает */
  .header-phone span {
    display: none;
  }
  .header-phone {
    min-width: 44px;
    justify-content: center;
    padding: 0;
  }
}

@media (max-width: 900px) {
  .site-nav {
    display: none;
  }
  .mobile-nav {
    display: block;
  }
  .hero {
    padding: 44px 0 52px;
  }
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .hero h1 {
    max-width: none;
  }
  .slot-card {
    padding: 22px;
  }
  .section {
    padding: 56px 0;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 62px;
  }
  body {
    padding-bottom: 76px;
  }
  /* Документы и страницы ошибок живут без мобильной панели — отступ не нужен */
  body.doc-page,
  body.error-page {
    padding-bottom: 0;
  }
  .container {
    padding: 0 16px;
  }
  .mobile-bar {
    display: flex;
  }
  .site-header__actions .btn--book {
    display: none;
  }
  .hero__actions .btn {
    flex: 1 1 100%;
  }
  .hero__badges {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .section__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .section__title {
    max-width: none;
  }
  .services-grid,
  .works-grid {
    grid-template-columns: 1fr;
  }
  .contacts {
    gap: 18px;
  }
  .contact-card {
    padding: 22px;
  }
  .map-card,
  .map-card iframe,
  .map-card__fallback {
    min-height: 300px;
  }
  .modal {
    width: 100vw;
    max-width: 100vw;
    max-height: 100dvh;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  .modal__scroll {
    max-height: 100dvh;
    padding: 20px 16px calc(28px + env(safe-area-inset-bottom));
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 380px) {
  .logo__tag {
    display: none;
  }
  .slot-card__time {
    font-size: 38px;
  }
  .slots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- страницы документов ---------- */

.doc-page {
  background: var(--surface);
}
.doc-hero {
  background: var(--deep);
  color: #fff;
  padding: 56px 0;
}
.doc-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.025em;
  font-weight: 800;
}
.doc-hero p {
  color: var(--on-deep-dim);
  margin-top: 10px;
}
.doc-body {
  padding: 48px 0 80px;
  max-width: 820px;
}
.doc-body h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 32px 0 12px;
}
.doc-title {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.025em;
  font-weight: 800;
  margin-bottom: 10px;
}
.footer-bottom--flush {
  border-top: 0;
  padding-top: 0;
}
.doc-body h2:first-child {
  margin-top: 0;
}
.doc-body p,
.doc-body li {
  color: #3c444d;
  font-size: 15.5px;
  line-height: 1.65;
  margin-bottom: 12px;
}
.doc-body ul {
  list-style: disc;
  padding-left: 22px;
  margin-bottom: 16px;
}
.doc-body ul li {
  margin-bottom: 6px;
}
.doc-body a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.doc-meta {
  font-size: 13.5px;
  color: var(--muted-2);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
}
.doc-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 0;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--muted);
}
.doc-back:hover {
  color: var(--ink);
}

/* =========================================================
   Живой фон первого экрана
   Слои: тёплые пятна, «сетка гаража», кольца-шестерни,
   плавающие инструменты и искры. Всё — transform/opacity,
   поэтому анимация не грузит процессор.
   ========================================================= */

.hero {
  position: relative;
  isolation: isolate;
}

.hero__scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  will-change: transform;
}
.hero__glow--a {
  width: 620px;
  height: 620px;
  right: -140px;
  top: -260px;
  background: radial-gradient(circle, rgba(255, 106, 19, 0.55), transparent 68%);
  animation: glow-drift-a 18s ease-in-out infinite;
}
.hero__glow--b {
  width: 480px;
  height: 480px;
  left: -160px;
  bottom: -240px;
  background: radial-gradient(circle, rgba(255, 138, 61, 0.35), transparent 70%);
  animation: glow-drift-b 22s ease-in-out infinite;
}
@keyframes glow-drift-a {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-46px, 34px, 0) scale(1.08);
  }
}
@keyframes glow-drift-b {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(38px, -28px, 0) scale(1.12);
  }
}

/* Медленно ползущая «сетка верстака».
   ВАЖНО: класс не должен совпадать с .hero__grid — это сетка контента первого
   экрана, и общий класс раньше двигал весь текст вместе с фоном. */
.hero__mesh {
  position: absolute;
  inset: -40px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 60% 30%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 60% 30%, #000 25%, transparent 78%);
  animation: grid-slide 32s linear infinite;
}
@keyframes grid-slide {
  to {
    transform: translate3d(72px, 72px, 0);
  }
}

/* Кольца-шестерни */
.hero__ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  will-change: transform;
}
.hero__ring::after {
  content: '';
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  border: 1px solid rgba(255, 106, 19, 0.22);
}
.hero__ring--a {
  width: 420px;
  height: 420px;
  right: 6%;
  top: 4%;
  animation: ring-spin 60s linear infinite;
}
.hero__ring--b {
  width: 260px;
  height: 260px;
  left: 44%;
  bottom: -80px;
  animation: ring-spin 44s linear infinite reverse;
  opacity: 0.7;
}
@keyframes ring-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Плавающие инструменты */
.hero__float {
  position: absolute;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.22);
  will-change: transform;
}
.hero__float svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.4;
}
.hero__float--1 {
  left: 4%;
  top: 16%;
  animation: float-y 9s ease-in-out infinite;
}
.hero__float--2 {
  right: 30%;
  top: 10%;
  animation: float-y 11s ease-in-out infinite 0.8s;
  color: rgba(255, 138, 61, 0.32);
}
.hero__float--3 {
  right: 8%;
  bottom: 20%;
  animation: float-y 8s ease-in-out infinite 1.6s;
  color: rgba(255, 106, 19, 0.42);
}
.hero__float--4 {
  left: 38%;
  top: 62%;
  animation: float-tilt 13s ease-in-out infinite 0.4s;
}
.hero__float--5 {
  left: 22%;
  bottom: 8%;
  animation: float-y 10s ease-in-out infinite 2.2s;
}
.hero__float--6 {
  right: 20%;
  bottom: 6%;
  animation: float-tilt 15s ease-in-out infinite 1.1s;
  color: rgba(255, 255, 255, 0.16);
}
@keyframes float-y {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -20px, 0);
  }
}
@keyframes float-tilt {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-6deg);
  }
  50% {
    transform: translate3d(10px, -14px, 0) rotate(8deg);
  }
}

/* Искры: медленно поднимаются и гаснут */
.hero__spark {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  box-shadow: 0 0 10px rgba(255, 106, 19, 0.8);
  animation: spark-rise 9s ease-in-out infinite;
}
.hero__spark--1 {
  left: 12%;
  bottom: 18%;
  animation-delay: 0s;
}
.hero__spark--2 {
  left: 30%;
  bottom: 8%;
  animation-delay: 1.6s;
  animation-duration: 11s;
}
.hero__spark--3 {
  left: 58%;
  bottom: 12%;
  animation-delay: 3.1s;
  animation-duration: 8s;
}
.hero__spark--4 {
  left: 76%;
  bottom: 22%;
  animation-delay: 4.4s;
  animation-duration: 12s;
}
.hero__spark--5 {
  left: 90%;
  bottom: 10%;
  animation-delay: 2.2s;
  animation-duration: 10s;
}
@keyframes spark-rise {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.6);
  }
  18% {
    opacity: 0.85;
  }
  70% {
    opacity: 0.35;
  }
  100% {
    opacity: 0;
    transform: translate3d(14px, -190px, 0) scale(1.1);
  }
}

/* Диагональный блик, проходящий по фону */
.hero__scan {
  position: absolute;
  inset: -30% -10%;
  background: linear-gradient(
    104deg,
    transparent 34%,
    rgba(255, 255, 255, 0.055) 46%,
    rgba(255, 138, 61, 0.07) 50%,
    transparent 62%
  );
  animation: scan-sweep 14s ease-in-out infinite;
}
@keyframes scan-sweep {
  0%,
  100% {
    transform: translate3d(-18%, 0, 0);
    opacity: 0;
  }
  45% {
    opacity: 1;
  }
  55% {
    opacity: 1;
  }
  90% {
    transform: translate3d(18%, 0, 0);
    opacity: 0;
  }
}

/* Сетка контента первого экрана должна быть выше декоративных слоёв. */
.hero > .container.hero__grid {
  position: relative;
  z-index: 1;
}

/* Появление контента первого экрана: мягкая лесенка при загрузке */
body.is-ready .hero__eyebrow,
body.is-ready .hero h1,
body.is-ready .hero__sub,
body.is-ready .hero__actions,
body.is-ready .hero__badges,
body.is-ready .slot-card {
  animation: hero-in 0.72s cubic-bezier(0.22, 0.68, 0.24, 1) both;
}
body.is-ready .hero h1 {
  animation-delay: 0.06s;
}
body.is-ready .hero__sub {
  animation-delay: 0.12s;
}
body.is-ready .hero__actions {
  animation-delay: 0.18s;
}
body.is-ready .hero__badges {
  animation-delay: 0.24s;
}
body.is-ready .slot-card {
  animation-delay: 0.14s;
}
@keyframes hero-in {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* =========================================================
   Полоса фактов под первым экраном
   ========================================================= */

.stat-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.stat-strip__inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding-top: 26px;
  padding-bottom: 26px;
}

.stat-strip__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 22px;
  border-left: 1px solid var(--line);
}
.stat-strip__item:first-child {
  padding-left: 0;
  border-left: 0;
}

.stat-strip__value {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--accent-dark);
  font-variant-numeric: tabular-nums;
}

.stat-strip__label {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
}

/* =========================================================
   Бегущая строка с услугами
   ========================================================= */

.ticker {
  overflow: hidden;
  background: var(--deep);
  color: var(--on-deep-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.ticker__track {
  display: flex;
  align-items: center;
  gap: 34px;
  width: max-content;
  padding: 12px 0;
  animation: ticker-run 48s linear infinite;
}
.ticker:hover .ticker__track,
.ticker:focus-within .ticker__track {
  animation-play-state: paused;
}

.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.ticker__item svg {
  color: var(--accent);
  flex-shrink: 0;
}

@keyframes ticker-run {
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

/* =========================================================
   Подписи разделов и скелетоны загрузки
   ========================================================= */

.section__index {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
}
.section__index::after {
  content: '';
  width: 34px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.section--dark .section__index {
  color: #ffa86b;
}

.skeleton-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.skeleton-card--media {
  padding: 0;
  overflow: hidden;
  gap: 0;
}
.skeleton-card--media .skeleton-line {
  margin: 10px 20px;
}
.skeleton-card--media .skeleton-line:last-child {
  margin-bottom: 20px;
}

.skeleton-block {
  display: block;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
.skeleton-block--icon {
  width: 46px;
  height: 46px;
}
.skeleton-block--media {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 0;
}

/* =========================================================
   Каскадное появление блоков
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity 0.55s cubic-bezier(0.22, 0.68, 0.24, 1),
    transform 0.55s cubic-bezier(0.22, 0.68, 0.24, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* =========================================================
   Кнопка «наверх» и уведомление об обновлении
   ========================================================= */

.to-top {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 44;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.to-top:hover {
  color: var(--accent-dark);
  border-color: var(--accent);
}

.update-pill {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 58;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, 14px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.update-pill.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.update-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(21, 145, 79, 0.16);
  flex-shrink: 0;
}
.update-pill__text {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.update-pill__action {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.update-pill__action:hover {
  background: var(--accent-dark);
}
.update-pill__close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
}
.update-pill__close:hover {
  background: var(--surface-2);
  color: var(--ink);
}

/* =========================================================
   Карта: заглушка до нажатия
   ========================================================= */

.map-card__cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 100%;
  min-height: 360px;
  padding: 28px;
  text-align: center;
  background:
    radial-gradient(600px 320px at 50% 0%, var(--accent-soft), transparent 70%),
    var(--surface-2);
}
.map-card__pin {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent-dark);
  box-shadow: var(--shadow-sm);
  animation: pin-pulse 2.6s ease-in-out infinite;
}
@keyframes pin-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 106, 19, 0.28);
  }
  60% {
    box-shadow: 0 0 0 14px rgba(255, 106, 19, 0);
  }
}
.map-card__title {
  font-weight: 800;
  font-size: 17px;
}
.map-card__hint {
  max-width: 34ch;
  font-size: 13.5px;
  color: var(--muted);
}

/* =========================================================
   Активная ссылка меню
   ========================================================= */

.site-nav a.is-current,
.mobile-nav__list a.is-current {
  color: var(--accent-dark);
  background: var(--accent-soft);
}
.site-nav a.is-current {
  background: var(--accent-soft);
}

.site-header.is-scrolled {
  box-shadow: 0 6px 24px rgba(16, 20, 26, 0.08);
}

/* =========================================================
   Адаптив: телефон — основной сценарий
   ========================================================= */

@media (max-width: 1024px) {
  .stat-strip__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 0;
  }
  .stat-strip__item:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 900px) {
  .hero__ring--a {
    width: 300px;
    height: 300px;
    right: -60px;
    top: -40px;
  }
  .hero__ring--b {
    display: none;
  }
  .hero__float--1,
  .hero__float--4 {
    display: none;
  }
  .hero__float--2 {
    right: 8%;
    top: 4%;
  }
  .hero__float--3 {
    right: 6%;
    bottom: 10%;
  }
}

@media (max-width: 720px) {
  .stat-strip__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 14px;
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .stat-strip__item {
    padding: 0 12px;
  }
  .stat-strip__item:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }
  .stat-strip__label {
    font-size: 12.5px;
  }

  .ticker__track {
    gap: 24px;
    animation-duration: 34s;
  }
  .ticker__item {
    font-size: 13px;
  }

  /* Меньше движущихся слоёв — телефон не должен тратить батарею на декор */
  .hero__float--5,
  .hero__float--6,
  .hero__spark--3,
  .hero__spark--5 {
    display: none;
  }
  .hero__glow {
    filter: blur(46px);
    opacity: 0.4;
  }
  .hero__mesh {
    background-size: 56px 56px;
  }

  /* Форма записи: кнопка отправки всегда под рукой */
  #submit-btn {
    position: sticky;
    bottom: 0;
    z-index: 2;
    box-shadow: 0 -14px 22px -8px var(--surface);
  }

  .date-strip {
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
  }
  .date-chip {
    min-width: 82px;
    scroll-snap-align: start;
  }
  .slot {
    min-height: 50px;
    font-size: 16px;
  }

  .to-top {
    right: 14px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    width: 42px;
    height: 42px;
  }

  .update-pill {
    bottom: calc(82px + env(safe-area-inset-bottom));
    width: calc(100vw - 28px);
    justify-content: space-between;
    border-radius: 16px;
  }
  .update-pill__text {
    white-space: normal;
    font-size: 13.5px;
  }

  .map-card__cover {
    min-height: 260px;
    padding: 22px;
  }

  /* ---------- шапка на телефоне ---------- */

  /* Шапка не должна выпирать за экран: логотип сжимается, телефон остаётся
     иконкой, кнопка записи — компактной. Раньше на страницах без мобильной
     панели (политика, 404) шапка давала горизонтальную прокрутку. */
  .site-header__inner {
    gap: 10px;
  }
  .logo {
    min-width: 0;
    flex-shrink: 1;
  }
  .logo__text {
    min-width: 0;
  }
  .logo__name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .site-header__actions {
    gap: 8px;
    min-width: 0;
  }
  .site-header__actions .btn--sm {
    padding: 0 14px;
    font-size: 14px;
    min-height: 42px;
  }
  .header-phone {
    min-width: 42px;
  }
}

@media (max-width: 400px) {
  .site-header__actions .btn {
    padding: 0 12px;
  }
  .logo__mark {
    width: 36px;
    height: 36px;
    font-size: 12.5px;
  }
  .logo__name {
    font-size: 16px;
  }
  /* На узких экранах подпись «Автосервис · Берёзовый» в логотипе убираем:
     вместе с кнопкой темы шапка перестаёт вылезать за экран, а название и
     кнопка «Записаться» остаются. */
  .logo__tag {
    display: none;
  }
  .site-header__actions {
    gap: 6px;
  }
}

@media (max-width: 420px) {
  .stat-strip__inner {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .stat-strip__item {
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
    padding: 0;
    border-left: 0;
  }
  .stat-strip__value {
    font-size: 24px;
    min-width: 62px;
  }
}

/* =========================================================
   Страницы ошибок
   ========================================================= */

.error-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.error-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 48px 0 64px;
}

.error-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 44px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.error-card__glow {
  position: absolute;
  right: -80px;
  top: -120px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 106, 19, 0.24), transparent 70%);
  pointer-events: none;
  animation: glow-drift-a 16s ease-in-out infinite;
}

.error-card__code {
  display: inline-block;
  font-size: clamp(64px, 14vw, 120px);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.06em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.error-card__title {
  margin-top: 14px;
  font-size: clamp(22px, 3.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.error-card__text {
  margin: 12px auto 0;
  max-width: 48ch;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.6;
}

.error-card__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 26px;
}

.error-card__hint {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  font-size: 13.5px;
  color: var(--muted-2);
}

.error-card__hint a {
  color: var(--accent-dark);
  font-weight: 700;
}

.error-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 14px;
}
.error-links a {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.error-links a:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.error-card__art {
  width: 100%;
  max-width: 260px;
  height: auto;
  margin: 0 auto 6px;
  color: var(--accent);
  opacity: 0.9;
}

@media (max-width: 720px) {
  .error-card {
    padding: 32px 20px;
    border-radius: var(--radius);
  }
  .error-card__actions .btn {
    flex: 1 1 100%;
  }
}

/* ---------- блок «Приложение для Android» ---------- */

.app-cta {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.app-cta__body .section__lead {
  margin-top: 10px;
}

.app-cta__note {
  margin: 14px 0 0;
  max-width: 60ch;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
}

.app-cta__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-cta__actions .btn {
  width: 100%;
  justify-content: center;
}

.app-cta__meta {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 860px) {
  .app-cta {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 22px;
  }
}
