/* =========================================================================
   Lusk Mobile Repair — site styles
   Sections (in document order):
     Tokens · Base · Topbar · Nav · Buttons · Hero · Sections · Services
     About · Why · Gallery · Contact · Footer · Shared utilities · Media
   ========================================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg: #ffffff;
  --ink: #0a0a0a;
  --ink-2: #2a2a2a;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --steel: #f4f4f4;
  --accent: #c1272d;
  --accent-dark: #951f24;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #1a1a1a;
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 {
  font-family: 'Oswald', 'Inter', sans-serif;
  letter-spacing: 0.02em;
  line-height: 1.1;
  margin: 0 0 0.5em;
  text-transform: uppercase;
}
h2 { font-size: clamp(1.9rem, 3.5vw, 2.7rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
  border-bottom: 2px solid var(--accent);
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.topbar .badges { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.topbar .badges span { opacity: 0.85; }
.topbar a.tel { color: #fff; font-weight: 600; letter-spacing: 0.04em; }

/* ---------- Nav ---------- */
nav.main {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.25s ease;
}
nav.main.is-scrolled {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
nav.main .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 0.85rem; padding-bottom: 0.85rem;
}
nav.main ul {
  display: flex; gap: 1.6rem; list-style: none; padding: 0; margin: 0;
  font-size: 0.95rem; font-weight: 500;
}
nav.main ul a { color: var(--ink-2); }
nav.main ul a:hover { color: var(--accent); }

.brand { display: flex; align-items: center; gap: 0.65rem; }
.brand img, .brand .logo-fallback { height: 56px; width: auto; }
.brand img { mix-blend-mode: multiply; }
.brand .name {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}
.brand .name small {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  font-weight: 500;
  margin-top: 4px;
}

/* Visual styling for the JS-injected logo fallback (sized via .brand rule above). */
.logo-fallback {
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--ink);
  background: var(--ink); color: #fff;
  font-family: 'Oswald', sans-serif; font-weight: 700; font-size: 1.2rem;
  letter-spacing: 0.05em;
  border-radius: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; }
.nav-cta { display: inline-flex; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.85) 100%),
    url('../images/truck_01.jpg') center/cover no-repeat,
    linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}
.hero .container { padding: 6rem 1.25rem 5rem; position: relative; }
.hero .eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: #fff;
  background: var(--accent);
  padding: 0.4rem 0.85rem;
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  text-transform: uppercase;
  margin: 0 0 1rem;
  max-width: 18ch;
}
.hero h1 .accent { color: var(--accent); }
.hero .lede {
  max-width: 56ch;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 2rem;
}
.hero .cta-row { display: flex; gap: 0.85rem; flex-wrap: wrap; }
.hero .trust-strip {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 1.5rem;
  max-width: 880px;
}
.trust-item {
  display: flex; align-items: center; gap: 0.65rem;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.92);
}
.trust-item svg { flex: none; width: 22px; height: 22px; color: var(--accent); }
.trust-item strong { font-weight: 600; }

/* ---------- Sections ---------- */
section { padding: 5rem 0; }
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}
.section-head p { color: var(--muted); font-size: 1.05rem; margin-top: 0.5rem; }
.kicker {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* ---------- Services ---------- */
.services { background: var(--steel); }
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.service {
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.85rem 1.5rem;
  border-radius: 6px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
}
.service:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  border-color: var(--ink);
}
.service .icon { width: 52px; height: 52px; margin-bottom: 1rem; }
.service .icon svg { width: 26px; height: 26px; }
.service h3 { color: var(--ink); margin-bottom: 0.4rem; }
.service p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.about-grid .copy h2 { margin-bottom: 1.2rem; }
.about-grid .copy p { color: #333; font-size: 1.02rem; }
.about-grid .copy .signature {
  margin-top: 1.5rem;
  letter-spacing: 0.16em;
  font-size: 0.95rem;
  color: var(--ink);
}
.about-grid .copy .signature span { color: var(--muted); font-weight: 400; letter-spacing: 0.08em; }

.credentials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.credential {
  border: 2px solid var(--ink);
  padding: 1.4rem 1.2rem;
  text-align: center;
  background: #fff;
}
.credential .num { font-size: 2.4rem; }
.credential .label {
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  margin-top: 0.6rem;
  color: var(--ink);
}

.about-image {
  aspect-ratio: 4/5;
  background: var(--ink) center/cover no-repeat;
  background-image: url('../images/truck_02.jpg');
  background-position: center 30%;
  border-radius: 4px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}
.about-image::after {
  content: "VETERAN OWNED & OPERATED";
  position: absolute; left: -14px; bottom: 28px;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  padding: 0.65rem 1rem;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

/* ---------- Why ---------- */
.why { background: var(--ink); color: #fff; padding: 3.5rem 0; }
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  text-align: center;
}
.why-item .num { font-size: 2.6rem; margin-bottom: 0.4rem; }
.why-item .label {
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.gallery-grid .tile {
  aspect-ratio: 4/3;
  background: #1a1a1a center/cover no-repeat;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.gallery-grid .tile::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.55));
  transition: opacity 0.2s ease;
}
.gallery-grid .tile:hover::after { opacity: 0.4; }
.tile.t1 { background-image: url('../images/truck_01.jpg'); }
.tile.t2 { background-image: url('../images/truck_02.jpg'); }

/* ---------- Contact ---------- */
.contact { background: var(--steel); }
.contact-grid {
  display: flex;
  justify-content: center;
}
.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 2.25rem;
  border-radius: 6px;
  width: 100%;
  max-width: 560px;
}
.contact-card h3 { margin-bottom: 1.25rem; }
.contact-row {
  display: flex; gap: 0.9rem; align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-row:last-child { border-bottom: 0; }
.contact-row .ico { flex: none; width: 38px; height: 38px; }
.contact-row .ico svg { width: 18px; height: 18px; }
.contact-row .label {
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 2px;
}
.contact-row .value { font-weight: 600; color: var(--ink); }
.contact-row .value a:hover { color: var(--accent); }

.contact-cta {
  margin-top: 2.5rem;
  background: var(--ink);
  color: #fff;
  padding: 2.25rem;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
}
.contact-cta h3 { color: #fff; margin: 0; }
.contact-cta p { color: rgba(255, 255, 255, 0.78); margin: 0.4rem 0 0; }

/* ---------- Footer ---------- */
footer {
  background: #050505;
  color: rgba(255, 255, 255, 0.7);
  padding: 2.5rem 0 1.75rem;
  font-size: 0.9rem;
}
footer .container {
  display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: center;
}
footer .legal { font-size: 0.82rem; color: rgba(255, 255, 255, 0.5); }
footer strong {
  color: #fff;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.08em;
}
footer a { color: rgba(255, 255, 255, 0.85); }

/* ---------- Shared utilities (deduped patterns) ---------- */

/* Square dark icon tile with red glyph — used in service cards and contact rows. */
.service .icon,
.contact-row .ico {
  background: var(--ink);
  color: var(--accent);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Oswald uppercase label — section kickers, stat labels, signatures, hero eyebrow, ribbon. */
.kicker,
.hero .eyebrow,
.credential .label,
.why-item .label,
.contact-row .label,
.about-grid .copy .signature,
.about-image::after {
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
}

/* Oswald bold accent number — credential and "why" stat blocks. */
.credential .num,
.why-item .num {
  font-family: 'Oswald', sans-serif;
  color: var(--accent);
  font-weight: 700;
  line-height: 1;
}

/* ---------- Motion ---------- */

/* Reveal-on-scroll. main.js adds .in-view via IntersectionObserver, then strips
   .reveal on transitionend so element-level transitions (e.g. service hover)
   aren't held to the slower reveal timing. */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.55s cubic-bezier(0.2, 0.6, 0.2, 1),
    transform 0.55s cubic-bezier(0.2, 0.6, 0.2, 1);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}

.service-grid > .reveal:nth-child(2) { --reveal-delay: 60ms; }
.service-grid > .reveal:nth-child(3) { --reveal-delay: 120ms; }
.service-grid > .reveal:nth-child(4) { --reveal-delay: 180ms; }
.service-grid > .reveal:nth-child(5) { --reveal-delay: 240ms; }
.service-grid > .reveal:nth-child(6) { --reveal-delay: 300ms; }

.why-grid > .reveal:nth-child(2) { --reveal-delay: 80ms; }
.why-grid > .reveal:nth-child(3) { --reveal-delay: 160ms; }
.why-grid > .reveal:nth-child(4) { --reveal-delay: 240ms; }

.gallery-grid > .reveal:nth-child(2) { --reveal-delay: 100ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  nav.main { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Media: ≤820px ---------- */
@media (max-width: 820px) {
  .topbar { display: none; }
  nav.main ul { display: none; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-image { aspect-ratio: 4/3; }
}
