/* ============================================================
   CSS-переменные (Design Tokens)
   ============================================================ */
:root {
  --text-primary: #0f1729;
  --text-secondary: #65758b;
  --text-muted: rgba(101, 117, 139, 0.6);
  --border: #e5e5e5;
  --bg: #ffffff;
  --brand-purple: #6c4af2;
  --brand-pill-bg: rgba(199, 74, 229, 0.15);
  --gradient-primary: linear-gradient(159.96deg, #6c4af2 0%, #ba4af2 50%, #f24aba 100%);
  --content-width: 1180px;
  --header-height: 88px;
}

/* ============================================================
   Reset & Base
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input {
  font-family: inherit;
}

/* ============================================================
   Утилиты
   ============================================================ */
.gradient-text {
  background-image: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  height: var(--header-height);
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.header-inner {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Логотип */
.site-logo {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 800;
  font-size: 19px;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -0.2px;
}

/* Правая часть header */
.header-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-shrink: 0;
}

.header-nav-item {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
}

/* Pill-кнопка "List your vehicle" */
.btn-list-vehicle {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 30px;
  height: 40px;
  padding: 0 30px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn-list-vehicle:hover {
  background-color: #f5f5f5;
  border-color: #ccc;
}

/* Вертикальный разделитель */
.header-divider {
  display: block;
  width: 1px;
  height: 27px;
  background-color: var(--border);
  flex-shrink: 0;
}

/* Блок с флагом и языком */
.header-lang {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: var(--text-primary);
}

.header-flag {
  font-size: 18px;
  line-height: 1;
}

/* Иконка пользователя */
.header-user-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-primary);
}

/* ============================================================
   MAIN / HERO
   ============================================================ */
.site-main {
  flex: 1;
}

.hero-section {
  width: 100%;
  min-height: 580px;
  background-color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 42px;
  width: 100%;
  max-width: 860px;
}

/* Верхний блок: pill + заголовок + подзаголовок */
.hero-text-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Pill-бейдж */
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--brand-pill-bg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  padding: 9px 17px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: var(--brand-purple);
  white-space: nowrap;
}

.hero-pill-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* Заголовок H1 */
.hero-title {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 700;
  font-size: 52px;
  line-height: 1.1;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

/* Подзаголовок */
.hero-subtitle {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  font-size: 20px;
  line-height: 28px;
  color: var(--text-secondary);
  max-width: 600px;
}

/* ============================================================
   SEARCH BAR
   ============================================================ */
.hero-search {
  width: 100%;
  max-width: 830px;
  height: 58px;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 0 13px 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hero-search:focus-within {
  border-color: var(--brand-purple);
  box-shadow: 0 2px 16px rgba(108, 74, 242, 0.12);
}

.hero-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: var(--text-primary);
  min-width: 0;
}

.hero-search-input::placeholder {
  color: var(--text-secondary);
}

/* Кнопка отправки — чёрный круг */
.hero-search-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background-color: var(--text-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.hero-search-btn:hover {
  background-color: #1e2d4a;
  transform: scale(1.05);
}

.hero-search-btn:active {
  transform: scale(0.97);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-copyright {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-muted);
  max-width: 600px;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

.footer-lang {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
}

.footer-flag {
  font-size: 16px;
  line-height: 1;
}

.footer-currency {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ============================================================
   Accessibility — visually hidden (для screen readers)
   ============================================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   RESPONSIVE — Mobile-first breakpoint 768px
   ============================================================ */
@media (max-width: 768px) {
  /* Header */
  .site-header {
    height: auto;
    min-height: 64px;
  }

  .header-inner {
    padding: 16px 20px;
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  /* Скрыть все nav-элементы кроме иконки пользователя */
  .header-nav-item,
  .btn-list-vehicle,
  .header-divider,
  .header-lang,
  .header-nav-km {
    display: none;
  }

  /* Уменьшить gap так, чтобы только иконка осталась */
  .header-nav {
    gap: 0;
  }

  /* Hero */
  .hero-section {
    min-height: auto;
    padding: 60px 20px 48px;
  }

  .hero-inner {
    gap: 32px;
  }

  .hero-title {
    font-size: 38px;
    letter-spacing: -0.3px;
  }

  .hero-subtitle {
    font-size: 17px;
    line-height: 26px;
  }

  .hero-pill {
    font-size: 13px;
    padding: 8px 14px;
  }

  /* Search bar на мобиле */
  .hero-search {
    max-width: 100%;
    height: 52px;
  }

  .hero-search-input {
    font-size: 15px;
  }

  /* Footer */
  .footer-inner {
    padding: 0 20px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }

  .footer-copyright {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 16px;
  }
}
