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

:root {
  --navy:       #0a1628;
  --navy-mid:   #0f2040;
  --navy-light: #172a52;
  --gold:       #c9a227;
  --gold-light: #e8bc35;
  --gold-dim:   #8a6e19;
  --white:      #f5f7fa;
  --gray:       #8a9bb5;
  --gray-light: #c4cedb;
  --border:     rgba(201,162,39,0.2);
  --card-bg:    #111e36;
  --radius:     12px;
  --radius-lg:  20px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--navy);
  color: var(--white);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Header ───────────────────────────────────────────────────────────────── */
.header {
  background: var(--navy-mid);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dealer-badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tagline { font-size: 0.8rem; color: var(--gray); }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--navy-mid) 0%, var(--navy) 100%);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
}
.hero-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
@media (min-width: 700px) {
  .hero-content { flex-direction: row; align-items: center; gap: 3rem; }
}

/* Agent card */
.agent-card {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  min-width: 260px;
}
.agent-photo {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  overflow: hidden;
  background: var(--navy-light);
}
.agent-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
  background: var(--navy-light);
}
.agent-name { font-size: 1.4rem; font-weight: 700; line-height: 1.2; }
.agent-title { font-size: 0.85rem; color: var(--gold); font-weight: 600; margin-top: 0.2rem; }
.agent-dealer { font-size: 0.8rem; color: var(--gray); margin-top: 0.15rem; }
.agent-contact {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--navy-light);
  border: 1px solid var(--border);
  color: var(--gold-light);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  transition: background 0.2s, border-color 0.2s;
}
.contact-link:hover { background: var(--navy-mid); border-color: var(--gold); }
.contact-link svg { width: 14px; height: 14px; }

/* Hero CTA */
.hero-cta h2 { font-size: 1.5rem; font-weight: 700; line-height: 1.3; }
.hero-cta p { color: var(--gray-light); margin-top: 0.6rem; font-size: 0.95rem; line-height: 1.6; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  margin-top: 1rem;
  transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--gold-light);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid var(--gold-dim);
  border-radius: 999px;
  margin-top: 1rem;
  transition: border-color 0.2s, background 0.2s, transform 0.1s;
}
.btn-secondary:hover {
  background: var(--navy-mid);
  border-color: var(--gold);
  transform: translateY(-1px);
}

/* ── Inventory Carousel ───────────────────────────────────────────────────── */
.inventory-section {
  padding: 2.5rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}
.section-header { margin-bottom: 1.25rem; }
.section-header h2 { font-size: 1.25rem; font-weight: 700; }
.section-header p { font-size: 0.85rem; color: var(--gray); margin-top: 0.25rem; }

.carousel-wrapper { position: relative; }
.carousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }

.vehicle-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  position: relative;
}
.vehicle-card:hover { border-color: var(--gold-dim); transform: translateY(-2px); }
.vehicle-card.selected { border-color: var(--gold); background: var(--navy-light); }

.vehicle-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.6rem;
}
.vehicle-badge.new { background: rgba(201,162,39,0.2); color: var(--gold); }
.vehicle-badge.used { background: rgba(100,130,180,0.2); color: #7ab0e0; }
.vehicle-badge.cpo { background: rgba(100,200,120,0.2); color: #6dcc8a; }

.vehicle-name { font-size: 1rem; font-weight: 700; line-height: 1.2; }
.vehicle-trim { font-size: 0.8rem; color: var(--gray); margin-top: 0.15rem; }
.vehicle-price { font-size: 1.1rem; font-weight: 700; color: var(--gold); margin-top: 0.5rem; }
.vehicle-mileage { font-size: 0.78rem; color: var(--gray); margin-top: 0.15rem; }
.vehicle-color { font-size: 0.78rem; color: var(--gray-light); margin-top: 0.15rem; }

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--navy-mid);
  border: 1px solid var(--border);
  color: var(--gold);
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}
@media (min-width: 600px) { .carousel-btn { display: flex; } }
.carousel-btn:hover { background: var(--navy-light); }
.carousel-btn.prev { left: -18px; }
.carousel-btn.next { right: -18px; }
.carousel-loading { color: var(--gray); font-size: 0.9rem; padding: 1rem; }

/* ── Lead Form ────────────────────────────────────────────────────────────── */
.form-section {
  padding: 1rem 1.5rem 3rem;
  max-width: 700px;
  margin: 0 auto;
}
.form-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
}
@media (min-width: 500px) { .form-card { padding: 2.5rem 2rem; } }

.form-header { margin-bottom: 1.75rem; }
.form-header h2 { font-size: 1.4rem; font-weight: 700; }
.form-header p { color: var(--gray); margin-top: 0.4rem; font-size: 0.9rem; }

.form-group { margin-bottom: 1.25rem; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-light);
  margin-bottom: 0.5rem;
}
.req { color: var(--gold); }

input[type="text"],
input[type="tel"],
input[type="email"],
select {
  width: 100%;
  background: var(--navy-mid);
  border: 1.5px solid rgba(100,130,180,0.3);
  border-radius: var(--radius);
  color: var(--white);
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
input::placeholder { color: var(--gray); }
input:focus,
select:focus {
  outline: none;
  border-color: var(--gold);
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%238a9bb5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 18px;
  padding-right: 2.5rem;
  cursor: pointer;
}
select option { background: var(--navy-mid); }

/* Trade-in toggle */
.toggle-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.25rem; }
.toggle { cursor: pointer; }
.toggle input { display: none; }
.toggle-btn {
  display: block;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1.5px solid rgba(100,130,180,0.3);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-light);
  background: var(--navy-mid);
  transition: all 0.2s;
  user-select: none;
}
.toggle input:checked + .toggle-btn {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201,162,39,0.1);
}

/* Submit button */
.btn-submit {
  width: 100%;
  background: var(--gold);
  color: var(--navy);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 1rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.2s, transform 0.1s;
}
.btn-submit:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-submit:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

.form-disclaimer {
  font-size: 0.75rem;
  color: var(--gray);
  text-align: center;
  margin-top: 0.85rem;
  line-height: 1.5;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.consent-group {
  margin: 0.25rem 0 1rem;
  padding: 0.9rem;
  border: 1px solid rgba(100,130,180,0.3);
  border-radius: var(--radius);
  background: var(--navy-mid);
}
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.5;
}
.consent-label input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 0.1rem;
  accent-color: var(--gold);
}
.consent-group p {
  margin: 0.55rem 0 0 1.65rem;
  font-size: 0.74rem;
  color: var(--gray);
}
.consent-group a { color: var(--gold-light); text-decoration: underline; }

/* Success / Error states */
.success-msg {
  text-align: center;
  padding: 2rem 1rem;
}
.success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(201,162,39,0.15);
  border: 2px solid var(--gold);
  color: var(--gold);
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}
.success-msg h3 { font-size: 1.3rem; font-weight: 700; }
.success-msg p { color: var(--gray-light); margin-top: 0.5rem; }
.error-msg {
  background: rgba(220,50,50,0.1);
  border: 1px solid rgba(220,50,50,0.3);
  border-radius: var(--radius);
  padding: 1rem;
  color: #f87171;
  font-size: 0.9rem;
  margin-top: 1rem;
  text-align: center;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--gray);
  line-height: 2;
}
.footer a { color: var(--gold-dim); }
.footer a:hover { color: var(--gold); }
.footer-credit { margin-top: 0.5rem; font-size: 0.72rem; opacity: 0.7; }
