:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #1c2430;
  --muted: #5b6675;
  --border: #dfe4ea;
  --brand: #1f2f4a;
  --brand-2: #2f4a73;
  --accent: #e0a800;
  --accent-soft: #fff4cc;
  --accent-text: #6b4e00;
  --radius: 16px;
  --shadow: 0 10px 30px rgb(18 33 58 / 8%);
  --container: 1180px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
}

main {
  flex: 1;
}

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

a {
  color: var(--brand-2);
}

h1,
h2,
h3 {
  line-height: 1.2;
}

::selection {
  background: var(--accent);
  color: #1c2430;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.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;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 0 0 10px 10px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

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

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar {
  background: #16243d;
  color: #dbe5ee;
  font-size: 0.8rem;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.45rem;
}

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

.topbar a:hover {
  color: #fff;
  text-decoration: underline;
}

.topbar__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}

.logo-text {
  display: inline-block;
  color: #3a4376;
  font-family: "Arial Black", "Arial", "Helvetica Neue", "DejaVu Sans", sans-serif;
  font-size: clamp(18px, 6.5vw, 48px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  -webkit-text-stroke: 0.035em #3a4376;
  text-shadow: -0.055em 0.07em 0 #cccc33;
}

.logo-tld {
  font-size: 0.62em;
  letter-spacing: 0;
  -webkit-text-stroke: 0.035em #3a4376;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.desktop-nav a {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.desktop-nav a:hover {
  background: #f1f4f7;
}

.mobile-nav {
  display: none;
  position: relative;
}

.mobile-nav summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.mobile-nav summary::-webkit-details-marker {
  display: none;
}

.mobile-nav summary::after {
  content: "▾";
  font-size: 0.8rem;
}

.mobile-nav[open] summary {
  background: #f1f4f7;
}

.mobile-nav nav {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 30;
  min-width: 190px;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.mobile-nav nav a {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.mobile-nav nav a:hover {
  background: #f1f4f7;
}

/* Main */
.site-main {
  padding-block: 0 1rem;
}

.hero {
  padding-block: 2.5rem 1.5rem;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.cars {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
}

.car-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.car-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgb(18 33 58 / 12%);
}

.car-card__media {
  display: block;
  aspect-ratio: 4 / 3;
  padding: 0.5rem;
  background: #e9eef2;
  overflow: hidden;
}

.car-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.car-card:hover .car-card__media img {
  transform: scale(1.03);
}

.car-card__thumbs {
  display: flex;
  gap: 0.5rem;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.thumb {
  display: block;
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #e9eef2;
  cursor: pointer;
  text-decoration: none;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb:hover {
  border-color: var(--brand-2);
}

.car-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1rem 1rem 1.1rem;
}

.car-card__heading {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.car-card h2 {
  margin: 0;
  font-size: 1.12rem;
}

.car-card__version {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.badge {
  align-self: flex-start;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.car-card__specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.spec {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.spec__label {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.spec__value {
  font-size: 0.92rem;
  font-weight: 700;
}

.car-card__price {
  margin: 0.1rem 0 0;
  color: var(--brand);
  font-size: 1.45rem;
  font-weight: 800;
}

.car-card__price--ask {
  color: var(--muted);
  font-size: 1.05rem;
}

.car-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 40px;
  padding: 0.5rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--brand);
  color: #fff;
}

.btn--primary:hover {
  background: var(--brand-2);
}

.btn--ghost {
  border-color: var(--border);
  background: transparent;
  color: var(--text);
}

.btn--ghost:hover {
  background: #f1f4f7;
}

.car-more {
  margin-top: 0.25rem;
}

.car-more summary {
  list-style: none;
}

.car-more summary::-webkit-details-marker {
  display: none;
}

.car-more dl {
  display: grid;
  grid-template-columns: minmax(120px, auto) 1fr;
  gap: 0.4rem 0.8rem;
  margin: 0.75rem 0 0;
  padding: 0.75rem;
  border-radius: 10px;
  background: #f7f9fa;
  font-size: 0.88rem;
}

.car-more dt {
  color: var(--muted);
}

.car-more dd {
  margin: 0;
}

.empty {
  padding: 2rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 2.25rem 0 1rem;
  background: var(--brand);
  color: #dbe5ee;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.footer-title {
  margin: 0 0 0.5rem;
  color: #fff;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.7;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgb(255 255 255 / 15%);
  color: #b9c9d6;
  font-size: 0.8rem;
}

/* Lightbox */
.lightbox {
  max-width: 95vw;
  max-height: 95vh;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
}

.lightbox::backdrop {
  background: rgb(0 0 0 / 82%);
}

.lightbox img {
  width: auto;
  max-width: 95vw;
  max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgb(0 0 0 / 45%);
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 35%);
  border-radius: 50%;
  background: rgb(0 0 0 / 45%);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgb(0 0 0 / 70%);
}

/* Responsive */
@media (max-width: 860px) {
  .desktop-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
    flex: 0 0 auto;
  }

  .header-inner {
    gap: 0.75rem;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .topbar__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .header-inner {
    padding-block: 0.75rem;
  }

  .hero {
    padding-block: 1.75rem 1rem;
  }

  .cars {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    font-size: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
