/* ==========================================================================
   GMA Automotive Services
   A one-page site. Phone first. Tablet from 600px, menu bar from 900px, desktop from 1024px.
   The layout grows with the screen up to 1440px wide, then stays put.
   ========================================================================== */

/* ---------- Fonts (hosted with the site, so there's no wait on Google) ---------- */
@font-face {
  font-family: "Jost";
  src: url(../assets/fonts/jost-latin.woff2) format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url(../assets/fonts/noto-sans-latin.woff2) format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

/* ---------- Design tokens ---------- */
/* The page colours below are registered so the browser can fade between them */
@property --page   { syntax: "<color>"; inherits: true; initial-value: #fbf6ec; }
@property --fg     { syntax: "<color>"; inherits: true; initial-value: #333333; }
@property --accent { syntax: "<color>"; inherits: true; initial-value: #e0002b; }

:root {
  /* Brand colours */
  --red: #e0002b;
  --cream: #fbf6ec;
  --sand: #fbe8cc;
  --pink: #fff2f5;
  --ink: #333333;
  --mustard: #dfad11;
  --white: #ffffff;

  /* Page colours. The whole page background is red while the hero or the
     call-to-action fills most of the screen, and cream everywhere else
     (js/main.js sets data-bg on <html>). Text on the page uses --fg and --accent,
     so it swaps colour along with the background. */
  --page: var(--cream);
  --fg: var(--ink);
  --accent: var(--red);
  --line: color-mix(in srgb, var(--fg) 12%, transparent);

  /* Type */
  --font-display: "Jost", system-ui, sans-serif;
  --font-body: "Noto Sans", system-ui, sans-serif;

  /* Layout: content is at most 1280px wide, which with the side margins makes 1440 */
  --content: 1280px;
  --gutter: clamp(20px, 5vw, 80px);
  --section: clamp(72px, 7vw + 40px, 140px);
  --radius: 8px;
  --radius-lg: 14px;
  --header-h: 64px;

  /* Motion (curves from Emil Kowalski's animation guidelines) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --duration-hover: 200ms;
  --duration-reveal: 700ms;
}

@media (min-width: 900px) {
  :root { --header-h: 76px; }
}

/* Red page: white text, sand headings */
html[data-bg="red"] {
  --page: var(--red);
  --fg: var(--white);
  --accent: var(--sand);
}
/* A colour change, so plain ease. Kept for reduced motion too: nothing moves. */
html.bg-ready {
  transition:
    --page 500ms ease,
    --fg 500ms ease,
    --accent 500ms ease;
}

/* Panels with their own background keep the cream-page colours whatever the page is doing */
.textured,
.review,
.map,
.action-bar,
.site-header[data-open] {
  --fg: var(--ink);
  --accent: var(--red);
  --line: rgb(51 51 51 / 0.1);
  color: var(--fg);
}

/* Without JavaScript the page stays cream, so the red sections paint their own background */
html:not(.js) :is(.hero, .cta, .page-hero) {
  --page: var(--red);
  --fg: var(--white);
  --accent: var(--sand);
  background: var(--page);
  color: var(--fg);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
}

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

h1, h2, h3, p, ul, ol, dl, dd, blockquote, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
cite { font-style: normal; display: block; }
address { font-style: normal; }
strong { font-weight: 700; }

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

.container {
  width: min(var(--content), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--white);
  transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; }

/* ---------- Type styles ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 3vw + 24px, 64px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--accent);
  text-wrap: balance;
}

.heading-2 {
  font-family: var(--font-display);
  font-weight: 640;
  font-size: clamp(22px, 1vw + 18px, 32px);
  line-height: 1.25;
  color: var(--fg);
  text-wrap: balance;
}

.lead {
  font-size: clamp(17px, 0.3vw + 16px, 19px);
  line-height: 1.6;
  font-weight: 500;
  text-wrap: pretty;
}

/* Heading + intro line at the top of a section */
.section-head {
  display: grid;
  gap: 16px;
  max-width: 720px;
  margin-bottom: clamp(32px, 4vw, 56px);
}

/* Bulleted list with small red dots */
.ticks { display: grid; gap: 4px; }
.ticks li {
  position: relative;
  padding-left: 18px;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Buttons & links ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--duration-hover) ease,
    border-color var(--duration-hover) ease,
    color var(--duration-hover) ease,
    transform 160ms var(--ease-out);
}
.button__icon { width: 18px; height: 18px; flex: none; }
.button:active { transform: scale(0.97); }

.button--small { min-height: 44px; padding: 0 18px; font-size: 15px; }
.button--small .button__icon { width: 16px; height: 16px; }

/* Outline button: takes the page's text colour */
.button--outline {
  background: transparent;
  border-color: color-mix(in srgb, var(--fg) 70%, transparent);
  color: var(--fg);
}
.button--red { background: var(--red); }
.button--ghost {
  background: transparent;
  border-color: var(--fg);
  color: var(--fg);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Red text link with an arrow that nudges forward on hover */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
}
.arrow-link svg {
  width: 18px;
  height: 18px;
  transition: transform var(--duration-hover) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--mustard); border-color: var(--mustard); color: var(--ink); }
  .arrow-link:hover svg { transform: translateX(4px); }
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  color: var(--fg);
  transition:
    background-color var(--duration-hover) ease,
    box-shadow var(--duration-hover) ease;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  min-height: var(--header-h);
}

/* Once the hero logo has scrolled away, or with the menu open, the header gets
   a soft backdrop in the page colour */
.site-header.show-logo,
.site-header[data-open] {
  background: color-mix(in srgb, var(--page) 90%, transparent);
  box-shadow: 0 1px 0 var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* With the menu open the bar goes solid, so the red hero doesn't tint it pink */
.site-header[data-open] { background: var(--cream); }

.site-header__logo {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}
.site-header.show-logo .site-header__logo,
.site-header[data-open] .site-header__logo { opacity: 1; pointer-events: auto; }
.site-header__logo svg { width: 80px; height: 30px; }

/* Menu button (phones and small tablets only) */
.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-right: -10px;
  padding: 0 10px;
  border: 0;
  background: none;
  color: inherit;
  font: 600 16px/1 var(--font-display);
  cursor: pointer;
}
.menu-toggle__bars,
.menu-toggle__bars::before,
.menu-toggle__bars::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 250ms var(--ease-out), opacity 150ms ease;
}
.menu-toggle__bars { position: relative; }
.menu-toggle__bars::before,
.menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle__bars::before { top: -6px; }
.menu-toggle__bars::after { top: 6px; }
.site-header[data-open] .menu-toggle__bars { background: transparent; }
.site-header[data-open] .menu-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.site-header[data-open] .menu-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  font-weight: 600;
  font-size: 15px;
}
.site-nav__list a {
  position: relative;
  display: block;
  padding-block: 10px;
}
.site-nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--mustard);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-hover) var(--ease-out);
}
.site-nav__list a[aria-current="page"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
  .site-nav__list a:hover::after { transform: scaleX(1); }
}

/* Small screens: the nav folds into a drop-down panel behind the Menu button */
@media (max-width: 899.98px) {
  .site-nav__cta { display: none; }

  .js .menu-toggle { display: inline-flex; }
  .js .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: block;
    padding: 8px var(--gutter) 24px;
    background: var(--cream);
    color: var(--ink);
    box-shadow: 0 16px 32px rgb(51 51 51 / 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
      opacity 200ms ease,
      transform 250ms var(--ease-out),
      visibility 0s linear 250ms;
  }
  .js .site-header[data-open] .site-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition:
      opacity 200ms ease,
      transform 250ms var(--ease-out),
      visibility 0s;
  }
  .js .site-nav__list {
    display: grid;
    gap: 0;
    font-family: var(--font-display);
    font-size: 22px;
  }
  .js .site-nav__list a {
    padding-block: 14px;
    border-bottom: 1px solid var(--line);
  }
  .js .site-nav__list a::after { display: none; }
  .js .site-nav__cta { display: flex; width: 100%; margin-top: 20px; }
}

/* ==========================================================================
   Hero (home page)
   ========================================================================== */
.hero {
  text-align: center;
  padding: calc(var(--header-h) + 8px) 0 clamp(56px, 7vw, 96px);
}
.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__logo {
  width: clamp(120px, 8vw + 90px, 160px);
  aspect-ratio: 456 / 172;
  height: auto;
  color: var(--accent);
}

.hero__kicker {
  margin-top: clamp(16px, 2vw, 28px);
  font-family: var(--font-display);
  font-weight: 700; /* bold and 19px+, so the sand colour passes contrast on red */
  font-size: clamp(19px, 1vw + 14px, 26px);
  line-height: 1.3;
  color: var(--accent);
  text-wrap: balance;
}

.hero__title {
  max-width: 14ch;
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 5vw + 24px, 96px);
  line-height: 0.98;
  letter-spacing: -0.015em;
  color: var(--accent);
  text-wrap: balance;
}

.hero__lead {
  max-width: 620px;
  margin-top: clamp(20px, 2vw, 28px);
  font-weight: 500;
  font-size: clamp(17px, 0.4vw + 15.5px, 20px);
  line-height: 1.55;
  text-wrap: pretty;
}

.hero .actions { margin-top: clamp(24px, 2.5vw, 36px); }

/* The car photos. On phones the yellow car fills the top row, the other two share
   the second. From 600px all three sit in one row at the same height: each photo's
   share of the row matches its shape, so their heights line up exactly. */
.hero__cars {
  display: grid;
  grid-template-columns: 1fr 0.668fr;
  align-items: start;
  gap: 12px;
  width: 100%;
  margin-top: clamp(40px, 5vw, 72px);
}
.hero__car {
  width: 100%;
  min-width: 0;
  border-radius: var(--radius-lg);
  transform-origin: center;
}
.hero__car--mustard { grid-column: 1 / -1; }

@media (min-width: 600px) {
  .hero__cars { display: flex; gap: clamp(12px, 1.6vw, 22px); }
  .hero__car--mustard   { flex: 1.77 1 0; }
  .hero__car--lime      { flex: 1 1 0; margin-top: clamp(16px, 3vw, 40px); }
  .hero__car--bubblegum { flex: 0.668 1 0; }
}

/* Desktop: the photos move up under the kicker and the headline overlaps their
   bottom edge, like the original design. The order only changes visually: the
   headline still comes first for screen readers and Google. */
@media (min-width: 1024px) {
  .hero__cars { order: 1; margin-top: clamp(28px, 2.4vw, 36px); }
  .hero__title {
    order: 2;
    position: relative;
    z-index: 1;
    margin-top: -1.55em;
    pointer-events: none; /* so the cars underneath still react to hover */
    /* A soft shadow keeps the lettering readable where it crosses the photos */
    text-shadow:
      0 2px 4px rgb(0 0 0 / 0.18),
      0 8px 40px rgb(0 0 0 / 0.3);
  }
  .hero__lead,
  .hero .actions { position: relative; z-index: 1; }
  .hero__lead { order: 3; max-width: 760px; }
  .hero .actions { order: 4; }
}

/* ==========================================================================
   About
   ========================================================================== */
.about { padding: var(--section) 0; }

.about__inner {
  display: grid;
  gap: 40px;
}
.about__text {
  display: grid;
  gap: 24px;
  align-content: center;
  max-width: 600px;
}
.about__text .display { margin-bottom: 8px; }

.about__photo {
  justify-self: end;
  width: min(85%, 520px);
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.about__photo img {
  width: 100%;
  transition: transform 600ms var(--ease-out);
}

@media (min-width: 720px) {
  .about__inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(40px, 7vw, 96px);
    align-items: center;
  }
  .about__photo { width: 100%; }
}

@media (hover: hover) and (pointer: fine) {
  .about__photo:hover img { transform: scale(1.05); }
}

/* ==========================================================================
   Textured area (story, values, services)
   ========================================================================== */
.textured {
  position: relative;
  overflow: clip;
  background: var(--white);
  padding-bottom: var(--section);
}

/* Confetti texture. It drifts sideways a little as you scroll (see Motion below). */
.textured__bg {
  position: absolute;
  inset: 0 -300px;
  background: url(../assets/images/bg-texture.webp) 0 0 / 988px auto repeat;
  pointer-events: none;
}
.textured > section { position: relative; padding-top: var(--section); }

/* ---------- Story: three generations ---------- */
.story__inner {
  display: grid;
  gap: 40px;
}
.story__photo {
  width: min(80%, 480px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.story__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease-out);
}
.story__copy {
  display: grid;
  gap: 24px;
  max-width: 620px;
}

.timeline {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}
/* A red line runs down the left, with a dot for each generation */
.timeline__item {
  position: relative;
  padding: 0 0 24px 32px;
}
.timeline__item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 12px;
  bottom: -4px;
  width: 2px;
  background: rgb(224 0 43 / 0.25);
}
.timeline__item:last-child::before { display: none; }
.timeline__item::after {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px var(--white);
}
.timeline__step {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
}
.timeline__title {
  font-family: var(--font-display);
  font-weight: 640;
  font-size: 22px;
  line-height: 1.3;
}
.timeline__item p { margin-top: 4px; }

@media (min-width: 720px) {
  .story__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: clamp(40px, 7vw, 96px);
    align-items: center;
  }
  .story__photo { width: 100%; }
}

@media (hover: hover) and (pointer: fine) {
  .story__photo:hover img { transform: scale(1.06); }
}

/* ---------- Values ("More Than A Repair Shop") ---------- */
.values__grid {
  display: grid;
  gap: 16px;
  margin-top: clamp(32px, 4vw, 56px);
}

.value-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--cream) var(--bg) center / cover no-repeat;
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: default;
}
.value-card__title {
  font-family: var(--font-display);
  font-weight: 640;
  font-size: 24px;
  line-height: 1.3;
  color: var(--red);
}

/* Both faces share one spot; hovering swaps which one shows */
.value-card__faces { display: grid; }
.value-card__face {
  grid-area: 1 / 1;
  transition: opacity var(--duration-hover) ease;
}
.value-card__face--back { opacity: 0; font-weight: 600; }
.value-card__face--back cite {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
}

@media (hover: hover) and (pointer: fine) {
  .value-card:hover .value-card__face--front,
  .value-card:focus-visible .value-card__face--front { opacity: 0; }
  .value-card:hover .value-card__face--back,
  .value-card:focus-visible .value-card__face--back { opacity: 1; }
}

/* Touch screens can't hover, so show the review underneath instead */
@media not ((hover: hover) and (pointer: fine)) {
  .value-card__faces { gap: 16px; }
  .value-card__face { grid-area: auto; }
  .value-card__face--back {
    opacity: 1;
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }
}

@media (min-width: 760px) {
  .values__grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Services ---------- */
.services__grid {
  display: grid;
  gap: 16px;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px var(--line);
}
.service-card--cream { background: var(--cream); }
.service-card--pink { background: var(--pink); }

.service-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.service-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease-out);
}
/* Cut-out artwork floats inside the card instead of filling it */
.service-card__media--float { padding: 24px 24px 0; }
.service-card__media--float img { object-fit: contain; object-position: center bottom; }

.service-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  padding: 24px;
}
.service-card__title {
  font-family: var(--font-display);
  font-weight: 640;
  font-size: 26px;
  line-height: 1.2;
}
@media (min-width: 600px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (min-width: 1024px) {
  .services__grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

@media (hover: hover) and (pointer: fine) {
  .service-card:hover .service-card__media img { transform: scale(1.05); }
}

/* ==========================================================================
   Reviews
   ========================================================================== */
.reviews { padding: var(--section) 0; }

.reviews__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.review {
  flex: 1 1 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-height: 140px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform 250ms var(--ease-out);
}
.review cite {
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
}
.review__big {
  font-family: var(--font-display);
  font-weight: 640;
  font-size: 24px;
  line-height: 1.2;
}

.reviews .arrow-link { margin-top: 28px; }

@media (min-width: 600px) {
  /* Each card's share of the row comes from --w, set in the HTML */
  .review { flex: var(--w) 1 calc(var(--w) * 1px); min-height: 160px; }
}

@media (hover: hover) and (pointer: fine) {
  .review:hover { transform: rotate(var(--tilt, 2deg)); }
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { padding: 0 0 var(--section); }

.faq__list { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 16px 48px 16px 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 0.5vw + 16px, 22px);
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
/* Plus sign that turns into a cross when the answer is open */
.faq__item summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  background: var(--accent);
  --plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  -webkit-mask: var(--plus) center / contain no-repeat;
  mask: var(--plus) center / contain no-repeat;
  transition: transform 250ms var(--ease-out);
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p {
  max-width: 720px;
  padding-bottom: 24px;
}
.faq__item a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 1024px) {
  .faq__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
    gap: 64px;
    align-items: start;
  }
  .faq .section-head { position: sticky; top: calc(var(--header-h) + 32px); }
}

/* ==========================================================================
   Call to action
   ========================================================================== */
.cta {
  text-align: center;
  padding: var(--section) 0;
}
.cta__inner { display: flex; flex-direction: column; align-items: center; }
.cta__lead {
  max-width: 560px;
  margin-top: 20px;
  font-weight: 500;
  font-size: clamp(17px, 0.3vw + 16px, 19px);
  text-wrap: pretty;
}
.cta .actions { margin-top: 32px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  padding: clamp(32px, 4vw, 56px) 0 32px;
  font-size: 15px;
}

/* Map stand-in. Tapping "Show map" swaps in the live Google map. */
.map {
  position: relative;
  height: 260px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(90deg, rgb(51 51 51 / 0.05) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(rgb(51 51 51 / 0.05) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--sand);
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.map__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 100%;
  padding: 20px;
  text-align: center;
}
.map__pin { width: 32px; height: 32px; color: var(--red); }
.map__address { font-weight: 600; line-height: 1.5; }
.map__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }

.footer__grid {
  display: grid;
  gap: 32px;
  margin-top: 40px;
}

.footer__logo { width: 150px; }
.footer__brand p { margin-top: 16px; max-width: 340px; }

.footer__label {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--accent);
}

.footer__social {
  display: flex;
  gap: 4px;
  margin: 12px 0 0 -10px;
}
.footer__social a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  transition: transform 160ms var(--ease-out), background-color var(--duration-hover) ease;
}
.footer__social a:active { transform: scale(0.94); }

.footer__address a { display: block; padding-block: 4px; }

.footer__label--spaced { margin-top: 28px; }
.footer__hours { max-width: 240px; }
.footer__hours div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 4px;
}
.footer__hours dd { font-variant-numeric: tabular-nums; }


.contact-list,
.footer__links { display: grid; }
.footer__links li { padding-block: 5px; }
.contact-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
.contact-list svg { width: 16px; height: 16px; flex: none; color: var(--accent); }

.footer__legal {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: color-mix(in srgb, var(--fg) 80%, transparent);
}

@media (hover: hover) and (pointer: fine) {
  .footer__social a:hover { background: color-mix(in srgb, var(--fg) 10%, transparent); }
  .contact-list a:hover,
  .footer__address a:hover { color: var(--accent); }
}

@media (min-width: 600px) {
  .footer__grid { grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .map { height: 300px; }
}

@media (min-width: 1024px) {
  .footer__grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
  .map { height: 340px; }
}

/* ==========================================================================
   Quick-contact bar (phones and small tablets)
   ========================================================================== */
.action-bar {
  position: fixed;
  inset: auto 0 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgb(251 246 236 / 0.92);
  box-shadow: 0 -1px 0 var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: transform 300ms var(--ease-out);
}
.action-bar .button { min-height: 48px; padding: 0 12px; }
.js .action-bar { transform: translateY(110%); }
.js .action-bar.is-visible { transform: none; }

@media (max-width: 899.98px) {
  /* Leave room so the bar never covers the end of the footer */
  .footer { padding-bottom: 104px; }
}
@media (min-width: 900px) {
  .action-bar { display: none; }
}

/* ==========================================================================
   Simple page hero (used by the 404 page)
   ========================================================================== */
.page-hero {
  display: flex;
  align-items: center;
  min-height: 80svh; /* tall enough to keep the page red while it's on screen */
  padding: calc(var(--header-h) + 24px) 0 clamp(56px, 7vw, 96px);
}
.page-hero__text { display: grid; gap: 20px; justify-items: start; }

.page-hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 3.5vw + 24px, 74px);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--accent);
  text-wrap: balance;
}
.page-hero__lead {
  max-width: 600px;
  font-weight: 500;
  font-size: clamp(17px, 0.4vw + 15.5px, 20px);
  line-height: 1.55;
  text-wrap: pretty;
}
.page-hero .actions { justify-content: flex-start; margin-top: 8px; }

/* ==========================================================================
   Motion
   Everything here respects "reduce motion" (see the end of the file).
   ========================================================================== */

/* ---------- Hero entrance (plays once on load) ---------- */
@keyframes fade-in { from { opacity: 0; } }
@keyframes logo-in { from { opacity: 0; transform: scale(0.9); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(24px); } }
@keyframes title-in { from { opacity: 0; transform: translateY(12px); } }

/* "backwards" means the start state applies only while waiting,
   so the hover tilt below still works after the entrance ends */
.hero__logo            { animation: logo-in 500ms var(--ease-out) backwards; }
.hero__kicker          { animation: fade-in 400ms ease 100ms backwards; }
.hero__title           { animation: title-in 800ms var(--ease-out) 150ms backwards; }
.hero__lead            { animation: fade-in 500ms ease 350ms backwards; }
.hero .actions         { animation: fade-in 500ms ease 450ms backwards; }
.hero__car--mustard    { animation: rise-in 900ms var(--ease-out) 450ms backwards; }
.hero__car--lime       { animation: rise-in 900ms var(--ease-out) 530ms backwards; }
.hero__car--bubblegum  { animation: rise-in 900ms var(--ease-out) 610ms backwards; }
.page-hero__text       { animation: title-in 700ms var(--ease-out) backwards; }

.hero__car { transition: transform 250ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .hero__car--mustard:hover   { transform: rotate(-2deg); }
  .hero__car--lime:hover      { transform: rotate(3deg); }
  .hero__car--bubblegum:hover { transform: rotate(-4deg); }
}

/* ---------- Scroll reveals (each plays once) ---------- */
.js .reveal {
  opacity: 0;
  transition:
    opacity var(--duration-reveal) var(--ease-out) var(--delay, 0ms),
    transform var(--duration-reveal) var(--ease-out) var(--delay, 0ms);
}
.js .reveal[data-reveal="up"]    { transform: translateY(24px); }
.js .reveal[data-reveal="left"]  { transform: translateX(-40px); }
.js .reveal[data-reveal="scale"] { transform: scale(0.95); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Texture drift, tied to scroll position ---------- */
@supports (animation-timeline: view()) {
  @keyframes drift {
    from { transform: translateX(-120px); }
    to   { transform: translateX(120px); }
  }
  .textured__bg {
    animation: drift linear both;
    animation-timeline: view();
  }
}

/* ---------- Hero depth: on desktop the photos sink a little as you scroll,
   so the headline slides further across them ---------- */
@supports (animation-timeline: scroll()) {
  @keyframes sink { to { transform: translateY(80px); } }
  @media (min-width: 1024px) {
    .hero__cars {
      animation: sink linear both;
      animation-timeline: scroll(root);
      animation-range: 0 100vh;
    }
  }
}

/* ---------- Reduced motion: keep fades, drop movement ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero__logo,
  .hero__kicker,
  .hero__car,
  .hero__title,
  .hero__lead,
  .hero .actions,
  .page-hero__text { animation: fade-in 300ms ease backwards; }

  .js .reveal[data-reveal] { transform: none; transition-duration: 300ms; }
  .textured__bg,
  .hero__cars { animation: none; }

  .hero__car:hover,
  .review:hover,
  .about__photo:hover img,
  .story__photo:hover img,
  .service-card:hover .service-card__media img { transform: none; }
}
