/* Icon Moss · iconmoss.com
   Plain CSS, no build step. Tokens first, then layout, then components. */

:root {
  --cream: #F3F0E8;
  --cream-deep: #DDD9CC;
  --rule: #CFCBBE;
  --ink: #1B2015;
  --ink-soft: #474C3D;
  --muted: #5B6150;
  --moss: #2C3820;
  --moss-mid: #4C5E33;
  --moss-line: #4E5B3B;
  --chartreuse: #DCF250;
  --lichen: #E4E8CF;
  --on-moss: #E2E0D4;
  --on-moss-muted: #B9BFA3;
  --on-photo: #F1F0E6;
  --white: #FFFFFF;

  --serif: 'Gloock', Georgia, 'Times New Roman', serif;
  --sans: 'Figtree', 'Helvetica Neue', Arial, sans-serif;

  --gutter: 56px;
  --max: 1440px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (max-width: 900px) { :root { --gutter: 32px; } }
@media (max-width: 560px) { :root { --gutter: 20px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
[hidden] { display: none !important; } /* components set display, which would override it */
a { color: var(--moss); }
a:hover { color: var(--moss-mid); }
h1, h2, h3, p, figure, blockquote { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--chartreuse); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Type helpers */
.serif { font-family: var(--serif); font-weight: 400; }
.label {
  font-size: 13px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--moss-mid);
}
.section-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(44px, 5vw, 72px); line-height: 1; letter-spacing: -0.02em;
}
.optical { margin-left: -0.04em; } /* aligns serif glyph edges with the column */
.nowrap { white-space: nowrap; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 54px; padding: 0 28px; border: 0; border-radius: 999px;
  background: var(--chartreuse); color: var(--ink);
  font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background .25s ease, color .25s ease;
}
.btn:hover { background: var(--moss); color: var(--cream); }
.btn--on-moss:hover { background: var(--cream); color: var(--ink); }
.btn svg { width: 16px; height: 16px; }

.pill {
  display: inline-block; padding: 5px 10px; border-radius: 999px;
  background: var(--chartreuse); color: var(--ink);
  font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
}

/* ---------- Header ---------- */
/* The header follows the scroll. app.js works out p, 0 to 1 over the last --hdr-scrub
   pixels before the photo leaves (where the bar used to switch to solid), and sets it on
   .site-header as --p along with five eased parts, each 0 to 1 over its own stretch of p:
   --hdr-fade (letters out), --hdr-bar (moss bar and rule in), --hdr-slide (the m into
   the mark), --hdr-tint (dot and m to chartreuse) and --hdr-tight (the bar compacts),
   plus --hdr-shade for the nav's shadow. It adds .is-moved once the header has left its
   resting state and .is-solid once the bar is fully opaque. Nothing here has a
   transition: p follows the scroll in both directions, and app.js keeps it from moving
   faster than the old 460ms transition did, so a fast flick still plays the morph.
   Under reduced motion everything jumps from rest to solid at once, at p = 1. */
.site-header {
  --hdr-scrub: 200px;   /* 5em of wordmark: the m travels 2.13em, so ~0.4x the scroll speed */
  --hdr-squeeze: 16px;  /* each side of the bar gives up this much: 32px padding to 16px */
  --hdr-fade: 0; --hdr-slide: 0; --hdr-tint: 0; --hdr-bar: 0; --hdr-tight: 0;
  --hdr-shade: 1;       /* the nav's shadow, 1 to 0 as the bar fills in, in a few steps */
  --hdr-shadow: 0 1px 14px rgba(0, 0, 0, .35);
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: var(--white);
  text-shadow: 0 1px 14px rgba(0, 0, 0, calc(.35 * var(--hdr-shade)));
  /* The box keeps its resting height; the bar drawn below shrinks instead, so only the
     bar and the controls catch clicks. */
  pointer-events: none;
}
/* The moss bar and its rule. Compacting slides it up by both paddings' worth, so its
   bottom edge lands where the solid header's used to; no layout changes per frame. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: auto;
  background: var(--moss); box-shadow: 0 1px 0 var(--moss-line);
  opacity: var(--hdr-bar);
  transform: translateY(calc(-2 * var(--hdr-squeeze) * var(--hdr-tight)));
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 32px;
}
.site-header__inner > * { pointer-events: auto; }
/* Once off its resting state (.is-moved) the controls rise with the bar to stay centred
   on it. At rest nothing has a transform, so the header draws exactly as it always has. */
.site-header.is-moved .site-header__inner > * { transform: translateY(calc(-1 * var(--hdr-squeeze) * var(--hdr-tight))); }
.wordmark {
  --wm-pad: 2px;
  position: relative; display: inline-block;
  font-family: var(--serif); font-size: 40px; line-height: 1; letter-spacing: -0.02em;
  color: inherit; text-decoration: none; padding: var(--wm-pad) 0; margin-left: -0.04em;
}
.wordmark:hover { color: inherit; opacity: .8; }

/* The wordmark becomes the mark (Gloock's i-dot over its m) on the solid bar.
   Three copies of "icon moss" sit exactly on the real one, each clipped to one part:
   the i's dot, the m of "moss", and everything else. Each copy is the whole word, so
   kerning and position match the real text by construction, and the clips meet in the
   empty space between glyphs. The real text underneath keeps only the shadow.
   As the photo leaves, the rest fades, the dot stays put, and the m slides left until
   its left stem is where the i's stem was. Only opacity, color and transform change.
   The letters are gone (fade ends at 30% of the scrub) before the m, which starts at
   10% and eases in, has covered the 8% of its slide that takes it over the "n".
   Numbers are Gloock units (1000 to the em):
   - the 1em line puts the baseline .875em down; the cut under the dot is at 577.5u,
     midway between the i's stem top (546u) and its dot (609u);
   - the m's copy runs from 2.053em (mid-space) to the gap before the next o;
   - the slide is 2.130em: the m starts at 2.131em (kerned, letter-spaced) and its stem
     sits 1u further left in its glyph than the i's;
   - the lift: the m's flag serif is 10u lower than the i's, and the mark keeps the i's
     63u gap between stem and dot, so the m ends 10u (0.3-0.4px) higher. Text only lands
     on whole device pixels, so that is one device pixel on 2x and 3x screens, none on 1x. */
.wordmark__text {
  display: inline-block; color: transparent; text-shadow: var(--hdr-shadow);
  opacity: calc(1 - var(--hdr-fade));
}
.wordmark__layer {
  position: absolute; left: 0; top: var(--wm-pad);
  white-space: nowrap; text-shadow: none; pointer-events: none; user-select: none;
  /* Before Gloock has loaded the whole word takes this tint, with no morph. */
  color: color-mix(in srgb, var(--chartreuse) calc(var(--hdr-tint) * 100%), var(--white));
}
.wordmark__layer::before { content: "icon moss"; }
.wordmark__dot { clip-path: polygon(-1em -1em, 6em -1em, 6em .2975em, -1em .2975em); }
.wordmark__m { clip-path: polygon(2.053em .2975em, 3.07em .2975em, 3.07em .775em, 3.181em .865em, 3.181em 1.5em, 2.053em 1.5em); }
.wordmark__word {
  clip-path: polygon(-1em .2975em, 2.053em .2975em, 2.053em 1.5em, 3.181em 1.5em, 3.181em .865em, 3.07em .775em, 3.07em .2975em, 6em .2975em, 6em 1.5em, -1em 1.5em);
}
.site-header.menu-open .wordmark__text { opacity: 0; }
.site-header.has-mark .wordmark__word { color: inherit; opacity: calc(1 - var(--hdr-fade)); }
.site-header.has-mark.is-moved .wordmark__m {
  transform: translate(calc(-2.13em * var(--hdr-slide)), calc(var(--wm-lift, 0px) * var(--hdr-slide)));
}
/* Browsers without color-mix() (Safari before 16.2) switch colour once the bar is solid. */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .site-header.is-solid .wordmark__layer { color: var(--chartreuse); }
  .site-header.has-mark.is-solid .wordmark__word { color: inherit; }
}
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) { .wordmark { --wm-lift: -.5px; } }
@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 3dppx) { .wordmark { --wm-lift: -.34px; } }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; font-size: 15px; font-weight: 500; }
.site-nav a { padding: 12px 14px; color: var(--white); text-decoration: none; transition: opacity .2s ease; }
.site-nav a:hover { opacity: .7; color: var(--white); }
.site-nav .site-nav__email { padding: 12px 18px; border: 1px solid rgba(255, 255, 255, .6); border-radius: 999px; }
.menu-btn { display: none; }

@media (max-width: 760px) {
  .site-header { --hdr-scrub: 160px; } /* 5em of the 32px wordmark */
  .wordmark { font-size: 32px; }
  .menu-btn {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--white); cursor: pointer;
  }
  .site-nav {
    position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; gap: 8px;
    padding: 96px var(--gutter) 48px; background: var(--moss); text-shadow: none;
    font-family: var(--serif); font-size: 36px; font-weight: 400;
    opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s;
  }
  .site-header.is-moved .site-nav { transform: none; } /* the menu overlay fills the screen and stays put */
  .site-nav a { padding: 10px 0; }
  .site-nav .site-nav__email { border: 0; padding: 10px 0; font-family: var(--sans); font-size: 18px; color: var(--chartreuse); }
  .site-header.menu-open .site-nav { opacity: 1; visibility: visible; }
  .site-header.menu-open { text-shadow: none; }
}

/* ---------- Home hero ---------- */
.hero {
  --hero-pin: 40svh;  /* how long the photo holds still: the headline has reached the header by then */
  position: relative; overflow: clip;
  display: flex; flex-wrap: wrap; align-items: flex-start;
  background: var(--moss); color: var(--white);
}
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 62% 30%; /* 30% keeps the faces below the headline on 16:10 and 16:9 screens */
  animation: im-zoom 2.6s var(--ease) both;
}
.hero__shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(18,22,12,.68) 0%, rgba(18,22,12,.38) 14%, rgba(18,22,12,0) 30%),
    linear-gradient(90deg, rgba(18,22,12,.58) 0%, rgba(18,22,12,.4) 30%, rgba(18,22,12,0) 58%);
}
.hero__body {
  position: relative; flex-grow: 1;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 32px;
  padding-top: 140px; padding-bottom: 200px;
}
.hero__eyebrow { color: var(--lichen); text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.hero__title {
  max-width: 11ch;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(56px, 9.4vw, 148px); line-height: .92; letter-spacing: -0.025em;
  color: var(--chartreuse); text-shadow: 0 2px 30px rgba(0,0,0,.3);
}
.hero__intro { max-width: 40ch; font-size: 18px; line-height: 1.6; color: var(--on-photo); text-shadow: 0 1px 14px rgba(0,0,0,.4); }
.hero__place {
  position: absolute; right: var(--gutter); bottom: 64px;
  color: var(--lichen); text-shadow: 0 1px 12px rgba(0,0,0,.35);
}
.hero__inner { position: relative; width: 100%; max-width: var(--max); min-height: max(640px, 100svh); margin: 0 auto; display: flex; }
.hero__inner > .hero__body { width: 100%; padding-inline: var(--gutter); }

/* The photo holds still while the words scroll up over it, then leaves with the page.
   .hero is a wrapping flex row. The photo, its shade and the words share the first line;
   the photo and shade give their width back (margin-right: -100%), so all three stack,
   and they stretch to the line, so at rest they have exactly the box they always had.
   Both are sticky: they stay at the top while the page scrolls through ::after, the
   second line, --hero-pin tall, until their bottom edge meets the section's and they
   scroll away. No script is involved. app.js anchors the header to the section's bottom
   edge, which is where the photo's ends up, so the header waits for the photo to leave.
   Units: the words keep max(640px, 100svh), so nothing moves when Safari's toolbar comes
   or goes. The photo is at least 100lvh, so it still reaches the bottom of the screen
   once the toolbar has gone. --hero-pin is in svh, so the pin is the same length either way.
   The shade is split. The top band, which is for the header, holds still with the photo.
   The darker lower half is there for the words, so it travels with them (.hero__inner's
   ::before, with a fade below it in ::after): the words keep the shade they have at rest
   wherever they are over the photo, and the photo comes up brighter as they leave it. */
.hero > picture { display: contents; } /* a <picture> around the photo would otherwise be the flex item */
.hero__img, .hero__shade {
  position: sticky; inset: auto; top: 0;
  flex: 0 0 100%; align-self: stretch; margin-right: -100%;
  height: auto; min-height: 100vh; min-height: 100lvh;
}
.hero__img { contain: size; } /* its own aspect ratio would make the line taller than the words */
.hero::after { content: ""; flex: 0 0 100%; height: var(--hero-pin); }
.hero__inner::before, .hero__inner::after {
  content: ""; position: absolute; left: calc(50% - 50vw); right: calc(50% - 50vw); pointer-events: none;
}
.hero__inner::before { top: 0; bottom: 0; background: linear-gradient(180deg, rgba(18,22,12,0) 42%, rgba(18,22,12,.72) 100%); }
.hero__inner::after {
  top: 100%; height: var(--hero-pin);
  background: linear-gradient(180deg, rgba(18,22,12,.72) 0%, rgba(18,22,12,.62) 25%, rgba(18,22,12,.36) 55%, rgba(18,22,12,.12) 80%, rgba(18,22,12,0) 100%);
}

@media (max-width: 760px) {
  .hero__intro { font-size: 17px; }
}

/* Phones: the photo holds until "See recent work" reaches the header, so the two of us
   are in full view before the page moves on.
   The pin lives in the words' own box this time (padding below them) rather than in a
   line of its own, and the photo is exactly 100lvh, so the photo lets go when the
   button's top is at 100lvh - pin - 174px (120px of padding under a 54px button),
   however tall the words are. 100lvh - 250px puts it at 76px, the bottom of the
   header's row (32px of padding and the 44px menu button).
   The shade: a light band under the header holds still with the photo, and a darker
   band hugs the words and travels with them, so their faces come clear behind it.
   The words sit in a grid here only so that band can span them exactly.
   "Bucks County, PA" becomes a caption in the photo's bottom corner (the shade's
   ::before), so it leaves with the photo and never crosses their faces. The words are
   repeated from index.html; the real label there stays for screen readers.
   --hero-toolbar is the strip Safari's toolbar covers at rest (100lvh - 100svh); the
   caption and the shade under it sit above that strip. */
@media (max-width: 760px) {
  .hero { --hero-pin: calc(100vh - 250px); --hero-toolbar: 0px; }
  .hero::after { display: none; }
  .hero__img, .hero__shade { align-self: flex-start; }
  .hero__inner { min-height: calc(max(640px, 100svh) + var(--hero-pin)); padding-bottom: var(--hero-pin); }
  .hero__inner::before, .hero__inner::after { content: none; }
  .hero__body {
    z-index: 0; display: grid; grid-template-rows: repeat(4, auto); align-content: end; justify-content: normal; justify-items: start;
    gap: 24px; padding-top: 120px; padding-bottom: 120px;
  }
  .hero__body::before {
    content: ""; position: absolute; z-index: -1; grid-row: 1 / -1; grid-column: 1;
    top: -90px; bottom: -110px; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); pointer-events: none;
    background: linear-gradient(180deg, rgba(18,22,12,0) 0, rgba(18,22,12,.45) 90px, rgba(18,22,12,.62) 45%, rgba(18,22,12,.84) calc(100% - 110px), rgba(18,22,12,.4) calc(100% - 55px), rgba(18,22,12,0) 100%);
  }
  .hero__shade {
    background:
      linear-gradient(180deg, rgba(18,22,12,.45) 0, rgba(18,22,12,.2) 70px, rgba(18,22,12,0) 150px),
      linear-gradient(0deg, rgba(18,22,12,.5) 0, rgba(18,22,12,.5) var(--hero-toolbar), rgba(18,22,12,0) calc(var(--hero-toolbar) + 130px));
  }
  .hero__shade::before {
    content: "Bucks County, PA"; position: absolute; right: var(--gutter); bottom: calc(var(--hero-toolbar) + 32px);
    font-size: 13px; font-weight: 600; line-height: 1.5; letter-spacing: .22em; text-transform: uppercase;
    color: var(--lichen); text-shadow: 0 1px 12px rgba(0,0,0,.35);
  }
  .hero__place { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@supports (height: 1lvh) {
  @media (max-width: 760px) {
    .hero { --hero-pin: calc(100lvh - 250px); --hero-toolbar: calc(100lvh - 100svh); }
  }
}

/* Where the browser can tie an animation to the scroll, the still photo also darkens a
   little toward the top as the words climb into its brighter half (the sky and blossom).
   It is fully dark by 60% of the pin. Not under reduced motion; there the travelling
   shade alone keeps the words readable. Not on phones either, where the photo should
   come up clear. */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 761px) {
    .hero__shade::after {
      content: ""; position: absolute; inset: 0;
      background: linear-gradient(180deg, rgba(18,22,12,.4) 0%, rgba(18,22,12,.3) 40%, rgba(18,22,12,0) 65%);
      animation: im-deepen linear both;
      animation-timeline: scroll(root); animation-range: 0 calc(var(--hero-pin) * .6);
    }
  }
}

/* Phones held upright get the tall photo (the <source> in index.html uses the same query) */
@media (orientation: portrait) and (max-width: 760px) {
  .hero__img { object-position: 50% 50%; }
}

.reveal { animation: im-rise 1.4s var(--ease) both; }
.reveal--2 { animation-delay: .15s; }
.reveal--3 { animation-delay: .3s; }

@keyframes im-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes im-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes im-deepen { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Manifesto ---------- */
.manifesto { padding: 152px 0 136px; }
.manifesto__inner { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 40px; text-align: center; }
.manifesto__text {
  font-family: var(--serif); font-size: clamp(36px, 5vw, 76px); line-height: 1.06; letter-spacing: -0.02em;
  text-wrap: balance;
}
.highlight {
  background: linear-gradient(180deg, transparent 56%, var(--chartreuse) 56%, var(--chartreuse) 90%, transparent 90%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 .06em;
}
.manifesto__sig { font-size: 15px; color: var(--muted); }
/* Too long for one line on a phone: it breaks after "studio" (the dot there is hidden), never before "2020". */
@media (max-width: 440px) { .manifesto__sep { display: block; height: 0; overflow: hidden; } }

/* ---------- The two of us ---------- */
/* Katharine first at every size. The section has no padding of its own: the manifesto's
   and the work grid's 136px sit either side of it, as they did around the old facts strip.
   It uses the work grid's column breakpoints (632px and 964px of grid), so its columns
   line up with the project cards below:
   - phones, under 632px: a compact card, a smaller portrait with the role and name set
     beside its foot and the bio across the full width under both;
   - 632px up: two columns, each card photo, role, name, bio, with the heading above;
   - 964px up: three columns, the heading in the first, the two of us in the other two.
   From 632px each card is a subgrid of four rows, so the roles, names and bios start
   level across the pair even when only one name wraps.
   The photo slot is 4:5 everywhere. Until the portraits arrive it is a moss block with the
   initial in Gloock; an <img> dropped in covers it. */
.us { scroll-margin-top: 96px; }
.us > .wrap { container: us / inline-size; }
.us__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px 32px; }
.us__head { display: flex; flex-direction: column; gap: 16px; }
.us__title { text-wrap: balance; }

.person {
  display: grid; grid-template-columns: minmax(0, 9fr) minmax(0, 11fr); grid-template-rows: 1fr auto auto auto;
  column-gap: 20px;
}
.person__photo {
  position: relative; overflow: hidden; container: photo / inline-size;
  display: grid; place-items: center; aspect-ratio: 4 / 5;
  background: var(--moss);
}
.person__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Each photo's crop. The slot is 4:5 at every size, so one position holds everywhere.
   Katharine: the original is 2:3, so a sixth of its height goes; taking it all off the top
   (sky and branches) keeps her face in the upper third and the dog and her boots whole. */
.person--katharine .person__photo img { object-position: 50% 100%; }
.person--robert .person__photo img { object-position: 50% 100%; }
.person__initial {
  font-family: var(--serif); font-size: 120px; font-size: 66cqw; line-height: 1;
  color: var(--chartreuse); transform: translateY(.03em); /* Gloock's caps sit a little high in the line box */
  user-select: none;
}
.person__role { margin: 0 0 8px; font-size: 12px; letter-spacing: .2em; line-height: 1.5; }
.person__name {
  font-family: var(--serif); font-weight: 400;
  font-size: 30px; font-size: clamp(22px, 8cqw, 30px); line-height: 1.04; letter-spacing: -0.01em; text-wrap: balance;
}
.person__bio { margin-top: 20px; font-size: 16px; line-height: 1.6; color: var(--ink-soft); text-wrap: pretty; }
/* Phones: the portrait spans the first three rows; the first row takes up the slack, so the
   role and name sit at the foot of the portrait, like a caption. */
.person__photo { grid-column: 1; grid-row: 1 / 4; }
.person__role { grid-column: 2; grid-row: 2; }
.person__name { grid-column: 2; grid-row: 3; }
.person__bio { grid-column: 1 / -1; grid-row: 4; }

@container us (width >= 632px) {
  .us__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 0; }
  .us__head { grid-column: 1 / -1; margin-bottom: 56px; }
  .person { display: flex; flex-direction: column; grid-row: span 4; }
  .person > * { grid-column: auto; grid-row: auto; }
  .person__photo { margin-bottom: 28px; }
  .person__role { margin: 0 0 12px; font-size: 13px; letter-spacing: .22em; }
  .person__name { font-size: 36px; line-height: 1.02; }
  .person__bio { margin-top: 18px; font-size: 17px; }
}
@supports (grid-template-rows: subgrid) {
  @container us (width >= 632px) {
    .person { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: subgrid; row-gap: 0; }
    .person__role { align-self: end; }
    .person__name { align-self: start; }
  }
}
@container us (width >= 964px) {
  .us__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .us__head { grid-column: 1; grid-row: 1 / span 4; align-self: start; margin-bottom: 0; }
  .us__title { max-width: 5em; } /* "The two / of us." */
}

/* ---------- Work grid ---------- */
.work { padding: 136px 0; }
.work__head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 56px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 64px 32px; }
.card { display: flex; flex-direction: column; gap: 20px; color: var(--ink); text-decoration: none; }
.card:hover { color: var(--ink); }
.card__media { overflow: hidden; background: var(--cream-deep); }
.card__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 1s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }
.card__meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--moss-mid); }
.card__title { margin-top: -4px; font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.05; letter-spacing: -0.01em; }
.card__summary { font-size: 16px; line-height: 1.6; color: var(--ink-soft); }

/* Count-aware grid: every row fills, whatever the number of published projects.
   Below 632px of grid (phones) the auto-fill rule above gives one column, as before.
   Wider, the number of cards picks the column count. When no count fills every row,
   the newest card (No. 01) spans two columns as a landscape feature, plus one more
   card for a few counts. Breakpoints keep a one-column card at least 300px wide:
   2 columns from 632px of grid (a 696px window), 3 from 964px (1076px), 4 from 1296px
   (1408px). Browsers without container queries or :has() keep the auto-fill rule. */
.work > .wrap { container: work / inline-size; }

@container work (width >= 632px) {
  .cards:has(> *) { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); }
  /* Every photo is as tall as a 4:5 photo one column wide, so a two-column card
     crops to landscape and its photo lines up with its row neighbours. */
  .cards:has(> *) .card__media img { height: calc((100cqw - (var(--cols) - 1) * 32px) / var(--cols) * 1.25); }
  .card__title { text-wrap: balance; }
  .card__summary { max-width: 62ch; }
}

/* 2 columns. Odd count: No. 01 spans both. */
@container work (632px <= width < 964px) {
  .cards:has(> *) { --cols: 2; }
  .cards:has(> :nth-child(2n+1):last-child) > :first-child { grid-column: span 2; }
}

/* 3 columns (one card: 2 columns, full width).
   Count not a multiple of 3: No. 01 spans two. One over a multiple of 3: No. 04 too. */
@container work (964px <= width < 1296px) {
  .cards:has(> *) { --cols: 3; }
  .cards:has(> :first-child:last-child) { --cols: 2; }
  .cards:not(:has(> :nth-child(3n):last-child)) > :first-child,
  .cards:has(> :nth-child(3n+1):last-child) > :nth-child(4) { grid-column: span 2; }
}

/* 4 columns, or 3 when that fills the rows with fewer wide cards (2, 3, 5, 6, 9).
   Count a multiple of neither: No. 01 spans two. Two short of a multiple of 4
   (10, 14): No. 06 too, closing row two. One over a multiple of 12 (13): No. 04 too. */
@container work (width >= 1296px) {
  .cards:has(> *) { --cols: 4; }
  .cards:has(> :nth-child(4n+1):last-child),
  .cards:has(> :nth-child(3n):last-child),
  .cards:has(> :nth-child(2):last-child) { --cols: 3; }
  .cards:has(> :nth-child(4n):last-child) { --cols: 4; }
  .cards:has(> :first-child:last-child) { --cols: 2; }
  .cards:not(:has(> :nth-child(4n):last-child)):not(:has(> :nth-child(3n):last-child)) > :first-child,
  .cards:has(> :nth-child(4n+2):last-child):not(:has(> :nth-child(3n):last-child)) > :nth-child(6),
  .cards:has(> :nth-child(12n+1):last-child) > :nth-child(4) { grid-column: span 2; }
}

/* ---------- Practices ---------- */
.practices { background: var(--moss); color: var(--cream); padding: 136px 0; }
.practices__head { display: flex; flex-wrap: wrap; gap: 16px; align-items: baseline; justify-content: space-between; margin-bottom: 64px; }
.practices__aside { color: var(--chartreuse); }
/* Always 4 across, 2 x 2, or 1 column. Never 3 + 1. */
.practices__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; }
@media (max-width: 1180px) { .practices__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 56px; } }
@media (max-width: 640px) { .practices__grid { grid-template-columns: minmax(0, 1fr); } }
.practice { display: flex; flex-direction: column; gap: 18px; padding-top: 28px; border-top: 2px solid var(--chartreuse); }
.practice__num { font-size: 13px; font-weight: 600; letter-spacing: .14em; color: var(--chartreuse); }
.practice__name { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1; }
.practice__line { font-size: 17px; line-height: 1.6; color: var(--on-moss); }
.practice__tags { font-size: 12px; font-weight: 600; line-height: 1.9; letter-spacing: .16em; text-transform: uppercase; color: var(--on-moss-muted); }

/* ---------- Contact (home) ---------- */
.contact { padding: 160px 0 96px; }
.contact__title { max-width: 17ch; font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 5.8vw, 88px); line-height: 1; letter-spacing: -0.025em; text-wrap: balance; }
.contact__row { display: flex; flex-wrap: wrap; gap: 24px 64px; align-items: center; justify-content: space-between; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--ink); }
.contact__email {
  font-family: var(--serif); font-size: clamp(26px, 3vw, 44px); color: var(--moss); padding: 6px 0;
  text-decoration-color: #C3DC2E; text-decoration-thickness: 4px; text-underline-offset: 12px;
}
.contact__address { margin-top: 24px; font-size: 15px; line-height: 1.7; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--moss); padding: 72px 0 32px; overflow: hidden; }
.site-footer__mark {
  font-family: var(--serif); font-size: clamp(72px, 19vw, 280px); line-height: .8; letter-spacing: -0.045em;
  color: var(--chartreuse); white-space: nowrap;
}
.site-footer__row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--moss-line); font-size: 13px; color: #C8CDB2; }

/* ---------- Project page ---------- */
.p-hero {
  position: relative; overflow: hidden; min-height: max(560px, 86svh);
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--moss); color: var(--white);
}
.p-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.p-hero__shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(18,22,12,.72) 0%, rgba(18,22,12,.42) 14%, rgba(18,22,12,0) 32%, rgba(18,22,12,0) 42%, rgba(18,22,12,.78) 100%);
}
.p-hero__body { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; padding-bottom: 64px; padding-top: 140px; }
.p-hero__title {
  max-width: 14ch; font-family: var(--serif); font-weight: 400;
  font-size: clamp(48px, 8vw, 128px); line-height: .94; letter-spacing: -0.025em;
  color: var(--chartreuse); text-shadow: 0 2px 30px rgba(0,0,0,.3); text-wrap: balance;
}
.p-hero__meta { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--lichen); }

.p-intro { display: flex; flex-wrap: wrap; gap: 56px 96px; align-items: flex-start; padding-top: 120px; padding-bottom: 96px; }
.p-intro__summary { flex: 999 1 560px; min-width: 0; font-family: var(--serif); font-size: clamp(28px, 3vw, 44px); line-height: 1.2; letter-spacing: -0.015em; text-wrap: pretty; }
.p-intro__side { flex: 1 1 320px; border-top: 2px solid var(--ink); }
.p-facts { margin: 0; }
.p-facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.p-facts dt { font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--moss-mid); }
.p-facts dd { margin: 0; font-size: 17px; font-weight: 500; text-align: right; }
.p-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 20px 0 0; margin: 0; list-style: none; }
.p-tags li { padding: 6px 14px; border: 1px solid var(--moss); border-radius: 999px; font-size: 14px; }

.p-sections { display: flex; flex-direction: column; gap: 96px; padding-bottom: 120px; }
.s-text { max-width: 760px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 20px; }
.s-text h2 { font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1.1; }
.s-text p, .s-cols p { font-size: 18px; line-height: 1.75; color: #3D4233; }
.s-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 40px 72px; padding-top: 40px; border-top: 1px solid var(--rule); }
.s-image { display: flex; flex-direction: column; gap: 16px; }
.s-image img { width: 100%; height: auto; }
.s-image figcaption { font-size: 14px; color: var(--muted); }
.s-quote { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.s-quote p { font-family: var(--serif); font-size: clamp(32px, 4vw, 56px); line-height: 1.1; letter-spacing: -0.02em; }
.s-quote cite { font-style: normal; font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--moss-mid); }

.p-more { padding-bottom: 136px; }
.p-more__head { padding-top: 28px; border-top: 2px solid var(--ink); margin-bottom: 40px; }
.p-more__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 40px 32px; }
.mini { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; color: var(--ink); text-decoration: none; }
.mini:hover { color: var(--ink); }
.mini__media { flex: 0 0 200px; overflow: hidden; background: var(--cream-deep); }
.mini__media img { width: 200px; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 1s var(--ease); }
.mini:hover .mini__media img { transform: scale(1.04); }
.mini__body { flex: 1 1 180px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.mini__title { font-family: var(--serif); font-size: 30px; line-height: 1.05; }

.closing { background: var(--moss); color: var(--cream); padding: 136px 0; }
.closing__inner { display: flex; flex-wrap: wrap; gap: 48px 96px; align-items: flex-end; }
.closing__copy { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.closing__label { color: var(--chartreuse); }
.closing__title { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5vw, 76px); line-height: 1; letter-spacing: -0.025em; text-wrap: balance; }
.closing__body { max-width: 46ch; font-size: 18px; line-height: 1.6; color: var(--on-moss); }
.closing + .site-footer { padding-top: 0; }
.closing + .site-footer .site-footer__top { border-top: 1px solid var(--moss-line); padding-top: 56px; }

/* ---------- Contact modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.is-open { display: block; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(28, 36, 20, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: im-fade .3s ease both; }
.modal__scroller { position: absolute; inset: 0; overflow-y: auto; display: flex; align-items: flex-start; justify-content: center; padding: 48px 24px; }
.modal__panel {
  position: relative; width: 760px; max-width: 100%; margin: auto;
  padding: 52px 56px 48px; background: var(--cream); border-radius: 20px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .4);
  animation: im-pop .5s var(--ease) both;
}
.modal__close {
  position: absolute; top: 20px; right: 20px; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: transparent; cursor: pointer;
}
.modal__close:hover { background: #E6E2D6; }
.modal__brand { font-family: var(--serif); font-size: 22px; line-height: 1; letter-spacing: -0.02em; color: var(--moss-mid); }
.modal__title { margin-top: 10px; font-family: var(--serif); font-weight: 400; font-size: 48px; line-height: 1; letter-spacing: -0.02em; }

.form { display: flex; flex-direction: column; gap: 28px; margin-top: 28px; }
.form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.form legend { padding: 0 0 12px; font-size: 14px; font-weight: 600; }
.form label.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; }
.form .row-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 20px; }
.input {
  width: 100%; min-height: 52px; padding: 14px 16px;
  border: 1px solid #BDB8A8; border-radius: 10px; background: var(--white);
  font: inherit; font-size: 16px; font-weight: 400; color: var(--ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.input::placeholder { color: #7A7D6E; }
.input:focus { outline: none; border-color: var(--moss); box-shadow: 0 0 0 3px var(--chartreuse); }
textarea.input { resize: vertical; min-height: 120px; }

.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1px solid #BDB8A8; border-radius: 999px; background: transparent;
  font-size: 15px; font-weight: 500; transition: background .2s ease, border-color .2s ease;
}
.choice:hover span { border-color: var(--moss); }
.choice input:checked + span { background: var(--chartreuse); border-color: var(--moss); }
.choice input:focus-visible + span { box-shadow: 0 0 0 3px var(--chartreuse); }

.form__foot { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; }
.form__note { flex: 1 1 300px; font-size: 14px; line-height: 1.55; color: var(--muted); }
.form__error { font-size: 14px; color: #8A2B1E; }
.form .btn { min-height: 56px; padding: 0 32px; font-size: 16px; }
.form .btn[disabled] { opacity: .6; cursor: progress; }

.thanks { min-height: 480px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 24px; }
.thanks__title { font-family: var(--serif); font-weight: 400; font-size: 88px; line-height: .95; letter-spacing: -0.03em; }
.thanks__body { max-width: 44ch; font-size: 19px; line-height: 1.6; color: #3D4233; }

/* Phone: the modal becomes a full-screen sheet */
@media (max-width: 640px) {
  .modal__scroller { padding: 0; }
  .modal__panel { width: 100%; min-height: 100%; margin: 0; border-radius: 0; padding: 88px 20px 40px; box-shadow: none; animation-name: im-up; }
  .modal__bar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 2; height: 64px;
    display: flex; align-items: center; padding: 0 12px 0 20px; background: var(--moss);
  }
  .modal__bar .modal__brand { font-size: 26px; color: var(--chartreuse); }
  .modal__close { position: fixed; top: 10px; right: 12px; z-index: 3; }
  .modal__close svg path { stroke: var(--cream); }
  .modal__close:hover { background: transparent; }
  .modal__title { font-size: 40px; margin-top: 0; }
  .choices--kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .choices--kinds .choice:last-child { grid-column: span 2; }
  .choices--kinds .choice span, .choices--timing .choice span { width: 100%; justify-content: center; min-height: 48px; background: var(--white); }
  .choices--timing { flex-direction: column; gap: 8px; }
  .choices--timing .choice span { justify-content: flex-start; border-radius: 12px; }
  .form .btn { width: 100%; justify-content: center; }
  .thanks__title { font-size: 72px; }
}

@keyframes im-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes im-pop { from { opacity: 0; transform: translateY(20px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes im-up { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: none; } }

body.modal-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
