/* Единый дизайн-слой внутренних страниц (/check, /vin, /blog, отчёт).
   До 09.09.2026 они жили на system-ui и своих переменных — сайт выглядел
   как два разных продукта. Здесь общие токены, типографика и поведение. */

:root {
  --bg: #14170e;
  --card: #1d2214;
  --card-2: #171b10;
  --line: rgba(232, 199, 102, 0.18);
  --line-soft: rgba(232, 199, 102, 0.09);
  --gold: #e8c766;
  --gold-hi: #f4d97e;
  --text: #f2f1e8;
  --muted: #b9b8a8;
  --green: #39d270;
  --red: #e05b5b;
  --radius: 18px;
  --shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.9);
}

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

body {
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "ss01", "cv01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, .brandfont {
  font-family: "Unbounded", "Onest", system-ui, sans-serif;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* Плавная шкала размеров вместо фиксированных пикселей */
h1 { font-size: clamp(1.45rem, 1.15rem + 1.5vw, 2.1rem); }
h2 { font-size: clamp(1.12rem, 1rem + 0.6vw, 1.35rem); }

/* Комфортная длина строки и межстрочный интервал для чтения */
p, li { line-height: 1.62; }

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-hi); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 10px;
}

/* Поля ввода: заметный фокус — юзер всегда видит, где он */
input[type="text"], input[type="url"], input[type="search"], textarea {
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
input[type="text"]:focus, input[type="url"]:focus, textarea:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 4px rgba(232, 199, 102, 0.12);
  background: #141810 !important;
}
::placeholder { color: #7d7c6e; }

/* Кнопки: подъём при наведении, вдавливание при нажатии */
.btn, .ghost, button[type="submit"] {
  transition: transform 160ms cubic-bezier(.22,.61,.36,1), box-shadow 160ms ease,
    background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px -14px rgba(232, 199, 102, 0.6); }
.btn:active, .ghost:active { transform: translateY(1px) scale(0.995); }

/* Состояние ожидания на кнопке (оплата, поиск VIN) */
.btn[data-loading="true"], button[data-loading="true"] {
  pointer-events: none;
  color: transparent !important;
  position: relative;
}
.btn[data-loading="true"]::after, button[data-loading="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid rgba(6, 20, 12, 0.35);
  border-top-color: #06140c;
  border-radius: 50%;
  animation: nl-spin 700ms linear infinite;
}
@keyframes nl-spin { to { transform: rotate(360deg); } }

/* Карточки чуть приподнимаются — ощущение «живого» интерфейса */
.card, .cell, .offer, .peek, .found {
  box-shadow: var(--shadow);
  transition: transform 200ms cubic-bezier(.22,.61,.36,1), border-color 200ms ease;
}
.cell:hover { transform: translateY(-2px); border-color: rgba(232, 199, 102, 0.35); }

/* Появление при скролле */
.reveal { opacity: 0; transform: translateY(14px);
  transition: opacity 520ms cubic-bezier(.22,.61,.36,1), transform 520ms cubic-bezier(.22,.61,.36,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* Мобильный: крупные тап-зоны (минимум 44px по рекомендациям) */
@media (max-width: 600px) {
  .btn, button[type="submit"], .ghost { min-height: 48px; }
  body { padding-bottom: env(safe-area-inset-bottom); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
