:root {
  --red: #d62828;
  --red-dark: #a51d1d;
  --red-contrast: #ffffff;
  --dark: #1c1c1c;
  --gray-900: #2a2a2a;
  --gray-100: #f5f5f5;
  --gray-200: #e9e9e9;
  --white: #ffffff;
  --radius: 8px;
  --max-width: 1140px;
  --font: "Segoe UI", Arial, Helvetica, sans-serif;

  /* Semantic theme tokens (light mode default) */
  --bg: #ffffff;
  --bg-alt: #f5f5f5;
  --surface: #ffffff;
  --header-bg: #ffffff;
  --text: #1c1c1c;
  --text-muted: #555555;
  --border: #e9e9e9;
}

:root[data-theme="dark"] {
  --red: #ff5c5c;
  --red-dark: #ff7f7f;
  --red-contrast: #1c1c1c;
  --bg: #121212;
  --bg-alt: #1a1a1a;
  --surface: #1e1e1e;
  --header-bg: #1a1a1a;
  --text: #f0f0f0;
  --text-muted: #b8b8b8;
  --border: #333333;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --red: #ff5c5c;
    --red-dark: #ff7f7f;
    --red-contrast: #1c1c1c;
    --bg: #121212;
    --bg-alt: #1a1a1a;
    --surface: #1e1e1e;
    --header-bg: #1a1a1a;
    --text: #f0f0f0;
    --text-muted: #b8b8b8;
    --border: #333333;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  transition: background 0.2s ease, color 0.2s ease;
}

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

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

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: var(--header-bg);
  border-bottom: 3px solid var(--red);
  z-index: 100;
  transition: background 0.2s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  gap: 16px;
}

.logo-link { display: flex; align-items: center; }
.logo-link img,
.logo-link .logo-svg { height: 48px; width: auto; }

.logo-badge { fill: #d62828; }
.logo-disc { fill: #1c1c1c; }
.logo-disc-hole { fill: #d62828; }
.logo-caliper-body { fill: #f2f2f2; stroke: #1c1c1c; stroke-width: 2; }
.logo-caliper-bolt { fill: #1c1c1c; }
.logo-text { fill: var(--text); }
.logo-text-accent { fill: var(--red); }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

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

.header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--red);
  color: var(--red-contrast);
  text-decoration: none;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn:hover { background: var(--red-dark); color: var(--red-contrast); }

.btn-icon {
  display: none;
  width: 18px;
  height: 18px;
  flex: none;
  fill: currentColor;
}

.btn-icon-visible { display: inline-block; }

.btn-outline {
  background: transparent;
  color: var(--red);
  border: 2px solid var(--red);
}

.btn-outline:hover { background: var(--red); color: var(--red-contrast); }

.phone-link {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.phone-link:hover { color: var(--red); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--text);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  padding: 0;
  flex: none;
}

.theme-toggle:hover { border-color: var(--red); color: var(--red); }

.theme-toggle svg { width: 20px; height: 20px; fill: currentColor; }

.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #1c1c1c 0%, #3a3a3a 100%);
  color: var(--white);
  padding: 70px 0;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-text { flex: 1 1 420px; }

.hero-text h1 {
  font-size: 2.4rem;
  margin: 0 0 16px;
  line-height: 1.2;
}

.hero-text h1 span { color: var(--red); }

.hero-text p {
  font-size: 1.1rem;
  color: #ddd;
  margin-bottom: 24px;
}

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

.hero-badges {
  flex: 1 1 300px;
  display: grid;
  gap: 16px;
}

.badge-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.badge-card strong {
  display: block;
  color: var(--red);
  font-size: 1.4rem;
}

/* Sections */
.section {
  padding: 60px 0;
}

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

.section-title {
  text-align: center;
  margin-bottom: 12px;
  font-size: 2rem;
  color: var(--text);
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 40px;
}

.grid {
  display: grid;
  gap: 24px;
}

.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.card .icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.card h3 {
  margin: 0 0 10px;
  color: var(--text);
}

.card p { margin: 0; color: var(--text-muted); }

/* Reviews */
.review-card {
  background: var(--surface);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stars { color: var(--red); font-size: 1.1rem; margin-bottom: 8px; }

.review-card p { font-style: italic; color: var(--text-muted); }

.review-source {
  display: block;
  margin-top: 10px;
  font-weight: 700;
  font-style: normal;
  color: var(--text);
}

.rating-summary {
  text-align: center;
  margin-bottom: 30px;
}

.rating-summary .score {
  font-size: 3rem;
  font-weight: 800;
  color: var(--red);
}

/* CTA band */
.cta-band {
  background: #d62828;
  color: #ffffff;
  text-align: center;
  padding: 50px 0;
}

.cta-band h2 { margin-top: 0; }

.cta-band .btn {
  background: #ffffff;
  color: #a51d1d;
}

.cta-band .btn:hover { background: #f0f0f0; color: #a51d1d; }

/* Info list (contact/hours) */
.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-list li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.info-list li:last-child { border-bottom: none; }

.info-list .label { font-weight: 700; min-width: 130px; }

.map-embed {
  border: 0;
  width: 100%;
  height: 360px;
  border-radius: var(--radius);
}

/* Footer */
.site-footer {
  background: #1c1c1c;
  color: #ccc;
  padding: 40px 0 20px;
}

.footer-inner {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.site-footer h4 {
  color: #ffffff;
  margin-top: 0;
}

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

.site-footer a:hover { color: #ff8080; }

.footer-bottom {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #444;
  font-size: 0.85rem;
  color: #888;
}

/* Page header (interior pages) */
.page-header {
  background: #1c1c1c;
  color: #ffffff;
  padding: 50px 0;
  text-align: center;
}

.page-header h1 { margin: 0; }
.page-header p { color: #ccc; margin-top: 10px; }

/* Service detail */
.service-block {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.service-block:last-child { border-bottom: none; }

.service-block .icon {
  font-size: 2.4rem;
  color: var(--red);
  flex: 0 0 60px;
}

.service-block .content { flex: 1 1 400px; }

.service-block h3 { margin-top: 0; }

/* Contact form (mailto based) */
.contact-form {
  display: grid;
  gap: 16px;
  max-width: 560px;
}

.contact-form label {
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}

.contact-form label { color: var(--text); }

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 1rem;
  background: var(--surface);
  color: var(--text);
}

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

.disclaimer {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Responsive nav */
@media (max-width: 860px) {
  .nav-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--header-bg);
    border-bottom: 3px solid var(--red);
  }

  .main-nav.open { display: block; }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 10px 20px 20px;
  }

  .main-nav a {
    display: block;
    padding: 12px 0;
  }

  .header-cta .btn-text { display: none; }
  .header-cta .btn-icon { display: block; }
  .header-cta .btn { padding: 10px 14px; }
}

@media (max-width: 480px) {
  .hero-text h1 { font-size: 1.8rem; }
}
