/* === KING & STRACHAN AUTOMOTIVE — Design System === */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Palette: 3 tones */
  --base: #1a1a1a;
  --base-light: #2a2a2a;
  --foreground: #f5f5f0;
  --foreground-muted: #a0a098;
  --accent: #c93c20;
  --accent-hover: #e04a2a;
  --card-bg: #222220;
  --rule: #333330;

  /* Type */
  --display: 'Bebas Neue', sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 48px;
  --space-6: 96px;

  /* Measure */
  --measure: 65ch;
}

@media (prefers-color-scheme: light) {
  :root {
    --base: #f5f5f0;
    --base-light: #e8e8e0;
    --foreground: #1a1a1a;
    --foreground-muted: #6b6b63;
    --accent: #c93c20;
    --accent-hover: #b03218;
    --card-bg: #ffffff;
    --rule: #d4d4cc;
  }
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  padding: 0;
  font-family: var(--body);
  background: var(--base);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--accent-hover); }

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

/* === Hero === */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--space-5) var(--space-3);
  position: relative;
  background: var(--base);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(201,60,32,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-name {
  font-family: var(--display);
  font-size: clamp(3rem, 12vw, 10rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--foreground);
  text-transform: uppercase;
}

.hero-tagline {
  font-family: var(--body);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 400;
  color: var(--foreground-muted);
  margin: var(--space-3) 0 var(--space-5);
  max-width: 40ch;
  line-height: 1.5;
}

.hero-phone {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  letter-spacing: 0.04em;
  color: var(--accent);
  background: transparent;
  border: 2px solid var(--accent);
  padding: var(--space-2) var(--space-4);
  text-decoration: none;
  transition: all 0.25s ease;
  line-height: 1;
}

.hero-phone:hover {
  background: var(--accent);
  color: var(--foreground);
}

.hero-address {
  margin-top: var(--space-4);
  font-size: 0.9rem;
  color: var(--foreground-muted);
  letter-spacing: 0.03em;
}

/* === Section base === */
.section {
  padding: var(--space-6) var(--space-3);
  max-width: var(--measure);
  margin: 0 auto;
}

.section-wide {
  max-width: 1200px;
}

.section-label {
  font-family: var(--display);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--space-2);
}

.section-title {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
  margin: 0 0 var(--space-5);
  text-transform: uppercase;
  color: var(--foreground);
}

/* === Reviews (social proof, top-half placement) === */
.reviews-section {
  background: var(--base-light);
}

.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .reviews-grid {
    grid-template-columns: 1fr 1fr;
  }
  .reviews-grid .review-card:last-child {
    grid-column: 1 / -1;
    max-width: 600px;
    justify-self: center;
  }
}

.review-card {
  background: var(--card-bg);
  padding: var(--space-4);
  border-left: 3px solid var(--accent);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.review-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.review-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--foreground);
  margin: 0;
  quotes: "“" "”" "‘" "’";
}

.review-text::before { content: "“"; }
.review-text::after { content: "”"; }

.review-author {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0;
}

.review-stars {
  color: var(--accent);
  font-size: 1rem;
  letter-spacing: 0.1em;
}

/* === Services === */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.service-card {
  background: var(--card-bg);
  padding: var(--space-4);
  border: 1px solid var(--rule);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.service-card h3 {
  font-family: var(--display);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  margin: 0 0 var(--space-2);
  text-transform: uppercase;
  color: var(--foreground);
}

.service-card p {
  font-size: 0.9rem;
  color: var(--foreground-muted);
  margin: 0;
  line-height: 1.5;
}

/* === Gallery === */
.gallery-section {
  padding: 0;
  max-width: 100%;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}

.gallery-grid img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: grayscale(0.3);
}

.gallery-grid img:hover {
  transform: scale(1.03);
  filter: grayscale(0);
  z-index: 2;
  position: relative;
}

/* === Hours === */
.hours-table {
  width: 100%;
  max-width: 480px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.hours-table tr {
  border-bottom: 1px solid var(--rule);
}

.hours-table td {
  padding: var(--space-2) 0;
}

.hours-table td:last-child {
  text-align: right;
  font-weight: 500;
  color: var(--foreground-muted);
}

.hours-table .today td {
  color: var(--accent);
  font-weight: 600;
}

/* === Contact Form === */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 520px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--foreground-muted);
}

.contact-form input,
.contact-form textarea {
  font-family: var(--body);
  font-size: 1rem;
  padding: var(--space-2) var(--space-3);
  background: var(--card-bg);
  border: 1px solid var(--rule);
  color: var(--foreground);
  transition: border-color 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.btn-primary {
  font-family: var(--display);
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--space-3) var(--space-5);
  background: var(--accent);
  color: var(--foreground);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  align-self: flex-start;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.form-status {
  font-size: 0.9rem;
  margin: 0;
  min-height: 1.5em;
}

.form-status.success { color: var(--accent); }
.form-status.error { color: var(--accent); }

/* === Footer === */
.site-footer {
  padding: var(--space-5) var(--space-3) var(--space-4);
  border-top: 1px solid var(--rule);
  text-align: center;
  font-size: 0.85rem;
  color: var(--foreground-muted);
}

.site-footer .footer-address {
  margin-bottom: var(--space-2);
  line-height: 1.5;
}

.site-footer .attribution {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-top: var(--space-3);
}

.site-footer .attribution a {
  color: var(--foreground-muted);
}

/* === Responsive === */
@media (max-width: 480px) {
  .hero {
    min-height: 90vh;
    padding: var(--space-4) var(--space-3);
  }
  .section {
    padding: var(--space-5) var(--space-3);
  }
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
  .gallery-grid img {
    height: 180px;
  }
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
