/* ==========================================================================
   Modern Design Studio
   --------------------------------------------------------------------------
   1.  Tokens            (colours, fonts, spacing — change the look here)
   2.  Base
   3.  Typography
   4.  Placeholders      (empty text + image slots)
   5.  Layout
   6.  Header + menu
   7.  Links + buttons
   8.  Media
   9.  Hero (home)
   10. Sections (home)
   11. Project cards + work index
   12. Project page
   13. About / people
   14. Process
   15. Contact
   16. Footer
   17. Motion
   18. Press, journal, video
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */

:root {
  --paper: #f6f2ea;
  --paper-deep: #eee8dc;
  --ink: #1d1f20;
  --ink-2: #57534b;
  --ink-3: #8b8578;
  --line: rgba(29, 31, 32, 0.16);
  --accent: #96753b;

  --slot: #e6dfd1;                       /* empty image slot */
  --slot-dark: #25272a;                  /* empty image slot, dark */
  --slot-rule: rgba(29, 31, 32, 0.1);    /* hairlines inside an empty image slot */
  --slot-text: rgba(29, 31, 32, 0.085);  /* empty text slot */

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --gutter: clamp(1.25rem, 3.2vw, 3rem);
  --gap: clamp(1rem, 2vw, 2rem);
  --section: clamp(5rem, 11vw, 11rem);
  --max: 105rem;
  --header-h: 4.75rem;

  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

/* 2. Base ------------------------------------------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

/* Lets edge-to-edge elements measure the page width without the scrollbar (cqw) */
main { container-type: inline-size; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol, address {
  margin: 0;
  padding: 0;
  font: inherit;
  font-style: normal;
}

ul, ol { list-style: none; }

img, video, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

::selection { background: var(--ink); color: var(--paper); }

:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

.skip {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* 3. Typography ------------------------------------------------------------ */

.display {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.125rem, 1.2rem + 3.3vw, 4.25rem);
  line-height: 1.14;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.display--xl {
  font-size: clamp(2.75rem, 1.2rem + 6vw, 6.5rem);
  line-height: 1.04;
  letter-spacing: -0.022em;
}

.heading {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.625rem, 1.1rem + 1.7vw, 2.625rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.subheading {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.3125rem, 1.15rem + 0.5vw, 1.625rem);
  line-height: 1.28;
}

.lede {
  font-size: clamp(1.125rem, 1rem + 0.55vw, 1.4375rem);
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}

.body {
  max-width: 62ch;
  color: var(--ink-2);
  text-wrap: pretty;
}
.body > * + * { margin-top: 1.15em; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.label {
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.meta {
  font-size: 0.8125rem;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

/* 4. Placeholders ----------------------------------------------------------
   Any element with a data-slot attribute shows soft "text lines" while it is
   empty. Type between its tags and the placeholder disappears by itself.
   The tags must be completely empty (no spaces or line breaks) to count.

     data-slot            full-width line
     data-slot="title"    medium line
     data-slot="short"    short line
     data-slot="tiny"     very short line
     data-lines="2..6"    paragraph of that many lines
   -------------------------------------------------------------------------- */

[data-slot] { --lines: 1; --slot-w: 100%; --slot-last: 100%; }
[data-slot="title"] { --slot-w: 11em; }
[data-slot="short"] { --slot-w: 7em; }
[data-slot="tiny"] { --slot-w: 3.5em; }
[data-lines] { --slot-last: 58%; }
[data-lines="2"] { --lines: 2; }
[data-lines="3"] { --lines: 3; }
[data-lines="4"] { --lines: 4; }
[data-lines="5"] { --lines: 5; }
[data-lines="6"] { --lines: 6; }

[data-slot]:empty { display: block; }

[data-slot]:empty::before {
  content: "";
  display: block;
  width: var(--slot-w);
  max-width: 100%;
  height: calc(var(--lines) * 1lh);
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent calc(0.5lh - 0.27em),
    var(--slot-text) calc(0.5lh - 0.27em),
    var(--slot-text) calc(0.5lh + 0.27em),
    transparent calc(0.5lh + 0.27em),
    transparent 1lh
  );
  -webkit-mask:
    linear-gradient(#000 0 0) top left / 100% calc(100% - 1lh) no-repeat,
    linear-gradient(#000 0 0) bottom left / var(--slot-last) 1lh no-repeat;
  mask:
    linear-gradient(#000 0 0) top left / 100% calc(100% - 1lh) no-repeat,
    linear-gradient(#000 0 0) bottom left / var(--slot-last) 1lh no-repeat;
}

.center [data-slot]:empty::before {
  margin-inline: auto;
  -webkit-mask-position: top center, bottom center;
  mask-position: top center, bottom center;
}

.on-dark {
  --slot-text: rgba(255, 255, 255, 0.22);
  --slot-rule: rgba(255, 255, 255, 0.09);
}

/* 5. Layout ---------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
}

.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * 0.6); }
.section--flush-top { padding-top: 0; }
.section--deep { background: var(--paper-deep); }

.rule { border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 1.25rem;
  margin-bottom: clamp(2rem, 4.5vw, 4.5rem);
  border-top: 1px solid var(--line);
}

/* Page heading (every page except home) */
.page-head {
  padding-top: calc(var(--header-h) + clamp(3.5rem, 9vw, 9rem));
  padding-bottom: clamp(3rem, 6vw, 6rem);
}
.page-head .eyebrow { margin-bottom: clamp(1.25rem, 2vw, 2rem); }
.page-head__title { grid-column: 1 / span 10; }
.page-head__lede {
  grid-column: 7 / span 6;
  margin-top: clamp(2rem, 4.5vw, 4.5rem);
}

/* 6. Header + menu --------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-h);
  padding-inline: var(--gutter);
  border-bottom: 1px solid transparent;
  color: var(--ink);
  transition:
    transform 0.55s var(--ease),
    background-color 0.35s ease,
    border-color 0.35s ease,
    color 0.35s ease;
}

.site-header.is-solid {
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}

.site-header.is-hidden { transform: translateY(-101%); }

/* Over the home hero the header sits on the image in white */
.has-hero .site-header:not(.is-solid):not(.is-menu) { color: #fff; }

.site-header.is-menu {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: transparent;
  color: var(--ink);
  transform: none;
}

.site-nav {
  display: flex;
  gap: clamp(1.5rem, 2.6vw, 2.75rem);
}
.site-nav--end { justify-content: flex-end; }

.site-nav a,
.menu-toggle {
  position: relative;
  padding-block: 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-nav a::after {
  content: "";
  position: absolute;
  inset: auto 0 0.2rem 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}
.site-header.is-solid .site-nav a[aria-current="page"],
body:not(.has-hero) .site-nav a[aria-current="page"] { color: var(--accent); }

.wordmark {
  margin-right: -0.34em; /* optically centre the tracked caps */
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  justify-self: end;
  align-items: center;
  gap: 0.7rem;
}
.menu-toggle__icon {
  position: relative;
  width: 1.375rem;
  height: 0.5rem;
}
.menu-toggle__icon::before,
.menu-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transition: transform 0.45s var(--ease), top 0.45s var(--ease);
}
.menu-toggle__icon::before { top: 0; }
.menu-toggle__icon::after { top: 100%; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon::before { top: 50%; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon::after { top: 50%; transform: rotate(-45deg); }

.menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3rem;
  padding: calc(var(--header-h) + 2.5rem) var(--gutter) 2rem;
  overflow-y: auto;
  background: var(--paper);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}
.menu.is-open { opacity: 1; visibility: visible; }

.menu__list { border-top: 1px solid var(--line); }
.menu__list a {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding-block: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.5rem, 11vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.6s var(--ease), transform 0.7s var(--ease), color 0.3s;
}
.menu.is-open .menu__list a { opacity: 1; transform: none; }
.menu.is-open .menu__list li:nth-child(2) a { transition-delay: 0.05s; }
.menu.is-open .menu__list li:nth-child(3) a { transition-delay: 0.1s; }
.menu.is-open .menu__list li:nth-child(4) a { transition-delay: 0.15s; }
.menu__list a[aria-current="page"] { color: var(--accent); }
.menu__list a span {
  flex: none;
  width: 1.75rem;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}

.menu__foot {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9375rem;
  color: var(--ink-2);
}

@media (max-width: 56rem) {
  :root { --header-h: 4rem; }
  .site-header { grid-template-columns: 1fr auto; }
  .site-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .wordmark {
    justify-self: start;
    margin-right: 0;
    font-size: 0.75rem;
    letter-spacing: 0.26em;
  }
}

/* 7. Links + buttons ------------------------------------------------------- */

.link {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  padding-block: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.arrow {
  position: relative;
  flex: none;
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  transition: width 0.45s var(--ease);
}
.arrow::after {
  content: "";
  position: absolute;
  top: -3px;
  right: 0;
  width: 7px;
  height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}
.arrow--back { transform: scaleX(-1); }
a:hover > .arrow,
button:hover > .arrow { width: 2.75rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 2rem;
  border: 1px solid currentColor;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--solid { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); }

/* 8. Media -----------------------------------------------------------------
   <figure class="media media--3x2"></figure> reserves the space.
   Put an <img> (or <video>) inside it and the placeholder disappears.
   -------------------------------------------------------------------------- */

.media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--slot);
}
.media--21x9 { aspect-ratio: 21 / 9; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--3x2 { aspect-ratio: 3 / 2; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--5x4 { aspect-ratio: 5 / 4; }
.media--4x5 { aspect-ratio: 4 / 5; }
.media--3x4 { aspect-ratio: 3 / 4; }
.media--2x3 { aspect-ratio: 2 / 3; }
.media--fill { position: absolute; inset: 0; aspect-ratio: auto; }
.media--dark { background: var(--slot-dark); }

.media > img,
.media > video,
.media > picture,
.media > picture > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Empty state: corner-to-corner hairlines + a small label */
.media:not(:has(img, video))::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top right, transparent calc(50% - 0.5px), var(--slot-rule) calc(50% - 0.5px), var(--slot-rule) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
    linear-gradient(to bottom right, transparent calc(50% - 0.5px), var(--slot-rule) calc(50% - 0.5px), var(--slot-rule) calc(50% + 0.5px), transparent calc(50% + 0.5px));
}
.media:not(:has(img, video))::after {
  content: attr(data-label);
  position: absolute;
  top: 50%;
  left: 50%;
  padding: 0.5rem 0.85rem;
  background: var(--slot);
  color: var(--ink-3);
  font-family: var(--sans);
  font-size: 0.625rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}
.media--dark:not(:has(img, video)) { --slot-rule: rgba(255, 255, 255, 0.09); }
.media--dark:not(:has(img, video))::after { background: var(--slot-dark); color: rgba(255, 255, 255, 0.5); }

.caption {
  margin-top: 0.85rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-3);
}

/* 9. Hero (home) ----------------------------------------------------------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 34rem;
  overflow: hidden;
  background: var(--slot-dark);
  color: #fff;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.4s ease, visibility 1.4s;
}
.hero__slide.is-active { opacity: 1; visibility: visible; }
.hero__slide.is-active .media > img { animation: drift 9s ease-out both; }

/* Soft shading so the header and caption stay legible on any photograph */
.hero__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.38), transparent 26%),
    linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent 36%);
  pointer-events: none;
}

/* The whole slide is a link to its project */
.hero__link {
  position: absolute;
  inset: 0;
  display: block;
  color: inherit;
}
.hero__link:focus-visible { outline-offset: -0.75rem; }
.hero__link .hero__title {
  text-decoration: underline 1px transparent;
  text-underline-offset: 0.2em;
  transition: text-decoration-color 0.4s ease;
}
.hero__link:hover .hero__title,
.hero__link:focus-visible .hero__title { text-decoration-color: currentColor; }

/* Slides wait off-stage, and their photos are not downloaded, until they are about to be shown */
.js [data-slide]:not(.is-active):not(.is-primed) { display: none; }

.hero__caption {
  position: absolute;
  left: var(--gutter);
  bottom: var(--gutter);
  z-index: 2;
  max-width: min(36rem, 60%);
}
.hero__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.625rem, 1.2rem + 1.6vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.hero__meta {
  margin-top: 0.6rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.85;
}

.hero__controls {
  position: absolute;
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
}
.hero__count { display: flex; align-items: center; gap: 0.85rem; }
.hero__progress {
  position: relative;
  width: clamp(3rem, 7vw, 6rem);
  height: 1px;
  background: rgba(255, 255, 255, 0.35);
}
.hero__progress i {
  position: absolute;
  inset: 0;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
}
.hero__controls button {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.hero__controls button:hover { background: #fff; border-color: #fff; color: var(--ink); }
.hero__controls svg { width: 0.875rem; height: 0.875rem; }

@media (max-width: 40rem) {
  .hero__caption { max-width: none; right: var(--gutter); }
  .hero:has(.hero__controls) .hero__caption { bottom: calc(var(--gutter) + 4rem); }
  .hero__controls { left: var(--gutter); justify-content: space-between; }
}

/* 10. Sections (home) ------------------------------------------------------ */

.intro__eyebrow { grid-column: 1 / -1; margin-bottom: clamp(1.25rem, 2vw, 2rem); }
.intro__statement { grid-column: 1 / span 10; }
.intro__body {
  grid-column: 7 / span 6;
  margin-top: clamp(2.5rem, 5vw, 5rem);
}
.intro__body .link { margin-top: 2rem; }

/* Selected work: an editorial, offset arrangement of four projects */
.features {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: clamp(3rem, 7vw, 7.5rem);
}
.features > :nth-child(1) { grid-column: 1 / -1; }
.features > :nth-child(2) { grid-column: 1 / span 5; }
.features > :nth-child(3) { grid-column: 7 / span 6; margin-top: clamp(4rem, 13vw, 13rem); }
.features > :nth-child(4) { grid-column: 3 / span 8; }

/* Full-bleed image band */
.band { position: relative; }
.band .media { aspect-ratio: 21 / 9; min-height: 22rem; width: 100%; }

.quote { text-align: center; }
.quote blockquote {
  max-width: 24ch;
  margin-inline: auto;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.75rem, 1.1rem + 2.4vw, 3.25rem);
  line-height: 1.22;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.quote figcaption { margin-top: 2rem; display: flex; justify-content: center; }

/* Three-up */
.trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 3rem;
}
.trio__item { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.trio__num {
  display: block;
  margin-bottom: clamp(2.5rem, 5vw, 5rem);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--accent);
}
.trio__item .subheading { margin-bottom: 1rem; }
.trio__item .body { font-size: 1rem; }
.trio__more { margin-top: clamp(2.5rem, 5vw, 4rem); }

/* Closing call to action */
.cta { text-align: center; }
.cta .eyebrow { margin-bottom: clamp(1.25rem, 2vw, 2rem); }
.cta .display { max-width: 16em; margin-inline: auto; }
.cta .btn { margin-top: clamp(2.5rem, 4vw, 3.5rem); }

@media (max-width: 48rem) {
  .intro__statement,
  .intro__body,
  .page-head__title,
  .page-head__lede { grid-column: 1 / -1; }
  .features > :nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
  .trio { grid-template-columns: 1fr; }
  .trio__num { margin-bottom: 1.5rem; }
  .band .media { aspect-ratio: 4 / 5; }
}

/* 11. Project cards + work index ------------------------------------------ */

.card { position: relative; display: block; }
.card[hidden] { display: none; }

.card .media > img { transition: transform 1.4s var(--ease); }
.card:hover .media > img { transform: scale(1.035); }
.card .media::before { transition: opacity 0.4s ease; }

.card__caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1rem;
}
.card__title {
  flex: 1;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.25rem, 1.05rem + 0.65vw, 1.625rem);
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.card__title:not(:empty) {
  display: inline;
  flex: none;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  transition: background-size 0.5s var(--ease);
}
.card:hover .card__title:not(:empty) { background-size: 100% 1px; }
.card__meta {
  flex: none;
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Toolbar: filters + view switch */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  flex-wrap: wrap;
  padding-block: 1rem;
  margin-bottom: clamp(2rem, 4vw, 4rem);
  border-top: 1px solid var(--line);
}
.chips { display: flex; flex-wrap: wrap; gap: 0.25rem clamp(1.25rem, 2.2vw, 2.25rem); }
.chip {
  position: relative;
  padding-block: 0.6rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  transition: color 0.3s ease;
}
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { color: var(--ink); }
.chip::after {
  content: "";
  position: absolute;
  inset: auto 0 0.15rem 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.chip[aria-pressed="true"]::after { transform: scaleX(1); }

/* Grid view */
.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: clamp(2.5rem, 5vw, 5rem);
  counter-reset: project;
}
.projects > .card { counter-increment: project; }
.projects:not([data-view="list"]) > .card--wide { grid-column: 1 / -1; }
.projects:not([data-view="list"]) > .card--wide .media { aspect-ratio: 21 / 9; }

/* Index (list) view — same markup, laid out as rows */
.projects[data-view="list"] {
  grid-template-columns: 1fr;
  row-gap: 0;
  border-top: 1px solid var(--line);
}
.projects[data-view="list"] > .card {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr) 7rem;
  column-gap: var(--gap);
  align-items: center;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--line);
  transition: padding 0.45s var(--ease), background-color 0.3s ease;
}
.projects[data-view="list"] > .card:hover { padding-inline: 0.75rem; background: var(--paper-deep); }
.projects[data-view="list"] > .card::before {
  content: counter(project, decimal-leading-zero);
  order: 0;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--ink-3);
}
.projects[data-view="list"] > .card::after {
  content: attr(data-category);
  order: 2;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.projects[data-view="list"] .card__caption { display: contents; }
.projects[data-view="list"] .card__title { order: 1; justify-self: start; }
.projects[data-view="list"] .card__meta { order: 3; margin-left: 0; }
.projects[data-view="list"] .media { order: 4; aspect-ratio: 3 / 2; }
.projects[data-view="list"] .media::after { content: none; }

@media (max-width: 44rem) {
  .projects { grid-template-columns: 1fr; }
  .projects:not([data-view="list"]) > .card--wide .media { aspect-ratio: 3 / 2; }
  .projects[data-view="list"] > .card { grid-template-columns: 2.25rem minmax(0, 1fr) auto; }
  .projects[data-view="list"] > .card::after,
  .projects[data-view="list"] .media { display: none; }
}

/* 12. Project page --------------------------------------------------------- */

/* Framed, full-height image viewer */
.viewer {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100vh;
  height: 100svh;
  min-height: 32rem;
  padding: var(--header-h) var(--gutter) 0;
}
.viewer__stage { position: relative; overflow: hidden; background: var(--slot); }
.viewer__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0.9s;
}
.viewer__slide.is-active { opacity: 1; visibility: visible; }

.viewer__zones {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.viewer__zones button { cursor: pointer; }
.viewer__zones button:first-child { cursor: w-resize; }
.viewer__zones button:last-child { cursor: e-resize; }
.viewer__zones button:focus-visible { outline-offset: -8px; }

.viewer__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 4rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.viewer__bar .link { font-size: inherit; justify-self: start; }
.viewer__count { display: flex; align-items: center; gap: 0.85rem; color: var(--ink-2); }
.viewer__count i { width: 2rem; height: 1px; background: var(--line); }
.viewer__steps { display: flex; gap: 1.75rem; justify-self: end; }
.viewer__steps button { padding-block: 0.6rem; transition: color 0.3s ease; }
.viewer__steps button:hover { color: var(--accent); }

/* Title, facts and description */
.project-info { padding-block: clamp(3.5rem, 7vw, 7.5rem) clamp(4rem, 8vw, 8rem); }
.project-info__head { grid-column: 1 / span 5; }
.project-info__head .eyebrow { margin-bottom: 1.25rem; }
.project-info__place { margin-top: 1rem; }
.project-info__body { grid-column: 7 / span 6; padding-top: 0.5rem; }
.project-info__body .lede { margin-bottom: 2rem; }

.specs { margin-top: clamp(2.5rem, 5vw, 4.5rem); border-top: 1px solid var(--line); }
.specs > div {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--line);
}
.specs dd { font-size: 0.9375rem; line-height: 1.5; }

/* Stacked gallery — add a layout class to each figure */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}
.gallery > * { grid-column: 1 / -1; }
.gallery > .g-half { grid-column: span 6; }
.gallery > .g-wide { grid-column: span 7; }
.gallery > .g-narrow { grid-column: span 5; }
.gallery > .g-left { grid-column: 1 / span 8; }
.gallery > .g-right { grid-column: 5 / span 8; }
.gallery > .g-center { grid-column: 3 / span 8; }
.gallery > .g-bleed { width: 100cqw; margin-left: calc(50% - 50cqw); }
.gallery > .g-text {
  grid-column: 7 / span 6;
  padding-block: clamp(2rem, 5vw, 5rem);
}
.gallery .align-end { align-self: end; }

/* Next project */
.next { display: block; border-top: 1px solid var(--line); }
.next__inner { align-items: end; padding-block: clamp(3rem, 6vw, 6rem); }
.next__text { grid-column: 1 / span 6; }
.next__text .label { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.5rem; color: var(--ink-2); }
.next__media { grid-column: 8 / span 5; }
.next .media > img { transition: transform 1.4s var(--ease); }
.next:hover .media > img { transform: scale(1.035); }
.next:hover .arrow { width: 2.75rem; }

@media (max-width: 48rem) {
  /* On phones the viewer keeps a landscape frame so wide photos aren't cropped to a sliver */
  .viewer { height: auto; min-height: 0; }
  .viewer__stage { aspect-ratio: 4 / 3; }
  .viewer__bar { grid-template-columns: 1fr auto; }
  .viewer__count { display: none; }
  .project-info__head,
  .project-info__body { grid-column: 1 / -1; }
  .project-info__body { padding-top: 2.5rem; }
  .specs > div { grid-template-columns: 7rem minmax(0, 1fr); }
  .gallery > :nth-child(n) { grid-column: 1 / -1; }
  .gallery > .g-text { padding-block: 1.5rem; }
  .next__text,
  .next__media { grid-column: 1 / -1; }
  .next__media { margin-top: 2.5rem; }
}

/* 13. About / people ------------------------------------------------------- */

.split { align-items: start; row-gap: 2.5rem; }
.split__label { grid-column: 1 / span 3; }
.split__body { grid-column: 5 / span 7; }
.split__body .heading { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }

/* Team grid: fixed column widths, so it looks the same with one person or ten */
.people {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(1.25rem, 3vw, 3rem);
  row-gap: clamp(3rem, 5vw, 4.5rem);
}
.person .media > img { transition: transform 1.4s var(--ease); }
.person:hover .media > img { transform: scale(1.03); }
.person__name {
  margin-top: 1.25rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
  line-height: 1.2;
}
.person__role { margin-top: 0.6rem; }
.person__bio {
  margin-top: 1.1rem;
  max-width: 42ch;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-2);
}

@media (max-width: 56rem) {
  .people { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 48rem) {
  .split__label,
  .split__body { grid-column: 1 / -1; }
}
@media (max-width: 36rem) {
  .people { grid-template-columns: minmax(0, 1fr); }
}

/* 14. Process -------------------------------------------------------------- */

.steps { counter-reset: step; }
.step {
  align-items: start;
  row-gap: 2rem;
  padding-block: clamp(3rem, 6vw, 6rem);
  border-top: 1px solid var(--line);
  counter-increment: step;
}
.step__num {
  grid-column: 1 / span 2;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.75rem, 1.5rem + 4vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.step__num::before { content: counter(step, decimal-leading-zero); }
.step__text { grid-column: 3 / span 4; position: sticky; top: calc(var(--header-h) + 2rem); }
.step__text .heading { margin-bottom: clamp(1.25rem, 2.5vw, 2rem); }
.step__media { grid-column: 8 / span 5; }

@media (max-width: 56rem) {
  .step__num,
  .step__text,
  .step__media { grid-column: 1 / -1; }
  .step__text { position: static; }
}

/* 15. Contact -------------------------------------------------------------- */

.contact { align-items: start; row-gap: 4rem; }
.contact__details { grid-column: 1 / span 4; }
.contact__form { grid-column: 6 / span 7; }

.details { border-top: 1px solid var(--line); }
.details > div { padding-block: 1.25rem 1.4rem; border-bottom: 1px solid var(--line); }
.details dt { margin-bottom: 0.6rem; }
.details dd { font-size: 1.0625rem; line-height: 1.5; }
.details a:not(:empty) {
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  transition: background-size 0.5s var(--ease);
}
.details a:hover { background-size: 100% 1px; }
.details ul { display: grid; gap: 0.25rem; }

.form { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gap); }
.field {
  position: relative;
  display: block;
  padding-top: 1.5rem;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.3s ease;
}
.field--full { grid-column: 1 / -1; }
.field:focus-within { border-bottom-color: var(--ink); }
.field input,
.field textarea,
.field select {
  display: block;
  width: 100%;
  padding: 0.6rem 0 1.1rem;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;
  line-height: 1.5;
  resize: vertical;
}
.field textarea { min-height: 9rem; }
.form__foot {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  margin-top: 2.5rem;
}

@media (max-width: 56rem) {
  .contact__details,
  .contact__form { grid-column: 1 / -1; }
}
@media (max-width: 36rem) {
  .form { grid-template-columns: 1fr; }
}

/* 16. Footer --------------------------------------------------------------- */

.site-footer {
  --line: rgba(246, 242, 234, 0.16);
  --ink-2: rgba(246, 242, 234, 0.72);
  --ink-3: rgba(246, 242, 234, 0.48);
  --slot-text: rgba(246, 242, 234, 0.14);
  background: var(--ink);
  color: var(--paper);
}

.footer__mark {
  display: block;
  padding-block: clamp(3.5rem, 7vw, 7rem) clamp(3rem, 6vw, 6rem);
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.5rem, 8.7vw, 9.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.5rem var(--gap);
  padding-block: clamp(2rem, 3.5vw, 3rem);
  border-top: 1px solid var(--line);
}
.footer__cols .label { margin-bottom: 1.1rem; }
.footer__cols ul { display: grid; gap: 0.35rem; }
.footer__cols li,
.footer__cols address { font-size: 0.9375rem; line-height: 1.55; color: var(--ink-2); }
.footer__cols a { transition: color 0.3s ease; }
.footer__cols a:hover { color: var(--paper); }

.footer__base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.5rem 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.footer__base a { color: var(--ink-2); transition: color 0.3s ease; }
.footer__base a:hover { color: var(--paper); }

/* Long email addresses must never widen the page */
.footer__cols ul { grid-template-columns: minmax(0, 1fr); }
.footer__cols a,
.details a,
.menu__foot a { overflow-wrap: anywhere; }

@media (max-width: 48rem) {
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 30rem) {
  /* Contact gets its own full-width row so the email fits on one line */
  .footer__cols { grid-auto-flow: row dense; }
  .footer__cols > :nth-child(2) { grid-column: 1 / -1; order: -1; }
}

/* 18. Press, journal, video ------------------------------------------------ */

/* Press list: outlet, headline, date — each row links to the article */
.press { border-top: 1px solid var(--line); }
.press__item {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 7fr) minmax(0, 2fr) 3rem;
  grid-template-areas: "outlet title date arrow";
  column-gap: var(--gap);
  align-items: baseline;
  padding-block: 1.5rem 1.65rem;
  border-bottom: 1px solid var(--line);
  transition: padding 0.45s var(--ease), background-color 0.3s ease;
}
.press__item:hover { padding-inline: 0.75rem; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.press__outlet { grid-area: outlet; }
.press__title { grid-area: title; }
.press__date { grid-area: date; }
.press__item .arrow { grid-area: arrow; justify-self: end; align-self: center; }

/* Journal posts */
.post {
  align-items: start;
  row-gap: 1.75rem;
  padding-block: clamp(3rem, 6vw, 6rem);
  border-top: 1px solid var(--line);
  scroll-margin-top: var(--header-h);
}
.post[hidden] { display: none; }
.post__meta {
  grid-column: 1 / span 3;
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  display: grid;
  gap: 0.6rem;
}
.post__meta time { color: var(--ink-2); }
.post__cats { color: var(--accent); }
.post__body { grid-column: 4 / span 8; }
.post__title { margin-bottom: clamp(1.25rem, 2.5vw, 2rem); }
.post__lead {
  margin-bottom: 1.25rem;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
}
.post__body > * + * { margin-top: clamp(1.75rem, 3.5vw, 2.75rem); }
.post__body > .post__title + *,
.post__body > .post__lead + * { margin-top: 0; }
.post__quote {
  max-width: 34em;
  padding-left: 1.5rem;
  border-left: 1px solid var(--accent);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  line-height: 1.4;
}
.post__media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  align-items: start;
}
.post__media > :only-child { grid-column: 1 / -1; }
.post__links { display: flex; flex-wrap: wrap; gap: 0.25rem 2.25rem; }

/* YouTube player: a still with a play button until clicked */
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--slot-dark);
}
.video > img,
.video > iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
.video__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.05) 45%);
}
.video__play > span {
  display: grid;
  place-items: center;
  width: clamp(3.75rem, 7vw, 5.5rem);
  height: clamp(3.75rem, 7vw, 5.5rem);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: transform 0.5s var(--ease), background-color 0.3s ease;
}
.video__play:hover > span { transform: scale(1.06); background: rgba(0, 0, 0, 0.38); }
.video__play svg { width: 1.1rem; height: 1.1rem; margin-left: 0.2rem; }
.video__play > em {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.1rem;
  font-style: normal;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: left;
}

/* About: story photo, philosophy, trades */
.split__media { margin-top: clamp(2.5rem, 5vw, 4rem); }
.philosophy__intro { max-width: 22em; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.trio__item .body > * + * { margin-top: 1em; }
.visit {
  align-items: baseline;
  row-gap: 1.25rem;
  margin-top: clamp(3rem, 6vw, 5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.visit__label { grid-column: 1 / span 4; }
.visit__body { grid-column: 5 / span 7; }
.visit__body .link { margin-top: 1.5rem; }

.partners { margin-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid var(--line); }
.partners > div {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: var(--gap);
  align-items: baseline;
  padding-block: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.partners dt { font-family: var(--serif); font-size: 1.25rem; line-height: 1.3; }
.partners dd { font-size: 0.9375rem; line-height: 1.55; color: var(--ink-2); }

@media (max-width: 48rem) {
  .press__item {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "outlet arrow" "title title" "date date";
    row-gap: 0.6rem;
  }
  .post__meta,
  .post__body,
  .visit__label,
  .visit__body { grid-column: 1 / -1; }
  .post__meta { position: static; display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }
  .post__media { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 36rem) {
  .partners > div { grid-template-columns: minmax(0, 1fr); gap: 0.35rem; }
}

/* Phone numbers (filled in from assets/js/site.js) */
.phones { display: grid; gap: 0.2rem; }
.phones > a { width: fit-content; }
.tel__name {
  display: inline-block;
  min-width: 3.25em;
  margin-right: 0.35em;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* 404 */
.lost {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 2rem;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + 2rem) var(--gutter) 4rem;
  text-align: center;
}

/* 17. Motion --------------------------------------------------------------- */

@keyframes drift {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}

@keyframes progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Scroll reveal (only when JavaScript is running) */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(1.75rem);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

.people > :nth-child(3n + 2),
.trio > :nth-child(3n + 2),
.projects > :nth-child(2n) { --d: 0.08s; }
.people > :nth-child(3n + 3),
.trio > :nth-child(3n + 3) { --d: 0.16s; }

/* Soft cross-fade between pages in browsers that support it */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}
