/* Home — 03 Services: bento grid of "paint-chip" cards -------------------------
   Card anatomy (like a paint-swatch card): photo → colour band (No. + icon) → label.
   Colours come from the service colour system (.mx-svc-N sets --svc / --svc-ink / --svc-soft).
   Layout: phone = feature card + compact rows (<640) → 2 col (640–1099, feature full
   width) → 6-col bento (≥1100). */

.mx-services { overflow: hidden; isolation: isolate; }
.mx-services__wash { /* soft brand glow behind the grid — depth on the night canvas */
  position: absolute; z-index: -1; pointer-events: none;
  left: -18vw; top: 12%; width: 64vw; height: 64vw; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--mx-brand) 55%, transparent) 0, transparent 62%),
    radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--mx-accent) 10%, transparent) 0, transparent 50%);
  opacity: .6; filter: blur(10px);
}

/* Head ------------------------------------------------------------------------ */
.mx-services__head { align-items: flex-end; }
.mx-services__title { max-width: 15ch; }
/* On night the stroke sits under the word (a painted underline) so the white text stays legible */
.mx-services__title .mx-brush::after { bottom: -.17em; height: .27em; opacity: 1; }
.mx-services__intro { max-width: 420px; }

/* Grid ------------------------------------------------------------------------ */
.mx-services__grid {
  --_gap: clamp(14px, 1.5vw, 20px);
  container-type: inline-size; /* lets the bento tiles size their photos from the grid width */
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--_gap);
  list-style: none; margin: 0; padding: 0;
}
.mx-services__item { display: flex; min-width: 0; }

/* Card ------------------------------------------------------------------------ */
.mx-services__card {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; flex: 1; min-width: 0;
  background: var(--mx-canvas); color: var(--mx-ink-2);
  border-radius: var(--mx-radius-lg);
  box-shadow: 0 30px 60px -36px rgba(0, 0, 0, .7);
  transition: transform .3s var(--mx-ease), box-shadow .3s var(--mx-ease);
}

.mx-services__media {
  position: relative; overflow: hidden; flex: none;
  aspect-ratio: 16 / 9; background: var(--svc-soft);
}
.mx-services__img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .9s var(--mx-ease-out);
}
.mx-services__media--swatch { /* no photo on file: the colour itself is the visual */
  display: grid; place-items: center; background: var(--svc); color: var(--svc-ink);
}
.mx-services__swatch-icon { font-size: clamp(40px, 5vw, 64px); opacity: .9; }

/* Colour band — the paint chip */
.mx-services__band {
  position: relative; z-index: 1; flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; padding: 0 20px;
  color: var(--svc-ink);
}
.mx-services__band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--svc);
  transform-origin: center bottom;
  transition: transform .35s var(--mx-ease);
}
/* Entrance: the colour band paints in left to right just after its card fades up.
   Backwards fill only, so the hover scale keeps working once it has run. An explicit `to`
   keeps it a wipe: inset() to the implicit `none` would not interpolate and would just pop. */
@keyframes mx-svc-lay { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.mx-js .mx-services__item[data-reveal].is-in .mx-services__band::before {
  animation: mx-svc-lay .7s var(--mx-ease-out) calc(var(--d, 0s) + .25s) backwards;
}
.mx-services__num {
  display: inline-flex; align-items: baseline; gap: 6px;
  font: 650 22px/1 var(--mx-font-display); letter-spacing: -.03em;
  font-variant-numeric: lining-nums tabular-nums;
}
.mx-services__num-no { font-family: var(--mx-font-accent); font-style: italic; font-weight: 400; font-size: .9em; letter-spacing: 0; }
.mx-services__icon { font-size: 18px; }

/* Label */
.mx-services__body {
  display: flex; flex-direction: column; flex: 1 1 auto; gap: 10px;
  padding: 22px 22px 16px;
}
.mx-services .mx-services__name { /* beats .mx-section--night h3 */
  font-size: clamp(1.3rem, 1.15rem + .45vw, 1.55rem); line-height: 1.15;
  color: var(--mx-ink);
}
.mx-services__text { font-size: 15px; line-height: 1.6; color: var(--mx-muted); }

.mx-services__actions {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: auto; padding-top: 14px;
  border-top: 1px solid var(--mx-line);
}
.mx-services__explore {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px;
  font: 700 15px/1 var(--mx-font); color: var(--mx-ink);
}
.mx-services__explore::after { /* stretched link: the whole card opens the service */
  content: ""; position: absolute; inset: 0; z-index: 2;
  border-radius: inherit;
}
.mx-services__arrow {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--svc); color: var(--svc-ink); font-size: 14px;
  transition: transform .25s var(--mx-ease);
}

.mx-services__quote {
  position: relative; z-index: 3; /* above the stretched link */
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--mx-line-strong); border-radius: var(--mx-radius-pill);
  font: 700 14px/1 var(--mx-font); color: var(--mx-ink); white-space: nowrap;
  transition: background-color .2s var(--mx-ease), border-color .2s var(--mx-ease), color .2s var(--mx-ease), transform .2s var(--mx-ease);
}
.mx-services__quote:active { transform: scale(.97); }

/* Focus: the card is light on a night section, so the ring for the stretched "Explore"
   link goes around the whole card (on night), and the quote pill fills ink. */
.mx-page .mx-services__explore:focus-visible { outline: none; }
@supports selector(:has(a)) {
  .mx-services__card:has(.mx-services__explore:focus-visible) { outline: 3px solid var(--mx-accent); outline-offset: 4px; }
}
@supports not selector(:has(a)) {
  .mx-services__explore:focus-visible::after { box-shadow: inset 0 0 0 3px var(--mx-accent), inset 0 0 0 5px var(--mx-ink); }
}
.mx-page a.mx-services__quote:focus-visible { /* keeps its pill shape under the global link focus radius */
  border-radius: var(--mx-radius-pill);
  background: var(--mx-ink); border-color: var(--mx-ink); color: var(--mx-paper);
}

/* Hover (pointer devices only — no sticky hover on touch) */
@media (hover: hover) {
  .mx-services__card:hover { transform: translateY(-4px); box-shadow: 0 40px 70px -34px rgba(0, 0, 0, .85); }
  .mx-services__card:active { transform: translateY(-2px) scale(.995); }
  .mx-services__card:hover .mx-services__img { transform: scale(1.06); }
  .mx-services__card:hover .mx-services__band::before { transform: scaleY(1.75); }
  .mx-services__card:hover .mx-services__arrow { transform: translateX(4px); }
  .mx-services__quote:hover { background: var(--mx-ink); border-color: var(--mx-ink); color: var(--mx-paper); }
}

/* Feature tile (Painting) */
.mx-services__item--feature .mx-services__band { min-height: 60px; padding-inline: 26px; }
.mx-services__item--feature .mx-services__num { font-size: 28px; }
.mx-services__item--feature .mx-services__icon { font-size: 22px; }
.mx-services__item--feature .mx-services__body { padding: 26px 26px 18px; gap: 12px; }
.mx-services .mx-services__item--feature .mx-services__name { font-size: clamp(1.7rem, 1.2rem + 1.4vw, 2.4rem); line-height: 1.08; }
.mx-services__item--feature .mx-services__text { font-size: 16px; max-width: 62ch; }

/* Closing CTA strip — the page's one mid-page conversion block ------------------ */
.mx-services__cta {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: 20px clamp(20px, 3vw, 40px); margin-top: clamp(28px, 3.5vw, 44px);
  padding: clamp(22px, 2.6vw, 30px) clamp(22px, 3vw, 36px);
  border: 1px solid color-mix(in srgb, var(--mx-on-night) 14%, transparent);
  border-radius: var(--mx-radius-lg);
  background: color-mix(in srgb, var(--mx-night-2) 75%, transparent);
}
.mx-services__cta-chips { flex-direction: column; gap: 4px; align-self: center; }
.mx-services__cta-chips span { width: 18px; height: 13px; border-radius: 3px; background: var(--svc); box-shadow: none; }
.mx-services__cta-copy { max-width: 560px; }
.mx-services__cta-title { font: 600 clamp(1.3rem, 1.1rem + .6vw, 1.6rem)/1.2 var(--mx-font-display); letter-spacing: -.02em; color: var(--mx-paper); }
.mx-services__cta-text { margin-top: 6px; color: var(--mx-on-night-muted); font-size: 15px; }
.mx-services__cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }

/* Horizontal card (photo left, label right) — shared by wide placements ------- */
@media (min-width: 640px) {
  .mx-services__item--solo .mx-services__card {
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: auto 1fr;
  }
  .mx-services__item--solo .mx-services__media { grid-row: 1 / span 2; aspect-ratio: auto; min-height: 300px; }
}
@media (min-width: 1100px) {
  .mx-services__item--d-full .mx-services__card {
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: auto 1fr;
  }
  .mx-services__item--d-full .mx-services__media { grid-row: 1 / span 2; aspect-ratio: auto; min-height: 300px; }
}

/* Tablet: 2 columns, feature full width ---------------------------------------- */
@media (min-width: 640px) and (max-width: 1099px) {
  .mx-services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mx-services__item--feature, .mx-services__item--t-full { grid-column: 1 / -1; }
  .mx-services__item--feature .mx-services__card,
  .mx-services__item--t-full .mx-services__card {
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: auto 1fr;
  }
  .mx-services__item--feature .mx-services__media,
  .mx-services__item--t-full .mx-services__media { grid-row: 1 / span 2; aspect-ratio: auto; min-height: 300px; }
  .mx-services__item--t-full .mx-services__media { min-height: 280px; }
  .mx-services__media { aspect-ratio: 3 / 2; }
}
@media (min-width: 640px) and (max-width: 1099px) and (hover: hover) {
  .mx-services__item--feature .mx-services__band::before,
  .mx-services__item--t-full .mx-services__band::before { transform-origin: right center; }
  .mx-services__item--feature .mx-services__card:hover .mx-services__band::before,
  .mx-services__item--t-full .mx-services__card:hover .mx-services__band::before { transform: scaleX(1.14); }
}
@media (max-width: 899px) {
  .mx-services__cta { grid-template-columns: auto minmax(0, 1fr); }
  .mx-services__cta-actions { grid-column: 2; }
}

/* Desktop: 6-col bento ---------------------------------------------------------- */
@media (min-width: 1100px) {
  .mx-services__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-flow: row dense; }
  .mx-services__item { grid-column: span 2; }
  .mx-services__item--feature { grid-column: span 4; grid-row: span 2; }
  .mx-services__item--tall { grid-column: span 2; grid-row: span 2; }
  .mx-services__item--d-half { grid-column: span 3; }
  .mx-services__item--d-full, .mx-services__item--solo { grid-column: 1 / -1; grid-row: auto; }

  .mx-services__item--feature .mx-services__media { aspect-ratio: 16 / 9; }
  .mx-services__item--tall .mx-services__media { aspect-ratio: auto; flex: 1 1 auto; min-height: 280px; }
  .mx-services__item--tall .mx-services__body { flex: none; }
  .mx-services__item--d-half .mx-services__media { aspect-ratio: 2 / 1; }

  /* Feature and tall tiles share one band line and one title line */
  .mx-services__item--tall .mx-services__band { min-height: 60px; padding-inline: 26px; }
  .mx-services__item--tall .mx-services__body { padding-top: 28px; }

  /* Feature label: title across, copy left, actions bottom right (level with the tall tile's) */
  .mx-services__item--feature .mx-services__body {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr;
    column-gap: 32px; row-gap: 12px; padding: 28px 30px 16px;
  }
  .mx-services__item--feature .mx-services__name { grid-column: 1 / -1; }
  .mx-services__item--feature .mx-services__text { grid-column: 1; align-self: start; }
  .mx-services__item--feature .mx-services__actions { grid-column: 2; grid-row: 2; align-self: end; margin: 0; padding: 0; border: 0; gap: 18px; }
}
/* Same photo height for the feature and tall tiles (feature = 4 of 6 columns at 16:9),
   so their colour bands start on the same line whatever the copy length. */
@supports (width: 1cqw) {
  @media (min-width: 1100px) {
    .mx-services__item--feature .mx-services__media,
    .mx-services__item--tall .mx-services__media {
      aspect-ratio: auto; flex: none; min-height: 0;
      height: calc((200cqw - var(--_gap)) * 3 / 16);
    }
    .mx-services__item--tall .mx-services__body { flex: 1 1 auto; }
  }
}
@media (min-width: 1100px) and (hover: hover) {
  .mx-services__item--solo .mx-services__band::before,
  .mx-services__item--d-full .mx-services__band::before { transform-origin: right center; }
  .mx-services__item--solo .mx-services__card:hover .mx-services__band::before,
  .mx-services__item--d-full .mx-services__card:hover .mx-services__band::before { transform: scaleX(1.14); }
}

/* Mobile: the action bar already offers Call / WhatsApp / Free Quote */
@media (max-width: 767px) {
  .mx-services__wa { display: none; }
}

/* Phones: Painting stays a full card, the others become compact swatch rows ------ */
@media (max-width: 639px) {
  .mx-services__media { aspect-ratio: 16 / 10; }
  .mx-services__item--feature .mx-services__body { padding: 22px 20px 16px; }

  .mx-services__item:not(.mx-services__item--feature) .mx-services__card {
    display: grid; grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: auto auto 1fr auto;
    border-radius: var(--mx-radius);
  }
  .mx-services__item:not(.mx-services__item--feature) .mx-services__media { grid-column: 1; grid-row: 1 / 4; aspect-ratio: auto; }
  .mx-services__item:not(.mx-services__item--feature) .mx-services__img { position: absolute; inset: 0; }
  .mx-services__item:not(.mx-services__item--feature) .mx-services__swatch-icon { font-size: 32px; }
  .mx-services__item:not(.mx-services__item--feature) .mx-services__band { grid-column: 2; grid-row: 1; min-height: 44px; padding: 0 16px; }
  .mx-services__item:not(.mx-services__item--feature) .mx-services__num { font-size: 19px; }
  .mx-services__item:not(.mx-services__item--feature) .mx-services__icon { font-size: 16px; }
  .mx-services__item:not(.mx-services__item--feature) .mx-services__body { display: contents; }
  .mx-services .mx-services__item:not(.mx-services__item--feature) .mx-services__name { grid-column: 2; grid-row: 2; margin: 14px 16px 0; font-size: 1.15rem; }
  .mx-services__item:not(.mx-services__item--feature) .mx-services__text {
    grid-column: 2; grid-row: 3; margin: 6px 16px 14px; font-size: 14px; line-height: 1.5;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
  }
  .mx-services__item:not(.mx-services__item--feature) .mx-services__actions { grid-column: 1 / -1; grid-row: 4; margin: 0; padding: 4px 16px 4px 14px; }
  .mx-services__item:not(.mx-services__item--feature) .mx-services__arrow { width: 32px; height: 32px; }

  .mx-services__cta { row-gap: 18px; }
  .mx-services__cta-actions { grid-column: 1 / -1; }
  .mx-services__cta-actions .mx-btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .mx-services__card:hover,
  .mx-services__card:active,
  .mx-services__card:hover .mx-services__img,
  .mx-services__card:hover .mx-services__arrow { transform: none; }
  .mx-js .mx-services__item[data-reveal].is-in .mx-services__band::before { animation: none; }
}

/* ===== Mobile layer (<=1023): m3-story ===== */
/* Folded from _mobile-wip/m3-story.css. Must stay after the base services rules above (it overrides the old phone
   rows through #services specificity). Its one projects rule (P8 tile swatch) lives at the end of 04-projects.css,
   because the base .mx-projects__tile rule there would otherwise win. JS half: js/home/03-services.js. */
/* m3-story, <=1023px only: intro + services phone layout, M3 swatch cue,
   P8 swatch placeholders + photo roller, P9 numerals, P6 fan-deck (JS: js/home/03-services.js) */

@media (max-width: 1023px) {
  /* P8: photo boxes wait on a soft swatch of their service (intro: interiors navy, paint marigold) */
  .mx-intro__shot--main { --mxm-c: var(--mx-brand); --mxm-s: var(--mx-brand-soft); background: var(--mxm-s); }
  .mx-intro__shot--side { --mxm-c: var(--mx-accent); --mxm-s: var(--mx-accent-soft); background: var(--mxm-s); --mxm-rd: .3s; }
  .mx-services__media { --mxm-rd: .3s; }
  .mxm-roll { /* the swatch, led by a solid service-colour edge; rolls off once the photo has decoded */
    --c: var(--mxm-c, var(--svc, var(--mx-ink))); --s: var(--mxm-s, var(--svc-soft, var(--mx-sand)));
    position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
    background: linear-gradient(90deg, var(--c) 0 9px, color-mix(in srgb, var(--c) 30%, var(--s)) 9px 12px, var(--s) 12px);
    transition: translate .45s cubic-bezier(.65, 0, .35, 1) var(--mxm-rd, .1s);
  }
  .mxm-roll.is-go { translate: 101% 0; }

  /* P9: digits roll up into place; the "11" counts in CSS (screen readers get the real label) */
  .mxm-odo { display: inline-block; clip-path: inset(0 -.25em); }
  .mxm-dg { display: inline-block; position: relative; }
  .mxm-dg::before { content: attr(data-mxm-prev); position: absolute; left: 0; bottom: 100%; white-space: pre; }
  .mxm-11 { position: relative; color: transparent; }
  .mxm-11::after {
    --mxm-n: 0; counter-reset: mxm-y var(--mxm-n); content: counter(mxm-y);
    position: absolute; inset: 0; text-align: right; color: var(--mx-paper);
    transition: --mxm-n .9s var(--mx-ease-out) .3s;
  }
  .mxm-11.is-on::after { --mxm-n: var(--mxm-to, 11); }

  /* Touch: no sticky hover lift / zoom on the service cards (some touch screens report hover) */
  @media (hover: none), (pointer: coarse) {
    #services .mx-services__card:hover, #services .mx-services__card:hover :is(.mx-services__img, .mx-services__arrow),
    #services .mx-services__card:hover .mx-services__band::before { transform: none; }
  }
}

@media (max-width: 1023px) and (prefers-reduced-motion: no-preference) {
  /* M3: each section head opens with one stroke of the five service colours (one pass, left to right) */
  .mx-js :is(.mx-eyebrow[data-reveal], [data-reveal] > .mx-eyebrow)::before {
    transform: none; clip-path: inset(0 100% 0 0); transition: clip-path .3s var(--mx-ease-out) calc(var(--d, 0s) + .05s);
  }
  .mx-js :is(.mx-eyebrow[data-reveal].is-in, [data-reveal].is-in > .mx-eyebrow)::before { clip-path: inset(0); }
  .mxm-dg { transition: translate .45s var(--mx-ease-out) calc(.1s + var(--j) * 35ms); }
  .mxm-odo:not(.is-on) .mxm-dg { translate: 0 calc(var(--k) * 100%); }
  /* P8: the roller replaces the 1.2s clip-path mask on the intro photos */
  .mx-js .mx-intro__media .mx-intro__shot { clip-path: none; transition: none; }
  .mx-js .mx-intro__media .mx-intro__shot img { transform: scale(1.06); transition-duration: .9s; }
  .mx-js .mx-intro__media.is-in .mx-intro__shot img { transform: none; }
  /* P8: the project viewer opens with a short zoom (the slide only; the overlay keeps its fade) */
  .glightbox-container .gslide.gfadeIn { animation: mxm-lb .4s var(--mx-ease-out); }
  @keyframes mxm-lb { from { opacity: 0; scale: .92; } }
}
@media (max-width: 1023px) and (prefers-reduced-motion: reduce) { .mxm-roll { display: none; } }

/* Intro on phones: a compact story so the five services arrive sooner (every fact kept).
   Landscape photo composition, the four points as 2 x 2, why-choose-us as 2 x 2 icon tiles. */
@media (max-width: 599px) {
  #about .mx-intro__media { aspect-ratio: 4 / 3; margin-top: 24px; }
  #about .mx-intro__float--side { width: 44%; }
  #about .mx-intro__float--years { top: 4%; width: 40%; }
  #about .mx-intro__years-swatch { padding: 10px 12px 8px 14px; }
  #about .mx-intro__years-num { font-size: 52px; }
  #about .mx-intro__years-label { padding: 9px 14px 11px; }
  #about .mx-intro__segments { margin-top: 20px; padding-block: 14px; }
  #about .mx-intro__segments li { padding-right: 12px; margin-right: 12px; gap: 10px; } /* both fit side by side from 360px */
  #about .mx-intro__segments li:last-child { padding-right: 0; margin-right: 0; }
  #about .mx-intro__seg-icon { width: 38px; height: 38px; border-radius: 12px; font-size: 15px; }
  #about .mx-intro__points { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-top: 18px; }
  #about .mx-intro__points li { grid-template-columns: 12px minmax(0, 1fr); gap: 8px; font-size: 14px; line-height: 1.45; }
  #about .mx-intro__mark { margin-top: .36em; }
  #about .mx-intro__mark--all { width: 12px; }
  #about .mx-intro__more { margin-top: 20px; }
  #about .mx-intro__more .mx-btn { width: 100%; }
  #about .mx-intro__band { margin-top: 36px; padding-top: 18px; gap: 10px; }
  #about .mx-intro__why { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  #about .mx-intro__why-item {
    grid-template-columns: 34px minmax(0, 1fr); grid-template-rows: auto auto;
    align-items: start; align-content: start; gap: 3px 10px; padding: 12px 0 13px;
  }
  #about .mx-intro__why-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--mx-line); }
  #about .mx-intro__why-icon { grid-area: 1 / 1 / 3 / 2; width: 34px; height: 34px; font-size: 14px; }
  #about .mx-intro__why-num { grid-area: 1 / 2; padding-top: 1px; font-size: 11.5px; }
  #about .mx-intro__why-title { grid-area: 2 / 2; align-self: start; font-size: 1rem; line-height: 1.2; }
}
@media (max-width: 359px) { /* the two segments stack: smaller chips; the collage keeps the photos clear of the 11 chip */
  #about .mx-intro__float--side { width: 40%; }
  #about .mx-intro__years-num { font-size: 44px; }
  #about .mx-intro__segments { gap: 10px 0; padding-block: 12px; }
  #about .mx-intro__segments li { padding-right: 0; margin-right: 0; }
}
@media (max-width: 339px) { /* one column: back to single rows (number, title, icon) */
  #about .mx-intro__points { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  #about .mx-intro__why { grid-template-columns: minmax(0, 1fr); }
  #about .mx-intro__why-item { grid-template: auto / 30px minmax(0, 1fr) auto; align-items: center; padding: 10px 0; }
  #about .mx-intro__why-num { grid-area: 1 / 1; padding-top: 0; }
  #about .mx-intro__why-title { grid-area: 1 / 2; align-self: center; }
  #about .mx-intro__why-icon { grid-area: 1 / 3; }
  #about .mx-intro__why-item:nth-last-child(2) { border-bottom: 0; }
}

/* Services on phones: five equal paint-chip cards, colour band on top, every word kept */
@media (max-width: 639px) {
  #services .mx-services__grid { --_gap: 12px; }
  #services .mx-services__card {
    display: grid; grid-template: "b b" auto "m n" auto "m t" 1fr "a a" auto / clamp(76px, 26vw, 104px) minmax(0, 1fr);
    border-radius: var(--mx-radius);
  }
  #services .mx-services__band { grid-area: b; min-height: 42px; padding: 0 16px; }
  #services .mx-services__num { font-size: 19px; }
  #services .mx-services__icon { font-size: 16px; }
  #services .mx-services__media { grid-area: m; aspect-ratio: auto; min-height: 92px; margin: 14px 0 0 14px; border-radius: var(--mx-radius-sm); }
  #services .mx-services__img { position: absolute; inset: 0; }
  #services .mx-services__swatch-icon { font-size: 30px; }
  #services .mx-services__body { display: contents; }
  #services .mx-services__name { grid-area: n; margin: 13px 16px 0 14px; font-size: 1.125rem; line-height: 1.2; }
  #services .mx-services__text { grid-area: t; max-width: none; margin: 6px 16px 0 14px; font-size: 14px; line-height: 1.5; display: block; overflow: visible; }
  #services .mx-services__actions { grid-area: a; margin: 12px 0 0; padding: 4px 14px; gap: 12px; }
  #services .mx-services__arrow { width: 34px; height: 34px; }
  #services .mx-services__cta { margin-top: 24px; padding: 20px 18px; gap: 16px; }
}

/* P6 fan-deck: JS adds .mxm-deck (and --mxm-i / --mxm-q) only when every card fits on screen */
@supports (animation-timeline: view()) {
  @media (max-width: 639px) and (prefers-reduced-motion: no-preference) {
    #services.mxm-deck-on { overflow: clip; }
    .mxm-deck { view-timeline: --mxm-deck block; view-timeline-inset: 0px; }
    .mxm-deck > li, .mxm-deck > li::after {
      --lv: calc(var(--mxm-q) - 1 - var(--mxm-i));
      animation: mxm-recede linear both; animation-timeline: --mxm-deck;
      animation-range: exit-crossing calc(var(--mxm-i) * (100% / var(--mxm-q) - 30px)) exit-crossing calc((var(--mxm-q) - 1) * (100% / var(--mxm-q) - 30px) - 12px);
    }
    .mxm-deck > li { position: sticky; top: calc(12px + var(--mxm-i) * 30px); transform-origin: 50% 0; }
    /* While the header is back (m1 removes .mxm-hide on a scroll up) the stack sits below it, so no
       service colour band slides under the header. --mxm-hh = measured header height (03-services.js).
       The top follows the header with its own show / hide timing; the reveal transitions keep theirs. */
    .mxm-deck > .mx-services__item {
      transition-property: opacity, transform, top;
      transition-duration: var(--mx-dur), var(--mx-dur), var(--mxm-dur-bar-hide, .3s);
      transition-timing-function: var(--mx-ease-out), var(--mx-ease-out), var(--mxm-ease-in, ease-in);
      transition-delay: min(calc(var(--d, 0s) * .45), .12s), min(calc(var(--d, 0s) * .45), .12s), 0s;
    }
    .mx-header:not(.mxm-hide) ~ main .mxm-deck > .mx-services__item {
      top: calc(var(--mxm-hh, 73px) + 8px + var(--mxm-i) * 30px);
      transition-duration: var(--mx-dur), var(--mx-dur), var(--mxm-dur-bar-show, .22s);
      transition-timing-function: var(--mx-ease-out), var(--mx-ease-out), var(--mxm-ease-out, ease-out);
    }
    .mxm-deck > li::after {
      content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none;
      border-radius: var(--mx-radius); background: var(--mx-night); opacity: 0; animation-name: mxm-shade;
    }
    .mxm-deck > li:last-child, .mxm-deck > li:last-child::after { animation: none; }
    @keyframes mxm-recede { to { scale: calc(1 - var(--lv) * .03); } }
    @keyframes mxm-shade { 0%, 30% { opacity: 0; } to { opacity: calc(var(--lv) * .05); } }
  }
}
/* ===== /Mobile layer: m3-story ===== */
