/* Grand Motors LLC — public site styles.
   Palette: warm cream #f5f3ee, red #d8342a, black #141414. */

:root {
  --cream: #f5f3ee;
  --red: #d8342a;
  --red-dark: #b3271f;
  --black: #141414;
  --gray: #5c5a55;
  --line: #e3ded4;
  --white: #ffffff;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 92px; }
.file-picker { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.4rem; }
.file-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.file-name { color: var(--gray); font-size: 0.9rem; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--cream);
  color: var(--black);
  line-height: 1.55;
}
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 0.5rem; }
p { margin: 0 0 1rem; }
a { color: inherit; }
img { max-width: 100%; display: block; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 243, 238, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.header-inner {
  max-width: 1120px; margin: 0 auto; padding: 0.75rem 1.25rem;
  display: flex; align-items: center; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; background: var(--red); color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
  transform: skewX(-7deg); border-radius: 6px; flex: none;
}
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; }
.brand-llc { font-weight: 400; font-size: 0.85rem; color: var(--gray); }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 1.25rem; }
.site-nav a { text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.site-nav a:hover { color: var(--red); }
.call-btn {
  background: var(--black); color: #fff !important; padding: 0.55rem 1rem;
  border-radius: 999px; font-size: 0.9rem !important; white-space: nowrap;
}
.call-btn:hover { background: var(--red); }

.hamburger {
  display: none; margin-left: auto; background: none; border: 0; cursor: pointer;
  padding: 0.5rem; flex-direction: column; gap: 5px;
}
.hamburger span { display: block; width: 24px; height: 2.5px; background: var(--black); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { padding: 3.5rem 1.25rem 3rem; }
.hero-inner {
  max-width: 760px; margin: 0 auto;
}
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem;
  font-weight: 700; color: var(--red); margin-bottom: 0.75rem;
}
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-weight: 800; }
.hero-sub { font-size: 1.1rem; color: var(--gray); max-width: 34rem; }
.hero-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.25rem; }

.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: 0.8rem 1.5rem; border-radius: 10px; border: 2px solid transparent;
  cursor: pointer; font-size: 1rem; text-align: center;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-outline { border-color: var(--black); color: var(--black); background: transparent; }
.btn-outline:hover { background: var(--black); color: #fff; }
.btn-big { width: 100%; padding: 1rem; font-size: 1.1rem; }

/* ---------- Trust strip ---------- */
.trust-strip {
  background: var(--black); color: #fff; text-align: center;
  padding: 1rem 1.25rem; display: flex; justify-content: center; align-items: center;
  gap: 1.5rem; flex-wrap: wrap; font-weight: 600;
}
.trust-strip i { color: var(--red); font-style: normal; font-size: 0.7rem; }
.trust-item { white-space: nowrap; }
.trust-item i { margin-right: 0.5rem; }

/* ---------- Sections ---------- */
.section { max-width: 1120px; margin: 0 auto; padding: 3.5rem 1.25rem; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); max-width: none; }
.section-alt > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: 2rem; }
.section-head h2 { font-size: 2.2rem; }
.section-sub { color: var(--gray); max-width: 40rem; }

/* ---------- Vehicle cards ---------- */
.vehicle-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.vehicle-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 6px 18px rgba(20, 20, 20, 0.05);
}
.vehicle-photo { aspect-ratio: 16 / 10; background: #e9e4d8; overflow: hidden; }
.vehicle-photo img { width: 100%; height: 100%; object-fit: cover; }
.vehicle-photo .no-photo {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--gray); font-weight: 600; font-size: 0.9rem;
}
.vehicle-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.vehicle-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; margin: 0; }
.vehicle-price { font-size: 1.5rem; font-weight: 800; color: var(--red); margin: 0; }
.vehicle-meta { color: var(--gray); font-size: 0.95rem; margin: 0; }
.vehicle-desc { font-size: 0.95rem; color: var(--gray); white-space: pre-line; margin: 0.5rem 0 0; }
.vehicle-actions { display: flex; gap: 0.6rem; margin-top: auto; padding-top: 1rem; }
.vehicle-actions .btn { flex: 1; padding: 0.65rem; font-size: 0.95rem; }

.empty-lot {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2.5rem; text-align: center;
}
.empty-lot h3 { font-size: 1.6rem; }
.empty-lot p { color: var(--gray); max-width: 32rem; margin: 0 auto 1.5rem; }
.empty-lot-buttons { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Steps + forms ---------- */
.steps {
  list-style: none; margin: 0 auto 2rem; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
}
.steps li {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; display: flex; gap: 0.9rem; align-items: flex-start;
}
.step-num {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--red); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.steps strong { display: block; margin-bottom: 0.15rem; }
.steps span span { color: var(--gray); font-size: 0.92rem; }

.form-card {
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem;
}
.form-card h3 { margin-bottom: 1.25rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
.form-grid .span-2 { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 600; font-size: 0.92rem; }
input, textarea, select {
  font: inherit; font-weight: 400; padding: 0.7rem 0.85rem;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--red); border-color: var(--red); }
.form-note { margin: 0.9rem 0 0; font-weight: 600; min-height: 1.4em; }
.form-note.ok { color: #1c7a2e; }
.form-note.err { color: var(--red-dark); }

.section-dark { background: var(--black); color: #fff; max-width: none; }
.section-dark > * { max-width: 1120px; margin-left: auto; margin-right: auto; }
.eyebrow-light { color: #ff8a80; }
.contact-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start;
  padding: 3.5rem 1.25rem;
}
.contact-inner h2 { font-size: 2.2rem; }
.contact-person { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; }
.avatar {
  width: 58px; height: 58px; border-radius: 50%; background: var(--red); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; flex: none;
}
.contact-name { font-weight: 800; font-size: 1.15rem; margin: 0; }
.contact-role { color: #b9b4a9; margin: 0; font-size: 0.95rem; }
.contact-email { display: block; margin-top: 0.9rem; color: #ff8a80; font-weight: 600; word-break: break-all; }
.contact-extra { color: #b9b4a9; margin-top: 1rem; white-space: pre-line; }
.form-dark { background: #1f1e1c; border-color: #33312d; }
.form-dark h3 { color: #fff; }
.form-dark label { color: #e8e4da; }
.form-dark input, .form-dark textarea { background: #2a2926; border-color: #44413a; color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--black); color: #cfc9bc; border-top: 1px solid #2a2926; }
.footer-inner {
  max-width: 1120px; margin: 0 auto; padding: 2.5rem 1.25rem;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem;
}
.footer-brand { display: flex; gap: 0.8rem; align-items: flex-start; }
.footer-name { color: #fff; font-weight: 800; font-family: var(--font-display); margin: 0 0 0.2rem; }
.footer-tagline { margin: 0; font-size: 0.95rem; }
.footer-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: #fff; }
.footer-contact p { margin: 0 0 0.4rem; color: #fff; font-weight: 700; }
.footer-contact a { display: block; text-decoration: none; margin-bottom: 0.3rem; }
.footer-contact a:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .hamburger { display: flex; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; padding: 0.75rem 1.25rem 1.25rem; gap: 0.25rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .site-nav a.call-btn { border: 0; text-align: center; margin-top: 0.5rem; }
  .site-header { position: sticky; }
  .header-inner { position: relative; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ---------- photo lightbox gallery ---------- */
.vehicle-photo { position: relative; }
.photo-count {
  position: absolute; right: 0.6rem; bottom: 0.6rem;
  background: rgba(20, 20, 20, 0.75); color: #fff;
  border: 0; border-radius: 999px; padding: 0.3rem 0.75rem;
  font-size: 0.8rem; font-weight: 700; cursor: pointer;
}
.photo-count:hover { background: var(--red); }
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10, 10, 10, 0.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox-stage {
  flex: 1; width: 100%; display: flex; align-items: center; justify-content: center;
  padding: 3.5rem 3.5rem 0.5rem; min-height: 0;
}
.lightbox-img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: 8px; user-select: none; -webkit-user-select: none;
}
.lightbox-counter {
  position: absolute; top: 1rem; left: 50%; transform: translateX(-50%);
  color: #fff; font-weight: 700; font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.12); padding: 0.3rem 0.9rem; border-radius: 999px;
}
.lightbox-close {
  position: absolute; top: 0.7rem; right: 1rem;
  background: none; border: 0; color: #fff;
  font-size: 2.2rem; line-height: 1; cursor: pointer; padding: 0.25rem 0.5rem;
}
.lightbox-close:hover { color: var(--red); }
.lightbox-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12); border: 0; color: #fff;
  font-size: 2rem; line-height: 1; cursor: pointer;
  width: 3rem; height: 3rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-arrow:hover { background: var(--red); }
.lightbox-prev { left: 0.75rem; }
.lightbox-next { right: 0.75rem; }
.lightbox-thumbs {
  display: flex; gap: 0.5rem; padding: 0.75rem 1rem 1.25rem;
  max-width: 100%; overflow-x: auto;
}
.lightbox-thumb {
  width: 64px; height: 48px; object-fit: cover; border-radius: 6px;
  cursor: pointer; opacity: 0.55; border: 2px solid transparent; flex-shrink: 0;
}
.lightbox-thumb.active { opacity: 1; border-color: var(--red); }
@media (max-width: 640px) {
  .lightbox-stage { padding: 3.5rem 0.5rem 0.5rem; }
  .lightbox-arrow { width: 2.5rem; height: 2.5rem; font-size: 1.6rem; }
  .lightbox-prev { left: 0.35rem; }
  .lightbox-next { right: 0.35rem; }
}

/* ---------- card photo arrows ---------- */
.card-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(20, 20, 20, 0.55); border: 0; color: #fff;
  font-size: 1.4rem; line-height: 1; cursor: pointer;
  width: 2rem; height: 2rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s;
}
.vehicle-photo:hover .card-arrow { opacity: 1; }
.card-arrow:hover { background: var(--red); }
.card-prev { left: 0.5rem; }
.card-next { right: 0.5rem; }
@media (hover: none) {
  .card-arrow { opacity: 1; }
}

/* ---------- 360° spin viewer ---------- */
.spin-badge {
  position: absolute; left: 0.6rem; bottom: 0.6rem;
  background: var(--red); color: #fff;
  border: 0; border-radius: 999px; padding: 0.3rem 0.75rem;
  font-size: 0.8rem; font-weight: 800; cursor: pointer;
  letter-spacing: 0.03em;
}
.spin-badge:hover { background: var(--red-dark); }
.spin-viewer {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10, 10, 10, 0.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.spin-stage {
  flex: 1; width: 100%; display: flex; align-items: center; justify-content: center;
  padding: 3.5rem 1rem 1rem; min-height: 0; cursor: grab; touch-action: pan-y;
}
.spin-img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: 8px; user-select: none; -webkit-user-select: none;
  pointer-events: none;
}
.spin-hint {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: #fff; font-weight: 700; font-size: 1rem;
  background: rgba(255, 255, 255, 0.14); padding: 0.6rem 1.2rem; border-radius: 999px;
  pointer-events: none; transition: opacity 0.4s;
}
