/* Automotive Solutions - Mesquite, TX
   Mobile-first stylesheet. Breakpoints at 640 / 900 / 1100. */

:root {
  --ink:        #15171c;   /* near-black, carries the white logo   */
  --ink-2:      #22262e;   /* raised dark surface                  */
  --accent:     #f5a524;   /* amber - CTAs, rules, active nav       */
  --accent-dk:  #d4881a;
  --red:        #c8352b;   /* used sparingly: the coupon           */
  --text:       #1c1f26;
  --muted:      #5c6470;
  --line:       #e3e6ea;
  --bg:         #ffffff;
  --bg-2:       #f5f6f8;
  --radius:     10px;
  --wrap:       1140px;
  --topbar-h:   46px;
  --sans: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  /* room for the fixed mobile call bar */
  padding-bottom: 62px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dk); }

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

h1, h2, h3 {
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.15;
  margin: 0 0 .5em;
}
h2 {
  font-size: 1.65rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
h3 { font-size: 1.1rem; }

.section { padding: 52px 0; }
.section--alt  { background: var(--bg-2); }
.section--dark { background: var(--ink); color: #e8eaee; }
.section--dark h2 { color: #fff; }
/* :not(.btn) - otherwise this rule (0-1-1) outranks .btn--primary (0-1-0)
   and paints button text amber on an amber background. */
.section--dark a:not(.btn) { color: var(--accent); }

/* amber rule under section headings */
.section > .wrap > h2::after,
.section-head h2::after {
  content: "";
  display: block;
  width: 58px; height: 4px;
  background: var(--accent);
  margin-top: 14px;
  border-radius: 2px;
}
.section-head { margin-bottom: 30px; }
.section-head p { color: var(--muted); max-width: 62ch; margin: 0; }
.section--dark .section-head p { color: #aab2bd; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px;
  font-size: 1rem; font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  min-height: 50px;               /* comfortable tap target */
  transition: background .15s, color .15s;
}
.btn--primary { background: var(--accent); color: #1a1205; }
.btn--primary:hover { background: var(--accent-dk); }
.btn--ghost   { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--dark    { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-2); }

/* ---------- top bar ----------
   Sticky at the very top so the address and phone are readable at any
   scroll position. Fixed height (--topbar-h) so the header below it can
   stick to a known offset instead of a guessed one. */
.topbar {
  display: none;                  /* hidden on phones - the fixed bottom
                                     call bar serves that job there */
  position: sticky; top: 0; z-index: 55;
  height: var(--topbar-h);
  background: var(--accent);
  color: #1a1205;
  font-size: 1rem;
  font-weight: 700;
}
.topbar .wrap {
  height: 100%;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
}
.topbar a { color: #1a1205; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.tb-addr  { letter-spacing: .01em; }
.tb-right { display: flex; align-items: center; gap: 22px; }
.tb-hours { font-weight: 700; }
.tb-phone {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: .01em;
  white-space: nowrap;
}
.tb-email { font-weight: 700; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink);
  border-bottom: 3px solid var(--accent);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 12px; padding-bottom: 12px;
}
.logo img { width: 190px; }

.nav-toggle {
  background: transparent; border: 1.5px solid #4a515c; color: #fff;
  border-radius: 8px; padding: 9px 12px;
  font-size: 1.35rem; line-height: 1; cursor: pointer;
}
.nav-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.nav {
  display: none;
  border-top: 1px solid #2c313a;
  padding-bottom: 10px;
}
.nav.open { display: block; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block;
  padding: 14px 2px;
  color: #e8eaee; text-decoration: none;
  font-weight: 700; font-size: .95rem;
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid #262b33;
}
.nav a:hover { color: var(--accent); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  background: #0d0f13 url("../img/shop.jpg") center/cover no-repeat;
  color: #fff;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,12,16,.72) 0%, rgba(10,12,16,.86) 100%);
}
.hero .wrap { position: relative; padding-top: 60px; padding-bottom: 60px; }
.hero h1 {
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: .35em;
}
.hero h1 .accent { color: var(--accent); display: block; }
.hero p.lead { font-size: 1.05rem; color: #d6dae1; max-width: 54ch; margin: 0 0 26px; }
.hero-actions { display: flex; flex-direction: column; gap: 12px; }
.hero-actions .btn { width: 100%; }

/* ---------- trust strip ---------- */
.trust { background: var(--ink-2); color: #fff; }
.trust ul {
  list-style: none; margin: 0; padding: 22px 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px;
  text-align: center;
}
.trust li { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; line-height: 1.35; }
.trust .num { display: block; font-size: 1.5rem; color: var(--accent); letter-spacing: 0; }

/* ---------- service grid ---------- */
.services { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.services a {
  display: flex; align-items: center;
  min-height: 62px;
  padding: 12px 14px;
  background: #fff; border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  color: var(--text); text-decoration: none;
  font-weight: 700; font-size: .84rem;
  text-transform: uppercase; letter-spacing: .03em;
}
.services a:hover { border-color: var(--accent); background: #fffdf7; }
.section--alt .services a { background: #fff; }

/* ---------- feature rows ---------- */
.feature { display: grid; gap: 26px; align-items: start; }
.feature img.badge { width: 132px; margin: 0 auto; }
.checks { list-style: none; margin: 18px 0 0; padding: 0; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 11px; }
.checks li::before {
  content: "\2713";
  position: absolute; left: 0; top: -1px;
  color: var(--accent); font-weight: 800; font-size: 1.15rem;
}

/* ---------- reviews ---------- */
.reviews { display: grid; gap: 16px; }
.review {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
}
.stars { color: var(--accent); letter-spacing: 2px; font-size: 1.05rem; }
.review blockquote { margin: 10px 0 14px; font-size: .97rem; }
.review cite { font-style: normal; font-weight: 700; font-size: .9rem; }

/* ---------- coupon ---------- */
.coupon {
  border: 3px dashed var(--red);
  border-radius: var(--radius);
  background: #fff;
  padding: 26px 20px;
  text-align: center;
}
.coupon .amount { font-size: 2.4rem; font-weight: 800; color: var(--red); line-height: 1; }
.coupon h3 { text-transform: uppercase; letter-spacing: .04em; margin-top: 8px; }
.coupon .fine { font-size: .8rem; color: var(--muted); margin: 14px auto 0; max-width: 56ch; }

/* ---------- brands ---------- */
.brands {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  align-items: center;
}
.brands img { margin: 0 auto; opacity: .85; }

/* ---------- vehicles ---------- */
.makes {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  font-size: .85rem;
}
.makes li {
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  padding: 9px 6px; text-align: center;
}

/* ---------- contact ---------- */
.contact-grid { display: grid; gap: 26px; }
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { margin-bottom: 18px; }
.info-list .label {
  display: block; font-size: .75rem; text-transform: uppercase;
  letter-spacing: .09em; color: var(--accent); font-weight: 700; margin-bottom: 3px;
}
.info-list a { color: #fff; text-decoration: none; }
.info-list a:hover { color: var(--accent); }
.hours-table { width: 100%; border-collapse: collapse; }
.hours-table th, .hours-table td { text-align: left; padding: 9px 0; border-bottom: 1px solid #2f343d; font-size: .95rem; }
.hours-table th { font-weight: 700; }
.hours-table td { text-align: right; color: var(--accent); font-weight: 700; }

/* ---------- footer ---------- */
.site-footer { background: #0e1014; color: #8b939f; font-size: .85rem; padding: 30px 0 34px; }
.site-footer a { color: #8b939f; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-links { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* ---------- fixed mobile call bar ---------- */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: 1fr 1fr;
  border-top: 1px solid #000;
}
.callbar a {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 17px 8px;
  font-weight: 800; font-size: .95rem; text-decoration: none;
  text-transform: uppercase; letter-spacing: .04em;
}
.callbar .call { background: var(--accent); color: #1a1205; }
.callbar .dir  { background: var(--ink); color: #fff; }

/* ================= 640px and up ================= */
@media (min-width: 640px) {
  .hero h1 { font-size: 2.6rem; }
  .hero-actions { flex-direction: row; }
  .hero-actions .btn { width: auto; }
  .trust ul { grid-template-columns: repeat(4, 1fr); }
  .services { grid-template-columns: repeat(3, 1fr); }
  .reviews { grid-template-columns: 1fr 1fr; }
  .brands { grid-template-columns: repeat(5, 1fr); }
  .makes { grid-template-columns: repeat(4, 1fr); }
  .feature { grid-template-columns: 160px 1fr; gap: 30px; align-items: center; }
  .feature img.badge { margin: 0; }
}

/* ================= 900px and up ================= */
@media (min-width: 900px) {
  body { padding-bottom: 0; }          /* call bar is hidden at this size */
  .callbar { display: none; }
  .topbar { display: block; }

  .nav-toggle { display: none; }
  .nav {
    display: block; border-top: none; padding-bottom: 0;
  }
  .nav ul { display: flex; gap: 4px; }
  .nav a { border-bottom: none; padding: 10px 13px; border-radius: 6px; font-size: .87rem; }
  .nav a:hover { background: rgba(255,255,255,.08); color: var(--accent); }

  .site-header { top: var(--topbar-h); }
  .header-inner { padding-top: 14px; padding-bottom: 14px; }
  .logo img { width: 215px; }

  .section { padding: 74px 0; }
  h2 { font-size: 2rem; }
  .hero .wrap { padding-top: 108px; padding-bottom: 108px; }
  .hero h1 { font-size: 3.2rem; }
  .hero p.lead { font-size: 1.15rem; }
  .services { grid-template-columns: repeat(4, 1fr); }
  .reviews { grid-template-columns: repeat(3, 1fr); }
  .makes { grid-template-columns: repeat(6, 1fr); }
  .contact-grid { grid-template-columns: 1.1fr 1fr 1fr; gap: 40px; }
  .brands { grid-template-columns: repeat(7, 1fr); }
}

/* ================= accessibility ================= */
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: #000; padding: 12px 18px; z-index: 100;
  font-weight: 700; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; top: 0; }

/* ---------- anchor offset for the sticky header ----------
   Without this, jumping to #services parks the heading underneath
   the sticky header. Values track the header's real height.        */
section[id] { scroll-margin-top: 92px; }
@media (min-width: 900px) { section[id] { scroll-margin-top: 190px; } }
/* #top sits at the very start of <body> so the logo returns the page
   to true scroll position 0, topbar and all. */
#top { scroll-margin-top: 0; }
