/* ============================================================
   Erilu Mobile Mechanic — Mississauga
   Composition: black + white + one colour per section,
   stacked headline, receipt/listing layout, grain overlay,
   drag-to-scroll band, gentle fade+rise on scroll.
   ============================================================ */

:root {
  --s1-bg: #0a0a0a;
  --s2-bg: #e10600;
  --s3-bg: #003c8a;
  --s4-bg: #f4ff33;
  --s5-bg: #0a0a0a;
  --s6-bg: #0a0a0a;

  --ink: #0a0a0a;
  --paper: #f5f4f0;
  --paper-dim: rgba(245, 244, 240, 0.72);
  --ink-dim: rgba(10, 10, 10, 0.72);

  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: "Bricolage Grotesque", "JetBrains Mono", system-ui, sans-serif;

  --gut: clamp(1.15rem, 5vw, 3rem);
  --rule: 1px dotted currentColor;
}

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

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

body {
  margin: 0;
  background: var(--s1-bg);
  color: var(--paper);
  font-family: var(--mono);
  font-size: clamp(0.94rem, 0.55vw + 0.82rem, 1.02rem);
  line-height: 1.62;
  font-variant-ligatures: none;
  overflow-x: hidden;
}

/* --- grain overlay ------------------------------------------------ */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.055;
  mix-blend-mode: overlay;
  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.82' numOctaves='4' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
}

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

a { color: inherit; }

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
  z-index: 10000;
  background: var(--paper);
  color: var(--ink);
  padding: 0.6rem 0.9rem;
}

/* --- header ------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 3vw, 2rem);
  padding: 0.7rem var(--gut);
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(245, 244, 240, 0.16);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex: 0 0 auto;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  background: var(--s2-bg);
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand-text em {
  font-style: normal;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper-dim);
}

.topnav {
  display: none;
  gap: 1.35rem;
  margin-left: auto;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.topnav a {
  text-decoration: none;
  color: var(--paper-dim);
  padding: 0.5rem 0;
  border-bottom: 1px solid transparent;
}
.topnav a:hover { color: var(--paper); border-bottom-color: var(--s2-bg); }

.call-btn {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-decoration: none;
  background: var(--s2-bg);
  color: #fff;
  padding: 0.5rem 0.85rem;
  min-height: 44px;
  justify-content: center;
  line-height: 1.15;
}
.call-label {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
}
.call-num { font-weight: 700; font-size: 0.9rem; white-space: nowrap; }

@media (min-width: 860px) {
  .topnav { display: flex; }
  .call-btn { margin-left: 0; }
}

/* --- section shell ------------------------------------------------ */
section { padding: clamp(3.2rem, 8vw, 6.5rem) 0; }

.wrap {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 var(--gut);
}

.kicker {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 1.4rem;
  opacity: 0.78;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 0.98;
  margin: 0 0 1.1rem;
  text-wrap: balance;
}

h2 { font-size: clamp(1.7rem, 4.6vw, 3rem); }
h3 { font-size: 1.06rem; letter-spacing: -0.01em; line-height: 1.2; margin-bottom: 0.45rem; }

.lede {
  max-width: 46ch;
  font-size: clamp(0.98rem, 0.5vw + 0.9rem, 1.12rem);
  margin: 0 0 2.4rem;
}

.fineprint {
  max-width: 52ch;
  font-size: 0.8rem;
  line-height: 1.6;
  opacity: 0.72;
  margin: 2rem 0 0;
}

/* --- stacked headline -------------------------------------------- */
.stack {
  font-size: clamp(2.5rem, 11vw, 6.4rem);
  margin-bottom: 1.8rem;
}
.stack span { display: block; }
.stack span:nth-child(2) { margin-left: 0.55em; }
.stack span:nth-child(3) { margin-left: -0.28em; }
.stack span:nth-child(4) { margin-left: 1.15em; }

@media (min-width: 700px) {
  .stack span:nth-child(2) { margin-left: 1.6em; }
  .stack span:nth-child(3) { margin-left: -0.7em; }
  .stack span:nth-child(4) { margin-left: 2.6em; }
}

/* --- buttons ------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.8rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 2px solid currentColor;
  transition: transform 160ms ease, background-color 160ms ease, color 160ms ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary { background: var(--s2-bg); border-color: var(--s2-bg); color: #fff; }
.btn-primary:hover { background: #ff1a0f; border-color: #ff1a0f; }

.btn-ghost { background: transparent; color: var(--paper); }
.btn-ghost:hover { background: var(--paper); color: var(--ink); }

.btn-big { font-size: 1.05rem; padding: 1rem 2.1rem; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

/* --- hero figure -------------------------------------------------- */
.hero-fig { margin: 0 0 2.6rem; }
.hero-fig img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: grayscale(0.35) contrast(1.06);
}
.hero-fig figcaption {
  font-size: 0.76rem;
  opacity: 0.66;
  margin-top: 0.7rem;
  max-width: 46ch;
}

.statline {
  list-style: none;
  margin: 0;
  padding: 1.4rem 0 0;
  border-top: var(--rule);
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
}
.statline li { display: flex; flex-direction: column; }
.statline b {
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}
.statline span {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.72;
  margin-top: 0.35rem;
}

/* --- receipt / listing ------------------------------------------- */
.receipt {
  max-width: 46rem;
  border-top: var(--rule);
  padding-top: 0.4rem;
}

.rline {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.85rem 0 0.2rem;
}
.rname { flex: 0 1 auto; font-weight: 700; }
.rdots {
  flex: 1 1 auto;
  border-bottom: var(--rule);
  opacity: 0.5;
  transform: translateY(-0.28em);
  min-width: 1.5rem;
}
.rmeta {
  flex: 0 0 auto;
  text-align: right;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  opacity: 0.9;
}
.rmeta a { text-decoration: none; border-bottom: 1px solid currentColor; }

.rnote {
  margin: 0 0 0.9rem;
  font-size: 0.82rem;
  line-height: 1.55;
  opacity: 0.78;
  max-width: 52ch;
}

.rline-closed .rname,
.rline-closed .rmeta { opacity: 0.55; }

.receipt-contact { margin-top: 2.6rem; }
.receipt-contact .rmeta { max-width: 60%; }

/* --- steps -------------------------------------------------------- */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0 0 3.4rem;
  padding: 0;
  display: grid;
  gap: 1.6rem;
  grid-template-columns: 1fr;
}
@media (min-width: 780px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}
.steps li {
  border-top: 3px solid currentColor;
  padding-top: 1rem;
}
.step-n {
  display: block;
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 0.6rem;
  opacity: 0.85;
}
.steps p { margin: 0; font-size: 0.85rem; line-height: 1.6; opacity: 0.86; }

/* --- drag band ---------------------------------------------------- */
.band {
  position: relative;
  margin: 0 calc(var(--gut) * -1);
  padding: 0 var(--gut);
}
.band-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  cursor: grab;
  padding-bottom: 0.5rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.band-track::-webkit-scrollbar { display: none; }
.band-track.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.band-track.is-dragging * { user-select: none; }

.band-item {
  flex: 0 0 auto;
  width: min(74vw, 22rem);
  margin: 0;
  scroll-snap-align: start;
}
.band-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: grayscale(0.4) contrast(1.05);
  transition: filter 260ms ease;
}
.band-item:hover img { filter: grayscale(0) contrast(1.05); }
.band-item figcaption {
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  margin-top: 0.55rem;
  opacity: 0.8;
}

.band-hint {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.6;
  margin: 0.9rem 0 0;
}

/* --- two column --------------------------------------------------- */
.two-col {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 820px) {
  .two-col { grid-template-columns: 1.05fr 0.95fr; gap: 3rem; }
}
.two-col p { margin: 0 0 1.1rem; max-width: 48ch; }
.two-col p:last-child { margin-bottom: 0; }

.area-fig { margin: 0; }
.area-fig img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: grayscale(0.45) contrast(1.05);
}
.area-fig figcaption {
  font-size: 0.74rem;
  opacity: 0.7;
  margin-top: 0.6rem;
}

/* --- closing ------------------------------------------------------ */
.s6 { text-align: center; }
.closing-h { font-size: clamp(1.9rem, 6vw, 3.6rem); margin-bottom: 0.6rem; }
.closing-p { margin: 0 0 2rem; opacity: 0.8; }
.closing-note {
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
  margin: 1.6rem 0 0;
}

/* --- footer ------------------------------------------------------- */
.site-footer {
  padding: 2.4rem 0 3.4rem;
  border-top: 1px solid rgba(245, 244, 240, 0.16);
  font-size: 0.78rem;
}
.foot-line { margin: 0 0 1.1rem; opacity: 0.72; }
.foot-line a { text-decoration: none; border-bottom: 1px solid currentColor; }

.claim-banner {
  display: inline-block;
  font-size: 0.74rem;
  text-decoration: none;
  padding: 0.5rem 0.8rem;
  background: rgba(245, 244, 240, 0.07);
  border: 1px solid rgba(245, 244, 240, 0.2);
  color: rgba(245, 244, 240, 0.82);
  margin-bottom: 1.4rem;
}
.claim-banner:hover {
  background: rgba(245, 244, 240, 0.14);
  color: var(--paper);
}

.attribution {
  margin: 0;
  font-size: 0.7rem;
  opacity: 0.5;
}
.attribution a { text-decoration: none; }

/* ============================================================
   SECTION COLOURS — each section takes over the full background
   ============================================================ */
.s1 { background: var(--s1-bg); color: var(--paper); }
.s2 { background: var(--s2-bg); color: #fff; }
.s3 { background: var(--s3-bg); color: #fff; }
.s4 { background: var(--s4-bg); color: var(--ink); }
.s5 { background: var(--s5-bg); color: var(--paper); }
.s6 { background: var(--s6-bg); color: var(--paper); }

.s4 .btn-ghost { color: var(--ink); }
.s4 .btn-ghost:hover { background: var(--ink); color: var(--s4-bg); }
.s4 .hero-fig img,
.s4 .band-item img { filter: grayscale(0.3) contrast(1.08); }

/* ============================================================
   MOTION — gentle fade + rise on scroll enter
   ============================================================ */
@keyframes fadeRise {
  from { opacity: 0; translate: 0 14px; }
  to   { opacity: 1; translate: 0 0; }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .wrap > * {
      animation: fadeRise 420ms cubic-bezier(.2, .7, .1, 1) both;
      animation-timeline: view();
      animation-range: entry 0% cover 22%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
