/* Jack's Brake & Alignment & Auto Repair — website-clean baseline styles.
 * The Claude Design export keeps every layout style inline on each element,
 * so this file only holds site-wide defaults and the mobile-nav toggle rules
 * (et-topbar / et-desknav / et-menubtn) needed to switch to the hamburger
 * on small screens. */

html, body { margin: 0; padding: 0; background: #141517; }
body {
  font-family: 'Barlow', sans-serif;
  color: #e9e6e0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}
*, *::before, *::after { box-sizing: border-box; }
img { display: block; max-width: 100%; height: auto; }
a { color: #f5c200; text-decoration: none; }
a:hover { color: #990000; }
::selection { background: #cc0000; color: #141517; }
h1, h2, h3, h4, h5, h6, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

/* Services dropdown — CSS-only, hover + focus-within. Reset by the mobile
 * media query below which hides .et-desknav entirely. */
.et-dropdown-menu {
  position: absolute;
  top: 100%;
  left: -16px;
  min-width: 300px;
  background: rgba(20, 21, 23, 0.98);
  backdrop-filter: blur(8px);
  border: 1px solid #26282c;
  border-top: 3px solid #cc0000;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .15s ease, visibility .15s ease, transform .15s ease;
  z-index: 100;
  pointer-events: none;
}
.et-dropdown:hover .et-dropdown-menu,
.et-dropdown:focus-within .et-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.et-dropdown-menu a {
  display: block;
  padding: 11px 20px;
  color: #e9e6e0;
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  white-space: nowrap;
  border-left: 3px solid transparent;
  transition: color .12s ease, background .12s ease, border-color .12s ease;
}
.et-dropdown-menu a:hover,
.et-dropdown-menu a:focus {
  color: #cc0000;
  background: rgba(204, 0, 0, 0.06);
  border-left-color: #cc0000;
  outline: none;
}
.et-dropdown-divider {
  height: 1px;
  background: #26282c;
  margin: 6px 12px;
}
.et-dropdown-menu .et-dropdown-all {
  color: #cc0000;
  font-weight: 600;
}

/* Blog — index cards (build.py emits <a class="blog-card">...</a> for each post)
 * and per-post article body. Match the dark theme. */
.blog-card {
  display: block;
  padding: 32px 28px;
  background: rgb(27, 29, 32);
  border: 1px solid rgb(38, 40, 44);
  border-left: 4px solid rgb(204, 0, 0);
  color: rgb(233, 230, 224);
  text-decoration: none;
  transition: border-color .18s ease, transform .18s ease;
}
.blog-card:hover { border-color: rgb(204, 0, 0); color: rgb(233, 230, 224); transform: translateY(-2px); }
.blog-card .date {
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  color: #cc0000;
  text-transform: uppercase;
}
.blog-card h2 {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 2.4vw, 26px);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 12px 0 12px;
  line-height: 1.2;
  color: rgb(233, 230, 224);
}
.blog-card p {
  color: rgb(154, 149, 140);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 20px;
}
.blog-card .more {
  color: #cc0000;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1.5px;
}

.blog-article h2 {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 28px);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgb(233, 230, 224);
  margin: 36px 0 14px;
}
.blog-article h3 {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: clamp(18px, 2vw, 22px);
  color: rgb(233, 230, 224);
  margin: 28px 0 12px;
}
.blog-article p {
  font-size: 17px;
  line-height: 1.75;
  color: rgb(201, 196, 187);
  margin: 0 0 18px;
  text-wrap: pretty;
}
.blog-article ul, .blog-article ol {
  padding-left: 24px;
  margin: 0 0 22px;
  list-style: revert;
}
.blog-article li {
  font-size: 16.5px;
  line-height: 1.7;
  color: rgb(201, 196, 187);
  margin-bottom: 8px;
}
.blog-article a { color: #cc0000; text-decoration: underline; text-decoration-color: rgba(204,0,0,0.4); text-underline-offset: 3px; }
.blog-article a:hover { text-decoration-color: #cc0000; }
.blog-article strong { color: rgb(233, 230, 224); }

/* Mobile-nav toggle — desktop shows .et-topbar + .et-desknav, mobile swaps
 * to .et-menubtn. The design ships all three classes but the visibility
 * switch is our job. */
/* Hamburger button — 3 horizontal bars stacked. Hidden on desktop. */
.et-menubtn {
  display: none;
  width: 46px; height: 46px;
  border: 1px solid rgb(51, 54, 59);
  align-items: center; justify-content: center; flex-direction: column;
  gap: 5px;
  cursor: pointer;
  flex-shrink: 0;
  background: transparent;
}
.et-menubtn-bar {
  width: 20px; height: 2px;
  background: #e9e6e0;
  transition: transform .2s ease, opacity .2s ease;
}

/* The invisible checkbox that drives the menu open/close state.
 * Kept off-screen and unfocusable — the labels toggle it. */
.mm-toggle {
  position: absolute;
  top: -100px; left: -100px;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Both the mobile drawer and the backdrop that dims content behind it
 * default to hidden. Tapping the backdrop (a <label> pointing at the
 * checkbox) toggles the menu closed. */
.et-mobile-menu { display: none; }
.et-mobile-backdrop { display: none; }
.et-mobile-callbar { display: none; }

@media (max-width: 940px) {
  .et-topbar { display: none !important; }
  .et-desknav { display: none !important; }
  .et-header-call { display: none !important; }
  .et-menubtn { display: flex !important; }

  /* Shrink the header so the fixed logo doesn't eat the phone screen. */
  .et-header { min-height: 76px !important; padding: 6px 16px !important; }
  .et-logo img { height: 56px !important; }
  .et-logo-tag { display: none; }

  /* Hamburger → X transformation when the drawer is open. */
  .mm-toggle:checked ~ .et-topbar + .et-header .et-menubtn .et-menubtn-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .mm-toggle:checked ~ .et-topbar + .et-header .et-menubtn .et-menubtn-bar:nth-child(2) {
    opacity: 0;
  }
  .mm-toggle:checked ~ .et-topbar + .et-header .et-menubtn .et-menubtn-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Backdrop: full-viewport tap target that closes the menu. */
  .mm-toggle:checked ~ .et-mobile-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 55;
  }

  /* The drawer itself — slides in from the top of the viewport, below
   * the sticky header. Scrollable if content overflows. */
  .mm-toggle:checked ~ .et-mobile-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 76px; left: 0; right: 0;
    max-height: calc(100dvh - 76px - 64px);
    overflow-y: auto;
    background: rgba(20, 21, 23, 0.98);
    backdrop-filter: blur(8px);
    border-top: 3px solid #cc0000;
    z-index: 60;
    padding: 8px 0;
  }
  .et-mobile-menu a {
    display: block;
    padding: 14px 22px;
    color: #e9e6e0;
    font-family: 'Oswald', sans-serif;
    font-size: 15px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    border-left: 3px solid transparent;
  }
  .et-mobile-menu a:hover, .et-mobile-menu a:focus {
    background: rgba(204, 0, 0, 0.1);
    border-left-color: #cc0000;
    color: #cc0000;
  }
  .et-mobile-menu-group {
    padding: 14px 22px 6px;
    font-family: 'Oswald', sans-serif;
    font-size: 12px;
    letter-spacing: 3px;
    color: #cc0000;
    text-transform: uppercase;
    margin-top: 6px;
    border-top: 1px solid #26282c;
  }
  .et-mobile-menu a.et-mobile-menu-sub {
    padding-left: 40px;
    font-size: 14px;
    color: #c9c4bb;
  }

  /* Persistent tap-to-call bar pinned to the bottom of the viewport.
   * Uses !important + isolation to defend against any ancestor CSS
   * that might otherwise create a containing block and break fixed. */
  .et-mobile-callbar {
    display: flex !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    background: #cc0000;
    color: #141517;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    z-index: 90;
    box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.45);
    isolation: isolate;
    will-change: transform;
  }
  .et-mobile-callbar:hover, .et-mobile-callbar:focus { color: #141517; }

  /* Keep the last bit of page content clear of the pinned bar. */
  body { padding-bottom: 64px; }

  /* Kill any transforms/filters on html/body that could accidentally
   * turn our fixed elements into absolute ones. */
  html, body { transform: none !important; filter: none !important; }
}

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


/* FAQ accordion (native <details>) */
.et-faq { overflow: hidden; }
.et-faq-summary::-webkit-details-marker { display: none; }
.et-faq-summary::marker { display: none; content: ""; }
.et-faq .et-faq-icon::before { content: "+"; }
.et-faq[open] .et-faq-icon::before { content: "\2013"; }
.et-faq[open] > summary { border-bottom: 1px solid rgb(38, 40, 44); }
.et-faq-summary:hover span:first-child { color: rgb(233, 230, 224); }
.et-faq-summary:focus-visible { outline: 2px solid rgb(204, 0, 0); outline-offset: -2px; }
