/* 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); } }
/* Holds space for the future Profile link */
.site-nav__reserved { min-width: 3.5rem; }

/* ---------- 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; }

.placeholder--hero {
  height: clamp(220px, 30vw, 440px);
  border: 0;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(47, 93, 58, .05) 14px 28px),
    linear-gradient(var(--sage) 0 80%, #e3ecee 80% 100%);
}
.placeholder--hero .placeholder__tag { font-size: .75rem; }
.placeholder--hero .placeholder__text { font-size: 1rem; }

/* ---------- Intro: gallery beside the welcome ---------- */

/* Source order is mobile order (heading, gallery, tiles); desktop places them in two columns */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "gallery welcome"
    "gallery categories";
  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; }
.welcome p:last-child { margin-bottom: 0; }

/* Gallery: one main image, a swipeable thumbnail strip beneath */
.gallery__main {
  aspect-ratio: 4 / 3;
  border-style: solid;
  border-color: transparent;
}
.gallery__main img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gallery__strip {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.gallery__thumbs {
  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 calc((100% - 4px * 4) / 5);
  scroll-snap-align: start;
}

.gallery__thumb {
  position: relative;
  display: block;
  width: 100%;
  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; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
/* 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;
}

/* 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__media { aspect-ratio: 4 / 3; border-style: solid; border-color: transparent; }
.feature--flip .feature__media { aspect-ratio: 1 / 1; max-width: 480px; }
.feature__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.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; }
  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 */
  .intro {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: "welcome" "gallery" "categories";
  }
  .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--flip .feature__media { max-width: none; aspect-ratio: 4 / 3; }
  .feature__text { max-width: 40rem; }
  .features::before { display: none; }
  .contact__inner { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --header-h: 4rem; }
  .site-header__inner { flex-wrap: wrap; gap: 0 1rem; padding-block: .5rem; }
  .brand { font-size: .95rem; }
  .brand__name, .brand__sub { display: block; white-space: nowrap; }   /* two tidy lines on phones */
  .site-nav ul { gap: .9rem; }
  .site-nav a { font-size: .85rem; }
  .site-nav__reserved { min-width: 1.5rem; }

  .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__thumbs li { flex-basis: calc((100% - 4px * 3) / 4.4); }   /* a peek of the next thumb says "swipe" */

  .contact__list > div { grid-template-columns: 1fr; gap: 0; }
  .site-footer__inner { flex-direction: column; }
}
