/* ==========================================================================
   DS Car Sales LLC — landing page styles
   Plain CSS. No build step, no external fonts, no JavaScript.
   Order: tokens → reset → primitives → header → sections → footer → responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Surfaces */
  --bg:            #0B0B0D;
  --bg-alt:        #101014;
  --surface:       #16161A;
  --surface-hover: #1D1D23;
  --border:        #26262C;

  /* Accents */
  --accent:        #E01F2D;
  --accent-hover:  #F5303E;
  --accent-2:       #F5A524;
  --accent-2-hover: #FFB93D;

  /* Text — both verified for WCAG AA against --bg and --surface */
  --text:          #F5F5F7;
  --text-muted:    #A0A0AB;
  --text-on-accent:#FFFFFF;

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-24: 6rem;

  /* Type scale */
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-lg:   1.125rem;
  --fs-xl:   1.375rem;
  --fs-2xl:  1.75rem;
  --fs-3xl:  2.25rem;
  --fs-hero: clamp(2.25rem, 6vw, 4.25rem);

  --radius:    10px;
  --radius-lg: 16px;

  --container: 1140px;
  --header-h:  68px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --transition: 160ms ease;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Keeps anchored sections clear of the sticky header */
  scroll-padding-top: calc(var(--header-h) + var(--sp-4));
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; }
p  { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a  { color: inherit; text-decoration: none; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: var(--sp-3) var(--sp-4);
  background: var(--accent);
  color: var(--text-on-accent);
  font-weight: 700;
}
.skip-link:focus { left: var(--sp-4); top: var(--sp-4); }

/* --------------------------------------------------------------------------
   3. Layout primitives
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

.section { padding-block: var(--sp-16); }
.section-alt { background: var(--bg-alt); }

.eyebrow {
  color: var(--accent-2);
  font-size: var(--fs-sm);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}

.section-title {
  font-size: var(--fs-3xl);
  margin-bottom: var(--sp-4);
}

/* Short red rule under every section heading */
.section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin-top: var(--sp-4);
  background: var(--accent);
  border-radius: 2px;
}

.section-lead {
  color: var(--text-muted);
  font-size: var(--fs-lg);
  max-width: 62ch;
  margin-bottom: var(--sp-12);
}

.note { color: var(--text); font-weight: 700; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
}

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-3) var(--sp-6);
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: var(--fs-base);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-align: center;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), transform var(--transition);
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--accent); color: var(--text-on-accent); }
.btn-primary:hover { background: var(--accent-hover); }

.btn-accent2 { background: var(--accent-2); color: var(--text-on-accent); }
.btn-accent2:hover { background: var(--accent-2-hover); }

.btn-outline { border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost {
  border-color: var(--accent-2);
  color: var(--accent-2);
  background: rgba(0, 0, 0, 0.35);
}
.btn-ghost:hover { border-color: var(--accent-2); color: var(--text); background: rgba(0, 0, 0, 0.6); }

.btn-sm { padding: var(--sp-2) var(--sp-4); font-size: var(--fs-sm); }
.btn-lg { padding: var(--sp-4) var(--sp-8); font-size: var(--fs-lg); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

/* --------------------------------------------------------------------------
   5. Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 11, 13, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: var(--header-h);
}

.wordmark {
  font-size: var(--fs-lg);
  font-weight: 900;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.wordmark-accent { color: var(--accent); }
.wordmark-llc {
  color: var(--text-muted);
  font-size: 0.6em;
  font-weight: 700;
  letter-spacing: 0.12em;
  vertical-align: super;
  margin-left: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  font-size: var(--fs-sm);
  font-weight: 700;
}
.site-nav > a:not(.btn) { color: var(--text-muted); transition: color var(--transition); }
.site-nav > a:not(.btn):hover { color: var(--text); }

/* CSS-only mobile menu toggle. The checkbox is the state; the label is the
   button; the general sibling selector reveals the nav. No JavaScript. */
.nav-toggle { display: none; }

.nav-toggle-label {
  display: none;
  width: 44px;
  height: 44px;
  cursor: pointer;
  position: relative;
}

/* Hamburger: one real bar, two pseudo-element bars */
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  position: absolute;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle-bar { top: 50%; left: 10px; transform: translateY(-50%); }
.nav-toggle-bar::before { content: ""; left: 0; transform: translateY(-8px); }
.nav-toggle-bar::after  { content: ""; left: 0; transform: translateY(8px); }

/* Open state → hamburger becomes an X */
.nav-toggle:checked + .nav-toggle-label .nav-toggle-bar { background: transparent; }
.nav-toggle:checked + .nav-toggle-label .nav-toggle-bar::before { transform: rotate(45deg); }
.nav-toggle:checked + .nav-toggle-label .nav-toggle-bar::after  { transform: rotate(-45deg); }

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: min(78vh, 720px);
  padding-block: var(--sp-24) var(--sp-16);
  /* Scrim first, photo second — keeps the headline readable over a busy shot */
  background-image:
    linear-gradient(180deg, rgba(11,11,13,0.72) 0%, rgba(11,11,13,0.82) 55%, rgba(11,11,13,0.97) 100%),
    url("../assets/main.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-inner { max-width: 46rem; }

.hero-title {
  font-size: var(--fs-hero);
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  margin-bottom: var(--sp-6);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}
.hero-title-accent { color: var(--accent); }

.hero-sub {
  font-size: var(--fs-lg);
  color: #D6D6DE;
  max-width: 46ch;
  margin-bottom: var(--sp-8);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.7);
}

/* --------------------------------------------------------------------------
   7. Steps (sell your car)
   -------------------------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  margin-bottom: var(--sp-12);
}

.step { position: relative; }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: var(--sp-4);
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-on-accent);
  font-size: var(--fs-xl);
  font-weight: 900;
}

.step-title { font-size: var(--fs-xl); margin-bottom: var(--sp-3); }
.step p { color: var(--text-muted); }

/* CTA panel */
.cta-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  padding: var(--sp-8);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(224, 31, 45, 0.16), rgba(22, 22, 26, 0.9));
}
.cta-panel-title { font-size: var(--fs-2xl); margin-bottom: var(--sp-2); }
.cta-panel-sub { color: var(--text-muted); }

/* --------------------------------------------------------------------------
   8. Gallery
   -------------------------------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  margin-bottom: var(--sp-12);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

/* Fixed aspect ratio + cover: keeps the one portrait photo (the 4Runner)
   the same height as its landscape neighbours instead of blowing out the row. */
.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  transition: transform 300ms ease;
}
.gallery-item:hover img { transform: scale(1.05); }

.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--sp-6) var(--sp-4) var(--sp-3);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.88));
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* Coming-soon panel */
.soon-panel {
  padding: var(--sp-8);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.soon-label {
  color: var(--accent-2);
  font-size: var(--fs-sm);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}
.soon-title { font-size: var(--fs-2xl); margin-bottom: var(--sp-3); }
.soon-sub {
  color: var(--text-muted);
  max-width: 54ch;
  margin: 0 auto var(--sp-6);
}
/* Not a link yet — looks disabled and isn't clickable */
.soon { opacity: 0.6; cursor: default; }
.soon:hover { transform: none; border-color: var(--border); color: var(--text); }

/* --------------------------------------------------------------------------
   9. Features (why us)
   -------------------------------------------------------------------------- */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}

.feature { border-top: 3px solid var(--accent); }
.feature-title { font-size: var(--fs-xl); margin-bottom: var(--sp-3); }
.feature p { color: var(--text-muted); }

/* --------------------------------------------------------------------------
   10. Contact
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}

.contact-item dt {
  color: var(--accent-2);
  font-size: var(--fs-sm);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}
.contact-item dd {
  /* Sized so a full email address fits one line in a 4-up card.
     overflow-wrap (not word-break) only splits a word when it truly can't fit. */
  font-size: var(--fs-base);
  font-weight: 700;
  overflow-wrap: break-word;
}
.contact-link { border-bottom: 2px solid var(--accent); transition: color var(--transition); }
.contact-link:hover { color: var(--accent); }

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--sp-12);
  text-align: center;
}
.footer-brand {
  font-size: var(--fs-lg);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.footer-tag { color: var(--text-muted); margin-bottom: var(--sp-4); }
.footer-contact { font-weight: 700; margin-bottom: var(--sp-4); }
.footer-contact a { border-bottom: 2px solid var(--accent); }
.footer-sep { color: var(--text-muted); margin-inline: var(--sp-2); }
.footer-legal { color: var(--text-muted); font-size: var(--fs-sm); }

/* --------------------------------------------------------------------------
   12. Responsive
   -------------------------------------------------------------------------- */

/* Mobile nav: below 900px the links collapse behind the hamburger */
@media (max-width: 899px) {
  .nav-toggle-label { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--sp-4);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    font-size: var(--fs-base);
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }

  .site-nav > a:not(.btn) {
    padding: var(--sp-3) var(--sp-2);
    border-bottom: 1px solid var(--border);
  }
  .site-nav > .btn { margin-top: var(--sp-4); }

  .header-inner { position: relative; }
}

@media (min-width: 640px) {
  .features, .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .section { padding-block: var(--sp-24); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .section-title { font-size: 2.75rem; }
}

/* Respect users who ask for less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn:hover, .gallery-item:hover img { transform: none; }
}
