/* ============================================================
   Master Mechanic Garage — Brikama
   faded-70s-print palette · vertical spine headline · grain
   ============================================================ */

:root {
  --bg:      #efe6d0;
  --bg-2:    #e6dabf;
  --paper:   #f6efdd;
  --ink:     #3a2f1a;
  --ink-soft:#6b5c3c;
  --a:       #a67c00;   /* mustard */
  --b:       #6b7a3a;   /* avocado */
  --c:       #c04e1a;   /* burnt sienna */
  --rule:    #c9b98f;
  --shadow:  0 1px 0 rgba(58,47,26,.12), 0 12px 28px -18px rgba(58,47,26,.45);
  --spine-w: 3.25rem;
  --pad:     clamp(1.25rem, 4vw, 3.5rem);
  --maxw:    68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #1c1810;
    --bg-2:    #241f14;
    --paper:   #262017;
    --ink:     #ece0c4;
    --ink-soft:#b3a483;
    --a:       #d9a92c;
    --b:       #9aab5c;
    --c:       #e2703a;
    --rule:    #4a3f28;
    --shadow:  0 1px 0 rgba(0,0,0,.4), 0 14px 30px -18px rgba(0,0,0,.8);
  }
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-variation-settings: "SOFT" 0, "WONK" 0;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  text-wrap: pretty;
  overflow-x: hidden;
}

/* --- grain overlay ------------------------------------------------ */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
  mix-blend-mode: multiply;
}
@media (prefers-color-scheme: dark) {
  body::before { opacity: .12; mix-blend-mode: screen; }
}

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

a { color: var(--c); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--a); }

:focus-visible {
  outline: 3px solid var(--c);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- scroll progress strip --------------------------------------- */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 5px;
  z-index: 60;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
}
.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--b), var(--a) 55%, var(--c));
  transform: scaleX(0);
  transform-origin: 0 50%;
}
@supports (animation-timeline: scroll()) {
  .progress span {
    animation: fill linear both;
    animation-timeline: scroll(root block);
  }
}
@keyframes fill { to { transform: scaleX(1); } }

/* --- vertical spine headline ------------------------------------- */
.spine {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--spine-w);
  margin: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  background: var(--ink);
  color: var(--bg);
  font-size: clamp(.8rem, .68rem + .5vw, 1.05rem);
  font-weight: 500;
  letter-spacing: .34em;
  text-transform: uppercase;
  font-variation-settings: "SOFT" 0, "WONK" 1;
  border-right: 1px solid var(--rule);
}
.spine span { white-space: nowrap; }

/* --- top bar ------------------------------------------------------ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  margin-left: var(--spine-w);
  display: flex;
  align-items: center;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  padding: .7rem var(--pad);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.wordmark {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.1;
  margin-right: auto;
}
.wordmark span {
  display: block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .6rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 500;
}
.topbar nav { display: flex; gap: 1.15rem; flex-wrap: wrap; }
.topbar nav a {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  padding: .55rem .1rem;
}
.topbar nav a:hover { color: var(--c); }

.call-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .6rem 1.1rem;
  background: var(--c);
  color: #fff8ec;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  transition: background .18s ease, transform .18s ease;
}
.call-btn:hover { background: var(--a); color: #241c08; transform: translateY(-1px); }
.call-btn.big { font-size: .82rem; padding: .85rem 1.5rem; }

.ghost-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .85rem 1.3rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  border-radius: 2px;
}
.ghost-btn:hover { background: var(--ink); color: var(--bg); }

/* --- layout shell ------------------------------------------------- */
main {
  margin-left: var(--spine-w);
  padding: 0 var(--pad);
  max-width: calc(var(--maxw) + var(--pad) * 2);
}

.eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .68rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--b);
  margin: 0 0 .9rem;
}

h2 {
  font-size: clamp(1.7rem, 1.2rem + 2.2vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -.02em;
  font-weight: 600;
  margin: 0 0 .8rem;
  font-variation-settings: "SOFT" 0, "WONK" 1;
}

/* --- hero --------------------------------------------------------- */
.hero {
  padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(1.5rem, 4vw, 3rem);
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: 1fr;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 62rem) {
  .hero { grid-template-columns: 1.05fr .95fr; align-items: start; }
  .hero-copy { grid-column: 1; }
  .hero-figure { grid-column: 2; }
  .visualizer { grid-column: 1 / -1; }
}

.hero-name {
  font-size: clamp(2.3rem, 1.4rem + 4.6vw, 4.6rem);
  line-height: .98;
  letter-spacing: -.035em;
  font-weight: 700;
  margin: 0 0 1.1rem;
  font-variation-settings: "SOFT" 0, "WONK" 1;
}
.lede { font-size: 1.06rem; color: var(--ink-soft); max-width: 46ch; margin: 0 0 1.6rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.hero-note {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--ink-soft);
  margin: 0;
}

.hero-figure { margin: 0; }
.hero-figure img {
  width: 100%;
  aspect-ratio: 14 / 9;
  object-fit: cover;
  border: 1px solid var(--rule);
  filter: saturate(.82) contrast(1.04) sepia(.14);
  box-shadow: var(--shadow);
}
.hero-figure figcaption,
.gallery figcaption {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .68rem;
  letter-spacing: .04em;
  color: var(--ink-soft);
  margin-top: .6rem;
  line-height: 1.5;
}

/* --- audio-visualizer bars (visual only, no sound) ---------------- */
.visualizer {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 54px;
  padding-top: .5rem;
  border-top: 1px solid var(--rule);
}
.visualizer span {
  flex: 1;
  min-width: 2px;
  height: 100%;
  background: linear-gradient(180deg, var(--a), var(--c));
  transform-origin: 50% 100%;
  transform: scaleY(var(--rest, .16));
  animation: pulse 1.9s ease-in-out infinite alternate;
}
.visualizer span:nth-child(3n)   { background: linear-gradient(180deg, var(--b), var(--a)); animation-duration: 2.4s; }
.visualizer span:nth-child(4n)   { background: linear-gradient(180deg, var(--c), var(--b)); animation-duration: 1.5s; }
.visualizer span:nth-child(5n)   { animation-duration: 2.9s; }
.visualizer span:nth-child(7n)   { animation-duration: 1.2s; }
.visualizer span:nth-child(1)  { animation-delay: -.1s; }
.visualizer span:nth-child(2)  { animation-delay: -.7s; }
.visualizer span:nth-child(3)  { animation-delay: -.3s; }
.visualizer span:nth-child(4)  { animation-delay: -1.1s; }
.visualizer span:nth-child(5)  { animation-delay: -.5s; }
.visualizer span:nth-child(6)  { animation-delay: -1.4s; }
.visualizer span:nth-child(7)  { animation-delay: -.2s; }
.visualizer span:nth-child(8)  { animation-delay: -.9s; }
.visualizer span:nth-child(9)  { animation-delay: -1.6s; }
.visualizer span:nth-child(10) { animation-delay: -.4s; }
.visualizer span:nth-child(11) { animation-delay: -1.2s; }
.visualizer span:nth-child(12) { animation-delay: -.8s; }
.visualizer span:nth-child(13) { animation-delay: -1.7s; }
.visualizer span:nth-child(14) { animation-delay: -.6s; }
.visualizer span:nth-child(15) { animation-delay: -1.0s; }
.visualizer span:nth-child(16) { animation-delay: -.15s; }
.visualizer span:nth-child(17) { animation-delay: -1.3s; }
.visualizer span:nth-child(18) { animation-delay: -.45s; }
.visualizer span:nth-child(19) { animation-delay: -1.8s; }
.visualizer span:nth-child(20) { animation-delay: -.75s; }
.visualizer span:nth-child(21) { animation-delay: -1.05s; }
.visualizer span:nth-child(22) { animation-delay: -.25s; }
.visualizer span:nth-child(23) { animation-delay: -1.5s; }
.visualizer span:nth-child(24) { animation-delay: -.55s; }
.visualizer span:nth-child(25) { animation-delay: -1.9s; }
.visualizer span:nth-child(26) { animation-delay: -.35s; }
.visualizer span:nth-child(27) { animation-delay: -1.15s; }
.visualizer span:nth-child(28) { animation-delay: -.65s; }

@keyframes pulse {
  from { transform: scaleY(var(--rest, .14)); }
  to   { transform: scaleY(var(--peak, 1)); }
}

/* --- strip -------------------------------------------------------- */
.strip {
  display: grid;
  gap: 1rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 48rem) { .strip { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.strip p {
  margin: 0;
  font-size: .95rem;
  color: var(--ink-soft);
  padding-left: .9rem;
  border-left: 3px solid var(--a);
}
.strip strong { color: var(--ink); font-weight: 600; }

/* --- menu (services) ---------------------------------------------- */
.menu { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-head { max-width: 52ch; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.section-note { color: var(--ink-soft); font-size: .95rem; margin: 0; }

.menu-group { margin-bottom: clamp(2rem, 5vw, 3.2rem); }
.menu-group h3 {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 2px solid var(--ink);
  padding-bottom: .55rem;
  margin: 0 0 1.1rem;
}

.item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .35rem 1.25rem;
  align-items: baseline;
  padding: .7rem 0;
  border-bottom: 1px dotted var(--rule);
}
.item-name { font-weight: 600; font-size: 1.02rem; }
.item-name em {
  display: block;
  font-style: normal;
  font-weight: 400;
  font-size: .86rem;
  color: var(--ink-soft);
  margin-top: .15rem;
  line-height: 1.45;
}
.price {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .84rem;
  font-weight: 500;
  color: var(--c);
  white-space: nowrap;
  text-align: right;
}

/* --- gallery ------------------------------------------------------ */
.gallery {
  display: grid;
  gap: clamp(1.2rem, 3vw, 2rem);
  padding: 0 0 clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 48rem) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery figure { margin: 0; }
.gallery img {
  width: 100%;
  aspect-ratio: 9 / 7;
  object-fit: cover;
  border: 1px solid var(--rule);
  filter: saturate(.8) contrast(1.05) sepia(.16);
}

/* --- about -------------------------------------------------------- */
.about {
  display: grid;
  gap: clamp(1.6rem, 4vw, 3rem);
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 56rem) { .about { grid-template-columns: 1.4fr 1fr; } }
.about-copy p { color: var(--ink-soft); max-width: 58ch; }
.about-copy p:first-of-type { color: var(--ink); }

.about-side {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  align-self: start;
}
.about-side h3 {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin: 0 0 1rem;
  color: var(--b);
}
.about-side ul { margin: 0; padding: 0; list-style: none; }
.about-side li {
  font-size: .92rem;
  padding: .45rem 0 .45rem 1.1rem;
  border-bottom: 1px dotted var(--rule);
  position: relative;
  color: var(--ink-soft);
}
.about-side li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.05em;
  width: .5rem; height: 2px;
  background: var(--c);
}
.aside-note { font-size: .84rem; color: var(--ink-soft); margin: 1rem 0 0; }

/* --- footer cards ------------------------------------------------- */
.footer-cards {
  display: grid;
  gap: clamp(1.2rem, 3vw, 2rem);
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}
@media (min-width: 56rem) { .footer-cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card h3 {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin: 0 0 1.1rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
}
.hours { margin: 0; }
.hours div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  padding: .38rem 0;
  border-bottom: 1px dotted var(--rule);
  font-size: .92rem;
}
.hours dt { color: var(--ink-soft); }
.hours dd { margin: 0; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .82rem; }
.hours .closed dt, .hours .closed dd { color: var(--c); }

.card address { font-style: normal; font-size: .95rem; line-height: 1.7; color: var(--ink-soft); }
.card-note { font-size: .85rem; color: var(--ink-soft); margin: 1rem 0 0; }
.card-call { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.card-call h3 { color: var(--bg); border-bottom-color: color-mix(in srgb, var(--bg) 30%, transparent); }
.card-call .card-note { color: color-mix(in srgb, var(--bg) 78%, transparent); }
.big-phone { margin: 0 0 .2rem; }
.big-phone a {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: clamp(1.15rem, 1rem + 1vw, 1.6rem);
  font-weight: 700;
  color: var(--a);
  text-decoration: none;
  letter-spacing: -.01em;
}
.big-phone a:hover { color: var(--c); }
.text-link {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

/* --- closing quote ------------------------------------------------ */
.quote { padding: clamp(2.5rem, 7vw, 5rem) 0; }
.quote blockquote {
  margin: 0;
  max-width: 40ch;
  border-left: 5px solid var(--a);
  padding-left: clamp(1rem, 3vw, 2rem);
}
.quote p {
  font-size: clamp(1.25rem, 1rem + 1.6vw, 2rem);
  line-height: 1.25;
  letter-spacing: -.02em;
  font-weight: 500;
  margin: 0 0 .9rem;
  font-variation-settings: "SOFT" 0, "WONK" 1;
}
.quote cite {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-style: normal;
}

/* --- footer ------------------------------------------------------- */
footer {
  margin-left: var(--spine-w);
  padding: 1.5rem var(--pad) 2.5rem;
  border-top: 1px solid var(--rule);
  background: var(--bg-2);
}
.claim-banner {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .72rem;
  letter-spacing: .04em;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: .5rem .8rem;
  text-decoration: none;
  margin-bottom: 1.1rem;
}
.claim-banner:hover { color: var(--c); border-color: var(--c); }
.footer-line {
  font-size: .82rem;
  color: var(--ink-soft);
  margin: 0 0 .5rem;
}
.attribution { font-size: .78rem; margin: 0; }
.attribution a { color: var(--ink-soft); }
.muted { color: var(--ink-soft); }

/* --- small screens: spine becomes a top band ---------------------- */
@media (max-width: 46rem) {
  :root { --spine-w: 0rem; }
  .spine {
    position: static;
    width: auto;
    height: auto;
    writing-mode: horizontal-tb;
    transform: none;
    padding: .55rem var(--pad);
    font-size: .68rem;
    letter-spacing: .22em;
    justify-content: flex-start;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .topbar { position: static; }
  .topbar nav { gap: .9rem; }
  .visualizer { height: 40px; }
}

/* --- reduced motion ----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .visualizer span { animation: none; transform: scaleY(.42); }
  .visualizer span:nth-child(2n) { transform: scaleY(.68); }
  .visualizer span:nth-child(3n) { transform: scaleY(.28); }
  .call-btn, .ghost-btn { transition: none; }
  .call-btn:hover { transform: none; }
}
