/* ===========================================================
   ВОЛЬТ ДРАЙВ — дизайн-токены и внутренности web components.
   Основная стилизация — Tailwind-утилиты в разметке.
   =========================================================== */

:root {
  /* Палитра */
  --brand: #a3e635;
  --brand-400: #bef264;
  --brand-600: #84cc16;
  --bg: #0e1310;
  --deep: #0b1009;
  --surface: #161c16;
  --surface-2: #121a12;
  --border: #243024;
  --text: #ffffff;
  --muted: #9ca3af;

  --light: #ffffff;
  --light-surface: #f3f4f6;
  --light-border: #e5e7eb;
  --ink: #111827;
  --ink-muted: #6b7280;

  /* Геометрия и тени */
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 24px 60px -28px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 24px 60px -30px rgba(163, 230, 53, 0.55);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
svg,
video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

::selection {
  background: var(--brand);
  color: #0e1310;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Служебные утилиты ---------- */
.no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Микроанимация появления секций */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Слайдер / карточки: тени не должны обрезаться */
.shadow-safe {
  padding-inline: 4px;
  margin-inline: -4px;
}

/* ---------- <site-modal> ---------- */
site-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}
site-modal .zc-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 6, 0.72);
  backdrop-filter: blur(6px);
  animation: zc-fade 0.2s ease both;
}
site-modal .zc-modal-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 32px);
  max-width: 560px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  animation: zc-pop 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}
site-modal .zc-modal-body {
  padding: 32px;
  overflow: auto;
  overscroll-behavior: contain;
}
site-modal .zc-modal-x {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(11, 16, 9, 0.6);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
site-modal .zc-modal-x:hover {
  color: var(--text);
  border-color: var(--brand);
}

@keyframes zc-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes zc-pop {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ---------- <ui-select> ---------- */
ui-select {
  position: relative;
  display: block;
}
ui-select .zc-select-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(11, 16, 9, 0.55);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
ui-select .zc-select-btn:hover {
  border-color: #3a4a37;
}
ui-select[data-open] .zc-select-btn {
  border-color: var(--brand);
}
ui-select .zc-select-btn[aria-expanded="true"] .zc-caret {
  transform: rotate(180deg);
}
ui-select .zc-caret {
  transition: transform 0.2s ease;
  color: var(--muted);
}
ui-select .zc-select-list {
  position: absolute;
  z-index: 30;
  width: 100%;
  margin: 6px 0 0;
  padding: 6px;
  list-style: none;
  background: #10160f;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  max-height: 240px;
  overflow: auto;
}
ui-select .zc-select-list li {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
ui-select .zc-select-list li:hover,
ui-select .zc-select-list li[aria-selected="true"] {
  background: rgba(163, 230, 53, 0.12);
  color: var(--brand);
}

/* ---------- <booking-form> ---------- */
booking-form {
  display: block;
}
booking-form .bf-field-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
booking-form .bf-box {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(11, 16, 9, 0.55);
  padding: 9px 14px 11px;
  transition: border-color 0.2s ease;
}
booking-form .bf-box:focus-within {
  border-color: var(--brand);
}
booking-form .bf-box input[type="date"],
booking-form .bf-box input[type="time"] {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text);
  color-scheme: dark;
  font-size: 1rem;
  line-height: 1.4;
}
booking-form .bf-box input:focus {
  outline: none;
}
booking-form .bf-error {
  border-color: #f87171;
}

/* ---------- <car-card> (кроп из общей картинки) ---------- */
car-card .cc-photo {
  background-image: url("images/cars.png");
  background-size: 200% 200%;
  background-repeat: no-repeat;
}

/* ---------- Карта: пульс активной точки ---------- */
.map-pin-active {
  animation: map-pulse 2.4s ease-in-out infinite;
}
@keyframes map-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.85);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.15);
  }
}

/* Плавный «бегущий» градиент для акцентных плашек */
.brand-glow {
  position: relative;
}
.brand-glow::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(163, 230, 53, 0.7), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---------- Карусель отзывов: тени не режутся ---------- */
.reviews-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 8px 4px 20px;
  margin: -8px -4px -20px;
}
.reviews-track > * {
  scroll-snap-align: start;
  flex: 0 0 min(88vw, 360px);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}
