/* Jake's Auto Service sample. Direction: "hometown garage": the cream (#FEFEE4) and blue (#086497)
   of their original 2000s site, deepened, with a warm amber accent. Zilla Slab for headings.
   The odometer in the hero (years since 1977) is the signature. */

:root {
  --ink: #15232d;
  --navy: #0b3d5c;
  --navy-2: #0e4b70;
  --blue: #086497;
  --cream: #fbf8e9;
  --cream-2: #f2edd6;
  --line: #ddd6b8;
  --muted: #5e6668;
  --amber: #e7a23b;
  --amber-dark: #c98419;
  --green: #3fb27f;
  --radius: 6px;
  --wrap: 1140px;
  --display: "Zilla Slab", Rockwell, Georgia, serif;
  --body: "Source Sans 3", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; margin: 0 0 .5em; }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.small { font-size: .9rem; color: var(--muted); }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

.eyebrow {
  font: 700 .8rem/1 var(--body);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1rem;
}

.sample-bar {
  background: var(--ink);
  color: #e8e6dc;
  font-size: .85rem;
  text-align: center;
  padding: .55rem 16px;
}
.sample-bar a { color: #fff; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font: 700 1rem/1 var(--body);
  padding: .9rem 1.4rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { background: var(--amber-dark); }
.btn-ghost { border-color: rgb(255 255 255 / .5); color: #fff; }
.btn-ghost:hover { border-color: #fff; background: rgb(255 255 255 / .08); }
.btn-ghost-dark { border-color: var(--navy); color: var(--navy); }
.btn-ghost-dark:hover { background: var(--navy); color: #fff; }
.btn-call { background: var(--navy); color: #fff; padding: .7rem 1.1rem; }
.btn-call:hover { background: var(--navy-2); }
.btn-call svg { width: 18px; height: 18px; fill: currentColor; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgb(251 248 233 / .95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 2rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--navy); color: var(--amber);
  font: 700 1.6rem/1 var(--display);
  box-shadow: inset 0 0 0 3px var(--navy), inset 0 0 0 5px var(--amber);
}
.brand-name { font: 700 1.25rem/1.1 var(--display); color: var(--navy); }
.brand-name small { display: block; font: 600 .72rem/1.4 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; gap: 1.6rem; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 600; color: var(--ink); }
.nav a:hover { color: var(--blue); }

/* Hero */
.hero {
  background:
    radial-gradient(1000px 500px at 85% 20%, rgb(8 100 151 / .55), transparent 70%),
    var(--navy);
  color: #fff;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.3rem); }
.hero h1 em { font-style: normal; color: var(--amber); display: block; }
.hero .eyebrow { color: #cfe3ee; }
.lede { font-size: 1.18rem; color: #dce8ef; max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 1.6rem; }
.rating { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .5rem; color: #f1f5f7; text-decoration: none; }
.rating:hover span:last-child { text-decoration: underline; }
.stars { color: var(--amber); letter-spacing: .1em; }

.status::before, .open-now::before {
  content: ""; display: inline-block; width: .6em; height: .6em; border-radius: 50%;
  background: currentColor; margin-right: .5em; vertical-align: .05em; opacity: .5;
}
.status.is-open::before, .open-now.is-open::before { background: var(--green); opacity: 1; box-shadow: 0 0 0 4px rgb(63 178 127 / .25); }

/* Odometer card */
.odo-card {
  background: var(--cream);
  color: var(--ink);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 0 24px 60px rgb(0 0 0 / .35);
  text-align: center;
}
.odo-label { font: 700 .8rem/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.odometer {
  display: inline-flex; gap: 4px;
  padding: 8px; margin: .6rem 0 .8rem;
  background: #111; border-radius: 8px;
  box-shadow: inset 0 2px 6px rgb(0 0 0 / .8);
}
.digit {
  display: grid; place-items: center;
  width: 2.6rem; height: 3.6rem;
  font: 700 2.3rem/1 var(--display);
  font-variant-numeric: tabular-nums;
  color: #f5f2e6;
  background: linear-gradient(#2a2a2a, #3b3b3b 45%, #1c1c1c 55%, #2a2a2a);
  border-radius: 3px;
}
/* The last two digits are the "tenths" style wheels in amber, like an analog trip meter */
.digit:nth-last-child(-n+2) { color: var(--ink); background: linear-gradient(#f0b14d, #f6c66f 45%, #dd9a2e 55%, #f0b14d); }
@media (prefers-reduced-motion: no-preference) {
  .digit { animation: roll .9s cubic-bezier(.2, .8, .2, 1) both; }
  .digit:nth-child(5) { animation-delay: .15s; }
  .digit:nth-child(6) { animation-delay: .3s; }
  @keyframes roll { from { transform: translateY(-35%); opacity: 0; } to { transform: none; opacity: 1; } }
}
.odo-unit { font: 700 1.25rem/1.2 var(--display); color: var(--navy); }
.odo-facts { list-style: none; padding: 1.1rem 0 0; margin: 1.1rem 0 0; border-top: 1px dashed var(--line); text-align: left; }
.odo-facts li { padding: .3rem 0 .3rem 1.7rem; position: relative; }
.odo-facts li::before {
  content: ""; position: absolute; left: 0; top: .55rem;
  width: 1rem; height: .55rem;
  border-left: 3px solid var(--blue); border-bottom: 3px solid var(--blue);
  transform: rotate(-45deg);
}

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-head { max-width: 42rem; margin-bottom: 2.5rem; }

.service-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem;
}
.service {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem .6rem;
}
.service h3 { color: var(--navy); }
.service p { color: var(--muted); font-size: 1rem; }

.about { background: var(--cream-2); border-block: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about h2 { color: var(--navy); }
.promise-list { list-style: none; counter-reset: p; padding: 0; margin: 0; display: grid; gap: 1rem; }
.promise-list li {
  counter-increment: p;
  display: grid; grid-template-columns: 3rem 1fr; column-gap: 1rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem;
}
.promise-list li::before {
  content: counter(p);
  grid-row: span 2;
  display: grid; place-items: center;
  width: 3rem; height: 3rem; border-radius: 50%;
  background: var(--amber); color: var(--ink);
  font: 700 1.4rem/1 var(--display);
}
.promise-list strong { font: 700 1.15rem/1.2 var(--display); color: var(--navy); }
.promise-list span { color: var(--muted); }

.visit-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: start; }
.visit h2 { color: var(--navy); margin-bottom: .2em; }
.addr { font-size: 1.2rem; }
.directions { color: var(--muted); max-width: 32rem; }
.contact-list { list-style: none; padding: 0; margin: 2rem 0 0; border-top: 1px solid var(--line); }
.contact-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.contact-list span { color: var(--muted); }
.contact-list a { font-weight: 600; color: var(--blue); text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { text-decoration: underline; }

.hours-card { background: var(--navy); color: #fff; border-radius: 14px; padding: 2rem; }
.hours-card .small { color: #b9cdd9; margin: 1rem 0 0; }
.open-now { font-weight: 600; color: #dce8ef; }
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { padding: .55rem .6rem; text-align: left; font-weight: 400; border-bottom: 1px solid rgb(255 255 255 / .12); }
.hours td { text-align: right; }
.hours tr.is-today { background: rgb(231 162 59 / .18); }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 700; color: var(--amber); }

.site-footer { background: var(--ink); color: #cdd3d6; padding: 2rem 0 5rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
.footer-row p { margin: 0; }
.site-footer .small { color: #8f999e; }

/* Phones: fixed call bar, since a phone call is the conversion for a garage */
.mobile-call { display: none; }

@media (max-width: 860px) {
  .nav { display: none; }
  .header-row { justify-content: space-between; gap: 1rem; }
  .hero-grid, .about-grid, .visit-grid { grid-template-columns: 1fr; }
  .site-footer { padding-bottom: 6rem; }
  .mobile-call {
    display: block;
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 20;
    background: var(--amber); color: var(--ink);
    text-align: center; font-weight: 700; text-decoration: none;
    padding: 1rem; border-radius: 10px;
    box-shadow: 0 10px 30px rgb(0 0 0 / .3);
  }
}
@media (max-width: 520px) {
  .btn-call span { display: none; }
  .btn-call { padding: .7rem; }
  .brand-name { font-size: 1.05rem; }
  .digit { width: 2.1rem; height: 3rem; font-size: 1.9rem; }
  .odo-card, .hours-card { padding: 1.5rem; }
}
