/* ============================================================
   Erilu Mobile Mechanic
   bleached cream + oxblood + navy · thin display / heavy body
   ============================================================ */

:root {
  --bg: #f4ecdc;
  --bg-2: #ece1cd;
  --ink: #1a1b2e;
  --ink-soft: #4a4a5e;
  --accent: #6b1f1a;
  --secondary: #1e2a4a;
  --rule: rgba(26, 27, 46, 0.16);
  --plate: rgba(244, 236, 220, 0.92);

  --pad: clamp(1.1rem, 4vw, 3.5rem);
  --measure: 62ch;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
}

html[data-theme="dark"] {
  --bg: #14151f;
  --bg-2: #1c1e2c;
  --ink: #efe6d6;
  --ink-soft: #b3ac9d;
  --accent: #d98a7c;
  --secondary: #9fb0d8;
  --rule: rgba(239, 230, 214, 0.18);
  --plate: rgba(20, 21, 31, 0.9);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  line-height: 1.62;
  font-variation-settings: "opsz" 14;
  text-wrap: pretty;
  overflow-x: hidden;
}

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

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--secondary); }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

/* ---------- type ---------- */

h1, h2, h3 {
  font-family: var(--font-display);
  font-variation-settings: "opsz" 100, "SOFT" 0;
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-weight: 200;
  font-size: clamp(2.9rem, 11vw, 7.5rem);
  letter-spacing: -0.03em;
}

h2 {
  font-weight: 200;
  font-size: clamp(2rem, 5.6vw, 3.9rem);
}

h3 {
  font-weight: 300;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  margin-bottom: 0.45em;
}

p { margin: 0 0 1.05em; max-width: var(--measure); }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.1rem;
  max-width: none;
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.4rem;
  padding: 0.7rem var(--pad);
  background: var(--plate);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  line-height: 1;
  margin-right: auto;
}
.wordmark__name {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: 1.6rem;
  letter-spacing: 0.01em;
}
.wordmark__sub {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 0.2rem;
}

.topbar__nav {
  display: flex;
  gap: 1.15rem;
  flex-wrap: wrap;
}
.topbar__nav a {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.5rem 0;
}
.topbar__nav a:hover { color: var(--accent); }

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle__icon {
  width: 0.72rem; height: 0.72rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: inset -3px -2px 0 0 var(--bg);
}
html[data-theme="dark"] .theme-toggle__icon {
  box-shadow: none;
  background: var(--accent);
}

/* ---------- call button ---------- */

.callbtn {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1.05rem;
  background: var(--accent);
  color: #fdf7ec;
  text-decoration: none;
  border-radius: 3px;
  line-height: 1.15;
  transition: background 180ms ease, transform 180ms ease;
}
.callbtn:hover { background: var(--secondary); color: #fdf7ec; }
.callbtn__label {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.85;
}
.callbtn__num {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}
.callbtn--big { padding: 0.85rem 1.6rem; }
.callbtn--big .callbtn__num { font-size: clamp(1.3rem, 3.4vw, 1.9rem); }

/* ---------- layout primitives ---------- */

.bleed { margin: 0; }
.bleed img { width: 100%; height: auto; }

.sechead {
  position: relative;
  padding: clamp(3.2rem, 8vw, 6rem) var(--pad) clamp(1.6rem, 4vw, 2.6rem);
}
.sechead__lede { color: var(--ink-soft); font-weight: 600; }

/* ---------- hero ---------- */

.hero { position: relative; }

.hero__plate {
  padding: clamp(2rem, 6vw, 4.5rem) var(--pad) clamp(3rem, 7vw, 5rem);
  max-width: 74rem;
}
.hero__lede {
  font-size: clamp(1.05rem, 1.9vw, 1.32rem);
  font-weight: 600;
  color: var(--ink-soft);
  max-width: 46ch;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.6rem;
  margin-top: 1.8rem;
}
.hero__note {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  max-width: 26ch;
}

/* ---------- signature: dictated line ---------- */

.dictation {
  padding: clamp(3.5rem, 9vw, 7rem) var(--pad);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--bg-2);
}

.dictation__line {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(1.7rem, 5.2vw, 3.6rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
  max-width: 24ch;
  margin: 0 0 1.2rem;
}

.dictation__line span {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.35em);
  animation: dictate 420ms cubic-bezier(0.22, 0.7, 0.3, 1) forwards;
  animation-play-state: paused;
}
.dictation.is-live .dictation__line span { animation-play-state: running; }

.dictation__line span:nth-child(1)  { animation-delay: 0.10s; }
.dictation__line span:nth-child(2)  { animation-delay: 0.44s; }
.dictation__line span:nth-child(3)  { animation-delay: 0.62s; }
.dictation__line span:nth-child(4)  { animation-delay: 1.05s; }
.dictation__line span:nth-child(5)  { animation-delay: 1.34s; }
.dictation__line span:nth-child(6)  { animation-delay: 1.52s; }
.dictation__line span:nth-child(7)  { animation-delay: 1.92s; }
.dictation__line span:nth-child(8)  { animation-delay: 2.34s; }
.dictation__line span:nth-child(9)  { animation-delay: 2.52s; }
.dictation__line span:nth-child(10) { animation-delay: 2.70s; }
.dictation__line span:nth-child(11) { animation-delay: 3.02s; }
.dictation__line span:nth-child(12) { animation-delay: 3.20s; }
.dictation__line span:nth-child(13) { animation-delay: 3.38s; }
.dictation__line span:nth-child(14) { animation-delay: 3.86s; }

.dictation__line span:last-child::after {
  content: "";
  display: inline-block;
  width: 0.055em;
  height: 0.92em;
  margin-left: 0.1em;
  background: var(--accent);
  vertical-align: -0.08em;
  animation: caret 1.05s steps(1, end) infinite;
}

@keyframes dictate {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes caret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.dictation__attr {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- gallery ---------- */

.gallery { display: grid; grid-template-columns: repeat(12, 1fr); }
.gallery > * { grid-column: 1 / -1; }
.gallery > .half { grid-column: 1 / -1; }

.pair { display: grid; grid-template-columns: repeat(12, 1fr); }
.pair .half { grid-column: 1 / -1; margin: 0; }
.pair figcaption,
.bleed figcaption {
  padding: 0.7rem var(--pad) 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  max-width: 60ch;
}

@media (min-width: 760px) {
  .gallery > .half { grid-column: span 6; }
  .pair .half { grid-column: span 6; }
}

/* ---------- services ---------- */

.svcgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: clamp(2rem, 5vw, 3.5rem) var(--pad) clamp(2.5rem, 6vw, 4rem);
}
@media (min-width: 720px) {
  .svcgrid { grid-template-columns: repeat(2, 1fr); column-gap: clamp(2rem, 5vw, 4rem); }
}
@media (min-width: 1100px) {
  .svcgrid { grid-template-columns: repeat(3, 1fr); }
}

.svc {
  padding: 1.5rem 0 1.4rem;
  border-top: 1px solid var(--rule);
}
.svc p { font-weight: 600; color: var(--ink-soft); font-size: 0.95rem; }
.svc h3 { color: var(--ink); }
.svc__meta {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.72rem !important;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent) !important;
  margin: 0;
}

/* ---------- how it works ---------- */

.how { padding-bottom: clamp(2rem, 5vw, 3rem); }

.steps {
  list-style: none;
  margin: 0;
  padding: 0 var(--pad) clamp(2.5rem, 6vw, 4rem);
  display: grid;
  gap: 0;
  counter-reset: step;
}
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(2, 1fr); column-gap: clamp(2rem, 5vw, 4rem); }
}

.step {
  padding: 1.6rem 0;
  border-top: 1px solid var(--rule);
}
.step__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 200;
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.step p { font-weight: 600; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- service area ---------- */

.areagrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 0 var(--pad) clamp(2.5rem, 6vw, 4rem);
}
@media (min-width: 820px) {
  .areagrid { grid-template-columns: repeat(2, 1fr); gap: clamp(2rem, 5vw, 4rem); }
}

.areacol h3 { font-size: 1.15rem; }
.arealist {
  list-style: none;
  margin: 0;
  padding: 0;
}
.arealist li {
  padding: 0.62rem 0 0.62rem 1.1rem;
  border-top: 1px solid var(--rule);
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--ink-soft);
  position: relative;
}
.arealist li::before {
  content: "";
  position: absolute;
  left: 0; top: 1.15em;
  width: 0.42rem; height: 1px;
  background: var(--accent);
}

/* ---------- why ---------- */

.why { padding-bottom: clamp(2rem, 5vw, 3rem); }

.whygrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0 var(--pad) clamp(2.5rem, 6vw, 4rem);
}
@media (min-width: 760px) {
  .whygrid { grid-template-columns: repeat(2, 1fr); column-gap: clamp(2rem, 5vw, 4rem); }
}
@media (min-width: 1180px) {
  .whygrid { grid-template-columns: repeat(4, 1fr); }
}

.whycard {
  padding: 1.5rem 0;
  border-top: 2px solid var(--secondary);
}
.whycard h3 { font-size: 1.2rem; }
.whycard p { font-weight: 600; color: var(--ink-soft); font-size: 0.94rem; }

/* ---------- hours + contact ---------- */

.hours {
  background: var(--bg-2);
  border-top: 1px solid var(--rule);
  padding: clamp(3rem, 7vw, 5.5rem) var(--pad);
}

.hours__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
}
@media (min-width: 900px) {
  .hours__grid { grid-template-columns: 1fr 1fr; }
}

.hrtable {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4rem;
  font-size: 0.95rem;
}
.hrtable th,
.hrtable td {
  text-align: left;
  padding: 0.62rem 0;
  border-bottom: 1px solid var(--rule);
  font-weight: 700;
}
.hrtable th { color: var(--ink); width: 42%; }
.hrtable td { color: var(--ink-soft); font-weight: 600; }
.hrtable__closed td { color: var(--accent); }

.hours__note {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
  max-width: 42ch;
}

.addr {
  font-style: normal;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 1.8rem 0 1rem;
  line-height: 1.7;
}
.addr__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.addr__hint {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
  max-width: 44ch;
}

/* ---------- reviews ---------- */

.reviews { padding-bottom: clamp(2rem, 5vw, 3rem); }

.revgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0 var(--pad) clamp(2.5rem, 6vw, 4rem);
}
@media (min-width: 860px) {
  .revgrid { grid-template-columns: repeat(3, 1fr); column-gap: clamp(1.6rem, 4vw, 3rem); }
}

.rev {
  margin: 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
}
.rev p {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.08rem;
  line-height: 1.5;
  color: var(--ink);
}
.rev cite {
  font-style: normal;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- closing ---------- */

.closing {
  padding: clamp(3.5rem, 9vw, 7rem) var(--pad);
  border-top: 1px solid var(--rule);
}
.closing h2 { max-width: 18ch; }
.closing__note {
  margin-top: 1.4rem;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

/* ---------- footer ---------- */

.footer {
  background: var(--secondary);
  color: #efe6d6;
  padding: clamp(2.2rem, 5vw, 3.4rem) var(--pad);
}
html[data-theme="dark"] .footer { background: #0e0f16; }

.footer__inner { max-width: 70rem; }
.footer__biz {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(239, 230, 214, 0.82);
  max-width: 62ch;
}
.footer__biz a { color: #f0c9a8; }
.footer__biz a:hover { color: #fff; }

.claim-banner {
  display: inline-block;
  margin: 0.4rem 0 1.4rem;
  padding: 0.45rem 0.8rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(239, 230, 214, 0.9);
  background: rgba(239, 230, 214, 0.09);
  border: 1px solid rgba(239, 230, 214, 0.2);
  border-radius: 3px;
  text-decoration: none;
}
.claim-banner:hover {
  color: #fff;
  background: rgba(239, 230, 214, 0.16);
}

.muted { margin: 0; font-size: 0.76rem; }
.attribution a {
  color: rgba(239, 230, 214, 0.62);
  text-decoration: none;
}
.attribution a:hover { color: #fff; text-decoration: underline; }

/* ---------- anchor-positioned scroll labels ---------- */

.scrolllabel {
  display: none;
}

@supports (anchor-name: --x) {
  @media (min-width: 1180px) {
    .services h2,
    .how h2,
    .area h2,
    .why h2,
    .reviews h2 {
      anchor-name: --heading;
    }

    .scrolllabel {
      display: block;
      position: absolute;
      position-anchor: --heading;
      position-area: right span-block;
      margin-left: 2.2rem;
      width: 11rem;
      font-family: var(--font-body);
      font-weight: 800;
      font-size: 0.66rem;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--accent);
      opacity: 0;
      animation: labelin linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 42%;
    }
  }
}

@keyframes labelin {
  from { opacity: 0; transform: translateY(0.6rem); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .dictation__line span {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
  .dictation__line span:last-child::after { animation: none; opacity: 1; }

  .scrolllabel { animation: none; opacity: 1; transform: none; }

  * { transition-duration: 0.01ms !important; }
}
