/* T’s Auto Repair
   Plain CSS, no JavaScript. Light by default; switches to dark
   automatically when the visitor’s device is set to dark mode. */

/* Fonts: Archivo by Omnibus-Type, SIL Open Font License (licenses/archivo-OFL.txt) */
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Archivo Expanded";
  src: url("fonts/archivo-expanded-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Colors ---------- */

:root {
  color-scheme: light dark;

  /* Light (default) */
  --bg: #ffffff;
  --text: #0f2340;
  --muted: #4a5d7c;
  --accent: #1f4f8f;
  --hero-bg: #e4eef8;
  --hero-line: rgba(15, 35, 64, 0.16);
  --line: #d6e0eb;
  --dash: #a3b5cc;
  --ghost-hover: rgba(15, 35, 64, 0.07);
  --call: #f3b63f;
  --call-hover: #f8c862;
  --on-call: #0f2340;
  --band-bg: #0f2340;
  --band-text: #ffffff;
  --band-muted: #b7c6da;
  --band-line: #2a3e5f;
  --band-accent: #a9c8f0;
  --focus: #1f4f8f;

  --pad: clamp(20px, 5vw, 40px);
  --max: 1200px;
  --font-body: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Archivo Expanded", "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1524;
    --text: #e6edf6;
    --muted: #a5b5ca;
    --accent: #8fb8ec;
    --hero-bg: #12223a;
    --hero-line: rgba(230, 237, 246, 0.16);
    --line: #22344e;
    --dash: #41587a;
    --ghost-hover: rgba(230, 237, 246, 0.08);
    --band-bg: #12223a;
    --band-text: #e6edf6;
    --band-muted: #a5b5ca;
    --band-line: #2a3d5c;
    --band-accent: #8fb8ec;
    --focus: #8fb8ec;
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
}

h1,
h2,
p,
ul,
dl,
dd {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

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

::selection {
  background: var(--call);
  color: var(--on-call);
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.icon {
  display: block;
  flex: none;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nowrap {
  white-space: nowrap;
}

.muted {
  color: var(--muted);
}

h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.375rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin-bottom: clamp(16px, 2.5vw, 28px);
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-decoration: none;
}

.btn .icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.btn-call {
  background: var(--call);
  color: var(--on-call);
}

.btn-call:hover {
  background: var(--call-hover);
}

.btn-ghost {
  border-color: currentColor;
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--ghost-hover);
}

@media (max-width: 559px) {
  .actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .btn {
    transition: background-color 0.15s ease;
  }
}

/* ---------- Two-column block (hero and contact) ---------- */

.split {
  display: grid;
  gap: 32px;
}

.facts {
  display: grid;
  gap: 18px;
}

.facts li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.facts .icon {
  color: var(--accent);
  margin-top: 1px;
}

@media (min-width: 880px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
  }

  .split > .facts {
    border-left: 1px solid var(--divider);
    padding-left: 40px;
  }
}

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

.hero {
  --divider: var(--hero-line);
  background: var(--hero-bg);
  padding: clamp(44px, 8vw, 96px) 0 clamp(44px, 7vw, 80px);
}

/* The name is set as wide as the page: two lines on phones, one line from 720px up. */
.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: min(calc((100vw - 2 * var(--pad)) / 5.3), 96px);
  line-height: 0.95;
  letter-spacing: -0.015em;
  margin-bottom: clamp(28px, 5vw, 56px);
}

.wordmark span {
  display: block;
}

@media (min-width: 720px) {
  .wordmark {
    font-size: calc((min(100vw, var(--max)) - 2 * var(--pad)) / 9.5);
  }

  .wordmark span {
    display: inline;
  }
}

.lead {
  font-size: clamp(1.1875rem, 1rem + 0.6vw, 1.4375rem);
  line-height: 1.4;
  text-wrap: balance;
  margin-bottom: 24px;
}

/* ---------- Services ---------- */

.services {
  padding: clamp(56px, 9vw, 112px) 0;
}

.services-grid {
  display: grid;
  gap: 56px;
}

@media (min-width: 1000px) {
  .services-grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 64px;
    align-items: start;
  }
}

.service-list {
  display: grid;
  column-gap: 32px;
}

@media (min-width: 600px) {
  .service-list {
    grid-template-columns: 1fr 1fr;
  }
}

.service-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}

.service-list .icon {
  color: var(--accent);
}

/* Dashed outline = not part of the shop’s work */
.not-offered {
  border: 2px dashed var(--dash);
  border-radius: 14px;
  padding: clamp(22px, 3.5vw, 32px);
}

.not-offered h2 {
  font-size: clamp(1.375rem, 1.15rem + 0.7vw, 1.625rem);
}

.not-list {
  display: grid;
  column-gap: 24px;
}

/* Tablets: two columns that read top to bottom, so the list order is kept */
@media (min-width: 600px) and (max-width: 999px) {
  .not-list {
    display: block;
    columns: 2;
  }

  .not-list li {
    break-inside: avoid;
  }
}

.not-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
}

.not-list .icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  color: var(--muted);
}

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

.contact {
  --focus: var(--band-accent);
  --divider: var(--band-line);
  background: var(--band-bg);
  color: var(--band-text);
  padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 80px);
}

.contact h2 {
  font-size: clamp(2rem, 1.25rem + 3vw, 3.25rem);
  margin-bottom: clamp(16px, 3vw, 32px);
}

.contact-text {
  color: var(--band-muted);
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem);
  line-height: 1.45;
  text-wrap: balance;
  max-width: 32ch;
  margin-bottom: 24px;
}

.contact .facts .icon {
  color: var(--band-accent);
}

.contact .facts a {
  color: var(--band-accent);
  font-weight: 600;
  text-underline-offset: 3px;
}

.contact .facts a:hover {
  color: var(--band-text);
}

.hours {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  column-gap: 20px;
}

.hours dt {
  white-space: nowrap;
}

.hours dd {
  color: var(--band-muted);
}

/* Very narrow phones: stack day and time */
@media (max-width: 379px) {
  .hours {
    grid-template-columns: auto;
  }

  .hours dd + dt {
    margin-top: 8px;
  }
}

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

.site-footer {
  background: var(--band-bg);
  color: var(--band-muted);
  font-size: 0.875rem;
}

.footer-line {
  border-top: 1px solid var(--band-line);
  padding: 24px 0 32px;
}

/* ---------- 404 page ---------- */

.not-found {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--hero-bg);
  padding: 48px 0;
}

.not-found .brand {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  margin-bottom: 40px;
}

.not-found h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.not-found p {
  max-width: 40ch;
  margin-bottom: 28px;
}
