/* QS Auto Services sample. Direction: "shop floor": graphite, shop-paper cream, one signal red.
   The repair-order ticket in the hero is the signature; the mono numerals echo it through the page. */

:root {
  --ink: #141518;
  --graphite: #1e2024;
  --steel: #2b2e34;
  --line: #3a3e45;
  --paper: #f4f0e7;
  --paper-2: #ebe5d8;
  --muted: #6b6a66;
  --muted-dark: #a7a9ad;
  --red: #d6332a;
  --red-dark: #b0261e;
  --green: #3fb27f;
  --radius: 4px;
  --wrap: 1180px;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

*, *::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(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1; margin: 0 0 .5em; letter-spacing: .005em; }
h2 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); text-transform: uppercase; }
h3 { font-size: 1.45rem; text-transform: uppercase; }
p { margin: 0 0 1em; }
.mono { font-family: var(--mono); font-size: .8em; letter-spacing: .04em; }
.small { font-size: .875rem; color: var(--muted); }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

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

/* "To be confirmed" marker, same convention as other Keystone previews */
.tbc, .tbc-key {
  outline: 2px dashed #e0a526;
  outline-offset: 3px;
  background: rgb(224 165 38 / .12);
  border-radius: 2px;
}
p.tbc { padding: .6em .8em; font-size: .95rem; }

/* Sample notice */
.sample-bar {
  background: #e0a526;
  color: var(--ink);
  font-size: .85rem;
  text-align: center;
  padding: .45rem 16px;
}
.sample-bar .tbc-key { outline-color: var(--ink); outline-offset: 1px; background: transparent; padding: 0 .25em; margin: 0 .3em; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font: 700 1.05rem/1 var(--display);
  letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  padding: .95em 1.4em; border-radius: var(--radius);
  border: 2px solid transparent;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-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(--ink); color: var(--ink); }
.btn-ghost-dark:hover { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 3px solid #e0a526; outline-offset: 3px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgb(20 21 24 / .94);
  backdrop-filter: blur(8px);
  color: #fff;
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 2rem; height: 68px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  background: var(--red); color: #fff;
  font: 800 1.35rem/1 var(--display);
  border-radius: var(--radius);
  transform: skewX(-8deg);
}
.brand-name { font: 700 1.35rem/0.95 var(--display); text-transform: uppercase; letter-spacing: .03em; }
.brand-name small { display: block; font: 500 .7rem/1.3 var(--body); letter-spacing: .28em; color: var(--muted-dark); }
.nav { display: flex; gap: 1.75rem; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; font-size: .95rem; color: #d9dadc; }
.nav a:hover { color: #fff; }
.btn-call { background: var(--red); color: #fff; padding: .7em 1.1em; font-size: 1rem; }
.btn-call:hover { background: var(--red-dark); }
.btn-call svg { width: 1em; height: 1em; fill: currentColor; }

/* Hero */
.hero { position: relative; background: var(--ink); color: #fff; overflow: hidden; isolation: isolate; }
.hero-photo { position: absolute; inset: 0; z-index: -1; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 30% center; opacity: .5; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, var(--ink) 18%, rgb(20 21 24 / .7) 55%, rgb(20 21 24 / .35));
}
.hero-grid {
  display: grid; grid-template-columns: 1.25fr .85fr; gap: 3rem; align-items: center;
  padding-block: clamp(4rem, 9vw, 7.5rem);
}
.hero h1 {
  font-size: clamp(3.4rem, 8.5vw, 6.6rem);
  font-weight: 800; text-transform: uppercase; line-height: .9;
}
.hero h1 em { font-style: normal; color: var(--red); }
.lede { font-size: 1.2rem; max-width: 34ch; color: #dcdddf; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

.status { display: inline-flex; align-items: center; gap: .55em; color: #fff; }
.status::before, .open-now::before {
  content: ""; width: .6em; height: .6em; border-radius: 50%; background: var(--muted-dark);
}
.status.is-open::before, .open-now.is-open::before { background: var(--green); box-shadow: 0 0 0 4px rgb(63 178 127 / .25); }
.status.is-closed::before, .open-now.is-closed::before { background: var(--red); }

/* The repair-order ticket */
.ticket {
  background: var(--paper);
  color: var(--ink);
  padding: 1.4rem 1.5rem 1.6rem;
  border-radius: 2px;
  transform: rotate(1.5deg);
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / .7);
  position: relative;
  /* perforated top edge */
  -webkit-mask: radial-gradient(circle 6px at 50% 0, transparent 98%, #000) 0 0 / 22px 100%;
          mask: radial-gradient(circle 6px at 50% 0, transparent 98%, #000) 0 0 / 22px 100%;
}
.ticket-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font: 700 1.3rem/1 var(--display); text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 2px solid var(--ink); padding: .4rem 0 .7rem;
}
.ticket-head .mono { color: var(--red); font-size: .85rem; }
.ticket-meta { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border-bottom: 1px dashed #b9b2a3; }
.ticket-meta div { padding: .6rem 0; }
.ticket-meta dt { font: 500 .68rem/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.ticket-meta dd { margin: .3rem 0 0; font-weight: 600; }
.ticket-lines { list-style: none; margin: 0; padding: .4rem 0; }
.ticket-lines li {
  display: flex; align-items: center; gap: .8rem;
  padding: .65rem 0; border-bottom: 1px solid var(--paper-2); font-weight: 500;
}
.tick {
  flex: none; width: 20px; height: 20px; border: 2px solid var(--ink); border-radius: 2px; position: relative;
}
.tick::after {
  content: ""; position: absolute; left: 4px; top: 0; width: 6px; height: 11px;
  border: solid var(--red); border-width: 0 3px 3px 0; transform: rotate(45deg);
}
@media (prefers-reduced-motion: no-preference) {
  .tick::after { animation: tick .35s ease-out backwards; }
  .ticket-lines li:nth-child(1) .tick::after { animation-delay: .5s; }
  .ticket-lines li:nth-child(2) .tick::after { animation-delay: .75s; }
  .ticket-lines li:nth-child(3) .tick::after { animation-delay: 1s; }
  .ticket-lines li:nth-child(4) .tick::after { animation-delay: 1.25s; }
  @keyframes tick { from { opacity: 0; transform: rotate(45deg) scale(.3); } }
}
.ticket-sign { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 1rem; }
.ticket-sign .mono { font-size: .68rem; text-transform: uppercase; color: var(--muted); }
.signature { font: italic 600 1.6rem/1 var(--display); color: #24418c; transform: rotate(-4deg); }

/* Promise strip */
.promise-strip { background: var(--red); color: #fff; }
.promise-row { display: grid; grid-template-columns: repeat(3, 1fr); }
.promise-row div { padding: 1.3rem 1.5rem; display: flex; flex-direction: column; }
.promise-row div + div { border-left: 1px solid rgb(255 255 255 / .3); }
.promise-row strong { font: 700 1.6rem/1 var(--display); text-transform: uppercase; }
.promise-row span { font-size: .95rem; opacity: .9; }

/* Sections */
.section { padding-block: clamp(4rem, 8vw, 6.5rem); }
.section-head { max-width: 46rem; margin-bottom: 2.75rem; }
.section-head p:last-child { color: var(--muted); font-size: 1.1rem; }

.service-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 2px solid var(--ink);
}
.service {
  padding: 1.6rem 1.4rem 1.8rem 0;
  border-bottom: 1px solid #d4cdbd;
  position: relative;
}
.service + .service { padding-left: 1.4rem; }
.service:nth-child(4n+1) { padding-left: 0; }
.service:not(:nth-child(4n)) { border-right: 1px solid #d4cdbd; }
.service .num { color: var(--red); display: block; margin-bottom: 1.6rem; }
.service h3 { margin-bottom: .45em; }
.service p { margin: 0; color: #45443f; font-size: .98rem; }
.service .tbc { display: inline-block; margin-top: .6rem; font-size: .85rem; }

/* Roadside */
.roadside { background: var(--graphite); color: #fff; }
.roadside .section-head p:last-of-type { color: var(--muted-dark); }
.roadside .section-head .btn { margin-top: .5rem; }
.roadside-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.roadside .section-head { margin-bottom: 0; }
.roadside-list { list-style: none; margin: 0; padding: 0; counter-reset: rs; }
.roadside-list li {
  counter-increment: rs;
  display: flex; align-items: baseline; gap: 1.2rem;
  font: 600 1.55rem/1.1 var(--display); text-transform: uppercase;
  padding: .9rem 0; border-bottom: 1px solid var(--line);
}
.roadside-list li::before {
  content: counter(rs, decimal-leading-zero);
  font: 500 .8rem/1 var(--mono); color: var(--red);
}

/* About */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 4rem; }
.about-grid > div:first-child p:not(.eyebrow):not(.tbc) { font-size: 1.15rem; max-width: 52ch; }
.parts { background: var(--paper-2); padding: 1.8rem; border-radius: var(--radius); align-self: start; }
.parts-list { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.parts-list li {
  font: 700 1.25rem/1 var(--display); text-transform: uppercase; letter-spacing: .04em;
  padding: .55em .8em; border: 2px solid var(--ink); border-radius: var(--radius);
}

/* Visit */
.visit { background: var(--paper-2); }
.visit-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; }
.visit h2 { font-size: clamp(1.9rem, 3.8vw, 2.8rem); margin-bottom: .2em; }
.addr { font-size: 1.2rem; margin-bottom: 1.5rem; }
.contact-list { list-style: none; padding: 0; margin: 2.5rem 0 0; border-top: 2px solid var(--ink); }
.contact-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid #cfc8b7; }
.contact-list span { font: 500 .75rem/1.6 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.contact-list a { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; text-align: right; }
.contact-list a:hover { color: var(--red); }

.hours-card { background: var(--ink); color: #fff; padding: 2rem; border-radius: var(--radius); align-self: start; }
.hours-card h3 { font-size: 1.8rem; }
.open-now { display: flex; align-items: center; gap: .6em; font-weight: 600; min-height: 1.6em; }
.open-now:empty { display: none; }
.hours { width: 100%; border-collapse: collapse; margin-top: .5rem; }
.hours th, .hours td { padding: .7rem 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.hours th { text-align: left; color: var(--muted-dark); }
.hours td { text-align: right; font-family: var(--mono); font-size: .9rem; }
.hours tr.is-today th, .hours tr.is-today td { color: #fff; font-weight: 600; }
.hours tr.is-today th::after { content: "Today"; margin-left: .6em; font: 600 .65rem/1 var(--body); letter-spacing: .1em; text-transform: uppercase; background: var(--red); padding: .25em .5em; border-radius: 2px; vertical-align: middle; }
.hours .tbc { background: transparent; padding: 0 .3em; }

/* Footer */
.site-footer { background: var(--ink); color: #c9cacc; padding: 2rem 0 2.5rem; font-size: .95rem; }
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 2rem; }
.footer-row p { margin: 0; }
.site-footer a { text-decoration: none; color: #fff; }
.site-footer .small { color: var(--muted-dark); }

.mobile-call { display: none; }

/* Tablet */
@media (max-width: 960px) {
  .nav { display: none; }
  .header-row { justify-content: space-between; }
  .hero-grid, .roadside-grid, .about-grid, .visit-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .ticket { max-width: 420px; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .service, .service + .service { padding: 1.5rem 1.2rem 1.6rem; border-right: 0; }
  .service:nth-child(odd) { padding-left: 0; border-right: 1px solid #d4cdbd; }
  .service:nth-child(even) { padding-right: 0; }
}

/* Phone */
@media (max-width: 600px) {
  body { padding-bottom: 64px; }
  .btn-call span { display: none; }
  .btn-call { padding: .75em; }
  .brand-name small { letter-spacing: .2em; }
  .hero-photo img { object-position: 60% center; }
  .ticket { transform: rotate(0); }
  .promise-row { grid-template-columns: 1fr; }
  .promise-row div { padding: .9rem 0; flex-direction: row; align-items: baseline; gap: .6rem; }
  .promise-row div + div { border-left: 0; border-top: 1px solid rgb(255 255 255 / .3); }
  .service-grid { grid-template-columns: 1fr; }
  .service, .service + .service, .service:nth-child(odd) { padding: 1.3rem 0; border-right: 0; }
  .service .num { margin-bottom: .6rem; }
  .roadside-list li { font-size: 1.3rem; }
  .hours-card, .parts { padding: 1.4rem; }
  .mobile-call {
    display: block; position: fixed; inset: auto 0 0 0; z-index: 30;
    background: var(--red); color: #fff; text-align: center; text-decoration: none;
    font: 700 1.2rem/1 var(--display); text-transform: uppercase; letter-spacing: .08em;
    padding: 1.1rem 16px calc(1.1rem + env(safe-area-inset-bottom));
  }
}

/* Google rating under the hero buttons */
.rating {
  display: inline-flex; align-items: center; gap: .6rem; margin-top: 1.6rem;
  text-decoration: none; color: #dcdddf; font-size: .95rem;
}
.rating .stars { color: #f2b632; letter-spacing: .08em; font-size: 1.05rem; }
.rating strong { color: #fff; }
.rating:hover span:last-child { text-decoration: underline; }
