/* John Richards Landscape Architects: shared styles */

:root {
  /* Palette: paper, slate, moss, sage, sandstone */
  --paper: #f7f8f5;
  --ink: #26302b;           /* slate ink */
  --ink-soft: #57615a;      /* secondary text, 5.9:1 on paper */
  --moss: #2f5d3a;          /* primary: brand, links, contact band */
  --moss-deep: #234a2c;     /* hover / pressed */
  --moss-ink: #1d3a25;      /* deepest moss, for the brand name and headings */
  --sage: #e6ece3;          /* tinted surfaces */
  --sage-deep: #dbe5d6;     /* tinted surface, hovered */
  --sage-line: #b9c8b3;     /* placeholder edges */
  --sage-on-moss: #cfdcca;  /* quiet text on the moss band, 6.3:1 */
  --sandstone: #a8875a;     /* the horizon line: rules only, never text */
  --rule: #d8ddd4;

  --font: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  --header-h: 4.75rem;
  --section-gap: clamp(4rem, 9vw, 7.5rem);

  /* Motion: a critically damped feel, no overshoot */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --t-press: 90ms;
  --t-hover: 260ms;
  --t-reveal: 800ms;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;               /* full-bleed bands never cause sideways scroll */
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;              /* Montserrat is wide: give body copy generous leading */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; }
p { margin: 0 0 1.15em; }
button { font: inherit; color: inherit; }

/* ---------- Links: drawn underline on hover, instant press feedback ---------- */

a {
  color: var(--moss);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  -webkit-tap-highlight-color: transparent;
  transition:
    color var(--t-hover) var(--ease-out),
    background-size var(--t-hover) var(--ease-out),
    opacity var(--t-hover) var(--ease-out),
    transform var(--t-hover) var(--ease-out);
}

@media (hover: hover) {
  a:hover { color: var(--moss-deep); background-size: 100% 1px; }
}
a:focus-visible {
  background-size: 100% 1px;
  outline: 2px solid var(--moss);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Press: respond on pointer-down, release eases back */
a:active {
  opacity: .6;
  transition-duration: var(--t-press);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: .75rem;
  background: var(--moss); color: #fff; padding: .6rem 1rem; z-index: 30;
  border-radius: 2px; font-weight: 600;
}
.skip-link:focus { left: var(--gutter); color: #fff; }

/* ---------- Header: sticky, translucent, edge appears on scroll ---------- */

site-header, site-footer { display: block; }

site-header {
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header {
  background: rgba(247, 248, 245, .82);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 1px 0 transparent;
  transition: box-shadow var(--t-hover) var(--ease-out);
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--rule), 0 6px 20px -14px rgba(38, 48, 43, .35); }

.site-header__inner {
  max-width: var(--max);
  min-height: var(--header-h);
  margin: 0 auto;
  padding: .75rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 2rem;
}

/* The name on one line: weight does the work, not a second typeface */
.brand {
  display: inline-block;
  background: none;
  color: var(--moss-ink);
  font-size: clamp(1.05rem, 1.9vw, 1.45rem);
  line-height: 1.25;
  letter-spacing: -.015em;
  transform-origin: left center;
}
.brand__name { font-weight: 700; }
.brand__sub { font-weight: 300; color: var(--moss); }
@media (hover: hover) { .brand:hover { color: var(--moss-deep); } }
.brand:active { opacity: 1; transform: scale(.985); }

.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 2rem; align-items: center;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;              /* comfortable touch target */
  font-size: .9rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--ink);
  background-position: 0 calc(50% + .8em);
}
@media (hover: hover) { .site-nav a:hover { color: var(--moss); } }
/* The email button in the menu bar: the page's CTA, sized for the header.
   (.site-nav .cta beats the plain .site-nav a link styles.) */
.site-nav .cta {
  display: inline-flex;
  width: auto;
  min-height: 44px;
  padding: .6rem 1.05rem .6rem .9rem;
  gap: .5rem;
  color: #fff;
  font-size: .85rem;
  letter-spacing: .01em;
  background-position: 0 0;
}
.site-nav .cta .cta__icon { width: 18px; height: 18px; }
.site-nav .cta__label { white-space: nowrap; }
@media (hover: hover) { .site-nav .cta:hover { color: #fff; } }

/* Tablets and phones: the menu bar is narrow, so the button becomes a square envelope.
   The label stays in the page for screen readers, so its name is still "Email John Richards". */
@media (max-width: 960px) {
  .site-nav .cta {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
  }
  .site-nav .cta .cta__icon { width: 20px; height: 20px; }
  .site-nav .cta__label {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0;
  }
}

/* ---------- Main ---------- */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* The horizon: the panorama runs edge to edge and rests on one sandstone line */
.hero {
  margin: 0 calc(50% - 50vw) clamp(3rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--sandstone);
}

.section-title {
  font-size: clamp(1.5rem, 2.3vw, 1.85rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--moss-ink);
  margin-bottom: 1.25rem;
  text-wrap: balance;               /* even line breaks on longer headings */
}
/* A short length of the horizon line under each heading */
.section-title::after {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2px;
  margin-top: .85rem;
  background: var(--sandstone);
}

/* ---------- Placeholders ---------- */

.placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .15rem;
  text-align: center;
  background:
    repeating-linear-gradient(135deg, transparent 0 10px, rgba(47, 93, 58, .05) 10px 20px),
    var(--sage);
  border: 1px dashed var(--sage-line);
  color: var(--ink-soft);
  line-height: 1.3;
  min-width: 0;
  overflow: hidden;
}
.placeholder__tag { font-size: .7rem; font-weight: 600; color: var(--moss); }
.placeholder__text { font-size: .85rem; font-weight: 300; }

/* Header illustration: full width, always whole (never cropped), transparent sky over the paper */
.hero__img {
  display: block;
  width: 100%;
  height: auto;
}

/* Lazy-loaded images fade in gently once they arrive (only when JS is running) */
.js .fade-img {
  opacity: 0;
  transition: opacity 700ms var(--ease-out);
}
.js .fade-img.is-loaded { opacity: 1; }

/* ---------- Intro: gallery beside the welcome ---------- */

/* Source order is mobile order (heading, gallery, tiles, email button); desktop places them in two columns */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  grid-template-areas:
    "gallery welcome"
    "gallery categories"
    "gallery cta";
  gap: 0 clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}
.intro .welcome { grid-area: welcome; }
.intro .gallery { grid-area: gallery; }
.intro .categories { grid-area: categories; }
.intro__cta { grid-area: cta; }
.welcome p:last-child { margin-bottom: 0; }

/* Gallery: one main image, a swipeable thumbnail strip beneath */
/* A fixed 4:3 frame; every photo is shown whole inside it (upright ones get sage bands at the sides) */
.gallery__main {
  aspect-ratio: 4 / 3;
  background: var(--sage);
  overflow: hidden;
}
.gallery__main img { display: block; width: 100%; height: 100%; object-fit: contain; }

/* The main image is a button that opens the enlarged view */
.gallery__main {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--t-hover) var(--ease-out);
}
.gallery__main:focus-visible { outline: 2px solid var(--moss); outline-offset: 3px; }
.gallery__main:active { transform: scale(.992); transition-duration: var(--t-press); }

/* A small expand icon in the corner says "this opens larger", on touch screens too */
.gallery__zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(247, 248, 245, .9);
  color: var(--moss);
  box-shadow: 0 1px 4px rgba(38, 48, 43, .2);
  pointer-events: none;
  transition: transform var(--t-hover) var(--ease-out), background-color var(--t-hover) var(--ease-out);
}
.gallery__zoom svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}
@media (hover: hover) {
  .gallery__main:hover .gallery__zoom { transform: scale(1.08); background: var(--paper); }
}

/* ---------- Enlarged photo view: a slider of its own ---------- */

html.lightbox-open { overflow: hidden; scrollbar-gutter: stable; }   /* page stays still behind it */

.lightbox {
  --lb-top: 72px;                     /* row for the close button */
  --lb-strip: 100px;                  /* row for the thumbnail strip */
  --lb-side: 92px;                    /* room for the arrows beside the photo */
  --lb-btn: 52px;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(20, 28, 23, .96);  /* deep moss scrim */
  overflow: hidden;
}
.lightbox[open] {
  display: grid;
  grid-template-rows: var(--lb-top) minmax(0, 1fr) var(--lb-strip);
}
.lightbox::backdrop { background: transparent; }

/* Middle row: the photo, with the arrows either side */
.lightbox__stage {
  grid-row: 2;
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0 var(--lb-side);
  touch-action: pan-y pinch-zoom;     /* sideways swipes are ours; pinch-zoom still works */
}

.lightbox__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - var(--lb-top) - var(--lb-strip) - 8px);
  max-height: calc(100dvh - var(--lb-top) - var(--lb-strip) - 8px);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .6);
  transform-origin: center;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Round buttons: close, previous, next. Light discs read clearly on the dark scrim and over photos. */
.lightbox__close,
.lightbox__nav {
  display: grid;
  place-items: center;
  width: var(--lb-btn);
  height: var(--lb-btn);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(247, 248, 245, .94);
  color: var(--moss-ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--t-hover) var(--ease-out), transform var(--t-hover) var(--ease-out);
}
.lightbox__close svg,
.lightbox__nav svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}
@media (hover: hover) {
  .lightbox__close:hover, .lightbox__nav:hover { background: #fff; }
}
.lightbox__close:focus-visible,
.lightbox__nav:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.lightbox__close:active,
.lightbox__nav:active { transform: scale(.92); transition-duration: var(--t-press); }

.lightbox__close {
  --lb-btn: 44px;
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}
.lightbox__close svg { width: 20px; height: 20px; }

.lightbox__nav {
  position: absolute;
  top: 50%;
  margin-top: calc(var(--lb-btn) / -2);
  z-index: 1;
}
.lightbox__nav:active { transform: scale(.92); }
.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }

/* Bottom row: the thumbnail strip */
.lightbox__thumbs {
  grid-row: 3;
  position: relative;
  list-style: none;
  margin: 0;
  padding: 16px 20px 20px;
  display: flex;
  align-items: center;
  justify-content: safe center;       /* centred when they fit, scrollable when they don't */
  gap: 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.lightbox__thumbs::-webkit-scrollbar { display: none; }
.lightbox__thumbs li { flex: 0 0 auto; }

.lightbox__thumb {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  opacity: .5;
  -webkit-tap-highlight-color: transparent;
  transition: opacity var(--t-hover) var(--ease-out), transform var(--t-hover) var(--ease-out);
}
.lightbox__thumb img { display: block; height: 60px; width: auto; }
.lightbox__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 2px transparent;
  transition: box-shadow var(--t-hover) var(--ease-out);
  pointer-events: none;
}
.lightbox__thumb[aria-current="true"] { opacity: 1; }
.lightbox__thumb[aria-current="true"]::after { box-shadow: inset 0 0 0 2px #fff; }
@media (hover: hover) { .lightbox__thumb:hover { opacity: .9; } }
.lightbox__thumb:focus-visible { outline: 2px solid #fff; outline-offset: 2px; opacity: 1; }
.lightbox__thumb:active { transform: scale(.95); transition-duration: var(--t-press); }

/* Phones: the photo takes the full width; the arrows sit over its edges */
@media (max-width: 640px) {
  .lightbox { --lb-top: 64px; --lb-strip: 84px; --lb-side: 0px; --lb-btn: 44px; }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
  .lightbox__nav { background: rgba(247, 248, 245, .88); }
  .lightbox__thumbs { padding: 12px 12px 16px; }
  .lightbox__thumb img { height: 48px; }
}

.gallery__strip {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.gallery__thumbs {
  position: relative;                /* thumbnails are measured from the strip */
  list-style: none;
  margin: 0;
  padding: 3px;                     /* room for the focus ring */
  display: flex;
  gap: 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
.gallery__thumbs::-webkit-scrollbar { display: none; }
.gallery__thumbs li {
  flex: 0 0 auto;                   /* each thumbnail keeps its photo's own shape */
  scroll-snap-align: start;
}

.gallery__thumb {
  position: relative;
  display: block;
  width: auto;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  opacity: .62;
  -webkit-tap-highlight-color: transparent;
  transition: opacity var(--t-hover) var(--ease-out), transform var(--t-hover) var(--ease-out);
}
.gallery__thumb .placeholder { aspect-ratio: 1 / 1; }
.gallery__thumb .placeholder__tag { display: none; }
.gallery__thumb .placeholder__text { font-size: .7rem; font-weight: 500; }
.gallery__thumb img { display: block; height: 80px; width: auto; }
/* The current photo: full strength with a moss frame */
.gallery__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 2px transparent;
  transition: box-shadow var(--t-hover) var(--ease-out);
  pointer-events: none;
}
.gallery__thumb[aria-current="true"] { opacity: 1; }
.gallery__thumb[aria-current="true"]::after { box-shadow: inset 0 0 0 2px var(--moss); }
@media (hover: hover) { .gallery__thumb:hover { opacity: 1; } }
.gallery__thumb:focus-visible { outline: 2px solid var(--moss); outline-offset: 1px; opacity: 1; }
.gallery__thumb:active { transform: scale(.96); transition-duration: var(--t-press); }

.gallery__nav {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--paper);
  color: var(--moss);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color var(--t-hover) var(--ease-out),
    border-color var(--t-hover) var(--ease-out),
    opacity var(--t-hover) var(--ease-out),
    transform var(--t-hover) var(--ease-out);
}
.gallery__nav svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}
@media (hover: hover) {
  .gallery__nav:hover:not(:disabled) { background: var(--sage); border-color: var(--sage-line); }
}
.gallery__nav:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; }
.gallery__nav:active:not(:disabled) { transform: scale(.92); transition-duration: var(--t-press); }
.gallery__nav:disabled { opacity: .35; cursor: default; }

/* Welcome, beside the gallery */
.welcome p:first-of-type {
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  letter-spacing: -.01em;
  color: var(--moss-ink);
  max-width: 34em;
}

/* Call to action: email John. A solid moss button, the one filled button on the page. */
/* Sits under the four tiles and spans their full width, so the block reads as one unit */
.intro__cta { margin: 1.25rem 0 0; }
.cta {
  display: flex;
  justify-content: center;
  width: 100%;
  align-items: center;
  border: 0;                        /* when the button is a real <button>, drop the browser's default edge */
  cursor: pointer;
  gap: .65rem;
  min-height: 48px;
  padding: .8rem 1.4rem .8rem 1.2rem;
  border-radius: 2px;
  background: var(--moss);
  background-image: none;           /* no drawn underline on the button */
  color: #fff;
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.2;
  box-shadow: 0 1px 2px rgba(29, 58, 37, .25);
  transition:
    background-color var(--t-hover) var(--ease-out),
    box-shadow var(--t-hover) var(--ease-out),
    transform var(--t-hover) var(--ease-out);
}
.cta__icon {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
  stroke-linecap: round;
  transition: transform var(--t-hover) var(--ease-out);
}
@media (hover: hover) {
  .cta:hover {
    color: #fff;
    background-color: var(--moss-deep);
    box-shadow: 0 6px 16px -8px rgba(29, 58, 37, .55);
  }
  .cta:hover .cta__icon { transform: translateY(-1px); }
}
.cta:focus-visible {
  color: #fff;
  outline: 2px solid var(--moss);
  outline-offset: 3px;
}
.cta:active {
  opacity: 1;
  transform: scale(.98);
  background-color: var(--moss-deep);
  transition-duration: var(--t-press);
}

/* Category tiles: icon + label. Plain <span> today; the same tile as an <a> becomes a link. */
.categories {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
}

.category {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .7rem;
  height: 100%;
  min-height: 44px;
  padding: 1.15rem .9rem 1.2rem;
  background: var(--sage);
  border-top: 2px solid var(--moss);
  color: var(--moss-ink);
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.35;
}

.category__icon {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: var(--moss);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--t-hover) var(--ease-out);
}

/* --- Future links: these rules apply only once a tile is an <a> --- */
a.category {
  background-image: none;           /* no text underline on tiles */
  transition:
    background-color var(--t-hover) var(--ease-out),
    color var(--t-hover) var(--ease-out),
    transform var(--t-hover) var(--ease-out);
}
@media (hover: hover) {
  a.category:hover { background-color: var(--sage-deep); color: var(--moss-ink); }
  a.category:hover .category__icon { transform: translateY(-2px); }
}
a.category:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; }
a.category:active {
  opacity: 1;
  transform: scale(.98);
  transition-duration: var(--t-press);
}

/* ---------- Feature rows: text beside a main image, alternating ---------- */

.features {
  position: relative;
  display: grid;
  gap: clamp(3rem, 7vw, 6rem);
  margin: var(--section-gap) 0;
}
/* A sage square sits behind where the two rows meet, tying them together */
.features::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(140px, 17vw, 220px);
  aspect-ratio: 1 / 1;
  transform: translate(-58%, -50%);
  background: var(--sage);
  z-index: 0;
}

.feature {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.feature--flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

/* Feature images keep their own proportions: never cropped or stretched */
.feature__media img { display: block; width: 100%; height: auto; }

.feature__text { max-width: 30rem; }
.feature--flip .feature__text { justify-self: start; }
.feature__text::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2px;
  margin-bottom: 1.5rem;
  background: var(--sandstone);
}
.feature__text p { margin: 0; font-size: 1.02rem; line-height: 1.85; }

/* ---------- Contact: one full-width moss band ---------- */

.contact {
  margin: 0 calc(50% - 50vw);
  padding: clamp(3rem, 7vw, 5rem) var(--gutter);
  background: var(--moss);
  color: #fff;
}
.contact__inner {
  max-width: calc(var(--max) - 2 * var(--gutter));   /* lines up with the content above */
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 2rem clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
}
.contact .section-title { color: #fff; }
.contact__name { font-weight: 600; margin: 0; }
.contact__list { margin: 0; display: grid; gap: 0; }
.contact__list > div {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: .8rem 0;
  border-top: 1px solid rgba(255, 255, 255, .18);
}
.contact__list > div:last-child { border-bottom: 1px solid rgba(255, 255, 255, .18); }
.contact__list dt { font-size: .85rem; font-weight: 500; color: var(--sage-on-moss); }
.contact__list dd { margin: 0; overflow-wrap: anywhere; }
.contact__list address { font-style: normal; }
.contact__list a {
  display: inline-block;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 500;
  padding: .55rem 0;          /* 44px hit area without shifting the layout */
  margin: -.55rem 0;
  background-position: 0 calc(100% - .45rem);
}
@media (hover: hover) { .contact__list a:hover { color: #fff; } }
.contact__list a:focus-visible { outline-color: #fff; }
.contact__list a:active { transform: translateY(1px); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--sage);
  color: var(--ink-soft);
  font-size: .875rem;
}
.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem var(--gutter) 2.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem 2rem;
}
.site-footer p { margin: 0; }
.site-footer__name { font-weight: 600; color: var(--moss-ink); }
.site-footer a {
  display: inline-block;
  padding: .6rem 0;
  margin: -.6rem 0;
  background-position: 0 calc(100% - .5rem);
}
.site-footer .sep { margin: 0 .5rem; }

/* ---------- Scroll reveal (only when JS is running) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity var(--t-reveal) var(--ease-out),
    transform var(--t-reveal) var(--ease-out);
}
/* The welcome follows the gallery a beat later */
.js .intro .reveal + .reveal { transition-delay: 120ms; }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Reduced motion / transparency ---------- */

@media (prefers-reduced-motion: reduce) {
  html, .gallery__thumbs { scroll-behavior: auto; }
  .js .reveal {
    transform: none;
    transition: opacity 300ms linear;
    transition-delay: 0s !important;
  }
  a, .brand { transition: color 150ms linear, opacity 150ms linear, background-size 0s; }
  a:active, .brand:active, .contact__list a:active, a.category:active,
  .gallery__thumb:active, .gallery__nav:active:not(:disabled) { transform: none; }
  .category__icon, a.category { transition: background-color 150ms linear, color 150ms linear; }
  .js .fade-img { transition: opacity 200ms linear; }   /* a short cross-fade, no movement */
  .gallery__main:active, .lightbox__close:active, .lightbox__nav:active, .lightbox__thumb:active, .cta:active { transform: none; }
  .cta:hover .cta__icon { transform: none; }
  .gallery__main:hover .gallery__zoom { transform: none; }
  a.category:hover .category__icon { transform: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  /* Stacked: heading and text, then the slider, then the four tiles, then the email button */
  .intro {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "welcome" "gallery" "categories" "cta";
  }
  .intro .gallery { margin-top: 2rem; }
  .intro .categories { margin-top: 1.25rem; }
  .feature, .feature--flip { grid-template-columns: 1fr; gap: 1.75rem; }
  .feature__media { order: -1; }               /* image first when stacked */
  .feature__text { max-width: 40rem; }
  .features::before { display: none; }
  .contact__inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .placeholder--hero { height: 200px; }

  /* Phones: the strip is swiped, so the arrow buttons step aside */
  .gallery__strip { grid-template-columns: minmax(0, 1fr); }
  .gallery__nav { display: none; }
  .gallery__thumbs { padding-inline: 0; }
  .gallery__thumb img { height: 64px; }       /* the next thumbnail peeks in at the edge: it says "swipe" */

  .contact__list > div { grid-template-columns: 1fr; gap: 0; }
  .site-footer__inner { flex-direction: column; }
}


/* ---------- Mobile header (under 768px): the name and a menu button; the links drop down in a panel ---------- */

.menu-toggle,
.menu-scrim { display: none; }               /* desktop doesn't use them */

@media (max-width: 767px) {
  :root { --header-h: 3.75rem; }

  .site-header__inner {
    position: relative;
    padding-block: .5rem;
    gap: 1rem;
  }

  /* The name keeps its bold/light split. If it doesn't fit on one line,
     "Landscape Architects" moves to a second line as one phrase. */
  .brand { font-size: clamp(.95rem, 3.9vw, 1.1rem); line-height: 1.2; }
  .brand__sub { white-space: nowrap; }

  /* The menu button: two moss lines that turn into an X */
  .menu-toggle {
    display: grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    margin-right: -11px;                      /* lines up the icon, not the tap area, with the page edge */
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--moss-ink);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color var(--t-hover) var(--ease-out), transform var(--t-hover) var(--ease-out);
  }
  .menu-toggle:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; }
  .menu-toggle:active {
    background: var(--sage);
    transform: scale(.92);
    transition-duration: var(--t-press);
  }
  .menu-toggle__icon { position: relative; display: block; width: 22px; height: 14px; }
  .menu-toggle__icon span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 1px;
    background: currentColor;
    transition: top 300ms var(--ease-out), transform 300ms var(--ease-out);
  }
  .menu-toggle__icon span:first-child { top: 2px; }
  .menu-toggle__icon span:last-child { top: 10px; }
  .is-menu-open .menu-toggle__icon span:first-child { top: 6px; transform: rotate(45deg); }
  .is-menu-open .menu-toggle__icon span:last-child { top: 6px; transform: rotate(-45deg); }

  /* While the menu is open, the header turns solid so it and the panel read as one surface */
  .site-header.is-menu-open {
    background: var(--paper);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
  }

  /* The panel: full width under the header, closed by the sandstone horizon line */
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: .25rem var(--gutter) 1.25rem;
    background: var(--paper);
    border-bottom: 1px solid var(--sandstone);
    box-shadow: 0 22px 32px -24px rgba(38, 48, 43, .5);
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
    transition: opacity 220ms var(--ease-out), transform 300ms var(--ease-out), visibility 0s linear 300ms;
  }
  .is-menu-open .site-nav {
    opacity: 1;
    transform: none;
    visibility: visible;
    transition: opacity 220ms var(--ease-out), transform 300ms var(--ease-out), visibility 0s;
  }

  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li + li { border-top: 1px solid var(--rule); }

  /* Links: full-width rows, 56px tall, easy to hit with a thumb */
  .site-nav a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 56px;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--ink);
    background-image: none;                  /* no drawn underline inside the panel */
  }

  /* The email link: a moss row with the envelope, not the big green button */
  .site-nav .cta {
    width: 100%;
    height: auto;
    min-height: 56px;
    justify-content: flex-start;
    gap: .75rem;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: var(--moss);
    font-size: 1.05rem;
    font-weight: 600;
  }
  .site-nav .cta .cta__icon { width: 20px; height: 20px; }
  .site-nav .cta__label {                    /* undo the tablet's hidden label: here it's shown */
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
  }
  .site-nav .cta:active { background: none; transform: none; }
  @media (hover: hover) {
    .site-nav .cta:hover { color: var(--moss-deep); background: none; box-shadow: none; }
  }

  /* The page behind dims; tapping it closes the menu */
  .menu-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: -1;                             /* under the header and panel, over the page */
    background: rgba(20, 28, 23, .32);
    opacity: 0;
    visibility: hidden;
    transition: opacity 260ms var(--ease-out), visibility 0s linear 260ms;
  }
  site-header.is-menu-open .menu-scrim {
    opacity: 1;
    visibility: visible;
    transition: opacity 260ms var(--ease-out), visibility 0s;
  }
  html.menu-open { overflow: hidden; }       /* the page stays still while the menu is open */
}

/* Reduced motion: the panel and backdrop simply fade; the icon changes quickly, without a swing */
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .site-nav,
  .is-menu-open .site-nav { transform: none; }
  .site-nav { transition: opacity 150ms linear, visibility 0s linear 150ms; }
  .is-menu-open .site-nav { transition: opacity 150ms linear, visibility 0s; }
  .menu-toggle__icon span { transition: none; }
  .menu-toggle:active { transform: none; }
}

/* ---------- Enquiry form (modal) ---------- */

:root {
  --error: #a3392b;                 /* muted brick: 6.4:1 on paper, used only for form errors */
  --field-border: #8b978d;          /* 3.1:1 against white: input edges stay visible */
}

html.enquiry-open { overflow: hidden; scrollbar-gutter: stable; }

.enquiry {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: clamp(16px, 4vw, 48px);
  border: 0;
  background: rgba(20, 28, 23, .55);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.enquiry[open] { display: grid; place-items: center; }
.enquiry::backdrop { background: transparent; }

.enquiry__card {
  width: min(100%, 34rem);
  background: var(--paper);
  border-top: 2px solid var(--sandstone);     /* the horizon line, as on the rest of the site */
  border-radius: 2px;
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .55);
}

.enquiry__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.6rem 1.25rem 0 clamp(1.25rem, 4vw, 2rem);
}
.enquiry__title {
  font-size: clamp(1.35rem, 2.4vw, 1.6rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--moss-ink);
  outline: none;
}
.enquiry__close {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  margin: -.55rem -.25rem 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--moss-ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--t-hover) var(--ease-out), transform var(--t-hover) var(--ease-out);
}
.enquiry__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
@media (hover: hover) { .enquiry__close:hover { background: var(--sage); } }
.enquiry__close:focus-visible { outline: 2px solid var(--moss); outline-offset: 2px; }
.enquiry__close:active { transform: scale(.92); transition-duration: var(--t-press); }

.enquiry__body { padding: 1.25rem clamp(1.25rem, 4vw, 2rem) 1.75rem; }

/* Fields: label, then any error, then the input */
.field { margin-bottom: 1.15rem; }
.field__label {
  display: block;
  margin-bottom: .35rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
}
.field__optional { font-weight: 400; color: var(--ink-soft); }
.field__input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: .7rem .85rem;
  border: 1px solid var(--field-border);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;                  /* 16px: stops iPhones zooming in on focus */
  line-height: 1.5;
  transition: border-color var(--t-hover) var(--ease-out), box-shadow var(--t-hover) var(--ease-out);
}
.field__input--area { min-height: 8.5rem; resize: vertical; }
.field__input:focus { outline: none; border-color: var(--moss); box-shadow: 0 0 0 3px rgba(47, 93, 58, .22); }
.field__error {
  margin: 0 0 .35rem;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--error);
}
.field.has-error .field__input { border-color: var(--error); border-width: 2px; padding: calc(.7rem - 1px) calc(.85rem - 1px); }
.field.has-error .field__input:focus { box-shadow: 0 0 0 3px rgba(163, 57, 43, .2); }

/* The honeypot: kept out of sight and out of reach for people */
.enquiry__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.enquiry__turnstile:not(:empty) { margin: .25rem 0 1rem; }

.enquiry__alert {
  margin: 0 0 1rem;
  padding: .75rem .9rem;
  border-left: 3px solid var(--error);
  background: #f6e9e6;
  color: #7d2a1f;
  font-size: .925rem;
  font-weight: 500;
  line-height: 1.5;
}

.enquiry__submit { margin-top: .35rem; }
.enquiry__submit:disabled { cursor: progress; opacity: .85; }
.enquiry__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: enquiry-spin .8s linear infinite;
}
.enquiry__submit.is-sending .enquiry__spinner { display: inline-block; }
@keyframes enquiry-spin { to { transform: rotate(360deg); } }

.enquiry__privacy {
  margin: 1rem 0 0;
  font-size: .85rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.enquiry__done { padding: .5rem 0 .25rem; }
.enquiry__thanks {
  margin: 0 0 1.5rem;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--moss-ink);
  outline: none;
}
.enquiry__done-close { width: auto; display: inline-flex; padding-inline: 2rem; }

/* Phones: a full-screen sheet */
@media (max-width: 640px) {
  .enquiry { padding: 0; background: rgba(20, 28, 23, .55); }
  .enquiry[open] { display: block; }
  .enquiry__card {
    width: 100%;
    min-height: 100%;
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
  .enquiry__head {
    position: sticky;
    top: 0;
    z-index: 1;
    align-items: center;
    padding: .6rem .6rem .6rem 1.25rem;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
  }
  .enquiry__close { margin: 0; }
  .enquiry__body { padding: 1.25rem 1.25rem calc(1.75rem + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .enquiry__spinner { animation-duration: 2.4s; }   /* still shows it's working, but gently */
  .enquiry__close:active { transform: none; }
}

/* ---------- Privacy Policy and other text pages ---------- */

.page {
  max-width: 44rem;
  padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(3rem, 8vw, 5rem);
}
.page h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); }
.page__updated { margin: -.25rem 0 2rem; color: var(--ink-soft); font-size: .95rem; }
.page h2 {
  margin: 2.25rem 0 .75rem;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--moss-ink);
}
.page p, .page li { max-width: 68ch; }
.page ul { padding-left: 1.25rem; margin: 0 0 1.15em; }
.page li { margin-bottom: .45em; }
.page a { background-size: 100% 1px; }             /* links in text are always underlined */
.page .placeholder-text { background: #fff3cd; padding: 0 .2em; border-radius: 2px; }

/* ---------- Admin sign-in page (served by the Worker at /admin/login) ---------- */

.admin-login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--gutter);
}
.admin-login__card {
  width: min(100%, 24rem);
  padding: 2rem clamp(1.25rem, 5vw, 2rem) 2.25rem;
  background: #fff;
  border-top: 2px solid var(--sandstone);
  border-radius: 2px;
  box-shadow: 0 24px 60px -32px rgba(38, 48, 43, .45);
}
.admin-login__brand { display: block; margin: 0 0 1.5rem; font-size: 1rem; }
.admin-login__title { margin: 0 0 1.25rem; font-size: 1.3rem; font-weight: 600; letter-spacing: -.01em; color: var(--moss-ink); }
.admin-login__msg {
  margin: 0 0 1.1rem;
  padding: .65rem .8rem;
  border-left: 3px solid var(--error);
  background: #f6e9e6;
  color: #7d2a1f;
  font-size: .9rem;
  font-weight: 500;
}
.admin-login__msg--ok { border-left-color: var(--moss); background: var(--sage); color: var(--moss-ink); }
.admin-login__submit { margin-top: 1rem; }

/* Preview/demo sites only: a quiet note in the enquiry form */
.enquiry__demo {
  margin: 0 0 1.1rem;
  padding: .55rem .8rem;
  background: var(--sage);
  border-left: 3px solid var(--moss);
  color: var(--moss-ink);
  font-size: .85rem;
  font-weight: 500;
}
