/* Mayo Pressure Washing: the gallery page.
 * Loaded after styles.css. Reuses its tokens, buttons, section heads and the
 * .ba slider; everything new is prefixed gx-. Colours past blue and gold come
 * from the shared palette tokens, with fallbacks until styles.css has them. */
:root {
  --gx-alt: var(--ground-alt, #f4f1ea);
  --gx-deep: var(--ground-deep, #12302a);
  --gx-teal: var(--accent-teal, #1f8a8a);
}

/* ---------- Hero ---------- */
.gx-illus {
  position: absolute; z-index: 1; top: calc(var(--head) + 12px + env(safe-area-inset-top)); right: var(--gutter);
  padding: 6px 10px; border-radius: 999px; background: oklch(15% .02 240 / .45); color: oklch(100% 0 0 / .86);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-size: 11px; line-height: 1.2; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; pointer-events: none;
}
.hero .hero-foot:has(> .btn:only-child) { grid-template-columns: auto; justify-content: start; }

/* ---------- Before and after ---------- */
.gx-ba-sec { background: var(--gx-alt); }
.gx-ba-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); margin-bottom: var(--head-gap); }
.gx-ba-head .section-head { margin-bottom: 0; }
.gx-ba-hint { margin: 0; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; }
.gx-ba-layout { display: grid; gap: var(--s5); }
@media (min-width: 1024px) {
  .gx-ba-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: var(--s8); align-items: start; }
}
.gx-stage { margin: 0; min-width: 0; }
.gx-ba { border-radius: var(--radius); box-shadow: 0 30px 60px -36px oklch(20% .04 200 / .7); }
.gx-ba img { transition: opacity .25s var(--ease); }
.gx-ba.is-swapping img { opacity: .35; }
.gx-stage-cap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s2) var(--s4); padding-top: var(--s4); }
.gx-stage-cap b { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 26px; line-height: 1; letter-spacing: .01em; }
@media (min-width: 1024px) { .gx-stage-cap b { font-size: 32px; } }
.gx-svc-link { color: var(--gx-teal); font-weight: 500; font-size: 15px; }
.gx-svc-link span { display: inline-block; transition: translate .2s var(--ease); }
.gx-svc-link:hover span { translate: 3px 0; }
.gx-svc-link[hidden] { display: none; }

/* The job picker: a sideways row on a phone, a list beside the stage on desktop. */
.gx-jobs {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 42%); gap: var(--s3);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain;
  margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter) 4px; scroll-padding-inline: var(--gutter);
}
.gx-jobs::-webkit-scrollbar { display: none; }
.gx-jobs li { scroll-snap-align: start; }
@media (min-width: 1024px) {
  .gx-jobs { grid-auto-flow: row; grid-auto-columns: auto; gap: var(--s2); overflow: visible; margin: 0; padding: 0; }
}
.gx-job {
  display: grid; gap: var(--s2); width: 100%; height: 100%; padding: var(--s2); text-align: left; cursor: pointer;
  border: 1px solid transparent; border-radius: var(--radius); background: oklch(100% 0 0 / .45);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.gx-job img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; background: oklch(90% .01 80); }
.gx-job span { display: grid; gap: 2px; padding: 0 var(--s1) var(--s1); }
.gx-job b { font-weight: 500; font-size: 15px; line-height: 1.3; }
.gx-job small { color: var(--muted); font-size: 13px; line-height: 1.3; }
@media (min-width: 1024px) {
  .gx-job { grid-template-columns: 112px 1fr; align-items: center; gap: var(--s4); }
  .gx-job span { padding: 0; }
}
@media (hover: hover) { .gx-job:hover { background: var(--paper); } }
.gx-job[aria-pressed="true"] { background: var(--paper); border-color: var(--gx-teal); box-shadow: 0 10px 24px -18px oklch(20% .04 200 / .6); }
.gx-job:focus-visible { outline: 2px solid var(--gx-teal); outline-offset: 2px; }

/* ---------- Our work ---------- */
.gx-work { background: var(--light); }
.gx-head { display: grid; gap: var(--s5); margin-bottom: var(--s8); }
.gx-head .section-head { margin-bottom: 0; }
@media (min-width: 1024px) { .gx-head { grid-template-columns: auto 1fr; align-items: end; gap: var(--s10); } }
/* One sideways row on a phone (no three-line chip pile), wrapped on desktop. */
.gx-filters {
  display: flex; gap: var(--s2); overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter);
}
.gx-filters::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) { .gx-filters { flex-wrap: wrap; justify-content: flex-end; overflow: visible; margin: 0; padding: 0; } }
.gx-chip {
  flex: none; display: inline-flex; align-items: center; gap: var(--s2); min-height: 42px; padding: 0 var(--s4);
  border-radius: 999px; border: 1px solid var(--hair); background: var(--paper); color: var(--ink);
  font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
@media (hover: hover) { .gx-chip:hover { border-color: var(--gx-teal); } }
.gx-chip:focus-visible { outline: 2px solid var(--gx-teal); outline-offset: 2px; }
.gx-chip[aria-pressed="true"] { background: var(--gx-deep); border-color: var(--gx-deep); color: var(--paper); }
.gx-n { font-size: 12px; font-variant-numeric: tabular-nums; opacity: .55; }
.gx-chip[hidden] { display: none; }

.gx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
@media (min-width: 768px) { .gx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); } }
@media (min-width: 1280px) { .gx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gx-item[hidden] { display: none; }
.gx-tile {
  position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; overflow: hidden; cursor: zoom-in;
  border-radius: var(--radius); background: oklch(93% .012 80);
}
.gx-tile img { width: 100%; height: 100%; object-fit: cover; transition: scale .35s var(--ease), opacity .35s var(--ease); }
.gx-js .gx-tile img { opacity: 0; }
.gx-js .gx-tile img.is-loaded { opacity: 1; }
@media (hover: hover) { .gx-tile:hover img { scale: 1.035; } }
.gx-tile:focus-visible { outline: 2px solid var(--gx-teal); outline-offset: 3px; }
.gx-grid.is-filtering .gx-item:not([hidden]) { animation: gx-in .3s var(--ease) both; }
@keyframes gx-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .gx-grid.is-filtering .gx-item:not([hidden]) { animation: none; }
  .gx-tile img, .gx-ba img { transition: none; }
}

/* ---------- One action ---------- */
.gx-cta { background: var(--gx-deep); color: var(--paper); padding: var(--sec) 0; }
.gx-cta-row { display: grid; gap: var(--s6); }
.gx-cta .section-head { margin: 0; max-width: 14ch; }
.gx-cta-act { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); }
.gx-cta-call { color: oklch(100% 0 0 / .78); font-size: 15px; }
.gx-cta-call:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 1024px) {
  .gx-cta-row { grid-template-columns: 1fr auto; align-items: center; }
  .gx-cta .section-head { max-width: none; }
}

/* ---------- Viewer ---------- */
.gx-lb {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: oklch(15% .02 200); color: var(--paper); overscroll-behavior: contain;
}
.gx-lb::backdrop { background: transparent; }
.gx-lb[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); animation: gx-in .16s var(--ease); }
.gx-lb-bar { display: flex; align-items: center; justify-content: space-between;
  padding: calc(8px + env(safe-area-inset-top)) var(--s3) var(--s2) var(--gutter); }
.gx-lb-count { font-size: 13px; letter-spacing: .12em; font-variant-numeric: tabular-nums; color: oklch(100% 0 0 / .7); }
.gx-lb-fig { margin: 0; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: var(--s3);
  padding: 0 var(--s3) calc(88px + env(safe-area-inset-bottom)); }
@media (min-width: 640px) { .gx-lb-fig { padding: 0 88px var(--s6); } .gx-lb-frame img { max-height: calc(100svh - 170px); } }
.gx-lb-frame { min-height: 0; display: grid; place-items: center; touch-action: pan-y pinch-zoom; }
.gx-lb-frame:has(img:not([src])) { min-height: 50svh; }
/* Bar ~64px, caption ~56px, nav row 88px on a phone. */
.gx-lb-frame img { max-width: 100%; max-height: calc(100svh - 240px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); width: auto; height: auto; object-fit: contain; border-radius: 8px;
  transition: opacity .18s var(--ease); }
.gx-lb-frame img.is-loading { opacity: .5; }
.gx-lb-cap { display: grid; gap: 4px; justify-items: center; text-align: center; font-size: 15px; line-height: 1.4; color: oklch(100% 0 0 / .86); }
.gx-lb-svc { font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: oklch(78% .08 195); }
.gx-lb-svc:empty { display: none; }
.gx-lb-btn {
  display: inline-grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: oklch(100% 0 0 / .1); color: var(--paper); transition: background-color .2s var(--ease), scale .15s var(--ease);
}
.gx-lb-btn:hover { background: oklch(100% 0 0 / .2); }
.gx-lb-btn:active { scale: .95; }
.gx-lb-btn:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
.gx-lb-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gx-lb-prev, .gx-lb-next { position: absolute; bottom: calc(20px + env(safe-area-inset-bottom)); }
.gx-lb-prev { left: calc(50% - 64px); }
.gx-lb-next { right: calc(50% - 64px); }
@media (min-width: 640px) {
  .gx-lb-prev, .gx-lb-next { bottom: auto; top: 50%; translate: 0 -50%; }
  .gx-lb-prev { left: var(--s5); }
  .gx-lb-next { right: var(--s5); }
}
body.gx-lb-open { overflow: hidden; }
