/* ==========================================================================
   HM&H Developments
   One centred axis, limestone paper, deep ink, and the HM&H navy as the only accent.
   ========================================================================== */

:root {
  --paper: #f2eee7;
  --paper-2: #e8e2d7;
  --ink: #131a23;
  --ink-2: #434b56;
  --ink-3: #646b75;
  --rule: rgba(19, 26, 35, 0.14);

  --navy: #2c4663;          /* taken from the existing HM&H mark */
  --night: #0e1824;
  --on-night: #ece7df;
  --on-night-2: #a1a9b3;
  --rule-night: rgba(236, 231, 223, 0.16);

  --display: 'Libre Caslon Display', 'Libre Caslon Text', Georgia, serif;
  --serif: 'Libre Caslon Text', Georgia, serif;
  --sans: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;

  --gutter: clamp(16px, 4.2vw, 72px);
  --col-gap: clamp(12px, 1.7vw, 28px);
  --header-h: clamp(64px, 6.4vw, 88px);
  --max: 1560px;
  --section: clamp(110px, 17vh, 210px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.7, 0, 0.2, 1);
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, figure, blockquote, dl, dd, ol { margin: 0; }
ol { padding: 0; list-style: none; }
::selection { background: var(--navy); color: var(--paper); }
:focus-visible { outline: 1px solid var(--navy); outline-offset: 4px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* ---------- Type ---------- */

.label {
  font: 500 11px/1.4 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.idx { font: 400 14px/1 var(--serif); letter-spacing: 0; color: var(--navy); margin-right: 12px; text-transform: none; }

.h2 {
  font: 400 clamp(2.3rem, 4.6vw, 4.6rem)/1.02 var(--display);
  letter-spacing: -0.012em;
}

.head { text-align: center; margin-bottom: clamp(48px, 9vh, 104px); }
.head .label { display: block; margin-bottom: 22px; }
.head--quiet h2 { font: 500 12px/1.4 var(--sans); letter-spacing: 0.34em; text-transform: uppercase; color: var(--ink); }
.head--quiet h2::after { content: ""; display: block; width: 1px; height: 36px; margin: 22px auto 0; background: var(--rule); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  font: 500 11px/1 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}
.link::after {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
  transition: width 0.7s var(--ease-out);
}
.link:hover::after { width: 64px; }
.link--light { color: var(--on-night); }
.link--back { flex-direction: row-reverse; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 34px;
  background: var(--navy);
  color: var(--paper);
  font: 500 11px/1 var(--sans);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  transition: background-color 0.5s var(--ease-out);
}
.btn:hover { background: var(--ink); }
.btn[disabled] { opacity: 0.6; cursor: wait; }
/* Outlined: a quieter button for use within running text */
.btn--line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px currentColor; transition: background-color 0.5s var(--ease-out), color 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out); }
.btn--line:hover { background: var(--navy); color: var(--paper); box-shadow: inset 0 0 0 1px var(--navy); }

/* Instagram: a small outline mark */
.ig { display: inline-grid; place-items: center; width: 40px; height: 40px; margin-inline: -8px; opacity: 0.78; transition: opacity 0.4s ease; }
.ig:hover { opacity: 1; }
.ig svg { width: 17px; height: 17px; }

/* ---------- Reveals ---------- */

.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.w > span { display: inline-block; }
.js [data-split] .w > span {
  transform: translate3d(0, 108%, 0);
  transition: transform 1.2s var(--ease-out) calc(var(--i) * 40ms + var(--delay, 0ms));
}
.js [data-split].is-in .w > span { transform: none; }

.js [data-reveal="up"] {
  opacity: 0;
  transform: translate3d(0, 32px, 0);
  transition: opacity 1.2s var(--ease-out) var(--delay, 0ms), transform 1.2s var(--ease-out) var(--delay, 0ms);
}
.js [data-reveal="up"].is-in { opacity: 1; transform: none; }

.js [data-reveal="frame"] {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.5s var(--ease-io) var(--delay, 0ms);
}
.js [data-reveal="frame"].is-in { clip-path: inset(0 0 0 0); }
.js [data-reveal="frame"] .fill {
  transform: scale(1.12);
  transition: transform 2.2s var(--ease-out) var(--delay, 0ms), opacity 0.9s var(--ease-out);
}
.js [data-reveal="frame"].is-in .fill { transform: none; }
/* The keyhole opens from the sill upward: every point starts on the bottom edge. */
.js .keyhole[data-reveal="frame"] { clip-path: polygon(70% 100%, 74.37% 100%, 78.5% 100%, 82.36% 100%, 85.92% 100%, 89.14% 100%, 91.98% 100%, 94.42% 100%, 96.45% 100%, 98.03% 100%, 99.15% 100%, 99.81% 100%, 100% 100%, 99.71% 100%, 98.95% 100%, 97.72% 100%, 96.04% 100%, 93.92% 100%, 91.39% 100%, 88.46% 100%, 85.16% 100%, 81.54% 100%, 77.61% 100%, 73.42% 100%, 69.01% 100%, 64.42% 100%, 59.69% 100%, 54.87% 100%, 50% 100%, 45.13% 100%, 40.31% 100%, 35.58% 100%, 30.99% 100%, 26.58% 100%, 22.39% 100%, 18.46% 100%, 14.84% 100%, 11.54% 100%, 8.61% 100%, 6.08% 100%, 3.96% 100%, 2.28% 100%, 1.05% 100%, 0.29% 100%, 0% 100%, 0.19% 100%, 0.85% 100%, 1.97% 100%, 3.55% 100%, 5.58% 100%, 8.02% 100%, 10.86% 100%, 14.08% 100%, 17.64% 100%, 21.5% 100%, 25.63% 100%, 30% 100%, 12% 100%, 88% 100%); }
.js .keyhole[data-reveal="frame"].is-in { clip-path: var(--keyhole); }

/* ---------- Frames ---------- */

.frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: var(--ar, 4 / 5);
  background: var(--paper-2);
  isolation: isolate;
}
.frame__inner {
  position: absolute;
  inset: -6% 0;
  transform: translate3d(0, var(--py, 0px), 0);
  will-change: transform;
}
.fill {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
}
.js .frame img.fill { opacity: 0; }
.js .frame img.fill.is-loaded { opacity: 1; }

/* Keyhole: a full-width circle over a tapering stem, drawn for a 9:16 frame. */
.keyhole {
  --ar: 9 / 16;
  --keyhole: polygon(70% 53.9%, 74.37% 52.68%, 78.5% 51.23%, 82.36% 49.56%, 85.92% 47.69%, 89.14% 45.63%, 91.98% 43.4%, 94.42% 41.03%, 96.45% 38.54%, 98.03% 35.94%, 99.15% 33.28%, 99.81% 30.56%, 100% 27.82%, 99.71% 25.09%, 98.95% 22.38%, 97.72% 19.73%, 96.04% 17.15%, 93.92% 14.68%, 91.39% 12.34%, 88.46% 10.15%, 85.16% 8.13%, 81.54% 6.3%, 77.61% 4.68%, 73.42% 3.28%, 69.01% 2.11%, 64.42% 1.19%, 59.69% 0.53%, 54.87% 0.13%, 50% 0%, 45.13% 0.13%, 40.31% 0.53%, 35.58% 1.19%, 30.99% 2.11%, 26.58% 3.28%, 22.39% 4.68%, 18.46% 6.3%, 14.84% 8.13%, 11.54% 10.15%, 8.61% 12.34%, 6.08% 14.68%, 3.96% 17.15%, 2.28% 19.73%, 1.05% 22.38%, 0.29% 25.09%, 0% 27.82%, 0.19% 30.56%, 0.85% 33.28%, 1.97% 35.94%, 3.55% 38.54%, 5.58% 41.03%, 8.02% 43.4%, 10.86% 45.63%, 14.08% 47.69%, 17.64% 49.56%, 21.5% 51.23%, 25.63% 52.68%, 30% 53.9%, 12% 100%, 88% 100%);
  clip-path: var(--keyhole);
}

@media (hover: hover) and (pointer: fine) and (min-width: 900px) { [data-cursor] { cursor: none; } }

/* ---------- Sets: a row on desktop, a swipeable strip on mobile ---------- */

.set { --span: 4; --ar: 9 / 16; --ar-m: 4 / 5; position: relative; }
.set__track {
  display: grid;
  grid-template-columns: repeat(var(--n, 1), minmax(0, 1fr));
  gap: var(--col-gap);
  width: calc(var(--n, 1) * (var(--span) * (100% - 11 * var(--col-gap)) / 12 + (var(--span) - 1) * var(--col-gap)) + (var(--n, 1) - 1) * var(--col-gap));
  margin-inline: auto;
}
.set .frame { aspect-ratio: var(--ar); max-height: 86svh; }
.set__count { display: none; }
.set + .set { margin-top: var(--col-gap); }

/* ---------- Loader & curtain ---------- */

.loader, .curtain { display: none; }

.has-loader .loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--paper);
  transition: transform 1.1s var(--ease-io);
}
.loader__inner { display: grid; justify-items: center; gap: 26px; }
.loader .brand { font-size: clamp(44px, 6vw, 64px); overflow: hidden; padding-bottom: 0.08em; }
.loader .brand > span { transform: translateY(110%); animation: rise 1s var(--ease-out) 0.15s forwards; }
.loader .brand > span:last-child { animation-delay: 0.3s; }
.loader__line { width: 120px; height: 1px; background: var(--rule); position: relative; overflow: hidden; }
.loader__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--navy);
  transform: scaleX(0);
  transform-origin: left;
  animation: grow 1.1s var(--ease-io) 0.3s forwards;
}
.loader.is-done { transform: translateY(-100%); }

@keyframes rise { to { transform: none; } }
@keyframes grow { to { transform: scaleX(1); } }

.js .curtain {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: block;
  background: var(--night);
  pointer-events: none;
  transform: translateY(100%);
}
.is-entering .curtain { transform: none; }
.is-revealing .curtain { transform: translateY(-100%); transition: transform 1s var(--ease-io); }
.is-leaving .curtain { transform: none; transition: transform 0.7s var(--ease-io); }
.has-loader .curtain { display: none; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: var(--header-h);
  /* Contact and Instagram to the left, the mark centred, the links to the right */
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  padding-inline: var(--gutter);
  color: var(--ink);
  transition: transform 0.8s var(--ease-out), color 0.5s ease;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(242, 238, 231, 0.88);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.site-header.has-bg::before { opacity: 1; }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header.is-light { color: var(--on-night); }

/* Stacked lockup: DEVELOPMENTS spread to the exact width of HM&H. */
.brand { display: inline-grid; justify-items: stretch; row-gap: 0.24em; font-size: clamp(23px, 2vw, 28px); }
.brand__mark { font: 400 1em/0.9 var(--display); letter-spacing: 0.02em; white-space: nowrap; }
.brand__mark i { font-family: var(--serif); font-size: 0.9em; margin: 0 0.02em; }
.brand__sub { display: flex; justify-content: space-between; padding: 0 0.5em 0 0.12em; font: 500 0.26em/1 var(--sans); text-transform: uppercase; }
.site-header .brand { font-size: clamp(27px, 2.35vw, 34px); }

.nav { display: flex; gap: clamp(22px, 2.8vw, 48px); }
.nav a, .header-cta, .menu-btn {
  font: 500 11px/1 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.nav a { position: relative; padding: 10px 0; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s var(--ease-out);
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.menu__links a[aria-current="page"] { color: var(--on-night-2); }

.site-header__start, .site-header__end { display: flex; align-items: center; gap: clamp(18px, 2vw, 28px); }
.site-header__end { justify-content: flex-end; }

.header-cta {
  padding: 15px 22px;
  border: 1px solid currentColor;
  transition: background-color 0.5s var(--ease-out), border-color 0.5s var(--ease-out), color 0.5s var(--ease-out);
}
.header-cta:hover { background: var(--navy); border-color: var(--navy); color: var(--paper); }

.menu-btn { display: none; align-items: center; gap: 12px; padding: 12px 0; }
.menu-btn__icon { position: relative; width: 22px; height: 7px; }
.menu-btn__icon::before, .menu-btn__icon::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: currentColor;
  transition: transform 0.6s var(--ease-out);
}
.menu-btn__icon::before { top: 0; }
.menu-btn__icon::after { bottom: 0; }
.menu-open .menu-btn__icon::before { transform: translateY(3px) rotate(20deg); }
.menu-open .menu-btn__icon::after { transform: translateY(-3px) rotate(-20deg); }

.menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--header-h) + 8vh) var(--gutter) max(32px, env(safe-area-inset-bottom));
  background: var(--night);
  color: var(--on-night);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.9s var(--ease-io), visibility 0s linear 0.9s;
}
.menu-open .menu { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 0.9s var(--ease-io), visibility 0s; }
.menu-open .site-header { color: var(--on-night); }
.menu-open .site-header::before { opacity: 0; }
.menu__links a {
  display: block;
  font: 400 clamp(2.4rem, 10.5vw, 4.2rem)/1.14 var(--display);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.9s var(--ease-out);
}
.menu-open .menu__links a { opacity: 1; transform: none; transition-delay: calc(0.25s + var(--i) * 60ms); }
.menu__foot { display: grid; gap: 8px; color: var(--on-night-2); font-size: 15px; }
.menu__foot .label { color: var(--on-night-2); }

/* ---------- Home: opening (the front elevation) ---------- */

.opening { position: relative; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; background: var(--night); color: var(--on-night); }
.opening__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.8s var(--ease-io); }
.opening__slide.is-active { z-index: 1; opacity: 1; }
/* Each render settles slowly while it is shown, then resets out of sight. */
.opening__slide .fill { transform: scale(1.06); transition: transform 0s linear 1.8s; }
.opening__slide.is-active .fill { transform: none; transition: transform 7s cubic-bezier(0.25, 0.6, 0.35, 1); }
.opening__shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(14, 24, 36, 0.42) 0%, rgba(14, 24, 36, 0) 26%, rgba(14, 24, 36, 0) 46%, rgba(14, 24, 36, 0.58) 100%);
}
.opening__copy {
  position: absolute;
  z-index: 3;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(104px, 17vh, 190px);
  text-align: center;
}
.opening__title {
  --delay: 250ms;
  font: 400 clamp(2.3rem, min(5.4vw, 8vh), 5.6rem)/1.04 var(--display);
  letter-spacing: -0.014em;
  text-shadow: 0 1px 30px rgba(14, 24, 36, 0.25);
}
.opening__title .t { display: block; }
.opening__foot {
  position: absolute;
  z-index: 3;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(22px, 4.5vh, 48px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 24px;
}
.opening__place { display: grid; justify-items: start; gap: 2px; }
.opening__place .label { color: var(--on-night-2); }
.opening__place .link { padding-bottom: 0; }
/* Set level with the foot's baseline, so it stays clear of the headline */
.opening .hero__cue { position: static; justify-self: center; align-self: end; align-items: flex-end; gap: 12px; writing-mode: horizontal-tb; transform: none; color: var(--on-night-2); }
.opening .hero__cue i { height: 22px; background: var(--rule-night); }
.opening .hero__cue i::after { background: var(--on-night); }
html:not(.js) .opening__slide:first-child { opacity: 1; }
html:not(.js) .opening__slide .fill { transform: none; }
/* The render starts below the header, so the navigation always sits on paper. */
.opening { margin-top: var(--header-h); height: calc(100vh - var(--header-h)); height: calc(100svh - var(--header-h)); }
.opening__shade { background: linear-gradient(180deg, rgba(14, 24, 36, 0) 46%, rgba(14, 24, 36, 0.58) 100%); }

/* ---------- Home: selected work, introduced by three frames opening to a triptych ---------- */

.hero { position: relative; height: 250vh; height: 250svh; }
.hero__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero__stage { position: absolute; inset: 0; }

.hero__pane {
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  background: var(--paper-2);
  will-change: transform, width, height;
}
.js .hero__pane { width: 0; height: 0; }
.hero__inner {
  position: absolute;
  inset: 0;
  transform: translate3d(0, 101%, 0);
  transition: transform 1.6s var(--ease-out) var(--delay, 0ms);
}
.hero__inner .fill { transform: scale(1.3); transition: transform 2.4s var(--ease-out) var(--delay, 0ms); }
.hero.is-ready .hero__inner, .hero.is-ready .hero__inner .fill { transform: none; }
.hero__pane[data-pane="l"] { --delay: 160ms; }
.hero__pane[data-pane="r"] { --delay: 260ms; }
html:not(.js) .hero__pane { display: none; }
html:not(.js) .hero__pane[data-pane="c"] { display: block; inset: 0; }
html:not(.js) .hero__inner, html:not(.js) .hero__inner .fill { transform: none; }

.hero__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(14, 24, 36, 0.36) 0%, rgba(14, 24, 36, 0) 22%, rgba(14, 24, 36, 0) 60%, rgba(14, 24, 36, 0.5) 100%);
  opacity: 0;
}

.hero__copy {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--header-h) + clamp(16px, 5vh, 56px));
  padding-inline: var(--gutter);
  text-align: center;
  will-change: transform, opacity;
}
.hero__title {
  --delay: 250ms;
  font: 400 clamp(1.9rem, min(4vw, 5.9vh), 4.4rem)/1.08 var(--display);
  letter-spacing: -0.012em;
}
.hero__title .t { display: block; }

.hero__caption {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(24px, 5vh, 56px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  color: var(--on-night);
  opacity: 0;
  pointer-events: none;
}
.hero__caption.is-on { pointer-events: auto; }
.hero__caption-name { font: 400 clamp(1.8rem, 3.4vw, 3.2rem)/1 var(--display); }
.hero__caption > div { display: grid; justify-items: start; gap: 6px; }
.hero__copy .head { margin-bottom: 0; }

.hero__cue {
  position: absolute;
  left: clamp(12px, calc(var(--gutter) / 2), 36px);
  bottom: clamp(20px, 4vh, 44px);
  display: flex;
  align-items: center;
  gap: 14px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font: 500 10px/1 var(--sans);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.hero__cue i { display: block; width: 1px; height: 56px; background: var(--rule); position: relative; overflow: hidden; }
.hero__cue i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  animation: cue 2.4s var(--ease-io) infinite;
}
@keyframes cue {
  0% { transform: translateY(100%); }
  50% { transform: none; }
  100% { transform: translateY(-100%); }
}

/* ---------- Home: intro ---------- */

.intro { padding: var(--section) 0 calc(var(--section) * 0.35); }
.intro__lead {
  max-width: 44ch;
  margin-inline: auto;
  text-align: center;
  font: 400 clamp(1.1rem, 1.45vw, 1.45rem)/1.55 var(--serif);
  letter-spacing: -0.008em;
}
[data-scrub] .sw { transition: opacity 0.3s linear; }
.intro__lead--next { margin-top: clamp(24px, 4vh, 40px); }
.intro__more {
  display: grid;
  gap: 1.2em;
  max-width: 60ch;
  margin: clamp(40px, 6vh, 64px) auto 0;
  text-align: center;
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.8;
  color: var(--ink-2);
}
.intro__cta { display: flex; justify-content: center; margin-top: clamp(44px, 7vh, 72px); }

/* ---------- Page intros (About, Developments) ----------
   The title holds the left of the grid; the words sit to its right on a narrower measure,
   their first line level with the top of the title. */

.page-intro {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  align-items: start;
  padding-top: calc(var(--header-h) + clamp(56px, 11vh, 128px));
}
.page-intro__head { grid-column: 1 / span 5; }
.page-intro__head .label { display: block; }
.page-intro__title {
  margin-top: 22px;
  font: 400 clamp(3rem, 6.4vw, 6.8rem)/0.9 var(--display);
  letter-spacing: -0.024em;
}
/* A short navy rule under the title, drawn once the title has risen */
.page-intro__head::after {
  content: "";
  display: block;
  width: 56px;
  height: 1px;
  margin-top: clamp(28px, 4.5vh, 44px);
  background: var(--navy);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s var(--ease-out) 0.6s;
}
.page-intro__head.is-in::after, html:not(.js) .page-intro__head::after { transform: none; }
/* Label height plus its gap, so the first line of text meets the cap height of the title */
.page-intro__body { grid-column: 7 / span 5; padding-top: calc(11px * 1.4 + 22px + 0.1em); }

.page-intro__lead { font: 400 clamp(1.2rem, 1.55vw, 1.55rem)/1.5 var(--serif); letter-spacing: -0.008em; color: var(--ink); }
.page-intro__text { display: grid; gap: 1.1em; margin-top: clamp(26px, 4vh, 40px); font-size: clamp(15px, 1.05vw, 17px); line-height: 1.8; color: var(--ink-2); max-width: 54ch; }

/* Facts on hairlines, two by two */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--col-gap); margin-top: clamp(44px, 7vh, 72px); }
.facts div { padding: 18px 0 20px; border-top: 1px solid var(--rule); }
.facts dt { font: 500 10px/1.2 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.facts dd { font-size: 15px; line-height: 1.5; color: var(--ink); }

/* ---------- About ---------- */

.about { padding-bottom: clamp(72px, 11vh, 128px); }
.about__gallery { padding-top: 0; }
.about__gallery + .approach { padding-top: clamp(96px, 14vh, 168px); }
/* Desktop: the mark, then the facts, directly under the title; phones keep the stacked intro */
.about__mark { display: none; color: var(--navy); font-size: clamp(52px, 5vw, 84px); }
@media (min-width: 900px) {
  .about .page-intro { grid-template-rows: auto auto auto 1fr; }
  .about .page-intro__head { grid-row: 1; }
  .about .page-intro__body { grid-row: 1 / span 4; }
  .about .about__mark { display: inline-grid; grid-column: 1 / span 4; grid-row: 2; justify-self: start; margin-top: clamp(40px, 7vh, 72px); }
  .about .facts { grid-column: 1 / span 4; grid-row: 3; margin-top: clamp(40px, 7vh, 72px); }
}

/* Six frames in two rows, the centre column dropped half a step */
.set--stagger { --drop: clamp(40px, 9vh, 110px); padding-bottom: var(--drop); }
.set--stagger .set__track { row-gap: calc(var(--col-gap) * 2); }
.set--stagger .frame:nth-child(3n + 2) { translate: 0 var(--drop); }

/* ---------- Developments ---------- */

.work { padding-bottom: var(--section); }
.work--page .page-intro { padding-bottom: clamp(40px, 7vh, 72px); margin-bottom: clamp(72px, 12vh, 140px); border-bottom: 1px solid var(--rule); }
.work--page .page-intro__head { grid-column: 1 / span 7; }
.work--page .page-intro__body { grid-column: 9 / span 4; align-self: end; padding-top: 0; }
.work--page .page-intro__lead { font-size: clamp(1.05rem, 1.25vw, 1.25rem); }
.work--page .filter { justify-content: flex-start; margin: clamp(22px, 3.5vh, 32px) 0 0; }

/* ---------- Home: after the triptych, the way through to every development ---------- */

.work-more { display: flex; justify-content: center; padding: clamp(64px, 11vh, 120px) 0 var(--section); }
.projects { display: grid; gap: clamp(100px, 17vh, 210px); transition: opacity 0.35s var(--ease-out); }
.projects.is-switching { opacity: 0; }
.project { display: grid; justify-items: center; text-align: center; }
.project[hidden] { display: none; }

/* Work filter: all, completed, forthcoming */
.filter { display: flex; justify-content: center; gap: clamp(22px, 3vw, 44px); margin: calc(clamp(48px, 9vh, 104px) * -0.5) 0 clamp(56px, 9vh, 104px); }
.filter button { padding: 8px 0; border-bottom: 1px solid transparent; font: 500 11px/1 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-3); transition: color 0.4s var(--ease-out), border-color 0.4s var(--ease-out); }
.filter button:hover { color: var(--ink); }
.filter button[aria-pressed="true"] { color: var(--ink); border-color: var(--navy); }
.project__media { width: calc(10 * (100% - 11 * var(--col-gap)) / 12 + 9 * var(--col-gap)); --ar: 16 / 10; }
.project__media--portrait { width: calc(5 * (100% - 11 * var(--col-gap)) / 12 + 4 * var(--col-gap)); --ar: 4 / 5; }
.project__body { margin-top: clamp(28px, 5vh, 48px); display: grid; justify-items: center; }
.project__name { font: 400 clamp(2.6rem, 5vw, 5.2rem)/0.98 var(--display); letter-spacing: -0.018em; margin: 16px 0 0; }
.project__name a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.8s var(--ease-out); }
.project__name a:hover { background-size: 100% 1px; }
.project__media .fill { transition: transform 1.6s var(--ease-out), opacity 0.9s var(--ease-out); }
.js .project__media.is-in:hover .fill { transform: scale(1.03); }

.meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px clamp(28px, 3.4vw, 56px);
  margin: 26px 0 22px;
}
.meta dt { font: 500 10px/1.2 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.meta dd { font: 400 15px/1.3 var(--sans); color: var(--ink); white-space: nowrap; }
.dot { display: inline-block; width: 6px; height: 6px; margin-right: 9px; border-radius: 50%; background: var(--navy); vertical-align: middle; position: relative; top: -1px; }
.dot--open { background: transparent; box-shadow: inset 0 0 0 1px var(--navy); }

/* ---------- About: land ---------- */

.land { background: var(--night); color: var(--on-night); padding: var(--section) 0; overflow: hidden; }
.land .label { color: var(--on-night-2); }
.land .head { margin-bottom: clamp(40px, 7vh, 72px); }
.land__text { max-width: 34ch; margin: 24px auto 0; color: var(--on-night-2); font-size: 17px; }
.land__plan { width: min(100%, 880px); margin-inline: auto; color: var(--on-night); }
.land__plan svg { width: 100%; height: auto; overflow: visible; }
.land__foot { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: clamp(32px, 6vh, 56px); text-align: center; }
.land__place { font: 400 clamp(1.5rem, 2.4vw, 2.1rem)/1.1 var(--display); }
.label--accent::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 12px; border-radius: 50%; background: #6f8db0; vertical-align: middle; position: relative; top: -1px; }

/* Site plan: stroke-only paths drawn one after another, each timed to its length. */
.plan .draw { stroke-dasharray: 1 2; stroke-dashoffset: 1; transition: stroke-dashoffset var(--t, 1s) cubic-bezier(0.45, 0, 0.2, 1) var(--s, 0s); }
.plan .fade { opacity: 0; transition: opacity 1.6s ease var(--s, 0s); }
.is-in .plan .draw { stroke-dashoffset: 0; }
.is-in .plan .fade { opacity: var(--o, 1); }

/* ---------- Home: approach ---------- */

.approach { padding: var(--section) 0; }
.approach__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: center; }
.approach__arch { grid-column: 5 / span 4; }
.steps { display: grid; gap: clamp(40px, 8vh, 88px); }
.steps--l { grid-column: 1 / span 3; grid-row: 1; text-align: right; }
.steps--r { grid-column: 10 / span 3; grid-row: 1; }
.steps li { display: grid; gap: 10px; }
.steps h3 { font: 400 clamp(1.5rem, 2vw, 1.9rem)/1.1 var(--display); }
.steps p { font-size: 15px; color: var(--ink-2); }
.steps--l p { margin-left: auto; max-width: 26ch; }
.steps--r p { max-width: 26ch; }

/* The process: five stages on a single rule across the page, a vertical line on smaller screens. */
.process { margin-top: clamp(96px, 15vh, 170px); }
.process__label { text-align: center; font: 500 12px/1.4 var(--sans); letter-spacing: 0.34em; text-transform: uppercase; color: var(--ink); }
.process__label::after { content: ""; display: block; width: 1px; height: 36px; margin: 22px auto 0; background: var(--rule); }
.process__list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: var(--col-gap); margin-top: clamp(40px, 7vh, 72px); }
.process__list li { position: relative; display: grid; align-content: start; gap: 12px; padding-top: 30px; border-top: 1px solid var(--rule); }
.process__list li::before { content: ""; position: absolute; left: 0; top: -4px; width: 7px; height: 7px; border-radius: 50%; background: var(--navy); }
.process__stage { font: 500 10px/1.2 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-3); }
.process__list h3 { font: 400 clamp(1.25rem, 1.6vw, 1.55rem)/1.15 var(--display); }
.process__list p { font-size: 15px; line-height: 1.65; color: var(--ink-2); max-width: 30ch; }
@media (max-width: 1023px) {
  .process__list { grid-template-columns: 1fr; row-gap: 36px; max-width: 520px; margin-inline: auto; border-left: 1px solid var(--rule); }
  .process__list li { padding: 0 0 0 30px; border-top: 0; }
  .process__list li::before { left: -4px; top: 4px; }
  .process__list p { max-width: none; }
}

/* ---------- Quotes (project page reviews) ---------- */

.quote__mark { display: block; height: 0.55em; font: 400 clamp(90px, 10vw, 140px)/1 var(--display); color: var(--navy); }
.quote blockquote p { font: 400 clamp(1.6rem, 2.6vw, 2.6rem)/1.22 var(--display); letter-spacing: -0.01em; }
.quote figcaption { margin-top: clamp(28px, 5vh, 44px); display: grid; gap: 8px; font: 400 17px/1.3 var(--serif); }
.quote figcaption a { justify-self: start; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 2px; transition: color 0.4s var(--ease-out); }
.quote figcaption a:hover { color: var(--navy); }

/* ---------- Contact ----------
   Desktop: title, a short lead and the direct details down the left; the form to the right. */

.contact { padding-bottom: var(--section); }
.contact__lead { font: 400 clamp(1.2rem, 1.55vw, 1.55rem)/1.5 var(--serif); letter-spacing: -0.008em; max-width: 30ch; }
.contact .facts { grid-template-columns: minmax(0, 1fr); }
.contact .facts a { background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 2px; transition: color 0.4s var(--ease-out); }
.contact .facts a:hover { color: var(--navy); }
.contact .enquiry { margin-inline: 0; }
.contact .enquiry__intro { text-align: left; }
@media (min-width: 900px) {
  .contact .page-intro { grid-template-rows: auto auto auto 1fr; }
  .contact .page-intro__head { grid-row: 1; }
  .contact__lead { grid-column: 1 / span 5; grid-row: 2; margin-top: clamp(32px, 5vh, 52px); }
  .contact .page-intro__body { grid-column: 7 / span 6; grid-row: 1 / span 4; }
  .contact .facts { grid-column: 1 / span 4; grid-row: 3; margin-top: clamp(40px, 7vh, 72px); }
}

/* ---------- Not found ---------- */

.lost { min-height: 78vh; min-height: 78svh; display: grid; align-content: center; padding: calc(var(--header-h) + clamp(56px, 11vh, 128px)) 0 var(--section); text-align: center; }
.lost .label { display: block; }
.lost__title { margin-top: 22px; font: 400 clamp(3rem, 6.4vw, 6.8rem)/0.95 var(--display); letter-spacing: -0.024em; }
.lost__lead { max-width: 34ch; margin: clamp(24px, 4vh, 36px) auto 0; font: 400 clamp(1.1rem, 1.4vw, 1.4rem)/1.5 var(--serif); color: var(--ink-2); }
.lost__links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 20px 40px; margin-top: clamp(36px, 6vh, 56px); }

/* Enquiry: one clearly labelled question per line, large type, generous targets. */
.enquiry { max-width: 620px; margin-inline: auto; display: grid; gap: 28px; }
.enquiry__intro { font-size: 18px; line-height: 1.6; color: var(--ink-2); text-align: center; text-wrap: balance; margin-bottom: 4px; }
.field { display: grid; gap: 10px; }
.field label { font: 500 18px/1.3 var(--sans); color: var(--ink); }
.field__opt { font-weight: 400; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 60px;
  padding: 14px 18px;
  font: 400 19px/1.4 var(--sans);
  color: var(--ink);
  background: #faf8f4;
  border: 1.5px solid rgba(19, 26, 35, 0.32);
  border-radius: 4px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(19, 26, 35, 0.55); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(44, 70, 99, 0.18); }
.field__select { position: relative; }
.field__select select { padding-right: 52px; cursor: pointer; }
.field__select::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.field__error { display: none; font-size: 16px; line-height: 1.4; color: #9b3d3d; }
.field.is-invalid input { border-color: #9b3d3d; }
.field.is-invalid .field__error { display: block; }
.enquiry__submit { width: 100%; min-height: 64px; margin-top: 8px; font-size: 14px; }
.form__status { font-size: 17px; line-height: 1.5; color: var(--ink-2); text-align: center; min-height: 1.5em; }
.form__status.is-ok { font: 400 clamp(1.3rem, 2vw, 1.6rem)/1.35 var(--serif); color: var(--ink); }
.form__status.is-error { color: #9b3d3d; }
.form__honey { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */

.footer { background: var(--night); color: var(--on-night); padding: clamp(72px, 11vh, 120px) 0 max(28px, env(safe-area-inset-bottom)); }
.footer .label { color: var(--on-night-2); margin-bottom: 14px; }
.footer__top { display: grid; grid-template-columns: repeat(4, auto) 1fr; gap: 40px clamp(32px, 5vw, 88px); padding-bottom: clamp(56px, 9vh, 96px); }
@media (min-width: 900px) and (max-width: 1199px) {
  .footer__top { grid-template-columns: repeat(4, auto); justify-content: space-between; }
  .footer__top .to-top { grid-column: 1 / -1; }
}
.footer__top a:not(.link), .footer__top p:not(.label), .footer__top address { font-size: 16px; }
.footer__top address { font-style: normal; line-height: 1.5; white-space: nowrap; }
.footer__top a:not(.link):hover { color: #fff; }
.footer__ig { display: inline-flex; align-items: center; gap: 10px; }
.footer__ig svg { width: 17px; height: 17px; flex: none; opacity: 0.85; }
.footer__top .to-top { justify-self: end; align-self: start; white-space: nowrap; }
.footer__base { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px 32px; padding-top: 26px; border-top: 1px solid var(--rule-night); color: var(--on-night-2); font-size: 13px; }
.footer__brand { font-size: 22px; color: var(--on-night); opacity: 0.7; transition: opacity 0.4s ease; }
.footer__brand:hover { opacity: 1; }
.footer__credit { text-align: right; }
.footer__credit a { color: var(--on-night); background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.6s var(--ease-out); }
.footer__credit a:hover { background-size: 100% 1px; }

/* ---------- Cursor ---------- */

.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 80;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font: 500 10px/1 var(--sans);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  scale: 0.4;
  transition: opacity 0.35s ease, scale 0.5s var(--ease-out);
}
.cursor.is-on { opacity: 1; scale: 1; }
@media (hover: none), (pointer: coarse), (max-width: 899px) { .cursor { display: none; } }

/* ==========================================================================
   Project pages
   ========================================================================== */

.p-hero { padding-top: calc(var(--header-h) + clamp(20px, 4vh, 48px)); }
.p-hero__row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); align-items: end; padding: clamp(28px, 6vh, 64px) 0 clamp(40px, 7vh, 72px); }
.p-hero__head { grid-column: 1 / span 7; }
.p-hero__title { font: 400 clamp(3.4rem, 9.2vw, 10rem)/0.9 var(--display); letter-spacing: -0.025em; margin-top: 20px; }
.p-hero__row .meta { grid-column: 8 / span 5; justify-content: flex-end; margin: 0; }
.render-hero { --ar: 16 / 9; width: 100%; max-height: 100svh; }

.overview { padding: var(--section) 0 0; text-align: center; }
.overview__lead { max-width: 30ch; margin-inline: auto; font: 400 clamp(1.5rem, 2.7vw, 2.6rem)/1.28 var(--serif); letter-spacing: -0.012em; }
.overview__text { max-width: 58ch; margin: clamp(36px, 5.5vh, 56px) auto 0; font-size: clamp(16px, 1.15vw, 18px); line-height: 1.8; color: var(--ink-2); }
.overview__text + .spec { margin-top: clamp(56px, 8.5vh, 92px); }
.spec { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px clamp(32px, 4vw, 64px); margin-top: clamp(40px, 7vh, 72px); }
.spec div { max-width: 28ch; }
.spec dt { font: 500 10px/1.2 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.spec dd { font-size: 15px; line-height: 1.5; color: var(--ink); }

.gallery { padding-top: clamp(72px, 11vh, 130px); }

.p-quote { padding-top: var(--section); text-align: center; }
.p-quote .quote { max-width: 880px; margin-inline: auto; }
.p-quote .quote blockquote p { font-size: clamp(1.45rem, 2.2vw, 2.2rem); }
/* The full review: smaller type, set as paragraphs */
.p-quote--full .quote { max-width: 780px; }
.p-quote--full .quote blockquote p { font-size: clamp(1.15rem, 1.55vw, 1.5rem); line-height: 1.5; }
.p-quote--full .quote blockquote p + p { margin-top: 1em; }

.cta { padding: var(--section) 0; text-align: center; }
.cta .h2 { max-width: 20ch; margin: 0 auto 36px; font-size: clamp(1.8rem, 3vw, 2.9rem); }
/* Home: the invitation to get in touch, on a band of its own before the footer */
.cta--home { background: var(--paper-2); }
.cta--home .label { display: block; margin-bottom: 22px; }
.cta--home .h2 { max-width: 24ch; text-wrap: balance; }

.next { background: var(--paper-2); }
.next__link { display: grid; justify-items: center; text-align: center; padding: clamp(90px, 15vh, 170px) 0; }
.next__media { width: min(100%, 560px); --ar: 16 / 10; margin-bottom: clamp(28px, 5vh, 48px); }
.next__name { font: 400 clamp(3rem, 7vw, 7rem)/0.92 var(--display); letter-spacing: -0.022em; margin: 16px 0 18px; }
.next__link:hover .link::after { width: 64px; }

.offer { background: var(--night); color: var(--on-night); padding: var(--section) 0; text-align: center; }
.offer .label { color: var(--on-night-2); }
.offer .h2 { max-width: 18ch; margin: 22px auto 36px; }
.offer .btn { background: var(--paper); color: var(--ink); }
.offer .btn:hover { background: #fff; }

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 899px) {
  .nav, .header-cta { display: none; }
  .menu-btn { display: inline-flex; }
  /* The mark to the left, Instagram and Menu to the right */
  .site-header { display: flex; gap: 18px; }
  .site-header .brand { order: -1; margin-right: auto; }
  /* A solid bar throughout, so the mark and Menu never sit loose over a picture */
  .site-header::before { opacity: 1; background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .site-header.is-light { color: var(--ink); }
  .menu-open .site-header.is-light { color: var(--on-night); }

  .hero__caption { flex-direction: column; align-items: flex-start; gap: 14px; }
  .opening .hero__cue { display: none; }
  .opening__foot { grid-template-columns: 1fr auto; }
  .opening__place .label, .opening__place .link { white-space: nowrap; }
  .opening__copy { bottom: clamp(112px, 19vh, 170px); }

  /* Full-width single images; sets become a swipeable strip */
  .set { margin-inline: calc(var(--gutter) * -1); }
  .set__track {
    display: flex;
    width: auto;
    gap: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .set__track::-webkit-scrollbar { display: none; }
  .set .frame { flex: 0 0 100%; aspect-ratio: var(--ar-m); max-height: none; scroll-snap-align: center; scroll-snap-stop: always; }
  .set .frame .fill { object-position: var(--pos-m, var(--pos, 50% 50%)); }
  .set__count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 16px;
    font: 500 10px/1 var(--sans);
    letter-spacing: 0.24em;
    color: var(--ink-3);
  }
  .set__count i { position: relative; width: 56px; height: 1px; background: var(--rule); overflow: hidden; }
  .set__count i::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(var(--p, 0.33)); transition: transform 0.5s var(--ease-out); }
  .set + .set { margin-top: 56px; }

  .project__media, .project__media--portrait { width: calc(100% + 2 * var(--gutter)); --ar: 4 / 3; }
  .project__media--portrait { --ar: 4 / 5; }
  .meta { display: grid; grid-template-columns: repeat(2, auto); justify-content: center; gap: 18px 40px; }

  /* One column under the arch: 01 to 04 stacked on the centre line */
  .approach__grid { grid-template-columns: 1fr; row-gap: 36px; }
  .approach__arch { grid-column: 1; grid-row: 1; width: 78%; justify-self: center; margin-bottom: 12px; }
  .steps { gap: 36px; text-align: center; }
  .steps--l { grid-column: 1; grid-row: 2; }
  .steps--r { grid-column: 1; grid-row: 3; }
  .steps li { gap: 8px; }
  .steps--l p, .steps--r p { margin-inline: auto; max-width: 28ch; }

  .footer__base { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer__brand { grid-row: 1; margin-bottom: 8px; }
  .footer__credit { text-align: center; }

  /* Project details (roof, entrance…) stacked one above another */
  .spec { flex-direction: column; align-items: center; gap: 22px; }
  .spec div { max-width: 30ch; }

  .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__top > div:first-child, .footer__top > div:nth-child(2) { grid-column: 1 / -1; }
  .footer__top .to-top { justify-self: start; }

  .p-hero__head, .p-hero__row .meta { grid-column: 1 / -1; }

  /* Page intros stack: title, then the words beneath, still left-aligned */
  .page-intro { grid-template-columns: minmax(0, 1fr); row-gap: 36px; padding-top: calc(var(--header-h) + 48px); }
  .page-intro__head, .page-intro__body, .work--page .page-intro__head, .work--page .page-intro__body { grid-column: 1; padding-top: 0; }
  .facts { grid-template-columns: minmax(0, 1fr); margin-top: 8px; }
  .work--page .page-intro { margin-bottom: 64px; }
  .set--stagger { padding-bottom: 0; }
  .set--stagger .frame:nth-child(3n + 2) { translate: none; }
  .p-hero__row .meta { margin-top: 28px; justify-content: flex-start; }
  .render-hero { --ar: 1 / 1; }
  .render-hero .fill { object-position: var(--pos-m, 50% 50%); }
}

@media (max-width: 380px) {
  .footer__top { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */

/* Set in the page head from the OS preference (the mobile preview can opt out). */
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: 0.01ms; animation-iteration-count: 1; transition-duration: 0.01ms; transition-delay: 0ms; scroll-behavior: auto; }
.reduce-motion .frame__inner { transform: none; }
/* The opening render still fades in, without the slow settle. */
.reduce-motion .opening__slide { transition: opacity 1.8s var(--ease-io); }
.reduce-motion .opening__slide .fill { transform: none; }

/* ---------- Gallery viewer: lightbox on larger screens, full screen on phones ---------- */

.set .frame { cursor: zoom-in; }
.set .frame:focus-visible { outline: 2px solid var(--navy); outline-offset: 4px; }
.viewer-open, .viewer-open body { overflow: hidden; }
.viewer {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(10, 16, 24, 0.96);
  color: var(--on-night);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
  overscroll-behavior: contain;
}
.viewer.is-open { opacity: 1; }
.viewer[hidden] { display: none; }
.viewer__track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior: contain;
}
.viewer__track::-webkit-scrollbar { display: none; }
.viewer__slide {
  flex: 0 0 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  align-items: center;
  gap: 18px;
  padding: clamp(64px, 9vh, 96px) clamp(72px, 9vw, 150px) clamp(28px, 5vh, 48px);
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.viewer__slide img, .viewer__slide video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
  transform: scale(0.97);
  transition: transform 0.5s var(--ease-out);
}
.viewer.is-open .viewer__slide img, .viewer.is-open .viewer__slide video { transform: none; }
.viewer__slide figcaption { max-width: 60ch; text-align: center; font-size: 15px; line-height: 1.5; color: var(--on-night-2); }
.viewer__count {
  position: absolute;
  left: 50%;
  top: clamp(24px, 4vh, 36px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  font: 500 11px/1 var(--sans);
  letter-spacing: 0.24em;
  color: var(--on-night-2);
}
.viewer__count i { width: 40px; height: 1px; background: var(--rule-night); }
.viewer__close, .viewer__nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: var(--on-night);
  transition: background-color 0.3s ease, opacity 0.3s ease;
}
.viewer__close:hover, .viewer__nav:hover { background: rgba(236, 231, 223, 0.1); }
.viewer__close:focus-visible, .viewer__nav:focus-visible { outline: 2px solid var(--on-night); outline-offset: 2px; }
.viewer__close { top: clamp(12px, 2.5vh, 24px); right: clamp(12px, 2.5vw, 32px); }
.viewer__close::before, .viewer__close::after { content: ""; grid-area: 1 / 1; width: 24px; height: 1.5px; background: currentColor; transform: rotate(45deg); }
.viewer__close::after { transform: rotate(-45deg); }
.viewer__nav { top: 50%; margin-top: -28px; }
.viewer__nav--prev { left: clamp(8px, 2.5vw, 40px); }
.viewer__nav--next { right: clamp(8px, 2.5vw, 40px); }
.viewer__nav::before { content: ""; width: 14px; height: 14px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; }
.viewer__nav--prev::before { transform: translateX(3px) rotate(45deg); }
.viewer__nav--next::before { transform: translateX(-3px) rotate(-135deg); }
.viewer__nav:disabled { opacity: 0.2; cursor: default; background: none; }

/* Phones: the picture fills the screen on black; swipe between pictures. */
@media (max-width: 899px) {
  .viewer { background: #000; }
  .viewer__slide { padding: 0; gap: 0; grid-template-rows: minmax(0, 1fr); }
  .viewer__slide img, .viewer__slide video { width: 100%; height: 100%; box-shadow: none; }
  .viewer__slide figcaption { display: none; }
  .viewer__nav { display: none; }
  .viewer__count { top: auto; bottom: max(20px, env(safe-area-inset-bottom)); }
  .viewer__close { top: max(10px, env(safe-area-inset-top)); right: 8px; background: rgba(0, 0, 0, 0.35); }
}
