/* Rojas Trailer Repair LLC — static site styles. Mobile-first. */

/* Heading font. Empera is the brand face; the site uses Barlow Condensed until the file is added.
   TODO: to use Empera, put Empera-Regular.woff2 in /fonts and uncomment the url() line below. */
@font-face {
  font-family: "Empera";
  src: local("Empera Regular"), local("Empera-Regular")
       /* , url("fonts/Empera-Regular.woff2") format("woff2") */;
  font-display: swap;
}

:root {
  /* Brand colors (identity PDF) */
  --red: #D12424;
  --red-dark: #A40607;
  --gray: #B2B2B2;
  --charcoal: #333333;
  --white: #FFFFFF;

  /* Roles */
  --ink: var(--charcoal);
  --ink-soft: #555555;
  --surface: var(--white);
  --surface-tint: #F2F2F2;
  --line: #767676;          /* 4.5:1 on white, used for form borders */
  --on-dark: #FFFFFF;
  --on-dark-soft: #D4D4D4;  /* 8.9:1 on charcoal */

  --font-head: "Empera", "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Mozilla Text", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --cut: 12px;              /* chamfer on buttons and tags */
  --cut-lg: 24px;           /* chamfer on cards */
  --wrap: 72rem;
  --gutter: 1rem;
  --callbar-h: 64px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  padding-bottom: calc(var(--callbar-h) + env(safe-area-inset-bottom));
}
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1;
  margin: 0;
  text-wrap: balance;
}
h2 { font-size: clamp(2.25rem, 7vw, 3.5rem); letter-spacing: .005em; }
h3 { font-size: 1.5rem; line-height: 1.1; }
p { margin: 0; }
a { color: inherit; }
address { font-style: normal; }
ul[role="list"] { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
/* On dark or red backgrounds the red ring is too faint (2.4:1 on charcoal), so it turns white there.
   Buttons keep their own inner ring in their text colour. */
.topbar :focus-visible:not(.btn), .header :focus-visible:not(.btn), .hero :focus-visible:not(.btn),
.section--dark :focus-visible:not(.btn), .card--road :focus-visible:not(.btn), .catalog-card :focus-visible:not(.btn),
.footer :focus-visible:not(.btn), .pairbox :focus-visible:not(.btn) { outline-color: var(--white); }
/* Keyboard focus never ends up hidden under the phone Call / Text bar */
@media (max-width: 899px) {
  html { scroll-padding-bottom: calc(var(--callbar-h) + env(safe-area-inset-bottom) + 16px); }
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
section[id] { scroll-margin-top: 1rem; }

.skip-link {
  position: absolute; left: .5rem; top: -4rem; z-index: 100;
  background: var(--white); color: var(--ink); padding: .75rem 1rem; border-radius: var(--radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: .5rem; }

.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Buttons (chamfered, like the identity) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .7rem 1.35rem;
  font-family: var(--font-body); font-size: 1rem; font-weight: 600; line-height: 1.2;
  text-decoration: none; border: 0; cursor: pointer;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: background-color .15s ease, color .15s ease;
}
/* clip-path hides outer outlines, so the focus ring sits inside the button */
.btn:focus-visible { outline: 2px solid currentColor; outline-offset: -6px; }
.btn--sm { min-height: 44px; padding: .55rem 1rem; font-size: .9375rem; }
.btn--lg { min-height: 56px; padding: .9rem 1.6rem; font-size: 1.0625rem; }
.btn--red { background: var(--red); color: var(--white); }
.btn--red:hover { background: var(--red-dark); }
.btn--ghost { background: rgba(255,255,255,.12); color: var(--white); }
.btn--ghost:hover { background: rgba(255,255,255,.22); }
.btn--white { background: var(--white); color: var(--red-dark); }
.btn--white:hover { background: #FBE9E9; }
.btn--dark { background: var(--charcoal); color: var(--white); }
.btn--dark:hover { background: #1F1F1F; }
.btn--ghost-dark { background: rgba(51,51,51,.1); color: var(--charcoal); }
.btn--ghost-dark:hover { background: rgba(51,51,51,.18); }

.link-strong {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 44px;
  font-weight: 600; color: var(--red-dark); text-decoration: underline; text-underline-offset: .2em;
}
.link-strong:hover { text-decoration-thickness: 2px; }
.link-strong--light { color: var(--white); }
.icon--star { color: var(--red); }

/* ---------- Top bar ---------- */
.topbar { background: var(--red-dark); color: var(--white); font-size: .9375rem; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 44px; }
.topbar__phone { display: flex; flex-wrap: wrap; align-items: center; column-gap: .9rem; }
.topbar__phone a { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; text-decoration: none; min-height: 44px; }
.topbar__phone a:hover { text-decoration: underline; }
.topbar__note { display: none; }
.lang-toggle {
  font: inherit; font-weight: 600; color: var(--white); cursor: pointer;
  background: rgba(255,255,255,.14); border: 0; min-height: 36px; padding: .3rem .85rem;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  position: relative;
}
.lang-toggle::after { content: ""; position: absolute; inset: -4px; } /* 44px hit area */
.lang-toggle:hover { background: rgba(255,255,255,.26); }
.lang-toggle:focus-visible { outline: 2px solid var(--white); outline-offset: -4px; }
@media (min-width: 640px) { .topbar__note { display: inline; color: #F6D6D6; } }

/* ---------- Header ---------- */
.header { background: var(--charcoal); color: var(--white); position: relative; z-index: 20; }
.header__inner { display: flex; align-items: center; gap: .75rem; min-height: 96px; padding-block: .6rem; }
.brand { display: block; flex: none; margin-right: auto; border-radius: 6px; }
.brand img { height: 80px; width: auto; }
.nav { order: 3; }
.header__call { order: 2; }
.nav__toggle {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; min-width: 44px; padding: .5rem .7rem;
  background: transparent; color: var(--white); border: 0; font: inherit; font-weight: 600; cursor: pointer;
  border-radius: var(--radius-sm);
}
.nav__toggle:hover { background: rgba(255,255,255,.1); }
.nav__list {
  display: none; list-style: none; margin: 0; padding: .5rem var(--gutter) 1rem;
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--charcoal); border-top: 1px solid rgba(255,255,255,.14);
}
.nav__list.is-open { display: block; }
.nav__list a {
  display: flex; align-items: center; min-height: 48px; padding-inline: .25rem;
  color: var(--white); text-decoration: none; font-weight: 600; font-size: 1.0625rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav__list a:hover { color: #F6D6D6; }
@media (max-width: 380px) {
  .nav__toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .brand img { height: 76px; }
}
@media (min-width: 900px) {
  .header__inner { min-height: 128px; gap: 2rem; }
  .brand img { height: 108px; }
}
/* Full menu needs ~1140px for its 7 links (Spanish labels are longest); below that the Menu button is used */
@media (min-width: 1140px) {
  .nav { order: 0; }
  .nav__toggle { display: none; }
  .nav__list {
    display: flex; position: static; padding: 0; border: 0; gap: 1.25rem; background: none;
  }
  .nav__list a[aria-current="page"] { text-decoration: underline; text-underline-offset: .35em; text-decoration-color: var(--red); text-decoration-thickness: 3px; }
  .nav__list a { min-height: 44px; border: 0; padding: 0; font-size: 1rem; white-space: nowrap; }
  .nav__list a:hover { color: var(--white); text-decoration: underline; text-underline-offset: .35em; text-decoration-color: var(--red); text-decoration-thickness: 3px; }
  .header__call { order: 0; }
}

/* ---------- Hero ---------- */
.hero { background: var(--charcoal); color: var(--white); overflow: hidden; }
.hero__inner { display: grid; padding-block: 2.25rem 2.75rem; }
.hero__title {
  font-size: clamp(3rem, 13vw, 6rem);
  line-height: .92;
  letter-spacing: -.005em;
  max-width: 10ch;
}
/* Home hero: the time-lapse video fills the whole section, under a dark overlay; the text sits on top, left-aligned */
.hero--video {
  position: relative; isolation: isolate;
  display: flex; align-items: center;
  min-height: 78svh;
}
.hero--video .hero__inner { position: relative; width: 100%; }
.hero__bg { position: absolute; inset: 0; z-index: -1; background: var(--charcoal); }
.hero__bg video, .hero__bg img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
/* Overlay: darker on the left where the headline is, so white text stays readable over the bright video */
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(0, 0, 0, .82); /* phones: text spans the full width, so the whole frame needs it */
}
@media (min-width: 960px) {
  .hero--video { min-height: 85vh; }
  .hero__bg::after {
    /* 86% behind the text (left half) keeps white text at 4.5:1+ even over the brightest frames; the right side
       lightens to 40% so the video shows through */
    background: linear-gradient(90deg, rgba(0,0,0,.86) 0%, rgba(0,0,0,.86) 50%, rgba(0,0,0,.6) 70%, rgba(0,0,0,.4) 100%);
  }
}
.hero--video .hero__lead, .hero--video .hero__phone { color: var(--white); }
.hero--video .hero__title, .hero--video .hero__lead, .hero--video .hero__phone { text-shadow: 0 1px 12px rgba(0,0,0,.35); }
/* Video first; the photo replaces it if the video can't play (script.js adds .is-fallback) or motion is reduced */
.hero__bg .hero__fallback { display: none; }
.hero__bg.is-fallback .hero__video { display: none; }
.hero__bg.is-fallback .hero__fallback { display: block; }
@media (prefers-reduced-motion: reduce) {
  .hero__bg .hero__video { display: none; }
  .hero__bg .hero__fallback { display: block; }
}

/* Longer H1s (home city line, inner pages) get a smaller size so they don't run 6+ lines on phones */
.hero__title--long { font-size: clamp(2.5rem, 9vw, 4.75rem); max-width: 16ch; }
.hero--page .hero__title { font-size: clamp(2.5rem, 9vw, 4.5rem); max-width: 18ch; }
.hero--page .hero__inner { padding-block: 2.25rem 2.5rem; }
.hero__lead { margin-top: 1.1rem; max-width: 38ch; color: var(--on-dark-soft); font-size: 1.125rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; }
.hero__actions .btn { flex: 1 1 13rem; }
.hero__phone { margin-top: 1rem; color: var(--on-dark-soft); font-size: .9375rem; }
.hero__phone a { color: var(--white); font-weight: 600; text-decoration: none; }

@media (min-width: 960px) {
  .hero__inner { padding-block: 5rem 5.5rem; }
  .hero__title { max-width: 12ch; }
  .hero__title--long { max-width: 16ch; }
  .hero--page .hero__title { max-width: 18ch; }
  .hero--page .hero__inner { padding-block: 3.5rem 3.75rem; }
  .hero__lead { max-width: 44ch; font-size: 1.25rem; }
  .hero__actions .btn { flex: 0 0 auto; }
}

/* ---------- Sections ---------- */
.section { padding-block: 3.5rem; }
.section--tint { background: var(--surface-tint); }
.section--dark { background: var(--charcoal); color: var(--white); }
.section__head { margin-bottom: 1.75rem; max-width: 40rem; }
.section__head p { margin-top: .75rem; color: var(--ink-soft); font-size: 1.125rem; }
@media (min-width: 900px) { .section { padding-block: 5rem; } .section__head { margin-bottom: 2.5rem; } }

/* ---------- Services ---------- */
.services { display: grid; gap: .875rem; }
.card {
  position: relative;
  background: var(--surface-tint);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.5rem;
  clip-path: polygon(0 0, calc(100% - var(--cut-lg)) 0, 100% var(--cut-lg), 100% 100%, 0 100%);
}
.card h3 { margin-top: .9rem; }
.card p { margin-top: .4rem; color: var(--ink-soft); }
.card__icon { width: 2.25rem; height: 2.25rem; color: var(--red); }
.card__icon--wide { width: 3rem; }

/* Road-service banner: Max's truck parked on the left (front facing the text), copy on the right.
   The red chamfered box is drawn by ::before; overflow hides the truck before it rolls in. */
.card--road {
  --truck-w: 38%;
  background: none; clip-path: none; color: var(--white);
  display: grid; gap: 1rem; align-content: start;
  isolation: isolate; overflow: hidden;
  padding-left: calc(var(--truck-w) + 1.25rem);
}
.card--road::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: var(--red); border-radius: var(--radius);
  clip-path: polygon(0 0, calc(100% - var(--cut-lg)) 0, 100% var(--cut-lg), 100% 100%, 0 100%);
}
.card--road > :not(.card__truck) { position: relative; z-index: 1; }
.card__truck {
  position: absolute; left: .5rem; bottom: 0; z-index: -1;
  width: var(--truck-w); aspect-ratio: 800 / 985; pointer-events: none;
  transform-origin: 70% 100%; /* rocks on the front wheels */
}
.card__truck picture, .card__truck img { display: block; width: 100%; height: 100%; }
.card__truck picture { position: relative; z-index: 1; }

/* Brake smoke: three faint puffs behind the front tire (bottom-left of the cab) */
.puff {
  position: absolute; z-index: 2; bottom: 0; left: 17%;
  width: 11%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.95) 0%, rgba(235,235,235,.6) 40%, rgba(235,235,235,0) 70%);
  filter: blur(3px); opacity: 0; visibility: hidden;
}
.puff:nth-child(2) { left: 11%; bottom: 3%; width: 9%; }
.puff:nth-child(3) { left: 22%; bottom: -2%; width: 8%; }

@media (min-width: 768px) {
  .card--road { --truck-w: 13rem; min-height: 17rem; padding-left: calc(24px + var(--truck-w) + 2.5rem); }
  .card--road h3, .card--road p { max-width: 34rem; }
  .card__truck { left: 24px; }
}

/* Desktop roll-in: script.js adds .is-armed (start position) and then .is-arrived, once. */
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  .card--road.is-armed .card__truck { transform: translateX(calc(-110% - 24px)); }
  .card--road.is-arrived .card__truck { animation: truck-in 1.1s linear forwards, truck-rock 1.1s linear forwards; }
  .card--road.is-arrived .puff { animation: puff .8s ease-out .95s forwards; }
  .card--road.is-arrived .puff:nth-child(2) { animation-delay: 1s; }
  .card--road.is-arrived .puff:nth-child(3) { animation-delay: 1.05s; }
}
@keyframes truck-in {
  0%   { transform: translateX(calc(-110% - 24px)); animation-timing-function: cubic-bezier(.16, .84, .44, 1); }
  80%  { transform: translateX(6px); animation-timing-function: ease-in-out; }  /* brakes past the mark by 6px… */
  100% { transform: translateX(0); }                                              /* …and settles back */
}
/* Suspension dip, only in the last 20%: nose rocks forward 0.6deg and back */
@keyframes truck-rock {
  0%, 80% { rotate: 0deg; animation-timing-function: ease-out; }
  90%     { rotate: .6deg; animation-timing-function: ease-in-out; }
  100%    { rotate: 0deg; }
}
@keyframes puff {
  0%   { opacity: .55; visibility: visible; transform: translate(0, 0) scale(.3); }
  100% { opacity: 0; visibility: hidden; transform: translate(-14px, -10px) scale(1.3); }
}
.card--road .card__icon { color: var(--white); }
.card--road h3 { margin-top: 0; font-size: 1.625rem; }
@media (min-width: 768px) { .card--road h3 { font-size: 1.875rem; } }
.card--road p { color: var(--white); font-size: 1.125rem; } /* white on #D12424 = 5.26:1 */
.card--road .btn { justify-self: start; }

@media (min-width: 340px) {
  .services { grid-template-columns: repeat(2, 1fr); gap: .625rem; }
  .card--road { grid-column: 1 / -1; }
}
@media (max-width: 599px) {
  .card:not(.card--road) { padding: 1rem 1rem 1.15rem; }
  .card:not(.card--road) h3 { font-size: 1.3125rem; }
  .card:not(.card--road) p { font-size: .9375rem; line-height: 1.45; }
}
@media (min-width: 600px) { .services { gap: .875rem; } }
@media (min-width: 960px) {
  .services { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .card--road { grid-column: 1 / -1; grid-template-columns: auto 1fr; align-content: center; padding-block: 2rem; padding-right: 2rem; column-gap: 1.25rem; }
  .card--road .card__icon { width: 3rem; height: 3rem; grid-row: span 2; }
  .card--road h3 { font-size: 2.25rem; }
}

.dont {
  display: flex; gap: 1rem; align-items: flex-start;
  margin-top: 1.25rem; padding: 1.15rem 1.35rem;
  background: var(--charcoal); color: var(--white);
  border-radius: var(--radius);
}
.dont__icon { width: 1.75rem; height: 1.75rem; color: #FF8A8A; margin-top: .1rem; }
.dont h3 { font-size: 1.375rem; }
.dont p { margin-top: .25rem; color: var(--on-dark-soft); }

/* ---------- Recent work ---------- */
.pairs { display: grid; gap: 1rem; }
.pair { background: var(--white); border-radius: var(--radius); padding: 1rem; }
.pair h3, .pair h2 { font-size: 1.375rem; line-height: 1.1; margin: .15rem .15rem .85rem; }
@media (min-width: 900px) { .pairs { grid-template-columns: 1fr 1fr; gap: 1.25rem; } .pair { padding: 1.25rem; } }

/* Before/after slider */
.compare {
  --pos: 50%;
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 3; width: 100%; /* same frame on every slider, photos cropped to fill */
  border-radius: var(--radius-sm); background: #DDD;
  user-select: none; -webkit-user-select: none;
}
.compare__img, .compare__img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.compare__img img { object-fit: cover; object-position: center; }
.compare__img--before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }

/* Full-photo slider ("Full box body rebuild"): both portrait photos are shown whole, at the same scale,
   centred in the 4:3 frame. The side space is filled with a blurred, darkened copy of the same photo
   (set per layer with style="--backdrop: url(...)"). */
.compare--full .compare__img { overflow: hidden; background: var(--charcoal); }
.compare--full .compare__img::before {
  content: ""; position: absolute; inset: -32px;
  background: var(--backdrop) center / cover no-repeat;
  filter: blur(18px) brightness(.5);
}
.compare--full .compare__img img { object-fit: contain; }
/* Phones: a taller frame for the full-photo slider, so the portrait photos show larger with little blurred fill */
@media (max-width: 599px) { .compare--full { aspect-ratio: 4 / 5; } }
.compare__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 4px; margin-left: -2px;
  background: var(--white); box-shadow: 0 0 0 1px rgba(0,0,0,.18); pointer-events: none;
}
.compare__knob {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 52px; height: 52px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: var(--white); color: var(--charcoal);
  box-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.compare__knob .icon { width: 1.1rem; height: 1.1rem; margin-inline: -2px; }
.compare .compare__tag { position: absolute; bottom: .6rem; transition: opacity .15s ease; }
.compare .compare__tag--before { left: .6rem; right: auto; }
.compare .compare__tag--after { left: auto; right: .6rem; }
.compare.is-near-left .compare__tag--before,
.compare.is-near-right .compare__tag--after { opacity: 0; }
/* Invisible range input covers the photo: drag anywhere, or use arrow keys */
.compare__range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize; touch-action: pan-y; -webkit-appearance: none; appearance: none;
}
.compare__range::-webkit-slider-thumb { -webkit-appearance: none; width: 52px; height: 100vh; }
.compare__range::-moz-range-thumb { width: 52px; height: 100vh; border: 0; }
.compare:has(.compare__range:focus-visible) { outline: 3px solid var(--red); outline-offset: 3px; }
.compare:has(.compare__range:focus-visible) .compare__knob { box-shadow: 0 0 0 3px var(--red), 0 2px 10px rgba(0,0,0,.3); }
.pairbox .compare:has(.compare__range:focus-visible) { outline-color: var(--white); } /* dark viewer backdrop */

.shot { position: relative; margin: 0; }
.shot__btn {
  display: block; width: 100%; padding: 0; border: 0; background: #DDD; cursor: zoom-in;
  border-radius: var(--radius-sm); overflow: hidden;
}
.shot__btn img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform .25s ease; }
.shot__btn:hover img { transform: scale(1.03); }
.shot__btn:focus-visible { outline-offset: 2px; }
.shot__cap { display: block; margin-top: .4rem; font-size: .875rem; font-weight: 600; line-height: 1.3; color: var(--charcoal); }
.tag {
  position: absolute; left: .5rem; bottom: .5rem; pointer-events: none; z-index: 1;
  padding: .3rem .7rem; font-size: .875rem; font-weight: 600; line-height: 1.2; color: var(--white);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.tag--before { background: var(--charcoal); }
.tag--after { background: var(--red); }

.more { margin-top: 1.25rem; }
.more summary {
  display: flex; align-items: center; gap: .75rem; cursor: pointer; list-style: none;
  min-height: 56px; padding: .75rem 1.25rem;
  background: var(--charcoal); color: var(--white); font-weight: 600; font-size: 1.0625rem;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
}
.more summary::-webkit-details-marker { display: none; }
.more summary::after {
  content: ""; margin-left: auto; width: .65rem; height: .65rem;
  border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor;
  transform: translateY(-25%) rotate(45deg); transition: transform .2s ease;
}
.more[open] summary::after { transform: translateY(25%) rotate(-135deg); }
.more summary:focus-visible { outline: 2px solid var(--white); outline-offset: -6px; }
.more__count {
  min-width: 1.75rem; height: 1.75rem; display: inline-grid; place-items: center;
  border-radius: 999px; background: var(--red); font-size: .875rem;
}
.yard { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin-top: 1rem !important; }
@media (min-width: 700px) { .yard { grid-template-columns: repeat(3, 1fr); gap: .75rem; } }

/* Home: service names as links to /services */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem !important; }
.chips a {
  display: inline-flex; align-items: center; min-height: 44px; padding: .5rem .95rem;
  background: var(--surface-tint); color: var(--charcoal); font-weight: 600; font-size: .9375rem; text-decoration: none;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.chips a:hover { background: #E4E4E4; }
.chips a:focus-visible { outline: 2px solid var(--red); outline-offset: -4px; }
#services .chips + .link-strong, .section__more { margin-top: 1rem; }
.card__link {
  display: inline-flex; align-items: center; min-height: 44px; margin-top: .35rem;
  color: var(--red-dark); font-weight: 600; font-size: .9375rem; text-underline-offset: .2em;
}
.card__link::after { content: "→"; margin-left: .35rem; }
.work__contact { margin-top: 1.75rem; display: flex; flex-wrap: wrap; align-items: center; column-gap: .75rem; font-size: 1.125rem; }

/* ---------- Our Work catalog ---------- */
/* Category filters */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
/* Phones: one row that scrolls sideways instead of four rows of buttons */
@media (max-width: 699px) {
  .filters {
    flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 4px;
    scroll-padding-inline: var(--gutter);
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: none; }
}
.filters__label { margin-bottom: .5rem; font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--charcoal); }
.paircards__empty { margin-bottom: 1.25rem; font-weight: 600; }
.paircards__empty[hidden] { display: none; }
.paircards__more { display: flex; justify-content: center; margin-top: 1.5rem; }
/* "Showing: Liftgate repair (1 photo)" when Our Work opens from a service link */
.svc-note {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.25rem;
  margin-bottom: 1.75rem; padding: .9rem 1rem .9rem 1.25rem;
  background: var(--white); border-left: 4px solid var(--red); border-radius: var(--radius-sm);
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.svc-note p { font-weight: 600; font-size: 1.0625rem; }
.section:not(.section--tint) .svc-note { background: var(--surface-tint); box-shadow: none; }
.paircards__more[hidden] { display: none; }
.filter {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: .5rem .95rem;
  font: inherit; font-size: .9375rem; font-weight: 600; cursor: pointer; border: 0;
  background: var(--white); color: var(--charcoal);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.filter:hover { background: #E4E4E4; }
.filter[aria-pressed="true"] { background: var(--red); color: var(--white); }
.filter:focus-visible { outline: 2px solid currentColor; outline-offset: -5px; }
.filter__n { font-size: .8125rem; opacity: .75; }

/* Before/after cards */
.paircards { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width: 700px) { .paircards { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
@media (min-width: 1000px) { .paircards { grid-template-columns: repeat(4, 1fr); } }
.paircard__btn {
  display: grid; width: 100%; height: 100%; padding: 0 0 .85rem; border: 0; text-align: left; cursor: zoom-in;
  font: inherit; color: var(--charcoal); background: var(--white); border-radius: var(--radius-sm); overflow: hidden;
}
.paircard__btn img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s ease; }
.paircard__btn:hover img { transform: scale(1.03); }
/* Reduced motion: no hover zoom on gallery photos */
@media (prefers-reduced-motion: reduce) {
  .shot__btn img, .paircard__btn img { transition: none; }
  .shot__btn:hover img, .paircard__btn:hover img { transform: none; }
}
.paircard__btn:focus-visible { outline-offset: 2px; }
.paircard__cat { margin: .7rem .8rem 0; font-size: .75rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--red-dark); }
.paircard__title { margin: .2rem .8rem 0; font-size: .9375rem; font-weight: 600; line-height: 1.3; }

/* Rebuild stories: horizontal step strips */
.story + .story { margin-top: 2.5rem; }
.story__head h3 { font-size: 1.625rem; }
.story__head p { margin-top: .3rem; color: var(--ink-soft); font-size: .9375rem; }
.strip {
  display: flex; gap: .75rem; margin: 1rem calc(var(--gutter) * -1) 0 !important; padding: 0 var(--gutter) .75rem !important;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: thin; list-style: none;
}
.strip:focus-visible { outline-offset: -3px; }
.strip__step { flex: 0 0 min(70vw, 300px); scroll-snap-align: start; }
.strip__step img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); background: #DDD; }
.strip__label { display: flex; align-items: center; gap: .45rem; margin-top: .5rem; font-size: .875rem; font-weight: 600; }
.strip__n {
  display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; padding-inline: .3rem;
  border-radius: 999px; background: var(--charcoal); color: var(--white); font-size: .75rem;
}
#rebuilds .catalog-card { margin-top: 3rem; }

/* Catalog download card (bottom of Recent work) */
.catalog-card {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem;
  margin-top: 1.75rem; padding: 1.35rem 1.5rem;
  background: var(--charcoal); color: var(--white); border-radius: var(--radius);
  clip-path: polygon(0 0, calc(100% - var(--cut-lg)) 0, 100% var(--cut-lg), 100% 100%, 0 100%);
}
.catalog-card h3 { font-size: 1.625rem; }
.catalog-card p { margin-top: .3rem; color: var(--on-dark-soft); font-size: .9375rem; }

/* ---------- About ---------- */
.about { display: grid; gap: 1.75rem; align-items: center; }
.about__mark {
  --k: 40px;
  background: var(--charcoal); padding: 2.25rem 1.5rem 1.75rem; border-radius: 0 0 var(--radius) var(--radius);
  clip-path: polygon(var(--k) 0, calc(100% - var(--k)) 0, 100% var(--k), 100% 100%, 0 100%, 0 var(--k));
  display: grid; place-items: center; max-width: 22rem;
}
.about__mark img { width: min(100%, 15rem); }
/* Phones: a small badge instead of a full-screen block (the logo is already in the header) */
@media (max-width: 799px) {
  .about__mark { --k: 22px; max-width: 11rem; padding: 1.25rem 1rem 1rem; }
  .about__mark img { width: 8rem; }
}
.about__copy p { margin-top: 1rem; max-width: 34rem; font-size: 1.125rem; }
.about__copy .link-strong { margin-top: 1rem; }
@media (min-width: 800px) { .about { grid-template-columns: 2fr 3fr; gap: 3.5rem; } }

/* ---------- Quote form ---------- */
.quote .section__head { margin-bottom: 1.5rem; }
.form {
  display: grid; gap: 1.1rem; max-width: 46rem;
  background: var(--white); border-radius: var(--radius); padding: 1.25rem;
}
@media (min-width: 700px) {
  .form { grid-template-columns: 1fr 1fr; padding: 2rem; gap: 1.25rem 1.5rem; }
  .field--full, .form__actions, .form__fallback { grid-column: 1 / -1; }
}
.field { display: grid; gap: .35rem; align-content: start; }
.field label { font-weight: 600; }
.field__hint { font-size: .9375rem; color: var(--ink-soft); }
.field input, .field select, .field textarea, .form__fallback textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  min-height: 48px; padding: .7rem .85rem;
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius-sm);
}
.field textarea, .form__fallback textarea { resize: vertical; min-height: 7.5rem; }
.field select {
  appearance: none; padding-right: 2.5rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--charcoal) 50%), linear-gradient(135deg, var(--charcoal) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) 50%, calc(100% - .8rem) 50%;
  background-size: .35rem .35rem; background-repeat: no-repeat;
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--red); outline-offset: 1px; border-color: var(--charcoal);
}
.field [aria-invalid="true"] { border-color: var(--red-dark); background: #FFF6F6; }
.field__error { color: var(--red-dark); font-weight: 600; font-size: .9375rem; }
.form__actions .btn { width: 100%; }
@media (min-width: 700px) { .form__actions .btn { width: auto; } }
.form__fallback {
  display: grid; gap: .75rem; padding: 1rem; border-radius: var(--radius-sm);
  background: var(--surface-tint); border-left: 4px solid var(--red);
}
.form__fallback:focus { outline: none; }
.form__fallback-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.form__copied { font-weight: 600; color: var(--charcoal); }

/* ---------- Contact ---------- */
.section--dark h2 { margin-bottom: 2rem; }
.contact { display: grid; gap: 1.25rem; }
.contact__block {
  background: rgba(255,255,255,.06); border-radius: var(--radius); padding: 1.35rem;
  display: grid; gap: .6rem; align-content: start;
}
.contact__block h3, .contact__block h2 { font-size: 1.375rem; line-height: 1.1; color: var(--gray); }
.section--dark .contact__block h2 { margin-bottom: 0; } /* same look as when these were h3 */
/* Contact page: path to the quote form, right under the heading */
.contact__quote {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem;
  margin: -0.75rem 0 1.75rem; color: var(--on-dark-soft); font-size: 1.125rem;
}
.contact__block p { color: var(--on-dark-soft); }
.contact__big, .contact__big a { font-size: 1.5rem; font-weight: 600; line-height: 1.3; color: var(--white); text-decoration: none; }
.contact__big a:hover { text-decoration: underline; }
.contact__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .25rem; }
.pay { display: flex; flex-wrap: wrap; gap: .5rem; }
.pay li {
  padding: .45rem .8rem; background: rgba(255,255,255,.1); color: var(--white); font-weight: 600; font-size: .9375rem;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
@media (min-width: 900px) { .contact { grid-template-columns: repeat(3, 1fr); } }

.contact__title { font-size: clamp(2.5rem, 9vw, 4.5rem); max-width: 18ch; margin-bottom: 2rem; }
.contact__hours { color: var(--white); font-weight: 600; }

/* Home: Where we work */
.area p { margin-top: 1rem; max-width: 46rem; color: var(--on-dark-soft); font-size: 1.125rem; }
.area__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.area__actions .btn { flex: 1 1 15rem; }
@media (min-width: 700px) { .area__actions .btn { flex: 0 0 auto; } }

.contact__catalog {
  margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.16);
  color: var(--on-dark-soft);
}
.contact__catalog a { color: var(--white); font-weight: 600; text-underline-offset: .2em; }
.contact__catalog a:hover { text-decoration-thickness: 2px; }

/* ---------- Trailer Rentals page ---------- */
.rental { display: grid; gap: 2rem; }
.checklist li {
  display: flex; gap: .75rem; align-items: flex-start;
  padding-block: .9rem; border-bottom: 1px solid #E2E2E2; font-size: 1.125rem;
}
.checklist li:first-child { padding-top: 0; }
.checklist .icon { color: var(--red); margin-top: .2rem; }
.rental__close { margin-top: 1.5rem; font-size: 1.125rem; font-weight: 600; }
.rental__close a { color: var(--red-dark); white-space: nowrap; }
.rental__cta { margin-top: 1.25rem; }
.rental__photo img {
  width: 100%; aspect-ratio: 4 / 5; max-height: 34rem; object-fit: cover;
  border-radius: var(--radius);
  clip-path: polygon(0 0, calc(100% - var(--cut-lg)) 0, 100% var(--cut-lg), 100% 100%, 0 100%);
}
@media (min-width: 900px) {
  .rental { grid-template-columns: 1.15fr .85fr; gap: 3.5rem; align-items: center; }
}

/* ---------- Footer ---------- */
.footer { background: var(--red-dark); color: var(--white); padding-block: 2.25rem; font-size: .9375rem; }
.footer__inner { display: grid; gap: 1.25rem; align-items: center; }
.footer__logo { height: 76px; width: auto; }
.footer__text { display: grid; gap: .3rem; }
.footer__text a { text-decoration: underline; text-underline-offset: .2em; display: inline-flex; align-items: center; min-height: 44px; }
.footer__name { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.footer__copy { color: #F6D6D6; margin-top: .5rem; }
.footer :focus-visible { outline-color: var(--white); }
@media (min-width: 700px) { .footer__inner { grid-template-columns: auto 1fr; gap: 2rem; } }

/* ---------- Sticky Call / Text bar (mobile) ---------- */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr 1fr;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--charcoal);
  box-shadow: 0 -2px 12px rgba(0,0,0,.18);
}
.callbar__btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: var(--callbar-h); color: var(--white); text-decoration: none; font-weight: 600; font-size: 1.0625rem;
}
.callbar__btn--call { background: var(--red); }
.callbar__btn:focus-visible { outline: 3px solid var(--white); outline-offset: -6px; }
@media (min-width: 900px) {
  .callbar { display: none; }
  body { padding-bottom: 0; }
}

/* ---------- Mascot (Max) ---------- */
.mascot {
  --w: 90px;
  position: fixed; left: 0; z-index: 40;
  bottom: calc(var(--callbar-h) + env(safe-area-inset-bottom) + 20px); /* sits above the mobile Call/Text bar */
  width: var(--w);
  pointer-events: none;            /* the dog never blocks taps on the page */
  visibility: hidden;
  transition: visibility 0s linear .7s;
}
.mascot.is-visible { visibility: visible; transition: visibility 0s; }
/* Only the image slides and leans; the bubble and X stay level. */
.mascot__img {
  width: 100%; height: auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.25));
  transform-origin: bottom left;
  transform: translateX(-110%) rotate(0deg);                 /* hidden behind the left edge */
  transition: transform .7s ease-out;
}
.mascot.is-visible .mascot__img {
  transform: translateX(-18%) rotate(20deg);                  /* leans around the corner into the page */
}

.mascot__bubble {
  pointer-events: auto;
  position: absolute; left: calc(118% + 10px); top: -12%;  /* up and to the right of his leaning head, clear of his face and the wrench */
  width: max-content; max-width: 9.5rem;
  display: flex; align-items: center; min-height: 44px; padding: .45rem .75rem;
  background: var(--white); color: var(--charcoal);
  font-size: .8125rem; font-weight: 600; line-height: 1.25; text-decoration: none;
  border-radius: var(--radius-sm);
  box-shadow: 0 3px 12px rgba(0,0,0,.22);
  opacity: 0; transition: opacity .15s ease;          /* hidden while Max slides */
}
.mascot.is-visible .mascot__bubble { opacity: 1; transition: opacity .25s ease .5s; }
.mascot__bubble::after {           /* tail pointing left, at Max */
  content: ""; position: absolute; left: -7px; top: 50%; margin-top: -7px;
  border-width: 7px 8px 7px 0; border-style: solid; border-color: transparent var(--white) transparent transparent;
}
.mascot__bubble:hover { color: var(--red-dark); }
.mascot__bubble:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

.mascot__close {
  pointer-events: auto;
  position: absolute; top: -10px; right: -6px;   /* on the visible (right) side */
  width: 28px; height: 28px; display: grid; place-items: center; padding: 0;
  background: var(--charcoal); color: var(--white); border: 2px solid var(--white); border-radius: 999px; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  opacity: 0; transition: opacity .15s ease; /* fades with the bubble so it never floats alone */
}
.mascot.is-visible .mascot__close { opacity: 1; transition: opacity .25s ease .5s; }
.mascot__close::after { content: ""; position: absolute; inset: -9px; } /* 46px tap area */
.mascot__close .icon { width: 14px; height: 14px; }
.mascot__close:hover { background: var(--red); }
.mascot__close:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

@media (min-width: 900px) {
  .mascot { --w: 140px; bottom: auto; top: 83.33%; margin-top: -74px; } /* centered in the lower third */
  .mascot__bubble { font-size: .875rem; max-width: 11rem; top: -8%; }
}
@media (prefers-reduced-motion: reduce) {
  .mascot, .mascot.is-visible, .mascot__img, .mascot__bubble, .mascot.is-visible .mascot__bubble { transition: none; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0;
  background: transparent; color: var(--white);
}
.lightbox::backdrop { background: rgba(18,18,18,.94); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox__frame { display: grid; gap: .75rem; justify-items: center; padding: 4.5rem 1rem 5.5rem; max-width: 60rem; }
.lightbox__img { max-height: calc(100dvh - 11rem); width: auto; border-radius: var(--radius-sm); }
.lightbox__caption { text-align: center; max-width: 40rem; color: var(--on-dark-soft); }
.lightbox__btn {
  position: fixed; width: 52px; height: 52px; display: grid; place-items: center;
  background: rgba(255,255,255,.14); color: var(--white); border: 0; border-radius: 999px; cursor: pointer;
}
.lightbox__btn:hover { background: rgba(255,255,255,.26); }
.lightbox__btn:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
.lightbox__btn .icon { width: 1.5rem; height: 1.5rem; }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev { bottom: 1.25rem; left: calc(50% - 64px); }
.lightbox__next { bottom: 1.25rem; left: calc(50% + 12px); }
/* Before/after viewer for the Our Work gallery cards (reuses the lightbox buttons) */
.pairbox {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0;
  background: transparent; color: var(--white);
}
.pairbox::backdrop { background: rgba(18,18,18,.94); }
.pairbox[open] { display: grid; place-items: center; }
.pairbox__inner { width: min(100%, 60rem, calc((100dvh - 12rem) * 4 / 3)); padding: 4.25rem 1rem 5.5rem; }
.pairbox__title { font-size: 1.375rem; line-height: 1.2; margin-bottom: .85rem; text-align: center; }
.pairbox .compare { border-radius: var(--radius-sm); }
@media (min-width: 900px) {
  .pairbox__inner { padding-block: 3rem; width: min(100%, 60rem, calc((100dvh - 9rem) * 4 / 3)); }
}

@media (min-width: 900px) {
  .lightbox__prev { bottom: auto; top: 50%; left: 1.5rem; transform: translateY(-50%); }
  .lightbox__next { bottom: auto; top: 50%; left: auto; right: 1.5rem; transform: translateY(-50%); }
  .lightbox__frame { padding-block: 3rem; }
  .lightbox__img { max-height: calc(100dvh - 8rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
