/* ============================================================
   3LY's Mobile Mechanic — faded-print palette, vertical spine,
   menu-first cards, grain overlay, cursor-reveal photo.
   ============================================================ */

:root {
  --bg:      #efe6d0;
  --bg-alt:  #e6d9bd;
  --paper:   #f6efdd;
  --ink:     #3a2f1a;
  --ink-soft:#6a5c3e;
  --a:       #a67c00;   /* mustard */
  --b:       #6b7a3a;   /* avocado */
  --c:       #c04e1a;   /* burnt sienna */
  --rule:    rgba(58, 47, 26, 0.22);
  --rule-strong: rgba(58, 47, 26, 0.45);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --mono:  "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(1.25rem, 5vw, 4rem);
  --spine-w: 3.5rem;
  --maxw: 74rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #1c1811;
    --bg-alt:  #221d14;
    --paper:   #262019;
    --ink:     #f0e6d2;
    --ink-soft:#b9a986;
    --a:       #d9a83a;
    --b:       #9aab5c;
    --c:       #e0703a;
    --rule:    rgba(240, 230, 210, 0.20);
    --rule-strong: rgba(240, 230, 210, 0.42);
  }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  font-variation-settings: "opsz" 20;
  overflow-x: hidden;
}

/* ---- grain overlay (BACKGROUND axis) ---- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.055;
  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.82' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}
@media (prefers-color-scheme: dark) {
  body::before { opacity: 0.085; }
}

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

a { color: var(--c); 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 (MOTION axis) ---- */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 4px;
  z-index: 60;
  background: var(--rule);
}
.progress__bar {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--b), var(--a) 55%, var(--c));
  transform-origin: 0 50%;
  transform: scaleX(0);
  animation: fill linear both;
  animation-timeline: scroll(root block);
}
@keyframes fill { to { transform: scaleX(1); } }

/* ---- vertical spine label (TYPOGRAPHY axis) ---- */
.spine {
  position: fixed;
  left: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-soft);
  z-index: 40;
  pointer-events: none;
  white-space: nowrap;
}

/* ---- top bar ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem var(--gutter) 0.85rem calc(var(--gutter) + var(--spine-w));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--rule);
}
.topbar__mark { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; line-height: 1.05; }
.topbar__num { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.topbar__sub { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-soft); }

.topbar__nav { display: flex; gap: 1.35rem; margin-left: auto; }
.topbar__nav a {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.6rem 0;
}
.topbar__nav a:hover { color: var(--c); }

.topbar__call {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  padding: 0.5rem 1.05rem;
  min-height: 44px;
  justify-content: center;
  background: var(--paper);
}
.topbar__call:hover { border-color: var(--c); }
.topbar__calllabel { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); }
.topbar__callnum { font-weight: 600; font-size: 0.95rem; white-space: nowrap; }

/* ---- layout wrappers ---- */
.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-left: calc(var(--gutter) + var(--spine-w));
}
.wrap--narrow { max-width: 52rem; }

.band { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.band--alt { background: var(--bg-alt); border-block: 1px solid var(--rule); }

.band__head { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.band__head h2 {
  font-size: clamp(1.85rem, 1.2rem + 2.6vw, 3rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0.4rem 0 0.9rem;
  text-wrap: balance;
}
.band__note { color: var(--ink-soft); margin: 0; max-width: 40rem; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--b);
  margin: 0;
}

/* ---- hero ---- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter) clamp(3rem, 6vw, 5rem) calc(var(--gutter) + var(--spine-w));
  max-width: var(--maxw);
  margin-inline: auto;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 62rem) {
  .hero { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}

.hero__title {
  font-size: clamp(2.4rem, 1.3rem + 5vw, 4.4rem);
  line-height: 0.98;
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0.6rem 0 1.1rem;
  font-variation-settings: "opsz" 120;
}
.hero__lede { color: var(--ink-soft); max-width: 34rem; margin: 0 0 1.75rem; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.btn--solid { background: var(--c); color: #fff8ec; }
.btn--solid:hover { background: var(--a); color: #2a2110; transform: translateY(-2px); }
.btn--ghost { border-color: var(--rule-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--c); color: var(--c); transform: translateY(-2px); }

.hero__facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.hero__facts li { padding-left: 1.15rem; position: relative; }
.hero__facts li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 0.5rem; height: 0.5rem;
  background: var(--b);
  border-radius: 50%;
}
.hero__facts strong { color: var(--ink); }

/* ---- cursor-reveal photo (SIGNATURE axis) ---- */
.reveal {
  position: relative;
  margin: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
  overflow: hidden;
  background: var(--ink);
  aspect-ratio: 4 / 3;
  box-shadow: 0 18px 40px -28px rgba(58, 47, 26, 0.8);
}
.reveal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.04);
}
.reveal::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--bg);
  opacity: 0.94;
  -webkit-mask-image: radial-gradient(circle var(--r, 0px) at var(--cx, 50%) var(--cy, 50%), transparent 0, transparent calc(var(--r, 0px) * 0.72), #000 var(--r, 0px));
  mask-image: radial-gradient(circle var(--r, 0px) at var(--cx, 50%) var(--cy, 50%), transparent 0, transparent calc(var(--r, 0px) * 0.72), #000 var(--r, 0px));
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.reveal.is-open::after { opacity: 0; }
.reveal__hint {
  position: absolute;
  left: 0.9rem;
  bottom: 0.9rem;
  z-index: 3;
  margin: 0;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  border: 1px solid var(--rule);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  transition: opacity 0.3s ease;
}
.reveal.is-open .reveal__hint { opacity: 0; }

/* ---- service menu (LAYOUT axis) ---- */
.menu { display: grid; gap: clamp(2rem, 4vw, 3rem); }
@media (min-width: 60rem) {
  .menu { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2.5rem, 5vw, 4.5rem); }
}

.menu__group h3 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--rule-strong);
  color: var(--ink);
}
.menu__group h3::before {
  content: "";
  display: inline-block;
  width: 0.55rem; height: 0.55rem;
  margin-right: 0.6rem;
  background: var(--a);
  transform: rotate(45deg);
  vertical-align: 0.08em;
}

.item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1.25rem;
  align-items: baseline;
  padding: 0.7rem 0;
  border-bottom: 1px dotted var(--rule);
}
.item:last-child { border-bottom: 0; }
.item__name { margin: 0; font-weight: 600; font-size: 1rem; }
.item__desc { margin: 0.15rem 0 0; font-size: 0.87rem; line-height: 1.5; color: var(--ink-soft); }
.item__price {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--c);
  white-space: nowrap;
}

.menu__foot {
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule-strong);
  max-width: 46rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* ---- steps ---- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 56rem) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
}
.step {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.5rem 1.4rem 1.6rem;
}
.step__num {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--b);
  margin-bottom: 0.7rem;
}
.step h3 { margin: 0 0 0.6rem; font-size: 1.15rem; font-weight: 600; }
.step p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }

.quote { margin-top: clamp(2.5rem, 5vw, 4rem); max-width: 46rem; }
.quote blockquote { margin: 0; padding-left: 1.4rem; border-left: 3px solid var(--a); }
.quote p { font-size: clamp(1.1rem, 1rem + 0.6vw, 1.4rem); line-height: 1.5; margin: 0 0 0.6rem; font-style: italic; }
.quote cite {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---- footer cards ---- */
.cards { display: grid; gap: 1.5rem; }
@media (min-width: 58rem) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
}
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 1.5rem 1.4rem;
}
.card h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}
.card__lead { margin: 0 0 0.9rem; font-size: 0.92rem; }
.card__note { margin: 1rem 0 0; font-size: 0.85rem; color: var(--ink-soft); }

.hours { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.hours th, .hours td { padding: 0.34rem 0; text-align: left; font-weight: 400; }
.hours th { color: var(--ink-soft); }
.hours td { text-align: right; font-family: var(--mono); font-size: 0.8rem; }
.hours tr + tr th, .hours tr + tr td { border-top: 1px dotted var(--rule); }

.area { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; }
.area li { padding: 0.3rem 0 0.3rem 1.1rem; position: relative; color: var(--ink-soft); }
.area li::before {
  content: "";
  position: absolute; left: 0; top: 0.85em;
  width: 0.42rem; height: 0.42rem;
  background: var(--b);
}
.area--plain li::before { background: var(--c); }

/* ---- contact ---- */
.contact {
  display: grid;
  gap: 1.75rem;
  padding: 1.75rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: 4px;
}
@media (min-width: 48rem) {
  .contact { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: center; gap: 2.5rem; }
}
.contact__phone {
  font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--c);
  line-height: 1.1;
  display: inline-block;
  padding: 0.35rem 0;
}
.contact__phone:hover { color: var(--a); }
.contact__meta p { margin: 0 0 0.85rem; font-size: 0.92rem; }
.contact__meta p:last-child { margin-bottom: 0; }
.contact__label {
  display: block;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.15rem;
}

/* ---- footer ---- */
.footer {
  background: var(--ink);
  color: var(--bg);
  padding-block: clamp(2.5rem, 5vw, 3.5rem) 1.75rem;
}
@media (prefers-color-scheme: dark) {
  .footer { background: #100d08; color: var(--ink); }
}
.footer .wrap { padding-left: calc(var(--gutter) + var(--spine-w)); }
.footer a { color: var(--a); }
.footer a:hover { color: var(--c); }

.footer__grid { display: grid; gap: 1.5rem; }
@media (min-width: 52rem) {
  .footer__grid { grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
}
.footer__mark { margin: 0 0 0.4rem; font-weight: 800; font-size: 1.15rem; }
.footer__line { margin: 0; font-size: 0.9rem; opacity: 0.78; max-width: 26rem; }
.footer__label {
  margin: 0 0 0.3rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.65;
}
.footer__grid p { margin: 0; font-size: 0.92rem; }

.claim-wrap { margin: 2.25rem 0 0; }
.claim-banner {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 0.45rem 0.8rem;
}
.claim-banner:hover { color: var(--c); border-color: var(--c); }

.muted { font-size: 0.78rem; opacity: 0.62; margin: 1.25rem 0 0; }
.attribution a { color: inherit; }

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .progress__bar { animation: none; transform: scaleX(1); }
  .reveal::after { opacity: 0; }
  .reveal__hint { display: none; }
  .btn, .reveal::after, .reveal__hint { transition: none; }
  .btn:hover { transform: none; }
}

/* ---- small screens ---- */
@media (max-width: 46rem) {
  .spine { display: none; }
  .topbar { padding-left: var(--gutter); flex-wrap: wrap; gap: 0.75rem; }
  .topbar__nav { order: 3; width: 100%; margin-left: 0; gap: 1.1rem; overflow-x: auto; }
  .topbar__call { margin-left: auto; }
  .wrap, .hero, .footer .wrap { padding-left: var(--gutter); }
}
