/* ==========================================================================
   Main Street Auto — Stylesheet
   Plain CSS, mobile-first. Edit the variables below to re-theme the site.
   ========================================================================== */

:root {
  --color-primary: #1f2a37;      /* deep slate — header, footer, headings */
  --color-primary-light: #2d3b4d;
  --color-accent: #d9480f;       /* safety orange — buttons, highlights */
  --color-accent-dark: #b33a0a;
  --color-text: #2b2f36;
  --color-muted: #5f6773;
  --color-bg: #ffffff;
  --color-bg-alt: #f3f4f6;
  --color-border: #dfe2e6;
  --color-placeholder: #c9cdd2;
  --color-placeholder-text: #6b7280;

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

  --radius: 8px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --max-width: 1140px;
  --header-height: 68px;
}

/* ---------- Reset / base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  /* room for the fixed mobile call bar */
  padding-bottom: 64px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 6vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.25rem); }
h3 { font-size: 1.25rem; }

p {
  margin: 0 0 1em;
}

a {
  color: var(--color-accent);
}

a:hover {
  color: var(--color-accent-dark);
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 8px 16px;
  z-index: 1000;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: #fff;
}

.btn-outline:hover {
  background: #fff;
  color: var(--color-primary);
}

.btn-dark-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-dark-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

.btn-icon {
  width: 1.1em;
  height: 1.1em;
  fill: currentColor;
  flex-shrink: 0;
}

/* ---------- Header / navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}

.logo:hover {
  color: #fff;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-accent);
  font-size: 0.95rem;
}

.logo span.logo-accent {
  color: var(--color-accent);
}

/* CSS-only mobile menu toggle (hidden checkbox + label) */
.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  cursor: pointer;
  border-radius: var(--radius);
}

.nav-toggle:focus-visible + .nav-toggle-label {
  outline: 3px solid var(--color-accent);
}

.nav-toggle-label span {
  display: block;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle:checked + .nav-toggle-label span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle:checked + .nav-toggle-label span:nth-child(2) {
  opacity: 0;
}

.nav-toggle:checked + .nav-toggle-label span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.main-nav {
  display: none;
  width: 100%;
  padding-bottom: 16px;
}

.nav-toggle:checked ~ .main-nav {
  display: block;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  display: block;
  padding: 12px 4px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid var(--color-primary-light);
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--color-accent);
}

.header-call {
  display: none;
}

/* ---------- Mobile sticky call bar ---------- */

.mobile-call-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  display: flex;
  gap: 1px;
  background: var(--color-primary);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
}

.mobile-call-bar a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
}

.mobile-call-bar .call {
  background: var(--color-accent);
}

.mobile-call-bar .directions {
  background: var(--color-primary-light);
}

/* ---------- Image placeholders ----------
   To swap in a real photo, replace the placeholder <div> with:
   <img src="images/your-photo.jpg" alt="Describe the photo" class="photo">
   ---------------------------------------------------------------- */

.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--color-placeholder);
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 14px,
    rgba(255, 255, 255, 0.18) 14px,
    rgba(255, 255, 255, 0.18) 28px
  );
  color: var(--color-placeholder-text);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  padding: 16px;
  border-radius: var(--radius);
}

.img-placeholder.wide { aspect-ratio: 16 / 9; }
.img-placeholder.square { aspect-ratio: 1 / 1; }

.photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--color-primary);
  color: #fff;
  /* Swap for a real photo: background-image: linear-gradient(rgba(31,42,55,.75), rgba(31,42,55,.75)), url("../images/hero.jpg"); */
  background-image:
    linear-gradient(rgba(31, 42, 55, 0.88), rgba(31, 42, 55, 0.88)),
    repeating-linear-gradient(45deg, #4b5563, #4b5563 20px, #6b7280 20px, #6b7280 40px);
  background-size: cover;
  background-position: center;
  padding: 72px 0 80px;
}

.hero h1 {
  color: #fff;
  max-width: 14ch;
}

.hero .lead {
  font-size: 1.15rem;
  max-width: 36rem;
  color: #e5e7eb;
  margin-bottom: 1.75em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.page-hero {
  background: var(--color-primary);
  color: #e5e7eb;
  padding: 56px 0;
}

.page-hero h1 {
  color: #fff;
  margin-bottom: 0.3em;
}

.page-hero p {
  max-width: 40rem;
  margin: 0;
  font-size: 1.1rem;
}

/* ---------- Trust strip ---------- */

.trust-strip {
  background: var(--color-accent);
  color: #fff;
  padding: 18px 0;
}

.trust-strip ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
  font-weight: 700;
  font-size: 0.95rem;
}

.trust-strip li::before {
  content: "\2713\00a0";
}

/* ---------- Sections ---------- */

.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-header {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 40px;
}

.section-header p {
  color: var(--color-muted);
}

/* ---------- Cards / grids ---------- */

.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card .img-placeholder,
.card .photo {
  border-radius: 0;
}

.card-body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body p {
  color: var(--color-muted);
}

.card-body .card-link {
  margin-top: auto;
  font-weight: 700;
  text-decoration: none;
}

.card-body .card-link::after {
  content: " \2192";
}

/* ---------- Split (image + text) ---------- */

.split {
  display: grid;
  gap: 32px;
  align-items: center;
  grid-template-columns: 1fr;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5em;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
}

.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-accent);
  font-weight: 800;
}

/* ---------- Service detail blocks ---------- */

.service-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.service-nav a {
  padding: 8px 18px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-bg);
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.service-nav a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.service-detail {
  scroll-margin-top: calc(var(--header-height) + 16px);
}

.service-detail + .service-detail {
  border-top: 1px solid var(--color-border);
}

.price-tag {
  display: inline-block;
  margin-bottom: 1em;
  padding: 4px 12px;
  border-radius: 999px;
  background: #fde8dd;
  color: var(--color-accent-dark);
  font-weight: 700;
  font-size: 0.9rem;
}

/* ---------- Testimonials ---------- */

.testimonial {
  margin: 0;
  padding: 24px;
  background: var(--color-bg);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.testimonial p {
  font-style: italic;
}

.testimonial cite {
  font-style: normal;
  font-weight: 700;
  color: var(--color-primary);
}

.stars {
  color: #f59f00;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1.1;
}

.stat-label {
  color: var(--color-muted);
  font-weight: 600;
}

/* ---------- CTA banner ---------- */

.cta-banner {
  background: var(--color-primary);
  color: #e5e7eb;
  text-align: center;
  padding: 56px 0;
}

.cta-banner h2 {
  color: #fff;
}

.cta-banner .hero-actions {
  justify-content: center;
}

/* ---------- Info blocks (hours, address) ---------- */

.info-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.info-card h3 {
  margin-bottom: 0.75em;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
}

.hours-table th,
.hours-table td {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

.hours-table td {
  text-align: right;
}

.hours-table tr:last-child th,
.hours-table tr:last-child td {
  border-bottom: 0;
}

address {
  font-style: normal;
}

/* ---------- Contact form ---------- */

.contact-form {
  display: grid;
  gap: 18px;
}

.form-row {
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--color-primary);
}

.form-group .required {
  color: var(--color-accent);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  color: var(--color-text);
  background: #fff;
  border: 1px solid #b8bec6;
  border-radius: var(--radius);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(217, 72, 15, 0.2);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin: 0;
}

.map-placeholder {
  aspect-ratio: 16 / 10;
}

/* ---------- Footer ---------- */

.site-footer {
  background: #151d27;
  color: #c4c9d0;
  padding: 48px 0 24px;
  font-size: 0.95rem;
}

.site-footer h4 {
  color: #fff;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1em;
}

.site-footer a {
  color: #c4c9d0;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--color-accent);
}

.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid li {
  margin-bottom: 6px;
}

.footer-hours {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  margin: 0;
}

.footer-hours dt {
  font-weight: 600;
  color: #fff;
}

.footer-hours dd {
  margin: 0;
}

.footer-phone {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff !important;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #2a3442;
  text-align: center;
  font-size: 0.85rem;
  color: #8a93a0;
}

/* ==========================================================================
   Tablet (≥ 640px)
   ========================================================================== */

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

  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .trust-strip ul {
    grid-template-columns: repeat(4, auto);
    justify-content: center;
  }
}

/* ==========================================================================
   Desktop (≥ 900px)
   ========================================================================== */

@media (min-width: 900px) {
  body {
    padding-bottom: 0;
  }

  .mobile-call-bar {
    display: none;
  }

  .header-inner {
    flex-wrap: nowrap;
    gap: 24px;
  }

  .nav-toggle-label {
    display: none;
  }

  .main-nav {
    display: block;
    width: auto;
    padding: 0;
    margin-left: auto;
  }

  .main-nav ul {
    display: flex;
    gap: 8px;
  }

  .main-nav a {
    padding: 8px 12px;
    border-bottom: 0;
  }

  .header-call {
    display: inline-flex;
    padding: 10px 18px;
  }

  .hero {
    padding: 112px 0 120px;
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .split {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
  }

  .split.reverse > :first-child {
    order: 2;
  }

  .contact-layout {
    grid-template-columns: 3fr 2fr;
    align-items: start;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  }

  .section {
    padding: 88px 0;
  }
}
