/* ============================================================
   Andrew Mobile Truck Repair (On Call)
   Palette: bleached cream + oxblood + navy
   Layout: full-bleed image gallery
   ============================================================ */

:root {
  --bg: #f4ecdc;
  --bg-deep: #ece0c9;
  --ink: #1a1b2e;
  --ink-soft: #4a4a5e;
  --accent: #6b1f1a;
  --accent-soft: #8f3a32;
  --secondary: #1e2a4a;
  --rule: rgba(26, 27, 46, 0.16);
  --surface: rgba(255, 252, 244, 0.72);
  --glow-a: rgba(107, 31, 26, 0.10);
  --glow-b: rgba(30, 42, 74, 0.12);
  --shadow: 0 18px 40px -28px rgba(26, 27, 46, 0.55);

  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --pad: clamp(1.25rem, 5vw, 5rem);
  --measure: 62ch;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14151f;
    --bg-deep: #0e0f16;
    --ink: #f0e7d6;
    --ink-soft: #b9b2a4;
    --accent: #d98a7c;
    --accent-soft: #e8a99c;
    --secondary: #8fa6d8;
    --rule: rgba(240, 231, 214, 0.18);
    --surface: rgba(30, 32, 46, 0.66);
    --glow-a: rgba(217, 138, 124, 0.12);
    --glow-b: rgba(143, 166, 216, 0.14);
    --shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.9);
  }
}

:root[data-theme="dark"] {
  --bg: #14151f;
  --bg-deep: #0e0f16;
  --ink: #f0e7d6;
  --ink-soft: #b9b2a4;
  --accent: #d98a7c;
  --accent-soft: #e8a99c;
  --secondary: #8fa6d8;
  --rule: rgba(240, 231, 214, 0.18);
  --surface: rgba(30, 32, 46, 0.66);
  --glow-a: rgba(217, 138, 124, 0.12);
  --glow-b: rgba(143, 166, 216, 0.14);
  --shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.9);
}

/* ---------- base ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  background:
    radial-gradient(ellipse 70% 55% at 8% 0%, var(--glow-a) 0%, transparent 62%),
    radial-gradient(ellipse 65% 60% at 100% 78%, var(--glow-b) 0%, transparent 58%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-soft); }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.4rem, 1.4rem + 5.2vw, 5.2rem);
  font-variation-settings: "wdth" 88, "opsz" 72;
  animation: breathe 7s ease-in-out infinite;
}

h2 {
  font-size: clamp(1.75rem, 1.1rem + 2.6vw, 3.1rem);
  font-variation-settings: "wdth" 92, "opsz" 48;
  anchor-name: --heading;
}

h3 {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  font-weight: 600;
  font-variation-settings: "wdth" 96;
  margin-bottom: 0.45em;
}

@keyframes breathe {
  0%, 100% { font-variation-settings: "wdth" 78, "opsz" 72; }
  50%      { font-variation-settings: "wdth" 118, "opsz" 72; }
}

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem var(--pad);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--rule);
}

.wordmark { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.wordmark-main {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  line-height: 1;
  letter-spacing: -0.02em;
}
.wordmark-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.2rem;
}

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

.open-flag {
  display: none;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.open-flag .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #3f8f5c;
  box-shadow: 0 0 0 3px color-mix(in srgb, #3f8f5c 25%, transparent);
}
@media (min-width: 720px) { .open-flag { display: inline-flex; } }

.call-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fdf8ee;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 2px;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.call-btn:hover { background: var(--secondary); border-color: var(--secondary); color: #fdf8ee; }

.call-btn-lg {
  min-height: 56px;
  padding: 0.85rem 1.6rem;
  font-size: 1rem;
  letter-spacing: 0.03em;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

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

.hero { padding-bottom: clamp(2rem, 6vw, 4.5rem); }

.hero-media { position: relative; overflow: hidden; }
.hero-media img {
  width: 100%;
  height: clamp(240px, 46vw, 560px);
  object-fit: cover;
  filter: saturate(0.86) contrast(1.04);
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, color-mix(in srgb, var(--bg) 92%, transparent) 100%);
  pointer-events: none;
}

.hero-copy {
  padding: 0 var(--pad);
  margin-top: clamp(-3.5rem, -6vw, -1.5rem);
  position: relative;
}
.hero-copy .lede {
  font-size: clamp(1.05rem, 1rem + 0.5vw, 1.35rem);
  color: var(--ink-soft);
  max-width: 54ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem;
  margin: 1.8rem 0 2.4rem;
}

.ghost-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.2rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.ghost-link:hover { color: var(--accent); border-color: var(--secondary); }

.hero-facts {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
}
@media (min-width: 700px) { .hero-facts { grid-template-columns: repeat(3, 1fr); } }
.hero-facts dt {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.3rem;
}
.hero-facts dd { margin: 0; font-size: 0.98rem; }

/* ---------- bands ---------- */

.band { padding: clamp(3rem, 8vw, 6.5rem) var(--pad); }
.band-alt {
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.band-head { position: relative; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.band-head h2 { max-width: 22ch; }

/* anchor-positioned scroll label */
.scroll-label {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0.7;
  writing-mode: vertical-rl;
}
@supports (anchor-name: --x) {
  @media (min-width: 1100px) {
    .scroll-label {
      display: block;
      position: absolute;
      position-anchor: --heading;
      position-area: right span-block;
      margin-left: 1.6rem;
    }
  }
}

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

.services {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}
@media (min-width: 760px) {
  .services { grid-template-columns: repeat(2, 1fr); column-gap: clamp(2rem, 5vw, 4.5rem); }
}

.svc {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.svc h3 { color: var(--ink); }
.svc p { color: var(--ink-soft); font-size: 0.97rem; margin-bottom: 0; max-width: 46ch; }

/* ---------- full-bleed gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0;
  margin: 0;
}
.gallery > * { grid-column: 1 / -1; margin: 0; }
.gallery > .half { grid-column: 1 / -1; }
@media (min-width: 820px) { .gallery > .half { grid-column: span 6; } }

.gallery img {
  width: 100%;
  height: clamp(260px, 52vw, 620px);
  object-fit: cover;
  filter: saturate(0.88) contrast(1.03);
}
.gallery .half img { height: clamp(240px, 34vw, 440px); }

.gallery figcaption {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0.85rem var(--pad) 1.6rem;
  border-bottom: 1px solid var(--rule);
}

/* ---------- steps ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}
@media (min-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); column-gap: clamp(2rem, 5vw, 4.5rem); } }

.steps li {
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--rule);
}
.step-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.steps p { color: var(--ink-soft); font-size: 0.97rem; margin-bottom: 0; max-width: 46ch; }

/* ---------- prose ---------- */

.prose { max-width: 68ch; }
.prose p { font-size: clamp(1rem, 0.97rem + 0.2vw, 1.12rem); }
.prose p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3.4em;
  line-height: 0.82;
  padding: 0.08em 0.12em 0 0;
  color: var(--accent);
}

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

.reviews {
  display: grid;
  gap: 1.4rem;
}
@media (min-width: 860px) { .reviews { grid-template-columns: repeat(3, 1fr); } }

.reviews blockquote {
  margin: 0;
  padding: 1.6rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  box-shadow: var(--shadow);
}
.reviews blockquote p {
  font-size: 1rem;
  margin-bottom: 0.9rem;
  max-width: none;
}
.reviews cite {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  gap: 2rem;
  border-top: 1px solid var(--rule);
  padding-top: 2rem;
}
@media (min-width: 760px) { .contact-grid { grid-template-columns: repeat(2, 1fr); column-gap: clamp(2rem, 5vw, 4.5rem); } }

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}

.big-phone {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 1.1rem + 2.4vw, 2.9rem);
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.1em;
  margin-bottom: 0.8rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.big-phone:hover { color: var(--accent); border-color: var(--secondary); }

.contact-note { font-size: 0.92rem; color: var(--ink-soft); max-width: 42ch; }

address { font-style: normal; font-size: 1rem; line-height: 1.7; margin-bottom: 0.8rem; }

.hours { border-collapse: collapse; width: 100%; max-width: 22rem; }
.hours th, .hours td {
  text-align: left;
  padding: 0.42rem 0;
  border-bottom: 1px solid var(--rule);
  font-weight: 400;
  font-size: 0.95rem;
}
.hours th { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.hours td { text-align: right; }
.hours .closed td { color: var(--accent); }

.area-list { font-size: 0.98rem; color: var(--ink-soft); max-width: 40ch; }

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

.site-footer {
  padding: clamp(2.5rem, 6vw, 4rem) var(--pad) 5.5rem;
  border-top: 1px solid var(--rule);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}
.footer-line { font-size: 0.95rem; margin-bottom: 0.4rem; }
.footer-fine { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 1.6rem; }

.claim-banner {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--bg-deep) 70%, transparent);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.5rem 0.8rem;
  text-decoration: none;
  margin-bottom: 1.2rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.claim-banner:hover { color: var(--accent); border-color: var(--accent); }

.attribution {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-soft);
  opacity: 0.65;
  margin: 0;
}
.attribution a { color: inherit; }

/* ---------- sticky call bar (mobile) ---------- */

.sticky-call {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.7rem 1rem;
  background: var(--accent);
  color: #fdf8ee;
  text-decoration: none;
  border-radius: 3px;
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.6);
}
.sticky-call:hover { color: #fdf8ee; background: var(--secondary); }
.sticky-call-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.85;
}
.sticky-call-num { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }

@media (min-width: 900px) { .sticky-call { display: none; } }

/* ---------- motion preferences ---------- */

@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;
  }
  h1 { font-variation-settings: "wdth" 92, "opsz" 72; }
}
