:root {
  --paper: #f4f1ec;
  --paper-2: #ebe6de;
  --ink: #161514;
  --muted: #6d675f;
  --sky: #438983; /* the hero sky's robin's egg, deepened to read on cream */
  --sky-light: #9ccfc8; /* the same blue, light, for titles on the black band */
  --rule: #d6d0c6;
  --serif: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1360px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
em { font-style: italic; }

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

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter);
  color: var(--ink);
  transition: background-color .35s, color .35s, padding .35s, border-color .35s, transform .35s;
  border-bottom: 1px solid transparent;
}
/* Tucks away while scrolling down so it never sits over the work */
.site-header.tucked { transform: translateY(-100%); }
.site-header.solid {
  background: rgba(244, 241, 236, .94);
  backdrop-filter: blur(8px);
  padding-block: 12px;
  border-color: var(--rule);
}
.wordmark {
  font-family: var(--serif); font-size: clamp(36px, 4.2vw, 62px); line-height: 1; letter-spacing: .05em;
  text-decoration: none; white-space: nowrap;
}
.wordmark span { font-style: italic; letter-spacing: .01em; margin-left: .15em; }
.nav { display: flex; gap: clamp(20px, 3vw, 40px); }
.nav a, .menu-toggle {
  font-size: 14px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  text-decoration: none;
}
.nav a { position: relative; padding-block: 4px; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1px; background: currentColor; transition: right .3s;
}
.nav a:hover::after { right: 0; }
.nav { align-items: center; }
.nav a.cta, .cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--paper); border-radius: 999px; padding: 11px 18px;
  font: 500 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: none;
  transition: background-color .2s, transform .2s;
}
.nav a.cta::after { display: none; }
.cta:hover { background: #3a3733; }
.cta:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.cta-large { padding: 18px 28px; font-size: 13px; margin-bottom: 14px; }
.cta-large span { transition: transform .25s; }
.cta-large:hover span { transform: translateX(5px); }
.cta-note { margin: 0 0 48px; color: var(--muted); font-size: 14px; }
.menu-toggle { display: none; background: none; border: 0; color: inherit; cursor: pointer; padding: 8px 0; }

/* Hero */
/* The headline stays in the page for search engines and screen readers but isn't shown;
   the photo starts right under the menu bar */
.hero-text {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.hero { padding-top: var(--header-h, clamp(80px, 7.4vw, 108px)); }
.hero h1 {
  font-family: var(--serif); font-size: clamp(22px, 2.4vw, 38px); line-height: 1.1; letter-spacing: -.01em;
  max-width: 15ch; text-align: right;
}
.hero-image { margin: 0; }
/* Show the full frame: campaign images carry logos and type at the edges */
.hero-image img { width: 100%; height: auto; }
.hero-image figcaption { margin-top: 12px; text-align: right; font-size: 12px; letter-spacing: .04em; color: var(--muted); max-width: none; margin-inline: 0; padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* Intro */
.intro {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(32px, 6vw, 96px);
  padding-block: clamp(40px, 5vw, 76px) clamp(56px, 8vw, 110px);
}
/* The label runs across the top; the paragraph starts level with the headline */
.intro-head { display: contents; }
.intro { row-gap: 0; }
.intro-label { grid-column: 1 / -1; }
.intro-body { align-self: start; padding-top: .55em; }
/* Same size as the intro paragraph beside it */
.intro-label { margin: 0 0 18px; font-size: 18px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.intro-lede { margin: 0; font-family: var(--serif); font-size: clamp(34px, 4.4vw, 64px); line-height: 1.08; }
.intro-body p { margin: 0; font-size: 18px; color: #3b3834; max-width: 52ch; }

/* Section heads */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding-bottom: 20px; margin-bottom: 40px; border-bottom: 1px solid var(--ink);
}
.section-head h2 { font-family: var(--serif); font-size: clamp(30px, 3.4vw, 48px); line-height: 1; }
.head-link { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; }
.head-link:hover { text-decoration: underline; }
.head-note { margin: 0; font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* Work: the three portfolios */
.work { padding-bottom: clamp(80px, 10vw, 140px); }
.portfolios { display: flex; gap: 12px; height: clamp(460px, 74vh, 780px); }
.portfolio {
  position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; border-radius: var(--radius); background: var(--ink); color: var(--paper);
  text-decoration: none; transition: flex-grow .7s cubic-bezier(.2, .7, .2, 1);
}
.portfolios:hover .portfolio { flex-grow: .75; }
.portfolios .portfolio:hover, .portfolios .portfolio:focus-visible { flex-grow: 1.7; }
.pf-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1), opacity .4s; opacity: .92; }
.portfolio:hover .pf-media { transform: scale(1.04); opacity: 1; }
/* The Phyt film has burned-in subtitles along the bottom: crop them out of the panel */
video.pf-media { transform-origin: 50% 0; transform: scale(1.32); }
.portfolio:hover video.pf-media { transform: scale(1.37); }
.pf-label {
  position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 6px;
  padding: 90px clamp(16px, 1.8vw, 26px) clamp(12px, 1.3vw, 18px);
  background: linear-gradient(to bottom, rgba(22,21,20,0), rgba(22,21,20,.72));
}
.pf-name { font-family: var(--serif); font-size: clamp(30px, 3.4vw, 54px); line-height: 1; }
.pf-name.pf-long { font-size: clamp(26px, 2.6vw, 42px); line-height: 1.05; }
.portfolio:nth-child(2) .pf-name { font-style: italic; }
.pf-go { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; opacity: 0; margin-bottom: -22px; transition: opacity .3s, margin .3s; }
.portfolio:hover .pf-go, .portfolio:focus-visible .pf-go { opacity: 1; margin-bottom: 0; }
.portfolio:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* What we do: one row per discipline. Name, what it is, then the services as a list */
.services { background: var(--ink); color: var(--paper); padding-block: clamp(56px, 6vw, 88px); }
.services-label { margin: 0 0 clamp(24px, 3vw, 40px); font-family: var(--serif); font-size: clamp(30px, 3.4vw, 48px); font-weight: 400; line-height: 1; color: var(--sky-light); }
.discipline {
  display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: clamp(24px, 4vw, 72px); align-items: start;
  padding-block: clamp(28px, 3vw, 44px); border-top: 1px solid rgba(244,241,236,.22);
}
.discipline h3 { font-family: var(--serif); font-size: clamp(44px, 5vw, 76px); line-height: .95; letter-spacing: -.015em; }
.discipline p { margin: 0; padding-top: 10px; color: rgba(244,241,236,.75); font-size: 16px; line-height: 1.65; max-width: 44ch; }
.discipline ul { margin: 0; padding: 4px 0 0; list-style: none; }
.discipline li {
  padding: 9px 0; border-bottom: 1px solid rgba(244,241,236,.12);
  font-family: var(--serif); font-size: clamp(18px, 1.5vw, 22px); line-height: 1.2;
}
.discipline li:last-child { border-bottom: 0; }

/* Clients: an open wall of logos, sized by visual weight rather than height */
.clients { padding-block: clamp(44px, 5vw, 72px) clamp(56px, 6vw, 90px); display: grid; gap: clamp(24px, 2.6vw, 36px); }
.client-group + .client-group { margin-top: clamp(32px, 4vw, 60px); }
.clients .section-head { margin-bottom: 0; }
/* Group names set in the display serif, with a hairline running out to the edge */
.client-group h3 {
  display: flex; align-items: center; gap: clamp(16px, 2vw, 28px); margin: 0 0 clamp(26px, 3vw, 40px);
  font-family: var(--serif); font-size: clamp(26px, 2.6vw, 38px); line-height: 1.1; color: var(--ink);
}
.client-group h3 em { font-style: italic; }
/* Section titles carry the sky blue from the hero photo; subheadings stay ink */
.section-head h2, .about h2, .portfolio-head h1 { color: var(--sky); }
.client-group h3::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.logo-wall {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: clamp(36px, 4vw, 52px) clamp(20px, 3vw, 40px);
  margin: 0; padding: 0; list-style: none;
}
.logo-wall li { display: grid; place-items: center; min-height: 64px; }
.logo-wall img { height: auto; max-width: 100%; opacity: .86; transition: opacity .2s; }
.logo-wall li:hover img { opacity: 1; }
.logo-type span { font-size: 15px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); opacity: .86; text-align: center; }

/* Photographers: an A–Z index beside one large picture that changes as you move through the names */
.photographers { background: var(--paper-2); padding-block: clamp(44px, 5vw, 72px) clamp(36px, 4vw, 56px); }
.photographers .head-note { margin: 0; }
.ph-index { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.ph-names { columns: 2; column-gap: clamp(24px, 3vw, 48px); }
.ix-group { display: grid; grid-template-columns: 2.2em 1fr; break-inside: avoid; padding-bottom: 14px; }
.ix-letter { margin: 0; padding-top: .45em; font-size: 11px; font-weight: 600; letter-spacing: .16em; color: var(--muted); }
.ix-group ul { margin: 0; padding: 0; list-style: none; }
.ix-group li { font-family: var(--serif); font-size: clamp(20px, 1.8vw, 27px); line-height: 1.32; }
.ix-group a { text-decoration: none; color: var(--ink); transition: color .2s; }
.ix-group a:hover, .ix-group a:focus-visible, .ix-group a.on { font-style: italic; }
.ix-group span { color: #9a948a; }
.ph-names:hover a:not(:hover):not(.on) { color: #7d776e; }
.ph-panel { position: sticky; top: 110px; margin: 0; }
.ph-frame { display: block; width: fit-content; max-width: 100%; border-radius: var(--radius); overflow: hidden; }
.ph-frame img { display: block; width: auto; height: auto; max-width: 100%; max-height: min(68vh, 640px); transition: opacity .25s; }
.ph-frame img.fade { opacity: 0; }
.ph-panel figcaption { display: grid; gap: 4px; margin-top: 14px; }
.ph-who { font-family: var(--serif); font-style: italic; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.1; }
.ph-what { font-size: 13px; color: var(--muted); }
.photographers + .about { background: var(--paper); }

/* About */
.about { background: var(--paper-2); padding-block: clamp(44px, 5vw, 72px) clamp(40px, 5vw, 70px); }
.about-grid { display: grid; grid-template-columns: minmax(160px, .7fr) 1.4fr .9fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.about h2 { font-family: var(--serif); font-size: clamp(30px, 3.4vw, 48px); line-height: 1; }
.about-lede { margin: 0 0 24px; font-family: var(--serif); font-size: clamp(26px, 2.6vw, 38px); line-height: 1.2; }
.about-body p:not(.about-lede) { margin: 0 0 16px; color: #3b3834; font-size: 17px; max-width: 60ch; }
.timeline { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.timeline li { display: grid; grid-template-columns: 3.4em 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 14px; color: #3b3834; }
.timeline span { font-family: var(--serif); font-size: 20px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Contact: the invitation on the left, how to reach Emily on the right */
.contact {
  display: grid; grid-template-columns: 1.5fr 1fr; align-items: end; gap: clamp(32px, 6vw, 96px);
  padding-block: clamp(48px, 6vw, 85px) clamp(36px, 4vw, 56px);
}
.contact-lede { margin: 0; font-family: var(--serif); font-size: clamp(40px, 5.6vw, 88px); line-height: 1.02; max-width: 14ch; }
.contact-grid { border-top: 1px solid var(--ink); padding-top: 22px; }
.contact-grid h3 { font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.contact-grid a { display: block; width: fit-content; font-family: var(--serif); font-size: clamp(22px, 2vw, 30px); line-height: 1.25; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .3s; }
.contact-grid a + a { margin-top: 4px; color: #3b3834; }
.contact-grid a:hover { background-size: 100% 1px; }
.contact-grid a.cta { display: inline-flex; margin-top: 22px; font: 500 12px/1 var(--sans); color: var(--paper); background: var(--ink); }
.contact-grid a.cta:hover { background: #3a3733; }
.page-contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: clamp(48px, 6vw, 88px); padding-block: clamp(32px, 4vw, 56px) clamp(24px, 2.5vw, 36px); border-top: 1px solid var(--rule); }
.page-contact p { margin: 0; font-family: var(--serif); font-size: clamp(26px, 2.8vw, 40px); line-height: 1.1; }

/* Portfolio pages */
.portfolio-page main { padding-top: clamp(110px, 14vw, 170px); padding-bottom: 0; }
.portfolio-head { padding-inline: var(--gutter); margin-bottom: clamp(24px, 3vw, 44px); }
.back-link { display: inline-flex; gap: 8px; margin-bottom: 14px; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); text-decoration: none; transition: color .2s; }
.back-link span { transition: transform .25s; }
.back-link:hover { color: var(--ink); }
.back-link:hover span { transform: translateX(-4px); }
.portfolio-head .back-link + h1 { margin-top: 0; }
.portfolio-head h1 { font-family: var(--serif); font-size: clamp(32px, 4.5vw, 70px); line-height: 1; letter-spacing: -.015em; }
.project-index { grid-column: 1 / -1; }
.project-index summary { cursor: pointer; width: fit-content; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.project-index summary:hover { text-decoration: underline; }
.project-index ol { columns: 3 260px; column-gap: 40px; margin: 20px 0 0; padding: 0; list-style: none; font-size: 15px; }
.project-index li { break-inside: avoid; padding-block: 3px; }
.project-index a { text-decoration: none; }
.project-index a:hover { text-decoration: underline; }
.project-index em { font-style: normal; color: var(--muted); }
.ix-no { display: inline-block; width: 2.6em; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

/* Stills: a justified wall, one large lead image per project, proportions kept */
.wall { --row-h: clamp(360px, 29vw, 560px); display: flex; flex-wrap: wrap; gap: 44px 16px; padding-inline: var(--gutter); }
.wall::after { content: ""; flex: 999 1 0; }
.tile { flex: var(--r) 1 calc(var(--r) * var(--row-h)); min-width: 0; max-width: calc(var(--r) * var(--row-h) * 1.5); margin: 0; scroll-margin-top: 90px; }
.tile img { width: 100%; background: var(--paper-2); border-radius: var(--radius); transition: opacity .3s; }
.tile:hover img { opacity: .9; }
.tile figcaption { display: grid; margin-top: 12px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.tile strong { font-family: var(--serif); font-weight: 700; font-size: 19px; line-height: 1.2; color: var(--ink); }
/* Only projects with more images to step through get the underline */
.tile.multi figcaption { cursor: pointer; }
.tile.multi:hover strong { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
.t-credit { color: var(--ink); }
.t-more { margin-top: 4px; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius); }
.zoom:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
/* A project with more images reads as a small stack of prints */
.tile.multi .zoom { position: relative; isolation: isolate; }
.tile.multi .zoom::before, .tile.multi .zoom::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: var(--radius);
  background: var(--paper); box-shadow: 0 0 0 1px var(--rule); transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.tile.multi .zoom::before { transform: translate(5px, -5px); }
.tile.multi .zoom::after { transform: translate(10px, -10px); z-index: -2; }
.tile.multi:hover .zoom::before { transform: translate(7px, -7px); }
.tile.multi:hover .zoom::after { transform: translate(14px, -14px); }
.stack-count {
  position: absolute; right: 10px; bottom: 10px; padding: 5px 9px; border-radius: 999px;
  background: rgba(22, 21, 20, .72); color: var(--paper); font-size: 11px; font-weight: 600; letter-spacing: .08em;
  font-variant-numeric: tabular-nums; opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s;
}
.tile.multi:hover .stack-count, .tile.multi .zoom:focus-visible .stack-count { opacity: 1; transform: none; }
@media (hover: none) { .stack-count { opacity: 1; transform: none; } }

/* Motion: one section per film, every clip running */
.films { padding-inline: var(--gutter); }
.film { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(0, 4fr); gap: clamp(24px, 3vw, 48px); padding-block: clamp(32px, 4vw, 56px); border-top: 1px solid var(--rule); scroll-margin-top: 80px; }
.film:first-child { border-top: 0; padding-top: 0; }
.film-meta { position: sticky; top: 96px; align-self: start; }
.film-meta h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(28px, 2.8vw, 42px); line-height: 1.05; }
.film-meta p { margin: 6px 0 0; color: var(--muted); }
.film-no, .film-count { font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.film-no { margin: 0 0 14px !important; }
.film-count { margin-top: 18px !important; }
.rows { --row-h: clamp(300px, 28vw, 460px); min-width: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.rows::after { content: ""; flex: 999 1 0; }
.rows figure { flex: var(--r) 1 calc(var(--r) * var(--row-h)); min-width: 0; margin: 0; }
.rows .zoom { position: relative; }
.rows .zoom::after { content: ""; position: absolute; left: 14px; bottom: 14px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0,0,0,.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 7l9 5-9 5z' fill='white'/%3E%3C/svg%3E") center / 20px no-repeat;
  transition: opacity .25s; pointer-events: none; }
.rows .zoom.playing::after { opacity: 0; }
.rows video { display: block; width: 100%; height: auto; background: var(--ink); border-radius: var(--radius); }
.rows figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }

.lightbox {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  grid-template-columns: 64px 1fr 64px; background: rgba(22, 21, 20, .96); color: var(--paper);
  padding: 64px 16px 56px;
}
.lb-stage { grid-column: 2; grid-row: 1; display: grid; place-items: center; width: 100%; height: 100%; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: calc(100svh - 128px); object-fit: contain; border-radius: 4px; }
.lightbox button { background: none; border: 0; color: inherit; cursor: pointer; font: 500 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.lb-prev, .lb-next { font-size: 28px !important; height: 100%; width: 100%; grid-row: 1; }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }
.lb-close { position: absolute; top: 20px; right: 24px; padding: 8px; }
.lb-caption { position: absolute; top: 24px; left: 24px; right: 120px; margin: 0; font-size: 13px; color: rgba(244,241,236,.8); }
.lb-count { position: absolute; bottom: 18px; left: 0; right: 0; margin: 0; text-align: center; font-size: 12px; letter-spacing: .14em; color: rgba(244,241,236,.6); font-variant-numeric: tabular-nums; }

.site-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--rule);
  font-size: 12px; letter-spacing: .06em; color: var(--muted);
}
.site-footer a { text-decoration: none; }

/* Responsive */
@media (max-width: 900px) {
  .intro, .about-grid, .discipline, .ph-index { grid-template-columns: 1fr; }
  .ph-panel { display: none; }
  .portfolios { flex-direction: column; height: auto; }
  .portfolio, .portfolios:hover .portfolio, .portfolios .portfolio:hover { flex: none; height: 62vw; min-height: 300px; }
  .pf-go { opacity: 1; margin-bottom: 0; }
  .wall { --row-h: 400px; }
  .film { grid-template-columns: 1fr; }
  .film-meta { position: static; }
  .rows { --row-h: 260px; }
  .contact { grid-template-columns: 1fr; }
}
/* Compact menu once the full nav no longer fits */
@media (max-width: 1080px) {
  .menu-toggle { display: block; }
  .wordmark, .menu-toggle { position: relative; z-index: 1; }
  .nav {
    position: absolute; inset: 0; height: 100svh;
    flex-direction: column; justify-content: center; align-items: flex-start; gap: 28px; padding: var(--gutter);
    background: var(--paper);
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  }
  .nav a { font-family: var(--serif); font-size: 40px; font-weight: 400; letter-spacing: 0; text-transform: none; }
  .nav a.cta { margin-top: 12px; padding: 16px 24px; font-size: 13px; }
  .nav-open { overflow: hidden; }
  .nav-open .nav { opacity: 1; visibility: visible; }
  .nav-open .site-header { backdrop-filter: none; border-color: transparent; }
}
/* Same compact menu whenever the full nav doesn't fit at the visitor's text size (set by main.js) */
html.nav-compact .menu-toggle { display: block; }
html.nav-compact .wordmark, html.nav-compact .menu-toggle { position: relative; z-index: 1; }
html.nav-compact .nav {
  position: absolute; inset: 0; height: 100svh;
  flex-direction: column; justify-content: center; align-items: flex-start; gap: 28px; padding: var(--gutter);
  background: var(--paper);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
html.nav-compact .nav a { font-family: var(--serif); font-size: 40px; font-weight: 400; letter-spacing: 0; text-transform: none; }
html.nav-compact .nav a.cta { margin-top: 12px; padding: 16px 24px; font-size: 13px; }
html.nav-compact .nav-open { overflow: hidden; }
html.nav-compact .nav-open .nav { opacity: 1; visibility: visible; }
html.nav-compact .nav-open .site-header { backdrop-filter: none; border-color: transparent; }
@media (max-width: 720px) {
  .wordmark { font-size: 32px; }
}
@media (max-width: 480px) {
  .wall { --row-h: 400px; gap: 28px 10px; }
  .tile strong { font-size: 16px; }
  .rows { --row-h: 190px; }
  .logo-wall { grid-template-columns: repeat(2, 1fr); }
  .ph-names { columns: 1; }
  .lightbox { grid-template-columns: 40px 1fr 40px; padding-inline: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* Accessibility menu (Sienna): a small button at the bottom right, menu opens on the right.
   Sienna sizes itself through its own variables, so they are set here. */
body .asw-menu-btn {
  --asw-btn-size: 32px !important; --asw-icon-size: 18px !important;
  --asw-btn-size-mobile: 32px !important; --asw-icon-size-mobile: 18px !important;
  --asw-left: auto !important; --asw-right: max(16px, env(safe-area-inset-right, 0px)) !important; --asw-bottom: 16px !important;
  left: auto !important; right: max(16px, env(safe-area-inset-right, 0px)) !important; bottom: 16px !important;
  width: 32px !important; height: 32px !important; min-width: 0 !important; min-height: 0 !important; padding: 0 !important;
  border-width: 2px !important;
}
body .asw-menu-btn svg { width: 18px !important; height: 18px !important; min-width: 0 !important; min-height: 0 !important; }
body .asw-menu { left: auto !important; right: 0 !important; }

/* Floating back-to-top arrow, stacked just above the accessibility button */
.to-top {
  position: fixed; z-index: 40; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(66px + env(safe-area-inset-bottom, 0px));
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--ink); color: var(--paper); font-size: 15px; text-decoration: none; box-shadow: 0 0 0 1px rgba(244,241,236,.4);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .3s, transform .3s, visibility .3s, background-color .2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: #3a3733; }
.to-top:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* A one-image project has nothing to step through */
.lightbox.single .lb-prev, .lightbox.single .lb-next { display: none; }
