/* ============================================
   DRIVE LINE MOTORS — Home Page Styles
   ============================================ */

/* ── Hero Section ─────────────────────────── */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  padding-top: var(--navbar-h);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  z-index: 2;          /* above video, below content */
  background:
    linear-gradient(180deg,
      rgba(10,10,10,0.55) 0%,
      rgba(5,5,5,0.35) 50%,
      rgba(10,10,10,0.75) 100%
    );
}

@media (prefers-color-scheme: light) {
  .hero-gradient {
    background:
      linear-gradient(180deg,
        rgba(247,245,242,0.55) 0%,
        rgba(236,233,228,0.35) 50%,
        rgba(247,245,242,0.75) 100%
      );
  }
}

/* Subtle dot grid */
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 3;          /* above gradient */
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

/* ── Hero Video (native HTML5 <video>) ────── */
.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;          /* sits above hero-bg base, below gradient */
  overflow: hidden;
  pointer-events: none;
}

/* Cover the full hero area at any aspect ratio */
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw;     /* 16:9 — grows with viewport width  */
  min-height: 100vh;
  min-width: 177.78vh; /* 16:9 — grows with viewport height */
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 1;
}

/* Animated car SVG — removed */
.hero-car-svg { display: none; }

/* Floating particles */
.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 4;          /* above grid */
  pointer-events: none;
}

.hero-particles span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--c-accent);
  opacity: 0;
  animation: particleFloat 8s ease-in-out infinite;
}

.hero-particles span:nth-child(1) { left: 20%; top: 70%; animation-delay: 0s; }
.hero-particles span:nth-child(2) { left: 40%; top: 60%; animation-delay: 1.5s; }
.hero-particles span:nth-child(3) { left: 60%; top: 75%; animation-delay: 3s; }
.hero-particles span:nth-child(4) { left: 75%; top: 65%; animation-delay: 0.8s; }
.hero-particles span:nth-child(5) { left: 85%; top: 55%; animation-delay: 2.2s; }
.hero-particles span:nth-child(6) { left: 15%; top: 55%; animation-delay: 4s; }

@keyframes particleFloat {
  0%   { opacity: 0; transform: translateY(0) scale(1); }
  20%  { opacity: 0.8; }
  80%  { opacity: 0.4; }
  100% { opacity: 0; transform: translateY(-80px) scale(2); }
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 5;          /* above all background layers */
  padding-bottom: min(200px, 30vw); /* space for the car */
  padding-top: var(--space-lg); /* space below navbar */
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--space-sm);
  margin-top: var(--space-md); /* push down from navbar */
  padding: 6px 16px;
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 100px;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 4rem); /* reduced from 7rem to 4rem max */
  font-weight: 300;
  color: var(--c-text);
  margin-bottom: var(--space-sm);
  line-height: 1.1;
}

.hero-title em {
  font-style: italic;
  color: var(--c-accent);
  display: inline; /* keep on same line — 2 lines total */
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--c-text-muted);
  max-width: 52ch;
  margin: 0 auto var(--space-md);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

/* Scroll indicator */
.hero-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.5;
}

.scroll-line {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--c-accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%       { opacity: 1; transform: scaleY(1.1); }
}

.scroll-text {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}

/* ── Stats Bar ────────────────────────────── */
.stats-bar {
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
  padding: var(--space-md) 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.stat-item {
  text-align: center;
  padding: var(--space-md);
  border-right: 1px solid var(--c-border);
}

.stat-item:last-child { border-right: none; }

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 300;
  color: var(--c-text);
  display: inline-block;
  line-height: 1;
}

.stat-unit {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--c-accent);
  font-weight: 300;
}

.stat-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-top: 6px;
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3),
  .stat-item:nth-child(4) { border-top: 1px solid var(--c-border); }
}

/* ── Brands Grid ──────────────────────────── */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--c-border);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 0 auto;
  max-width: 900px;
}

.brand-item {
  background: var(--c-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  transition: background 0.25s, color 0.25s;
  cursor: default;
}

.brand-item:hover {
  background: var(--c-accent-dim);
  color: var(--c-accent);
}

.brand-logo-placeholder {
  color: var(--c-text-muted);
  transition: color 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-item:hover .brand-logo-placeholder { color: var(--c-accent); }

/* Real brand logo images */
.brand-img {
  width: 110px;
  height: 60px;
  object-fit: contain;
  object-position: center;
  display: block;
  filter: grayscale(100%) brightness(1.8);   /* neutral on dark bg */
  transition: filter 0.3s var(--ease), transform 0.3s var(--ease);
}

/* Light mode: invert so white logos become dark */
@media (prefers-color-scheme: light) {
  .brand-img { filter: grayscale(100%) brightness(0.2); }
  .brand-item:hover .brand-img { filter: grayscale(0%) brightness(1); }
}

.brand-item:hover .brand-img {
  filter: grayscale(0%) brightness(1);
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .brands-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .brands-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Why Strip ────────────────────────────── */
.why-strip {
  padding: var(--space-xl) 0;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.why-item {
  text-align: center;
  padding: var(--space-md);
}

.why-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-sm);
  color: var(--c-accent);
  transition: background 0.3s, border-color 0.3s;
}

.why-item:hover .why-icon {
  background: var(--c-accent-dim);
  border-color: var(--c-accent);
}

.why-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 10px;
  color: var(--c-text);
}

.why-item p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0 auto;
  max-width: 24ch;
}

@media (max-width: 900px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
  .why-grid { grid-template-columns: 1fr; }
  .why-item p { max-width: 100%; }
}

/* ── Home CTA ─────────────────────────────── */
.home-cta { background: var(--c-bg); }
.home-cta .section-title { color: var(--c-text); }
.home-cta .section-title em { font-style: italic; color: var(--c-accent); display: inline; }
.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-md);
}
