/* ===== Основа ===== */
:root {
  --bg: #0b0c0f;
  --bg-alt: #111318;
  --card: #171a20;
  --line: #262a33;
  --text: #f2f3f5;
  --muted: #a3a9b4;
  --orange: #ff7a1a;
  --orange-2: #ff9f4d;
  --radius: 18px;
  --header-h: 72px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }

.container { width: min(1140px, 92%); margin-inline: auto; }
.accent { color: var(--orange); }

.eyebrow {
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .78rem;
  font-weight: 700;
  margin-bottom: 10px;
}

h1, h2, h3 { line-height: 1.15; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.2rem); margin-bottom: 20px; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); margin-bottom: 12px; }
h3 { font-size: 1.2rem; margin-bottom: 8px; }

.note { color: var(--muted); font-size: .95rem; }
.note strong { color: var(--orange); }

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

/* ===== Слой для фотографий =====
   Фото появляется поверх резервного фона, только если загрузилось. */
.ph { position: relative; overflow: hidden; }
.ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--photo, none) center / cover no-repeat;
  opacity: 0;
  transition: opacity .7s ease, transform 1s ease;
  z-index: 0;
}
.ph.has-photo::before { opacity: 1; }

/* ===== Кнопки ===== */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--small { padding: 9px 20px; font-size: .92rem; }
.btn--primary {
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  color: #1a1004;
  box-shadow: 0 8px 24px rgba(255, 122, 26, .3);
}
.btn--primary:hover { box-shadow: 0 12px 30px rgba(255, 122, 26, .5); }
.btn--ghost { border-color: rgba(255,255,255,.25); color: var(--text); background: rgba(255,255,255,.04); }
.btn--ghost:hover { border-color: var(--orange); color: var(--orange); }
.btn--outline { border-color: var(--orange); color: var(--orange); background: transparent; }
.btn--outline:hover { background: var(--orange); color: #1a1004; }
.btn--full { width: 100%; }

/* ===== Шапка ===== */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  transition: background .3s, box-shadow .3s;
}
.header.scrolled {
  background: rgba(11, 12, 15, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
}
.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.header__actions { display: flex; align-items: center; gap: 12px; }

.logo { font-weight: 800; font-size: 1.4rem; letter-spacing: .06em; white-space: nowrap; }
.logo span { color: var(--orange); }

.nav { display: flex; gap: 28px; }
.nav__link {
  color: rgba(255,255,255,.75);
  font-weight: 600;
  position: relative;
  padding: 6px 0;
  transition: color .2s;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--orange);
  transition: width .25s;
}
.nav__link:hover, .nav__link.active { color: #fff; }
.nav__link:hover::after, .nav__link.active::after { width: 100%; }

.burger {
  display: none;
  width: 44px; height: 44px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.burger span {
  width: 20px; height: 2px;
  background: var(--text);
  transition: transform .3s, opacity .3s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Главный экран ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 30px) 0 70px;
  background:
    radial-gradient(900px 500px at 80% 40%, rgba(255, 122, 26, .22), transparent 70%),
    linear-gradient(160deg, #15171d 0%, #0b0c0f 60%);
}
.hero__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(11,12,15,.92) 0%, rgba(11,12,15,.6) 55%, rgba(11,12,15,.35) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 25%);
  pointer-events: none;
}
.hero__glow {
  position: absolute;
  width: 700px; height: 700px;
  right: -150px; top: 10%;
  background: radial-gradient(circle, rgba(255, 122, 26, .3), transparent 65%);
  pointer-events: none;
  z-index: 1;
}
.hero__streaks {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(115deg, transparent 40%, rgba(255,255,255,.05) 45%, transparent 50%),
    linear-gradient(115deg, transparent 58%, rgba(255,122,26,.08) 62%, transparent 66%);
  animation: sweep 9s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes sweep { from { transform: translateX(-4%); } to { transform: translateX(4%); } }

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: center;
}
.hero__lead { color: #cfd3da; font-size: 1.1rem; max-width: 500px; margin-bottom: 28px; }
.hero__buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.hero__chips li {
  font-size: .82rem;
  color: #dfe2e8;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.05);
  padding: 6px 14px;
  border-radius: 999px;
}
.hero__chips li::before { content: "✓ "; color: var(--orange); font-weight: 800; }

.hero__car { position: relative; }
.hero__car-svg {
  width: 100%;
  display: block;
  filter: drop-shadow(0 20px 40px rgba(255, 122, 26, .4));
  animation: float 5s ease-in-out infinite;
}
.hero__floor {
  height: 18px;
  margin: -6px 10% 0;
  background: radial-gradient(ellipse, rgba(255, 122, 26, .55), transparent 70%);
  filter: blur(6px);
}
/* Если загрузилось настоящее фото, рисованный автомобиль скрываем */
.hero.has-photo .hero__car { visibility: hidden; }

.spark {
  position: absolute;
  width: 10px; height: 10px;
  background: #fff;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: 0;
  animation: twinkle 3s ease-in-out infinite;
}
.spark--1 { top: 18%; left: 28%; }
.spark--2 { top: 12%; left: 62%; animation-delay: 1s; width: 14px; height: 14px; }
.spark--3 { top: 40%; left: 82%; animation-delay: 2s; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1.2); } }

/* ===== Секции ===== */
.section { padding: 110px 0; scroll-margin-top: var(--header-h); }
.section--alt { background: var(--bg-alt); }
.section__head { margin-bottom: 52px; max-width: 640px; }

/* ===== Карточки услуг ===== */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-8px); border-color: var(--orange); box-shadow: 0 18px 44px rgba(255, 122, 26, .15); }
.card--featured { border-color: var(--orange); }

.card__media { height: 170px; display: grid; place-items: center; }
.card:hover .card__media.has-photo::before { transform: scale(1.06); }
.card__media-icon {
  position: relative;
  z-index: 1;
  font-size: 3.4rem;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.5));
  transition: transform .4s;
}
.card:hover .card__media-icon { transform: scale(1.15) rotate(-6deg); }
.card__media.has-photo .card__media-icon { display: none; }

.m-wash {
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.25) 0 6px, transparent 7px),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,.2) 0 9px, transparent 10px),
    radial-gradient(circle at 45% 80%, rgba(255,255,255,.18) 0 5px, transparent 6px),
    linear-gradient(135deg, #12384f, #0e1d2a 60%, #3a2412);
}
.m-complex {
  background:
    radial-gradient(circle at 75% 25%, rgba(255,200,120,.45), transparent 45%),
    linear-gradient(135deg, #3a210d, #1a1208 60%, #0f1115);
}
.m-interior {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.04) 0 6px, transparent 6px 12px),
    linear-gradient(135deg, #2a2230, #15131a 70%, #2b1a0e);
}
.m-polish { background: conic-gradient(from 200deg at 50% 50%, #1b1d23, #4a2c14, #1b1d23, #6b3b16, #1b1d23); }

.badge {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 3;
  background: var(--orange);
  color: #1a1004;
  font-size: .75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
}

.card__body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.card__body p { color: var(--muted); font-size: .95rem; }
.card .price {
  color: var(--text);
  font-size: 1.7rem;
  font-weight: 800;
  margin-top: auto;
  padding: 18px 0 16px;
}
.price small { color: var(--muted); font-size: .72rem; font-weight: 500; margin-left: 4px; }

/* ===== Преимущества ===== */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform .3s, border-color .3s;
}
.feature:hover { transform: translateY(-6px); border-color: var(--orange); }
.feature__icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  font-size: 1.7rem;
  background: rgba(255, 122, 26, .12);
  border-radius: 16px;
  margin-bottom: 18px;
}
.feature p { color: var(--muted); font-size: .96rem; }

/* ===== Галерея ===== */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.gallery__item {
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.gallery__item:hover { transform: translateY(-6px); border-color: var(--orange); box-shadow: 0 18px 44px rgba(255,122,26,.15); }
.gallery__item:hover.has-photo::before { transform: scale(1.05); }
.gallery__art {
  position: relative;
  z-index: 1;
  width: 72%;
  filter: drop-shadow(0 14px 24px rgba(0,0,0,.5));
  transition: transform .5s;
}
.gallery__item:hover .gallery__art { transform: translateX(10px) scale(1.03); }
.gallery__item.has-photo .gallery__art { display: none; }
.gallery__item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 36px 20px 16px;
  font-weight: 600;
  background: linear-gradient(0deg, rgba(0,0,0,.75), transparent);
}

.g-1 { background: radial-gradient(circle at 50% 70%, rgba(255,122,26,.35), transparent 60%), linear-gradient(160deg, #1d2027, #0e1013); }
.g-2 {
  background:
    radial-gradient(circle at 15% 25%, rgba(255,255,255,.22) 0 8px, transparent 9px),
    radial-gradient(circle at 85% 20%, rgba(255,255,255,.18) 0 12px, transparent 13px),
    radial-gradient(circle at 70% 85%, rgba(255,255,255,.15) 0 7px, transparent 8px),
    linear-gradient(160deg, #1a2a36, #0e1013);
}
.g-3 { background: linear-gradient(115deg, #14171d 30%, rgba(255,255,255,.08) 45%, #14171d 60%), linear-gradient(160deg, #1b2230, #0e1013); }
.g-4 { background: radial-gradient(circle at 30% 30%, rgba(255,122,26,.25), transparent 55%), linear-gradient(160deg, #281b1b, #0e1013); }

/* ===== Отзывы ===== */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .3s, border-color .3s;
}
.review:hover { transform: translateY(-6px); border-color: var(--orange); }
.review__tag {
  align-self: flex-start;
  font-size: .7rem;
  font-weight: 700;
  color: var(--orange);
  border: 1px dashed var(--orange);
  padding: 3px 10px;
  border-radius: 999px;
}
.review__stars { color: var(--orange); letter-spacing: 3px; font-size: 1.1rem; }
.review p { color: #d5d8de; }
.review footer { margin-top: auto; color: var(--muted); font-size: .9rem; }

/* ===== Форма записи ===== */
.booking { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.booking__info p { color: var(--muted); }
.booking__info strong { color: var(--orange); }

.form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  display: grid;
  gap: 16px;
}
.field { display: grid; gap: 6px; }
.field span { font-weight: 600; font-size: .9rem; }
.field input, .field select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  transition: border-color .2s, box-shadow .2s;
  color-scheme: dark;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 122, 26, .2);
}
.field.invalid input, .field.invalid select { border-color: #ff5a5a; }
.error { color: #ff7b7b; font-size: .82rem; font-style: normal; min-height: 1em; }

.form__message, .contact-msg {
  display: none;
  background: rgba(255, 122, 26, .1);
  border: 1px solid var(--orange);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: .92rem;
  color: var(--text);
}
.form__message.show, .contact-msg.show { display: block; animation: fadeIn .4s; }
.contact-msg { margin-top: 14px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ===== Контакты ===== */
.contacts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  transition: transform .3s, border-color .3s;
}
.contact-card:hover { transform: translateY(-6px); border-color: var(--orange); }
.contact-card__icon {
  width: 50px; height: 50px;
  display: grid; place-items: center;
  font-size: 1.5rem;
  background: rgba(255, 122, 26, .12);
  border-radius: 14px;
  margin-bottom: 16px;
}
.contact-card h3 { color: var(--orange); }
.contact-card p { color: var(--muted); margin-bottom: 14px; }
.contact-card .status { font-weight: 700; margin-bottom: 0; }
.contact-card .status.open { color: #4ade80; }
.contact-card .status.closed { color: #ff7b7b; }

/* ===== Подвал ===== */
.footer { border-top: 1px solid var(--line); padding: 30px 0; }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: .9rem;
}
.footer__up:hover { color: var(--orange); }

/* ===== Анимация появления =====
   Блоки прячутся только когда JavaScript работает (класс .js ставит script.js).
   Если скрипт не загрузился, всё остаётся видимым. */
.js .reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
.js .reveal.visible.done { transition: transform .3s, border-color .3s, box-shadow .3s; }

/* ===== Адаптивность ===== */
@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .features, .reviews { grid-template-columns: 1fr; }
  .booking { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 860px) {
  .burger { display: flex; }
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: rgba(11, 12, 15, .97);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 10px 4%;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height .35s, visibility .35s;
  }
  .nav.open { max-height: 400px; visibility: visible; }
  .nav__link { padding: 14px 0; border-bottom: 1px solid var(--line); }

  .hero { min-height: auto; padding-top: calc(var(--header-h) + 40px); }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__car { order: -1; }
  .hero.has-photo .hero__car { display: none; }
  .contacts { grid-template-columns: 1fr; }
  .section { padding: 76px 0; }
}

@media (max-width: 560px) {
  .cards, .gallery { grid-template-columns: 1fr; }
  .hero__buttons .btn { width: 100%; }
  .form { padding: 22px; }
  .logo { font-size: 1.2rem; }
  .btn--small { padding: 8px 14px; font-size: .85rem; }
  .header__actions { gap: 8px; }
}

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