/* ============================================================
   J.D Mobile Mechanic — Brampton, ON
   Composition: black + white + one colour per section,
   stacked offset headlines, scroll-driven line reveals,
   broken bento grid, hover footnote annotations,
   patterned SVG tile background.
   ============================================================ */

:root {
  --ink: #0a0a0a;
  --paper: #f5f3ee;
  --red: #e10600;
  --blue: #003c8a;
  --acid: #f4ff33;

  --line: rgba(10, 10, 10, 0.14);
  --line-inv: rgba(255, 255, 255, 0.22);

  --pad: clamp(1.25rem, 5vw, 5rem);
  --maxw: 1240px;

  --step--1: clamp(0.78rem, 0.74rem + 0.2vw, 0.88rem);
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.1rem);
  --step-1: clamp(1.25rem, 1.1rem + 0.7vw, 1.6rem);
  --step-2: clamp(1.7rem, 1.3rem + 1.9vw, 2.9rem);
  --step-3: clamp(2.4rem, 1.3rem + 5vw, 5.6rem);

  --font-display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Fraunces", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
}

/* ---------- patterned SVG tile background ---------- */
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24'><circle cx='2' cy='2' r='1.1' fill='%230a0a0a' fill-opacity='0.13'/><path d='M0 24 L24 0' stroke='%230a0a0a' stroke-opacity='0.05' stroke-width='1'/></svg>");
  background-size: 24px 24px;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

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

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.skip-none { position: absolute; left: -9999px; }

/* ---------- shell ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

section { padding-block: clamp(3.5rem, 9vw, 7.5rem); }

/* ---------- header ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 3px solid var(--red);
}
.masthead .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding-block: 0.7rem;
}
.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-1);
  letter-spacing: -0.02em;
  text-decoration: none;
  text-transform: uppercase;
  line-height: 1;
}
.brand span { color: var(--red); }
.masthead nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.masthead nav a {
  text-decoration: none;
  padding: 0.55rem 0.15rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
}
.masthead nav a:hover { border-bottom-color: var(--acid); }

.call-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 1.1rem;
  background: var(--red);
  color: #fff;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  border: 2px solid var(--red);
  transition: background 0.18s ease, color 0.18s ease;
}
.call-btn:hover { background: var(--acid); color: var(--ink); border-color: var(--acid); }

/* ---------- stacked offset headline ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.92;
  margin: 0;
  text-transform: uppercase;
}
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); line-height: 1.05; }

h1 span { display: block; }
h1 span:nth-child(2) { margin-left: 0.9em; }
h1 span:nth-child(3) { margin-left: -0.35em; }

@media (min-width: 700px) {
  h1 span:nth-child(2) { margin-left: 2em; }
  h1 span:nth-child(3) { margin-left: -1em; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0 0 1.1rem;
  opacity: 0.75;
}

/* ---------- scroll-driven line reveal ---------- */
@keyframes riseIn {
  from { opacity: 0; translate: 0 22px; }
  to   { opacity: 1; translate: 0 0; }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .rise {
      animation: riseIn linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 38%;
    }
    .rise:nth-of-type(2) { animation-range: entry 0% cover 46%; }
    .rise:nth-of-type(3) { animation-range: entry 0% cover 54%; }
  }
}

/* ---------- hover footnote annotations ---------- */
.note {
  border-bottom: 1px dotted currentColor;
  cursor: help;
  position: relative;
  font-weight: 600;
}
.note::after {
  content: attr(data-note);
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.55rem);
  width: max-content;
  max-width: min(19rem, 70vw);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.01em;
  padding: 0.5rem 0.65rem;
  opacity: 0;
  translate: 0 6px;
  pointer-events: none;
  transition: opacity 0.16s ease, translate 0.16s ease;
  z-index: 20;
}
.note:hover::after,
.note:focus-visible::after { opacity: 1; translate: 0 0; }

/* ---------- hero ---------- */
.hero {
  background: var(--ink);
  color: var(--paper);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20'><path d='M0 20 L20 0' stroke='%23ffffff' stroke-opacity='0.07' stroke-width='1'/></svg>");
  background-size: 20px 20px;
  padding-block: clamp(3rem, 8vw, 6rem);
}
.hero-grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: repeat(6, 1fr); align-items: end; }
  .hero-copy { grid-column: 1 / 5; }
  .hero-shot { grid-column: 4 / 7; grid-row: 1; }
}
.hero h1 { margin-bottom: 1.4rem; }
.hero h1 span:nth-child(3) { color: var(--acid); }
.hero-lede {
  font-size: var(--step-1);
  max-width: 34ch;
  margin: 0 0 1.6rem;
}
.hero-shot img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 3px solid var(--paper);
  filter: grayscale(1) contrast(1.08);
}
.hero-shot figcaption {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-top: 0.6rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.ghost-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.6rem 1.1rem;
  border: 2px solid var(--paper);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}
.ghost-btn:hover { background: var(--paper); color: var(--ink); }

.rating-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  align-items: center;
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-inv);
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.stars { color: var(--acid); letter-spacing: 0.15em; }

/* ---------- broken bento ---------- */
.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}
@media (min-width: 860px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .b-a { grid-column: 1 / 4; }
  .b-b { grid-column: 4 / 7; margin-top: 3.5rem; }
  .b-c { grid-column: 2 / 5; }
  .b-d { grid-column: 5 / 7; margin-top: -2.5rem; }
  .b-e { grid-column: 1 / 3; margin-top: 2rem; }
  .b-f { grid-column: 3 / 7; }
}

.card {
  background: var(--paper);
  border: 2px solid var(--ink);
  padding: clamp(1.1rem, 2.5vw, 1.75rem);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.card p { margin: 0; }
.card .tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.65;
}
.card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 2px solid var(--ink);
  filter: grayscale(1) contrast(1.05);
  transition: filter 0.3s ease;
}
.card:hover img { filter: grayscale(0) contrast(1); }

/* ---------- section colour rotation ---------- */
.sec-red { background: var(--red); color: #fff; }
.sec-blue { background: var(--blue); color: #fff; }
.sec-acid { background: var(--acid); color: var(--ink); }
.sec-ink { background: var(--ink); color: var(--paper); }

/* ---------- services list ---------- */
.svc-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 2.5rem;
  border-top: 2px solid currentColor;
}
@media (min-width: 760px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); column-gap: clamp(1.5rem, 5vw, 4rem); }
}
.svc {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid currentColor;
  border-bottom-color: color-mix(in srgb, currentColor 35%, transparent);
}
.svc .num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  padding-top: 0.35rem;
  opacity: 0.7;
}
.svc h3 { margin-bottom: 0.35rem; }
.svc p { margin: 0; font-size: 0.95rem; opacity: 0.92; }
.svc .price {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 0.5rem;
  display: block;
}

/* ---------- process ---------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  margin-top: 2.5rem;
}
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps > :nth-child(2) { margin-top: 2.5rem; }
}
.step {
  border-top: 4px solid var(--ink);
  padding-top: 1rem;
}
.sec-ink .step, .sec-blue .step { border-top-color: var(--acid); }
.step .num {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  display: block;
  margin-bottom: 0.6rem;
  opacity: 0.5;
}
.step h3 { margin-bottom: 0.5rem; }
.step p { margin: 0; font-size: 0.95rem; }

/* ---------- coverage ---------- */
.coverage {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
@media (min-width: 860px) {
  .coverage { grid-template-columns: repeat(6, 1fr); }
  .coverage-copy { grid-column: 1 / 4; }
  .coverage-shot { grid-column: 4 / 7; margin-top: 3rem; }
}
.area-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.area-list li {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1.5px solid currentColor;
  padding: 0.4rem 0.7rem;
}
.coverage-shot img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 3px solid currentColor;
}

/* ---------- hours + contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.75rem, 4vw, 3rem);
  margin-top: 2.5rem;
}
@media (min-width: 860px) {
  .contact-grid { grid-template-columns: repeat(6, 1fr); }
  .hours-col { grid-column: 1 / 4; }
  .reach-col { grid-column: 4 / 7; margin-top: 2.5rem; }
}
.hours {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 2px solid currentColor;
}
.hours li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}
.hours .day { text-transform: uppercase; }
.hours .open { font-weight: 700; }

.reach {
  border: 2px solid currentColor;
  padding: clamp(1.25rem, 3vw, 2rem);
}
.reach dl { margin: 0; }
.reach dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-top: 1.1rem;
}
.reach dt:first-child { margin-top: 0; }
.reach dd { margin: 0.25rem 0 0; font-size: var(--step-1); }
.reach dd a { text-decoration: none; border-bottom: 2px solid currentColor; }
.reach dd a:hover { background: var(--acid); color: var(--ink); }
.reach .big-phone {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.6rem, 1rem + 3vw, 2.6rem);
  letter-spacing: -0.03em;
  display: inline-block;
  margin-top: 0.2rem;
}
.reach .fineprint {
  font-size: 0.85rem;
  margin: 1.4rem 0 0;
  opacity: 0.85;
}

/* ---------- reviews ---------- */
.reviews {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  margin-top: 2.5rem;
}
@media (min-width: 860px) {
  .reviews { grid-template-columns: repeat(3, 1fr); }
  .reviews > :nth-child(2) { margin-top: 2.25rem; }
}
.review {
  border-left: 4px solid var(--acid);
  padding-left: 1.1rem;
}
.review blockquote { margin: 0 0 0.75rem; font-size: 1.02rem; }
.review cite {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-style: normal;
  opacity: 0.8;
}

/* ---------- footer ---------- */
footer.site-foot {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(2.5rem, 6vw, 4rem);
  border-top: 4px solid var(--red);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
@media (min-width: 760px) {
  .foot-grid { grid-template-columns: 2fr 1fr 1fr; }
}
footer.site-foot h3 { font-size: var(--step-1); margin-bottom: 0.6rem; }
footer.site-foot p { margin: 0 0 0.5rem; font-size: 0.92rem; }
footer.site-foot a { color: var(--paper); }
.foot-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-inv);
}

.claim-banner {
  display: block;
  margin-top: 1.5rem;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line-inv);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  width: fit-content;
  max-width: 100%;
}
.claim-banner:hover { background: var(--acid); color: var(--ink); border-color: var(--acid); }

.attribution {
  position: static;
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  opacity: 0.55;
}
.attribution a { color: inherit; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .note::after { translate: 0 0; }
}
