/* ============================================================
   Tulip Garage — mobile mechanic, Brikama / Serrekunda
   Composition: desaturated 70s photo print · vertical spine H1
   scroll progress strip · menu-first cards · grain overlay
   ============================================================ */

:root {
  --bg: #efe6d0;
  --bg-2: #e6dabf;
  --paper: #f6efdd;
  --ink: #3a2f1a;
  --ink-soft: #6a5c3c;
  --a: #a67c00;
  --b: #6b7a3a;
  --c: #c04e1a;
  --rule: rgba(58, 47, 26, 0.22);
  --shadow: 0 1px 0 rgba(58, 47, 26, 0.12), 0 12px 28px -18px rgba(58, 47, 26, 0.5);
  --spine: 3.4rem;
  --maxw: 1080px;
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Crimson Pro", "Georgia", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
}

html[data-theme="dark"] {
  --bg: #221d14;
  --bg-2: #2b2418;
  --paper: #2a2318;
  --ink: #ece0c6;
  --ink-soft: #b3a483;
  --a: #d6a63a;
  --b: #97a85c;
  --c: #e0723c;
  --rule: rgba(236, 224, 198, 0.2);
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 14px 30px -18px rgba(0, 0, 0, 0.8);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1.02rem, 0.55vw + 0.9rem, 1.16rem);
  line-height: 1.62;
  min-height: 100vh;
  overflow-x: hidden;
  text-wrap: pretty;
  transition: background-color 0.35s ease, color 0.35s ease;
}

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

/* ---------- grain overlay (background axis) ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
}
html[data-theme="dark"] body::before { mix-blend-mode: screen; opacity: 0.05; }

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

/* ---------- vertical spine H1 (typography axis) ---------- */
.spine {
  position: fixed;
  left: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  margin: 0;
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 60;
  font-weight: 600;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  letter-spacing: 0.06em;
  color: var(--ink);
  pointer-events: none;
  user-select: none;
}
.spine span { color: var(--c); }

/* ---------- shell ---------- */
.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.1rem, 4vw, 2.5rem) 0 clamp(calc(var(--spine) + 0.6rem), 8vw, 5.5rem);
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(9px);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-bottom: 1px solid var(--rule);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.6rem clamp(1.1rem, 4vw, 2.5rem) 0.6rem clamp(calc(var(--spine) + 0.6rem), 8vw, 5.5rem);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-right: auto;
}
.brand b { color: var(--ink); font-weight: 700; }
.topbar nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.topbar nav a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.55rem 0.15rem;
  border-bottom: 1px solid transparent;
}
.topbar nav a:hover { color: var(--c); border-bottom-color: var(--c); }

.theme-toggle {
  min-width: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}
.theme-toggle:hover { border-color: var(--c); color: var(--c); }

.call-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.55rem 1.05rem;
  background: var(--c);
  color: #fff6e6;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.call-btn:hover { background: var(--a); color: #2a2210; }

/* ---------- hero ---------- */
.hero {
  padding: clamp(2.4rem, 7vw, 5rem) 0 clamp(1.6rem, 4vw, 2.6rem);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.6rem, 4vw, 3.2rem);
  align-items: center;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--a);
  margin: 0 0 0.9rem;
}
.hero h2 {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 100;
  font-weight: 600;
  font-size: clamp(2.3rem, 6.4vw, 4.1rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
}
.hero h2 em { font-style: italic; color: var(--c); }
.hero .lede {
  font-size: clamp(1.06rem, 1.4vw, 1.24rem);
  color: var(--ink-soft);
  max-width: 34ch;
  margin: 0 0 1.5rem;
}
.hero-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center; }
.ghost-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 1.05rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ghost-btn:hover { background: var(--ink); color: var(--bg); }

.hero-figure { position: relative; }
.hero-figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 3px;
  filter: saturate(0.72) contrast(1.04) sepia(0.14);
  box-shadow: var(--shadow);
}
.hero-figure figcaption {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.6rem;
}

/* ---------- audio visualizer bars (signature axis) ---------- */
.viz {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 46px;
  margin: 1.4rem 0 0;
}
.viz i {
  display: block;
  width: 4px;
  height: 100%;
  background: var(--b);
  transform-origin: 50% 100%;
  transform: scaleY(0.18);
  border-radius: 1px;
  animation: pulse 1.5s ease-in-out infinite;
}
.viz i:nth-child(3n) { background: var(--a); }
.viz i:nth-child(4n) { background: var(--c); }
@keyframes pulse {
  0%, 100% { transform: scaleY(0.16); }
  50%      { transform: scaleY(1); }
}
.viz-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0.5rem 0 0;
}

/* ---------- section furniture ---------- */
section { padding: clamp(2.2rem, 5vw, 3.6rem) 0; }
.sec-head { margin-bottom: 1.6rem; }
.sec-head h3 {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 60;
  font-weight: 600;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  line-height: 1.06;
  margin: 0 0 0.5rem;
}
.sec-head p { margin: 0; color: var(--ink-soft); max-width: 62ch; }

/* ---------- service board (menu-first cards) ---------- */
.board { display: grid; gap: 2.4rem; }
.board-group h4 {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--a);
  margin: 0 0 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}
.item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem 1.2rem;
  padding: 0.72rem 0;
  border-bottom: 1px dotted var(--rule);
  align-items: baseline;
}
.item:last-child { border-bottom: 0; }
.item .name {
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 30;
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0;
}
.item .price {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--c);
  white-space: nowrap;
}
.item .desc {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.96rem;
  color: var(--ink-soft);
  max-width: 62ch;
}
.board-note {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  border-left: 3px solid var(--b);
  padding: 0.5rem 0 0.5rem 0.9rem;
  margin-top: 1.4rem;
}

/* ---------- photo strip ---------- */
.strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.strip figure { margin: 0; }
.strip img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
  filter: saturate(0.7) contrast(1.05) sepia(0.16);
  box-shadow: var(--shadow);
}
.strip figcaption {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.5rem;
}

/* ---------- story ---------- */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.4rem, 4vw, 3rem); }
.story p { margin: 0 0 1rem; }
.story p:last-child { margin-bottom: 0; }
.pull {
  border-left: 3px solid var(--a);
  padding-left: 1rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--ink);
}

/* ---------- footer cards ---------- */
.footer-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
}
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 1.3rem 1.25rem;
  box-shadow: var(--shadow);
}
.card h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--a);
  margin: 0 0 0.9rem;
}
.hours { list-style: none; margin: 0; padding: 0; }
.hours li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.32rem 0;
  border-bottom: 1px dotted var(--rule);
  font-size: 0.95rem;
}
.hours li:last-child { border-bottom: 0; }
.hours .closed { color: var(--c); }
.card p { margin: 0 0 0.7rem; font-size: 0.98rem; }
.card p:last-child { margin-bottom: 0; }
.card a { color: var(--c); }
.card .big-phone {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.card .big-phone:hover { color: var(--c); }

/* ---------- closing quote ---------- */
.closing {
  text-align: center;
  padding: clamp(2.4rem, 6vw, 4rem) 0 clamp(1.6rem, 4vw, 2.4rem);
}
.closing blockquote {
  margin: 0 auto;
  max-width: 30ch;
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 80;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.4rem, 3.6vw, 2.1rem);
  line-height: 1.2;
}
.closing cite {
  display: block;
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- claim banner + attribution ---------- */
.claim-wrap {
  border-top: 1px solid var(--rule);
  padding: 1.1rem 0 0.6rem;
  text-align: center;
}
.claim-banner {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  text-decoration: none;
}
.claim-banner:hover { color: var(--c); border-color: var(--c); }

.attribution {
  position: static;
  text-align: center;
  padding: 0.4rem 0 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  opacity: 0.55;
}
.attribution a { color: inherit; }

/* ---------- focus ---------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--c);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-figure img { aspect-ratio: 16 / 10; }
  .story { grid-template-columns: 1fr; }
  .footer-cards { grid-template-columns: 1fr; }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip figure:last-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  :root { --spine: 2.1rem; }
  .spine { font-size: 1.15rem; left: 0.3rem; letter-spacing: 0.02em; }
  .topbar nav { display: none; }
  .strip { grid-template-columns: 1fr; }
  .strip figure:last-child { grid-column: auto; }
  .viz { height: 34px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .viz i { animation: none; transform: scaleY(0.42); }
  .viz i:nth-child(2n) { transform: scaleY(0.7); }
  .viz i:nth-child(3n) { transform: scaleY(0.28); }
  .progress-bar { animation: none; transform: scaleX(1); }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
