/* Middle TN Auto Repair website
   Brand colors come from the logo: blue #2E6DA1, steel gray #7B7C7C. */

@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/barlow-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/barlow-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/fonts/barlow-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("assets/fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  --blue: #2E6DA1;
  --blue-deep: #1E4C74;
  --blue-wash: #E6EFF6;
  --steel: #6F7172;
  --ink: #1C2830;
  --paper: #F4F7F9;
  --white: #FFFFFF;
  --line: #D3DCE3;

  /* Theme tokens: light values here, dark values below */
  --surface: #FFFFFF;
  --text-2: #33424D;
  --text-3: #4A565E;
  --line-soft: #EDF1F4;
  --link: #1E4C74;
  --link-hover: #2E6DA1;
  --accent-text: #2E6DA1;
  --focus: #2E6DA1;
  --field-border: #A9B7C2;
  --underline: #9DBAD3;
  --dash: #A8AFB4;
  --bubble-out: #E9EDF0;
  --header-bg: rgba(255, 255, 255, 0.96);
  --shadow: rgba(28, 40, 48, 0.45);
  --star: #C98A06;
  --footer-bg: #163A59;
  --contact-bg: #1E4C74;
  color-scheme: light;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", "Segoe UI", Roboto, sans-serif;

  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #11181D;
    --surface: #182229;
    --ink: #E6ECF0;
    --steel: #97A4AE;
    --line: #2C3A44;
    --blue-wash: #1D3245;
    --text-2: #BCC8D1;
    --text-3: #A9B5BE;
    --line-soft: #223039;
    --link: #8DBDE6;
    --link-hover: #B5D5F0;
    --accent-text: #6FA8DA;
    --focus: #8DBDE6;
    --field-border: #4A5B67;
    --underline: #3F6A8F;
    --dash: #5E6C76;
    --bubble-out: #26333C;
    --header-bg: rgba(24, 34, 41, 0.96);
    --shadow: rgba(0, 0, 0, 0.7);
    --star: #E8B43A;
    --footer-bg: #0E2133;
    --contact-bg: #173C5D;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #11181D;
  --surface: #182229;
  --ink: #E6ECF0;
  --steel: #97A4AE;
  --line: #2C3A44;
  --blue-wash: #1D3245;
  --text-2: #BCC8D1;
  --text-3: #A9B5BE;
  --line-soft: #223039;
  --link: #8DBDE6;
  --link-hover: #B5D5F0;
  --accent-text: #6FA8DA;
  --focus: #8DBDE6;
  --field-border: #4A5B67;
  --underline: #3F6A8F;
  --dash: #5E6C76;
  --bubble-out: #26333C;
  --header-bg: rgba(24, 34, 41, 0.96);
  --shadow: rgba(0, 0, 0, 0.7);
  --star: #E8B43A;
  --footer-bg: #0E2133;
  --contact-bg: #173C5D;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 0.5em;
  letter-spacing: 0.005em;
}
h2 { font-size: clamp(2rem, 4.2vw, 2.9rem); }
h3 { font-size: 1.45rem; font-weight: 600; }
p { margin: 0 0 1em; }

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

.skip {
  position: absolute; left: -999px; top: 0.5rem;
  background: var(--surface); color: var(--ink); padding: 0.5rem 1rem; z-index: 20;
}
.skip:focus { left: 0.5rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.7rem 1.4rem;
  background: var(--blue); color: var(--white);
  font-family: var(--display); font-weight: 600; font-size: 1.25rem; letter-spacing: 0.02em;
  text-decoration: none; border: 2px solid var(--blue); border-radius: 999px;
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: var(--white); }
.btn-quiet { background: transparent; color: var(--link); }
.btn-quiet:hover { background: var(--blue-wash); color: var(--link); border-color: var(--link); }
.btn-small { min-height: 2.5rem; padding: 0.4rem 1.1rem; font-size: 1.1rem; white-space: nowrap; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; padding-top: 0.5rem; padding-bottom: 0.5rem; }
.brand img { width: 150px; height: auto; }
.nav { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  color: var(--ink); text-decoration: none;
  font-family: var(--display); font-weight: 600; font-size: 1.15rem;
}
.nav a:hover { color: var(--link-hover); }
.site-header nav { margin-left: auto; }

/* Theme toggle and logo swap */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 2.75rem; height: 2.75rem; padding: 0; cursor: pointer;
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { background: var(--blue-wash); border-color: var(--link); }
.theme-toggle svg { width: 1.3rem; height: 1.3rem; }
.icon-sun, .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sun, :root:not([data-theme="light"]) .logo-dark { display: block; }
  :root:not([data-theme="light"]) .icon-moon, :root:not([data-theme="light"]) .logo-light { display: none; }
}
:root[data-theme="dark"] .icon-sun, :root[data-theme="dark"] .logo-dark { display: block; }
:root[data-theme="dark"] .icon-moon, :root[data-theme="dark"] .logo-light { display: none; }

/* Hero */
.hero { background: var(--surface); padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem); }
.hero-inner {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.7rem, 6.4vw, 5rem);
  line-height: 0.98;
  color: var(--ink);
  max-width: 12ch;
}
.lede { font-size: 1.25rem; max-width: 34rem; color: var(--text-2); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 1.25rem; }
.area { color: var(--steel); font-size: 1rem; }
.proof { margin: -0.25rem 0 1rem; font-weight: 600; font-size: 1.05rem; }
.proof a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.proof a:hover { color: var(--link); border-color: var(--link); }
.proof span { color: var(--star); }
.desktop-note { display: none; margin: -0.5rem 0 0.75rem; font-weight: 500; color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .desktop-note { display: block; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.hero-media { position: relative; margin: 0 0 8.5rem; }
.hero-media > img { border-radius: var(--radius); width: 100%; }

/* The text thread: the one bold element on the page */
.thread {
  position: absolute; left: -1.75rem; bottom: -8rem;
  width: min(22rem, 80%);
  background: var(--surface);
  border-radius: 18px;
  padding: 1rem 1rem 0.75rem;
  box-shadow: 0 18px 40px -18px var(--shadow), 0 0 0 1px var(--line);
  font-size: 0.98rem; line-height: 1.4;
}
.thread-label {
  margin: 0 0 0.6rem; color: var(--steel);
  font-family: var(--display); font-weight: 600; font-size: 1rem;
}
.bubble { margin: 0 0 0.5rem; padding: 0.55rem 0.85rem; border-radius: 16px; max-width: 88%; }
.bubble-in { background: var(--blue); color: var(--white); margin-left: auto; border-bottom-right-radius: 4px; }
.bubble-out { background: var(--bubble-out); color: var(--ink); border-bottom-left-radius: 4px; }

/* Sections */
.fix, .booking, .about, .work, .reviews { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-lede { color: var(--text-2); max-width: 40rem; margin-bottom: 2rem; }

/* What we fix: a two-column service ticket */
.ticket {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 6px solid var(--blue);
  border-radius: var(--radius);
}
.ticket-col { padding: 1.75rem clamp(1.25rem, 3vw, 2.25rem) 2rem; }
.ticket-no { border-left: 2px dashed var(--line); }
.ticket h3 { font-size: 1.6rem; }
.ticket-yes h3 { color: var(--link); }
.ticket-no h3 { color: var(--steel); }
.ticket ul { list-style: none; margin: 0; padding: 0; }
.ticket li { position: relative; padding: 0.55rem 0 0.55rem 2rem; border-bottom: 1px solid var(--line-soft); }
.ticket li:last-child { border-bottom: 0; }
.ticket-yes li::before {
  content: ""; position: absolute; left: 0.2rem; top: 0.95rem;
  width: 0.75rem; height: 0.42rem;
  border-left: 3px solid var(--accent-text); border-bottom: 3px solid var(--accent-text);
  transform: rotate(-45deg);
}
.ticket-yes a { color: var(--ink); text-decoration-color: var(--underline); }
.ticket-yes a:hover { color: var(--link); text-decoration-color: var(--link); }
.ticket-yes li:last-child a { color: var(--link); }
.ticket-no li { color: var(--text-3); }
.ticket-no li::before {
  content: ""; position: absolute; left: 0.15rem; top: 1.2rem;
  width: 0.9rem; height: 3px; background: var(--dash); border-radius: 2px;
}
.ticket-note { margin: 1.25rem 0 0; color: var(--steel); font-size: 1rem; }

/* Booking steps (a real sequence, so numbered) */
.booking { background: var(--surface); }
.steps {
  list-style: none; margin: 2rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.5rem;
  counter-reset: step;
}
.steps li { counter-increment: step; border-top: 2px solid var(--line); padding-top: 1rem; }
.steps li::before {
  content: counter(step);
  display: block; margin-bottom: 0.4rem;
  font-family: var(--display); font-weight: 700; font-size: 2.6rem; line-height: 1;
  color: var(--accent-text);
}
.steps h3 { font-size: 1.35rem; margin-bottom: 0.35rem; }
.steps p { font-size: 1rem; color: var(--text-2); margin: 0; }

/* Estimate text builder */
.estimate {
  margin-top: 3rem; padding: clamp(1.5rem, 4vw, 2.5rem);
  display: grid; gap: 2rem; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  background: var(--paper); border: 1px solid var(--line); border-top: 6px solid var(--blue); border-radius: var(--radius);
}
.estimate h3 { font-size: 2rem; }
.estimate-intro p { color: var(--text-2); max-width: 26rem; }
.estimate-tip { font-weight: 600; color: var(--ink) !important; }
.estimate-private { font-size: 0.95rem; color: var(--steel) !important; }
#estimate-fallback { align-self: center; }
.estimate form { display: grid; gap: 0.35rem; }
.estimate label { font-weight: 600; font-size: 1rem; margin-top: 0.6rem; }
.estimate label:first-child { margin-top: 0; }
.req { font-weight: 400; color: var(--steel); font-size: 0.9rem; }
.estimate input, .estimate textarea {
  width: 100%; font: inherit; font-size: 1.0625rem; color: var(--ink);
  padding: 0.6rem 0.75rem; min-height: 2.9rem;
  background: var(--surface); border: 1px solid var(--field-border); border-radius: 8px;
}
.estimate textarea { resize: vertical; }
.estimate input:focus, .estimate textarea:focus { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.estimate-more { margin-top: 0.9rem; border-top: 1px solid var(--line); padding-top: 0.6rem; }
.estimate-more summary { cursor: pointer; font-weight: 600; color: var(--link); padding: 0.4rem 0; }
.estimate-more > label, .estimate-more > input { display: block; }
.estimate-more > input { margin-top: 0.35rem; }
.estimate-note { font-size: 0.95rem; color: var(--steel); margin: 0.25rem 0 0; }
.estimate-pair { display: grid; grid-template-columns: 1.4fr 1fr; gap: 0.75rem; }
.estimate-pair label { display: block; margin-top: 0.6rem; }
.estimate-pair input { margin-top: 0.35rem; }
.estimate-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.estimate-actions button { cursor: pointer; }
.estimate-status { min-height: 1.6em; margin: 0.5rem 0 0; font-weight: 500; color: var(--link); }

/* About */
.about-inner {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
}
.about-copy p { max-width: 36rem; }
.about-media { display: grid; gap: 1.25rem; }
.about-wide { margin-top: 2rem; }

.photo { margin: 0; }
.photo img { border-radius: var(--radius); width: 100%; }
.photo figcaption { margin-top: 0.5rem; font-size: 0.95rem; color: var(--steel); }

/* Recent work */
.work { background: var(--surface); }
.work-grid {
  display: grid; gap: 1.25rem; margin-top: 1.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.work-grid img { aspect-ratio: 4 / 3; object-fit: cover; }
.work-more { margin-top: 1.5rem; }

/* Questions */
.faq { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.faq-inner { display: grid; gap: 2rem; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: start; }
.faq-side p { color: var(--text-2); max-width: 22rem; }
.faq-list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 1rem 2.5rem 1rem 0;
  font-family: var(--display); font-weight: 600; font-size: 1.35rem; line-height: 1.2;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 0.5rem; top: 50%;
  width: 0.6rem; height: 0.6rem; margin-top: -0.45rem;
  border-right: 3px solid var(--accent-text); border-bottom: 3px solid var(--accent-text);
  transform: rotate(45deg);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -0.1rem; }
.faq details p { margin: 0 0 1.1rem; max-width: 40rem; color: var(--text-2); }

/* Reviews */
.reviews { background: var(--surface); }
.reviews .review-card { background: var(--paper); }
.reviews-inner {
  display: grid; gap: 2rem;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: start;
}
.quotes { display: grid; gap: 1.5rem; margin-top: 1.5rem; }
.quote { margin: 0; padding-left: 1.25rem; border-left: 4px solid var(--accent-text); }
.quote p { font-size: 1.2rem; line-height: 1.5; max-width: 34rem; margin-bottom: 0.35rem; }
.quote footer { color: var(--steel); font-size: 1rem; }
.review-links { display: grid; gap: 1rem; }
.review-card {
  padding: 1.25rem 1.4rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.review-card p { margin: 0; }
.review-score { font-family: var(--display); font-weight: 700; font-size: 1.6rem; line-height: 1.1; }
.review-count { color: var(--steel); font-size: 1rem; margin-bottom: 0.6rem !important; }
.review-actions { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.review-actions a { display: inline-block; padding: 0.35rem 0; font-weight: 500; }

/* Contact */
.contact { background: var(--contact-bg); color: var(--white); padding: clamp(3.5rem, 8vw, 6rem) 0; }
.contact a { color: var(--white); }
.contact h2 { color: var(--white); }
.contact-number {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(3rem, 10vw, 6.5rem); line-height: 1; margin: 0.25rem 0 1rem;
}
.contact-number a { text-decoration: none; }
.contact-number a:hover { color: #CFE0EE; }
.contact-inner p { max-width: 36rem; color: #DCE7F0; }
.contact-inner { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: end; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.85rem; justify-items: start; }
.contact .btn-light { background: var(--white); color: var(--blue-deep); border-color: var(--white); }
.contact .btn-light:hover { background: #DCE7F0; border-color: #DCE7F0; color: var(--blue-deep); }
.btn-outline-light { background: transparent; color: var(--white); border-color: #9DBAD3; }
.btn-outline-light:hover { background: rgba(255,255,255,0.1); color: var(--white); border-color: var(--white); }
.contact-link { display: inline-block; padding: 0.35rem 0; font-weight: 500; }
.contact :focus-visible, .site-footer :focus-visible { outline-color: var(--white); }
.contact .area { color: #B8CCDD; }

/* Service pages */
.page-hero { background: var(--surface); padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2.5rem, 5vw, 3.5rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); line-height: 1; max-width: 18ch; }
.page-hero .lede { max-width: 40rem; }
.crumbs { font-size: 0.95rem; color: var(--steel); margin-bottom: 1rem; }
.svc { padding: clamp(3rem, 7vw, 5rem) 0; }
.svc-inner { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr); align-items: start; }
.svc-copy h2 { font-size: clamp(1.7rem, 3.2vw, 2.2rem); margin-top: 2.25rem; }
.svc-copy h2:first-child { margin-top: 0; }
.svc-copy p { max-width: 40rem; color: var(--text-2); }
.svc-copy strong { color: var(--ink); }
.svc-list { list-style: none; margin: 0; padding: 0; max-width: 40rem; }
.svc-list li { position: relative; padding: 0.45rem 0 0.45rem 2rem; border-bottom: 1px solid var(--line); }
.svc-list li:last-child { border-bottom: 0; }
.svc-list li::before {
  content: ""; position: absolute; left: 0.2rem; top: 0.85rem;
  width: 0.75rem; height: 0.42rem;
  border-left: 3px solid var(--accent-text); border-bottom: 3px solid var(--accent-text);
  transform: rotate(-45deg);
}
.svc-aside { display: grid; gap: 1.25rem; }
.svc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.4rem; }
.svc-card h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.svc-card ul { margin: 0; padding-left: 1.1rem; font-size: 1rem; color: var(--text-2); }
.svc-card li { margin-bottom: 0.4rem; }
.svc-links { list-style: none; padding-left: 0 !important; }
.svc-links a { display: inline-block; padding: 0.2rem 0; font-weight: 500; }

/* Footer */
.site-footer { background: var(--footer-bg); color: #B8CCDD; font-size: 0.95rem; }
.site-footer a { color: #DCE7F0; display: inline-block; padding: 0.35rem 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1.5rem; padding-top: 1.25rem; padding-bottom: 1.25rem; }
.footer-inner p { margin: 0; }
.footer-services { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }

/* Responsive */
@media (max-width: 960px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-inner, .reviews-inner, .faq-inner, .contact-inner, .estimate, .svc-inner { grid-template-columns: 1fr; }
  .about-media { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .site-header nav { display: none; }
  .theme-toggle { margin-left: auto; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
  .thread { left: 0.75rem; bottom: -6rem; }
}

@media (max-width: 640px) {
  body { font-size: 1.0625rem; }
  .brand img { width: 104px; }
  .header-inner { gap: 0.6rem; }
  .theme-toggle { width: 2.5rem; height: 2.5rem; }
  .btn-small { font-size: 1rem; padding: 0.35rem 0.9rem; }
  .ticket { grid-template-columns: 1fr; }
  .ticket-no { border-left: 0; border-top: 2px dashed var(--line); }
  .steps { grid-template-columns: 1fr; }
  .about-media { grid-template-columns: 1fr; }
  .thread { position: relative; left: auto; bottom: auto; width: auto; margin: -1.5rem 0.75rem 0; }
  .hero-media { margin-bottom: 0; }
  .footer-inner { flex-direction: column; }
}
