/* ============================================================
   DriveSelect — Home Page Styles
   css/home.css
   ============================================================ */

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  background-image: 
  linear-gradient(344deg, rgba(4, 8, 20, .90) 0%, rgba(4, 8, 20, .65) 40%, rgba(4, 8, 20, 0.35) 100%),
  url("../assets/import.jpg");
  background-size: cover;
  background-position: left;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: center;
  min-height: 480px;
}

.hero-headline {
  font-family: var(--ff-display);
  font-size: clamp(36px, 6vw, var(--text-3xl));
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.0;
  color: var(--ink-900);
  margin-bottom: var(--space-5);
}

.hero-headline em {
  color: var(--brand);
  font-style: normal;
  display: block;
}

.hero-sub {
  font-size: var(--text-base);
  color: var(--ink-500);
  line-height: 1.7;
  max-width: 46ch;
  margin-bottom: var(--space-8);
}

.hero-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}

.hero-trust {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--ink-500);
}

.trust-item i {
  color: var(--brand);
  font-size: 15px;
}

/* Hero visual */
.hero-visual {
  position: relative;
}

.hero-card-stack {
  position: relative;
  height: 340px;
}

.hero-stat-card {
  position: absolute;
  background: var(--surface-0);
  border: var(--border-light);
  border-radius: var(--r-xl);
  padding: var(--space-5) var(--space-6);
  box-shadow: var(--shadow-lg);
}

.hero-stat-card--1 {
  top: 20px;
  left: 0;
  width: 200px;
}

.hero-stat-card--2 {
  bottom: 40px;
  right: 0;
  width: 180px;
}

.stat-value {
  display: block;
  font-family: var(--ff-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--ink-900);
}

.stat-label {
  display: block;
  font-size: var(--text-xs);
  color: var(--ink-500);
  margin-top: var(--space-1);
}

.hero-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--brand);
  color: #fff;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}

/* Section header with action button */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  gap: var(--space-4);
}

.section-header .section-title {
  margin-bottom: 0;
}

/* Cars grid */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-5);
}

/* Pillars grid */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}

.pillar {
  background: var(--surface-0);
  border: var(--border-light);
  border-radius: var(--r-lg);
  padding: var(--space-6);
}

.pillar-icon {
  font-size: 26px;
  color: var(--brand);
  margin-bottom: var(--space-4);
}

.pillar-title {
  font-family: var(--ff-display);
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--ink-900);
  margin-bottom: var(--space-2);
}

.pillar-desc {
  font-size: var(--text-sm);
  color: var(--ink-500);
  line-height: 1.65;
}

/* Blog grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-5);
}

/* CTA banner */
.cta-banner {
  /* background: var(--ink-900); */
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.cta-title {
  font-family: var(--ff-display);
  font-size: clamp(var(--text-lg), 3vw, var(--text-xl));
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-2);
}

.cta-sub {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.55);
  max-width: 46ch;
}

.cta-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.btn--outline-white {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn--outline-white:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Loading/error states */
.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-12);
  color: var(--ink-300);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

@media (max-width: 800px) {
  .hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-visual {
    display: none;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.brands-marquee {
  width: 100%;
  overflow: hidden;
  /* background: #073a6e; */
  margin-top: 3rem;
  /* padding: 24px 0; */
  margin-bottom: -2rem;
}

/* Track that moves */
.brands-marquee-track {
  display: flex;
  gap: 48px;
  width: 100%;
  min-width: 100%;
  animation: brandsScroll 20s linear infinite;
  will-change: transform;
  /* performance hint for mobile */
}

/* Optional: pause on hover */
.brands-marquee-track:hover {
  animation-play-state: paused;
}

/* Brand item */
.brand-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 140px;
}

.brand-item img {
  width: 100%;
  height: 60px;
  object-fit: contain;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.brand-item img:hover {
  transform: scale(1.05);
  filter: contrast(1.1);
}

/* Endless scroll animation */
@keyframes brandsScroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Mobile: slower + tighter gap + smaller items */
@media (max-width: 768px) {
  .brands-marquee {
    padding: 16px 0;
  }

  .brands-marquee-track {
    gap: 32px;
    animation-duration: 20s;
    /* will-change: transform; */
  }

  .brand-item {
    width: 110px;
  }

  .brand-item img {
    height: 48px;
  }
}

.page-404 {
  min-height: 50vh;
  background-image: linear-gradient(344deg, rgba(4, 8, 20, .90) 0%, rgba(4, 8, 20, .65) 40%, rgba(4, 8, 20, .35) 100%),
  url("../assets/404.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.page-404-inner {
  max-width: 520px;
  text-align: center;
}

.page-404-title {
  font-size: 96px;
  line-height: 1;
  margin: 0 0 16px;
  font-weight: 800;
  color: var(--ink-900);
}

.page-404-subtitle {
  font-size: 24px;
  margin: 0 0 16px;
  color: var(--ink-700);
}

.page-404-text {
  font-size: 16px;
  margin: 0 0 28px;
  color: var(--ink-600);
}

.page-404-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}