/* ==========================================================================
   Outside the Frame — styles
   Colors, type and spacing live in :root so they are easy to adjust.
   ========================================================================== */

:root {
  --paper: #f5f3ee;        /* bone white — cool, quiet paper */
  --paper-2: #ebe8e1;      /* image backing, subtle panels */
  --ink: #111111;          /* ink black */
  --ink-2: #5d5b57;        /* secondary text, 6.3:1 on paper */
  --rule: #d9d5cd;         /* hairlines */
  --accent: #7b1e22;       /* oxblood — used sparingly, like book-cloth */
  --night: #141414;        /* book band */
  --night-ink: #f5f3ee;
  --night-2: #a9a59d;
  --void: #0f0f0f;         /* lightbox / reader */

  /* Bodoni + Futura-style geometric sans: the classic editorial pairing */
  --serif: "Bodoni Moda", "Didot", "Bodoni 72", "Iowan Old Style", Georgia, serif;
  --sans: "Jost", "Futura", "Century Gothic", "Helvetica Neue", Arial, sans-serif;

  --gutter: max(clamp(16px, 4vw, 56px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --col-gap: clamp(12px, 2vw, 28px);
  --section: clamp(96px, 12vw, 176px);
  --mark: 10px;            /* crop-mark length */
  --mark-gap: 9px;         /* crop-mark distance outside the image */

  --ease: cubic-bezier(.2, .6, .2, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--mh, 64px) + 12px); scroll-padding-bottom: 12px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-transform: inherit; letter-spacing: inherit; text-shadow: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.lightbox :focus-visible, .reader :focus-visible { outline-color: var(--paper); }

.skip {
  position: absolute; left: var(--gutter); top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 8px 14px;
}
.skip:focus { top: 12px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------------------------------------------------------------- type */
.micro {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.accent { color: var(--accent); }
.numeral { font-family: var(--serif); font-style: italic; color: var(--accent); letter-spacing: 0; text-transform: none; }
.muted { color: var(--ink-2); }
.count { font-variant-numeric: tabular-nums; color: var(--ink-2); }
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(60px, 13.2vw, 216px);
  line-height: .9;
  letter-spacing: -.035em;
}
.title-l {
  font-family: var(--serif);
  font-size: clamp(40px, 5.6vw, 88px);
  line-height: .98;
  letter-spacing: -.03em;
}
.title-m {
  font-family: var(--serif);
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1.05;
  letter-spacing: -.015em;
}
.lede {
  font-family: var(--serif);
  font-size: clamp(19px, 1.6vw, 23px);
  line-height: 1.42;
  letter-spacing: -.005em;
}
.prose p + p { margin-top: 1em; }
.prose { max-width: 36em; }
em, .it { font-style: italic; }

.link {
  display: inline-flex; align-items: baseline; gap: .6em;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 3px;
  transition: gap .35s var(--ease), opacity .2s;
}
@media (hover: hover) { .link:hover { gap: 1.1em; color: var(--accent); } }
.link .arrow { font-family: var(--sans); }

/* -------------------------------------------------------------- notice */
.notice {
  position: fixed; left: max(12px, env(safe-area-inset-left, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 45;
  display: flex; align-items: center; gap: 12px;
  max-width: min(460px, calc(100vw - 24px));
  padding: 9px 10px 9px 14px;
  background: var(--ink); color: var(--paper);
  font-size: 10px;
}
.notice[hidden] { display: none; }
.notice button { color: var(--paper); padding: 2px 6px; font-size: 14px; line-height: 1; opacity: .7; }
@media (hover: hover) { .notice button:hover { opacity: 1; } }

/* ------------------------------------------------------------- header */
/* Fixed, frosted masthead. Transparent with light type while over the opening photograph;
   slides away when scrolling down and returns when scrolling up. */
.masthead {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 16px 32px;
  padding: 10px var(--gutter);
  color: var(--ink);
  background: rgba(245, 243, 238, .86);                       /* (browsers without color-mix) */
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--rule);
  transition: transform .5s var(--ease), background-color .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease);
  view-transition-name: masthead;
}
.masthead.is-hidden { transform: translateY(-101%); }
/* over the carousel: clear with light type over the full-screen photograph; a dark bar where the carousel's controls (or
   a photograph that does not fill the screen) pass under it */
.masthead.is-over {
  background: transparent; color: #fff; border-color: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none; text-shadow: 0 0 2px rgba(0, 0, 0, .45), 0 1px 10px rgba(0, 0, 0, .5);
}
/* its own shade, moving with it, so the light type reads over any sky */
.masthead.is-over:not(.is-solid)::before {
  content: ""; position: absolute; inset: 0 0 -140px; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, .4) 30%, rgba(0, 0, 0, .16) 65%, rgba(0, 0, 0, 0));
}
.masthead.is-over.is-solid {
  background: rgba(15, 15, 15, .96);
  background: color-mix(in srgb, var(--void) 96%, transparent); text-shadow: none;
  -webkit-backdrop-filter: saturate(1.2) blur(14px); backdrop-filter: saturate(1.2) blur(14px);
}
.masthead.is-over .byline, .masthead.is-over .nav a[aria-current="page"] { color: #fff; }
/* over the 3D book: transparent, dark type */
.masthead.is-clear {
  background: transparent; border-color: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.masthead.is-clear, .masthead.is-clear .byline, .masthead.is-clear .nav a[aria-current="page"] { color: var(--paper); }
.masthead.is-clear { text-shadow: 0 1px 12px rgba(0, 0, 0, .4); }
.masthead.is-clear :focus-visible { outline-color: var(--paper); }
.masthead.is-over :focus-visible { outline-color: #fff; }
main { padding-top: var(--mh, 72px); }
body.is-home main { padding-top: 0; }
.masthead .byline { justify-self: start; color: var(--ink-2); display: flex; gap: 10px; transition: color .5s; }
.masthead .byline time { font-variant-numeric: tabular-nums; }
.masthead nav { justify-self: end; }
.wordmark {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
  letter-spacing: -.01em;
  text-align: center;
}
.wordmark .it { font-style: italic; }
.nav { display: flex; gap: clamp(18px, 2.6vw, 40px); }
.nav a {
  font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; white-space: nowrap;
}
.nav a::after {
  content: ""; position: absolute; left: 2px; right: 2px; bottom: 11px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--accent); }

/* --------------------------------------------------------------- page */
main { display: block; min-height: 100vh; min-height: 100svh; outline: none; }   /* the footer never flashes into view before a page renders */
.page { padding: 0 var(--gutter); }
.page-enter { animation: fade .6s var(--ease) both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  border-top: 1px solid var(--ink);
  padding-top: 14px;
  margin-bottom: clamp(40px, 6vw, 88px);
}

/* ---------------------------------------------- photograph + crop marks */
.photo { position: relative; }
.photo .frame {
  position: relative;
  background: var(--paper-2);
}
/* Crop marks sit just outside each corner of the image — outside the frame. */
.photo .frame::before {
  content: "";
  position: absolute;
  inset: calc(-1 * (var(--mark-gap) + var(--mark)));
  pointer-events: none;
  opacity: .55;
  --c: var(--ink);
  background:
    linear-gradient(var(--c), var(--c)) left  calc(var(--mark) + var(--mark-gap)) top    0 / 1px var(--mark) no-repeat,
    linear-gradient(var(--c), var(--c)) left  0 top    calc(var(--mark) + var(--mark-gap)) / var(--mark) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) right calc(var(--mark) + var(--mark-gap)) top    0 / 1px var(--mark) no-repeat,
    linear-gradient(var(--c), var(--c)) right 0 top    calc(var(--mark) + var(--mark-gap)) / var(--mark) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) left  calc(var(--mark) + var(--mark-gap)) bottom 0 / 1px var(--mark) no-repeat,
    linear-gradient(var(--c), var(--c)) left  0 bottom calc(var(--mark) + var(--mark-gap)) / var(--mark) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) right calc(var(--mark) + var(--mark-gap)) bottom 0 / 1px var(--mark) no-repeat,
    linear-gradient(var(--c), var(--c)) right 0 bottom calc(var(--mark) + var(--mark-gap)) / var(--mark) 1px no-repeat;
  transition: opacity .4s var(--ease), inset .4s var(--ease);
}
.photo.no-marks .frame::before { display: none; }
.photo:not(.no-marks) figcaption { margin-top: calc(var(--mark-gap) + var(--mark) + 9px); }
.photo img {
  width: 100%;
  height: auto;          /* never cropped — natural ratio */
  transition: opacity .6s var(--ease);
}
.photo .frame { overflow: visible; }
.photo img.loading { opacity: 0; }
button.photo-open { display: block; width: 100%; cursor: zoom-in; text-align: left; }


.missing {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--ink-2);
  border: 1px solid var(--rule);
  background: var(--paper-2);
}

.photo figcaption,
.cap {
  margin-top: 14px;
  display: flex; gap: 14px; flex-wrap: wrap; align-items: baseline;
  color: var(--ink-2);
}
.cap .plate { font-family: var(--serif); font-style: italic; font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--accent); font-variant-numeric: lining-nums tabular-nums; }
.cap .it { font-family: var(--serif); font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink); }

/* =============================================================== HOME */
/* The carousel after the book: one photograph at a time on a dark wall, always whole (never cropped),
   the caption and controls below the picture, never over it. */
.stage {
  position: relative; height: 100vh; height: 100svh; min-height: 520px;
  margin: 0 calc(-1 * var(--gutter));
  padding: calc(var(--mh, 72px) + clamp(10px, 2vw, 28px)) var(--gutter) 0;
  display: grid; grid-template-rows: minmax(0, 1fr) auto;
  background: var(--void); color: #fff;
  outline: none;
}
.stage-media { position: relative; min-height: 0; touch-action: pan-y; }
.stage-slide { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity .7s var(--ease), visibility 0s linear .7s; }
.stage-slide.is-active { opacity: 1; visibility: visible; transition: opacity .7s var(--ease), visibility 0s; }
.stage-slide img { width: 100%; height: 100%; object-fit: contain; }   /* the whole photograph (see the full-screen layout below) */
.stage-ctrl {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  margin-top: clamp(12px, 1.6vw, 22px); padding: 12px 0 clamp(14px, 2vw, 26px);
  border-top: 1px solid rgba(255,255,255,.18);
}
.stage-cap { color: rgba(255,255,255,.82); min-height: 1.4em; }
.stage-nav { display: flex; align-items: center; gap: 4px 14px; }
.stage-nav button { color: #fff; opacity: .85; min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; }
@media (hover: hover) { .stage-nav button:hover { opacity: 1; } }
.stage-nav .stage-pause { min-width: 64px; }
.stage.no-autoplay .stage-pause, .stage.no-autoplay .stage-bar { display: none; }
.stage :focus-visible { outline-color: #fff; }
.stage-count { font-variant-numeric: tabular-nums; }
.stage-bar { position: relative; width: clamp(60px, 9vw, 140px); height: 1px; background: rgba(255,255,255,.3); overflow: hidden; }
.stage-bar i { position: absolute; inset: 0; background: #fff; transform-origin: left; transform: scaleX(0); }
.stage-bar i.run { animation: bar var(--dur, 7s) linear forwards; }
.stage.is-paused .stage-bar i { animation-play-state: paused; }
@keyframes bar { to { transform: scaleX(1); } }
/* short screens (phones held sideways): the carousel never grows taller than the screen */
@media (max-height: 560px) { .stage { min-height: 0; padding-top: calc(var(--mh, 60px) + 6px); } .stage-ctrl { margin-top: 8px; padding: 6px 0 8px; } }
/* phones held upright: the picture keeps its own shape at full width instead of floating in a tall black screen */
@media (max-aspect-ratio: 4/5) {
  .stage { height: auto; min-height: 0; padding-top: calc(var(--mh, 60px) + 10px); }
  .stage-media { aspect-ratio: 3 / 2; }
  .stage-ctrl { flex-direction: column; align-items: stretch; }
  .stage-nav { justify-content: space-between; }
  .stage-bar { flex: 1; }
  .stage { padding-left: 0; padding-right: 0; }                          /* the photograph edge to edge */
  .stage-ctrl { margin-left: var(--gutter); margin-right: var(--gutter); }
}

/* Photographs from the book: whole, in justified rows; one per row on phones. */
.from-book { padding-top: var(--section); }
.fb-intro { max-width: 30em; margin: 0 0 clamp(40px, 6vw, 88px); }
.fb-spreads { display: grid; row-gap: clamp(56px, 9vw, 140px); }
.fb-row { column-gap: clamp(14px, 2vw, 32px); row-gap: 40px; }
.fb-row .photo-open { cursor: zoom-in; }
@media (max-width: 699px) { .fb-spreads { row-gap: 48px; } }
.fb-more {
  display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap;
  margin-top: clamp(56px, 7vw, 110px); padding-top: 22px; border-top: 1px solid var(--ink);
}
.fb-more .title-m { font-style: italic; }

/* The book and how to buy it: the three views of the book beside the details and the button. */
.buy { padding: var(--section) 0; }
.book-page .buy { padding-top: clamp(24px, 4.5vw, 64px); }
.buy-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 88px); align-items: center; }
.shots { min-width: 0; outline: none; }
.shots-track { position: relative; aspect-ratio: 16 / 9; background: var(--paper-2); overflow: hidden; touch-action: pan-y; }
@media (max-aspect-ratio: 4/5) and (max-width: 699px) { .shots-track { aspect-ratio: 4 / 5; } }
.shot picture { display: contents; }
.shot { position: absolute; inset: 0; margin: 0; opacity: 0; visibility: hidden; transition: opacity .7s var(--ease), visibility 0s linear .7s; }
.shot.is-active { opacity: 1; visibility: visible; transition: opacity .7s var(--ease), visibility 0s; }
.shot img { width: 100%; height: 100%; object-fit: contain; }
.shots-ctrl { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.shots-ctrl > button { min-width: 44px; min-height: 44px; font-size: 15px; }
@media (hover: hover) { .shots-ctrl > button:hover { color: var(--accent); } }
.shots-dots { display: flex; gap: 8px; margin-left: auto; margin-right: 8px; }
.shots-count { font-variant-numeric: tabular-nums; color: var(--ink-2); margin-left: 8px; white-space: nowrap; }
.sold-out { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--accent); }
.dot { width: 80px; height: 45px; position: relative; padding: 0; background: var(--paper-2); opacity: .55; transition: opacity .25s; }
.dot img { width: 100%; height: 100%; object-fit: contain; }
.dot::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 2px; background: transparent; transition: background .25s; }
.dot.is-on { opacity: 1; }
.dot.is-on::after { background: var(--ink); }
.dot:focus-visible { opacity: 1; }
@media (hover: hover) { .dot:hover { opacity: 1; } }
@media (max-width: 699px) { .shots-dots { display: none; } .shots-count { margin: 0 auto; } }
.buy-box { display: grid; gap: 22px; align-content: center; min-width: 0; }
.buy-title { font-family: var(--serif); font-size: clamp(34px, 3.2vw, 52px); line-height: 1; letter-spacing: -.02em; margin-top: -4px; }
.buy-sub { margin-top: -8px; }
.buy-box .lede { max-width: 28em; }
.buy-places { display: grid; gap: 8px; font-family: var(--serif); font-size: 17px; line-height: 1.45; border-top: 1px solid var(--rule); padding-top: 16px; margin-top: 6px; }
.buy-specs { display: grid; grid-template-columns: 96px 1fr; gap: 6px 12px; align-items: baseline; }
.buy-specs dd { font-size: 15px; }
.buy-action { display: flex; align-items: center; gap: 14px 24px; flex-wrap: wrap; margin-top: 6px; }
.price { font-family: var(--serif); font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.buy .btn-buy { padding: 0 28px; min-height: 52px; min-width: 260px; justify-content: center; font-size: 13px; font-weight: 500; letter-spacing: .12em; background: var(--accent); color: var(--paper); }
@media (hover: hover) { .buy a.btn-buy:hover { background: var(--ink); } }
.buy .btn-buy:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.buy .btn-buy.is-inactive, .buy .btn-buy.is-inactive:hover { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); cursor: default; gap: .8em; }
.fb-more .link { font-size: 12px; min-height: 44px; align-items: center; }
.btn:focus-visible { outline-offset: 3px; }
.buy-note { max-width: 32em; font-size: 13px; line-height: 1.55; color: var(--ink-2); }
@media (max-width: 899px) {
  .buy-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .buy-box { max-width: 560px; }
  .buy .btn-buy { width: 100%; min-width: 0; }
}

/* ---------------------------------------------------------- 3D BOOK INTRO
   A tall section; its inner frame stays pinned while scrolling plays the book. */
.book3d {
  --bg: #b3aea7;
  position: relative;
  height: calc(var(--len, 5.5) * 100vh);
  height: calc(var(--len, 5.5) * 100svh);
  margin: 0 calc(-1 * var(--gutter));
  background: var(--bg);
  color: var(--ink);
}
.book3d-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--bg); background: linear-gradient(var(--bgt, var(--bg)), var(--bg)); contain: layout paint; }
.book3d.is-static .book3d-pin { background: var(--bg); }
.book3d-canvas, .book3d-poster, .book3d-poster img {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block;
}
.book3d-poster img { object-fit: cover; object-position: 50% 0; }   /* top-anchored, like the canvas */
@media (max-aspect-ratio: 9/10) { .book3d-poster img { object-fit: contain; object-position: 50% 50%; } }
.book3d-canvas { visibility: hidden; object-fit: contain; }   /* a buffer of the old size (mid-resize) is never distorted */
/* The book lies on a dark walnut table: everything written over it is paper-white, with a soft shadow so it
   stays legible over the lighter wood too. */
.book3d { color: var(--paper); }
/* (no shade is laid over the render itself: the text carries its own soft shadow) */
.book3d-intro, .book3d-captions, .book3d-hud, .book3d-hint { color: var(--paper); text-shadow: 0 1px 14px rgba(0, 0, 0, .5), 0 0 3px rgba(0, 0, 0, .55), 0 1px 1px rgba(0, 0, 0, .4); }
.book3d-captions, .book3d-hud, .book3d-hint { z-index: 1; }
.book3d.is-live .book3d-canvas { visibility: visible; }
.book3d.is-live .book3d-poster { visibility: hidden; }
.book3d-intro {
  position: absolute; left: var(--gutter); right: var(--gutter); top: calc(var(--mh, 72px) + clamp(16px, 4vh, 48px));
  opacity: var(--intro, 1);
  transform: translateY(calc((1 - var(--intro, 1)) * -24px));
  pointer-events: none;
}
/* one line, above the closed book, so the stamped title on the cover stays clear */
.book3d-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 6.4vw, 118px); line-height: .95; letter-spacing: -.035em;
  white-space: nowrap;
}
.book3d-title .ln { display: inline; }
.book3d-sub { margin-top: 18px; color: inherit; }
.book3d-captions .numeral { color: inherit; }
.book3d-captions {
  position: absolute; left: var(--gutter); bottom: calc(clamp(22px, 4vh, 44px) + env(safe-area-inset-bottom, 0px));
  max-width: 60ch;
}
.book3d-captions li {
  position: absolute; left: 0; bottom: 0; white-space: nowrap;
  font-family: var(--serif); font-size: clamp(17px, 1.5vw, 22px);
  opacity: 0; transform: translateY(8px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.book3d-captions li.on { opacity: 1; transform: none; }
.book3d-hud {
  position: absolute; right: var(--gutter); bottom: calc(clamp(22px, 4vh, 44px) + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 16px;
}
.book3d-count { min-width: 5ch; text-align: right; font-variant-numeric: tabular-nums; }
.book3d-line { position: relative; width: clamp(60px, 10vw, 160px); height: 1px; background: rgba(245,243,238,.35); overflow: hidden; }
.book3d-line i { position: absolute; inset: 0; background: currentColor; transform-origin: left; transform: scaleX(var(--p, 0)); }
.book3d-skip { min-height: 44px; min-width: 44px; padding: 0 4px; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
@media (hover: hover) { .book3d-skip:hover { opacity: .75; } }
.book3d-hint {
  position: absolute; left: 50%; bottom: calc(clamp(22px, 4vh, 44px) + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  opacity: calc(1 - var(--p, 0) * 30);
}
@media (orientation: landscape) and (max-height: 500px) {
  .book3d:not(.is-static) .book3d-intro { width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 700px) and (orientation: portrait) {
  .book3d-captions { bottom: calc(clamp(22px, 4vh, 44px) + 34px + env(safe-area-inset-bottom, 0px)); }
}
/* reduced motion or frames unavailable: a still of the open book, normal height */
.book3d.is-static { height: auto; }
.book3d.is-static .book3d-pin {
  position: relative; display: flex; flex-direction: column; height: auto; min-height: 0;
  padding-top: calc(var(--mh, 72px) + clamp(16px, 4vh, 48px));
}
.book3d.is-static .book3d-intro { order: -1; position: relative; top: auto; left: auto; right: auto; padding: 0 var(--gutter) clamp(12px, 3vh, 32px); }
.book3d.is-static .book3d-poster, .book3d.is-static .book3d-poster img {
  position: relative; inset: auto; width: 100%; height: auto; max-height: calc(100svh - var(--mh, 72px)); object-fit: contain;
}
.book3d.is-static .book3d-hud { position: relative; right: auto; bottom: auto; justify-content: flex-end; padding: 12px var(--gutter); }
.book3d.is-static .book3d-canvas, .book3d.is-static .book3d-hint, .book3d.is-static .book3d-line, .book3d.is-static .book3d-count { display: none; }
.book3d.is-static .book3d-poster { visibility: visible; }
.book3d.is-static .book3d-captions { display: none; }
html.motion .book3d-intro .ln { transform: translateY(30px); opacity: 0; transition: transform 1.2s cubic-bezier(.16, 1, .3, 1), opacity 1s; }
html.motion .book3d-intro .ln.b { transition-delay: .1s; }
html.motion .book3d.is-ready .book3d-intro .ln { transform: none; opacity: 1; }

/* entrance: title lines rise from behind a mask */

/* Selected works — an asymmetric, rhythmic sequence */

/* ============================================================== FOOTER */
.page:last-child { padding-bottom: var(--section); }
.page > .buy:last-child { padding-bottom: 0; }
.colophon {
  margin-top: 0;
  padding: 48px var(--gutter) 40px;
  border-top: 1px solid var(--rule);
  overflow: hidden;
}
.colophon .grid { row-gap: 24px; align-items: baseline; }
.colophon .name { grid-column: 1 / span 4; font-family: var(--serif); font-size: 20px; line-height: 1.1; }
.colophon .where { grid-column: 5 / span 3; }
.colophon .links { grid-column: 8 / span 3; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.colophon .year { grid-column: 11 / span 2; text-align: right; }
@media (hover: hover) { .colophon a:hover, .contact-list a:hover { color: var(--ink-2); } }

/* =============================================================== WORK */
.page-head { padding-top: clamp(32px, 6vw, 88px); margin-bottom: clamp(48px, 7vw, 110px); }
.page-head .grid { align-items: end; row-gap: 24px; }
.page-head h1, .page-head .head-main { grid-column: 1 / span 8; }
.page-head .head-main h1 { grid-column: auto; }
.page-head .aside { grid-column: 9 / -1; }
.work-count { margin-top: 14px; }

.filters { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.filters button { min-height: 44px; padding: 0 2px; color: var(--ink-2); transition: color .2s; }
@media (hover: hover) { .filters button:hover { color: var(--ink); } }
.filters button[aria-pressed="true"] { color: var(--accent); }
.filters button[aria-pressed="true"]::before { content: "— "; }

/* Contents — like the table of contents of a book */
/* A chapter per series: photographs in justified rows (never cropped) */
.chapter { margin-bottom: 0; }
.chapter:not([hidden]) ~ .chapter:not([hidden]) { margin-top: var(--section); }   /* one gap between chapters, whatever the filter */
.chapter[hidden] { display: none; }
.chapter-head {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap);
  align-items: baseline; row-gap: 12px;
  border-top: 1px solid var(--ink); padding-top: 14px; margin-bottom: clamp(28px, 4vw, 48px);
}
.chapter-head .numeral { grid-column: 1 / span 1; font-size: 20px; }
.chapter-head h2 { grid-column: 2 / span 6; }
@media (hover: hover) { .chapter-head h2 a:hover { font-style: italic; color: var(--accent); } }
.chapter-head .facts { grid-column: 8 / -1; text-align: right; color: var(--ink-2); line-height: 1.9; }
.justified { display: flex; flex-wrap: wrap; gap: var(--col-gap); }
.justified .photo { flex: 0 0 calc(25% - var(--col-gap)); min-width: 0; } /* widths are set by justify() in app.js */
.chapter-foot { display: flex; justify-content: flex-end; margin-top: clamp(24px, 3vw, 36px); }
.empty-filter { padding: 64px 0; border-top: 1px solid var(--rule); color: var(--ink-2); }

/* ------------------------------------------------------ series page */
.series-head .grid { row-gap: 28px; align-items: end; }
.series-head .back { grid-column: 1 / -1; }
.series-head h1 { grid-column: 1 / span 8; }
.series-head .facts { grid-column: 9 / -1; text-align: right; line-height: 1.9; }
.series-intro { margin-bottom: clamp(72px, 10vw, 150px); }
.series-intro .prose { grid-column: 5 / span 6; }

/* Every photograph fits within the screen height, so it can be seen whole. */

.series-nav {
  margin-top: var(--section);
  border-top: 1px solid var(--ink);
  padding-top: 14px;
  display: flex; justify-content: space-between; gap: 24px;
}
.series-nav a .title-m { display: block; margin-top: 10px; }
@media (hover: hover) { .series-nav a:hover .title-m { font-style: italic; color: var(--accent); } }
.series-nav .next { text-align: right; margin-left: auto; }

/* ============================================================== BOOK */
.btn {
  display: inline-flex; align-items: center; gap: .8em;
  background: var(--ink); color: var(--paper);
  padding: 15px 22px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  transition: background .25s, gap .35s var(--ease);
}
@media (hover: hover) { .btn:hover { background: var(--accent); gap: 1.2em; } }

.spread-pages { display: grid; grid-template-columns: 1fr 1fr; background: var(--paper-2); }
.spread-pages img { width: 100%; height: auto; }
.spread-pages img + img { box-shadow: inset 1px 0 0 rgba(0,0,0,.06); }


/* ============================================================= ABOUT */
.about { padding-top: clamp(32px, 6vw, 88px); }
.about .grid { row-gap: 48px; align-items: start; }
.about .portrait { grid-column: 1 / span 5; }
.about .text { grid-column: 7 / -1; display: grid; gap: 40px; }
.about .lede { font-size: clamp(30px, 3.4vw, 50px); line-height: 1.06; }
.about.no-portrait .text { grid-column: 1 / span 9; }
.about.no-portrait { min-height: 60vh; }
.about-links { display: flex; flex-wrap: wrap; gap: 14px 28px; }
.notes li { display: grid; grid-template-columns: 5.5em 1fr; gap: 16px; border-top: 1px solid var(--rule); padding: 10px 0; }

/* =========================================================== CONTACT */
.contact { padding-top: clamp(32px, 6vw, 88px); }
.contact .grid { row-gap: 48px; }
.contact h1 { grid-column: 1 / span 9; }
.contact-list { grid-column: 1 / -1; margin-top: clamp(24px, 5vw, 72px); }
.contact-list li { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--col-gap); border-top: 1px solid var(--rule); padding: 18px 0 22px; align-items: baseline; }
.contact-list .k { grid-column: 1 / span 3; color: var(--ink-2); }
.contact-list .v { grid-column: 4 / -1; font-family: var(--serif); font-size: clamp(28px, 4.4vw, 68px); line-height: 1.02; overflow-wrap: anywhere; }
.contact-list .v a { transition: color .2s; }
@media (hover: hover) { .contact-list .v a:hover { font-style: italic; color: var(--accent); } }

/* ========================================================== LIGHTBOX */
.lightbox, .reader {
  position: fixed; inset: 0; z-index: 50;
  background: var(--void); color: var(--paper);
  display: flex; flex-direction: column;
}
.lightbox[hidden], .reader[hidden] { display: none; }
.lb-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px var(--gutter);
}
.lb-bar button, .lb-bar a { min-height: 44px; padding: 0 4px; display: inline-flex; align-items: center; color: var(--paper); }
@media (hover: hover) { .lb-bar button:hover, .lb-bar a:hover { opacity: .7; } }
.reader-actions { display: flex; gap: 24px; align-items: center; }
.reader-title { font-family: var(--serif); font-size: 16px; letter-spacing: 0; text-transform: none; margin-right: 12px; }
.lb-stage, .reader-stage {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center;
  padding: 0 calc(var(--gutter) - 16px) 24px;
  touch-action: pan-y pinch-zoom;
}
.lb-figure { min-height: 0; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lb-figure img {
  max-width: 100%;
  max-height: calc(100% - 44px);
  width: auto; height: auto;
  object-fit: contain;
  transition: opacity .3s var(--ease);
}
.lb-caption { margin-top: 16px; color: rgba(245,243,238,.78); text-align: center; min-height: 1.4em; }
.lb-caption .it { color: var(--paper); }
.lb-arrow {
  width: 56px; height: 56px; display: grid; place-items: center;
  font-size: 22px; color: var(--paper); opacity: .75;
  transition: opacity .2s, transform .3s var(--ease);
}
@media (hover: hover) {
  .lb-arrow:hover { opacity: 1; }
  .lb-prev:hover { transform: translateX(-3px); }
  .lb-next:hover { transform: translateX(3px); }
}
.lb-arrow:disabled { opacity: .18; cursor: default; transform: none; }

/* Reader */
.spread {
  height: 100%; min-height: 0; min-width: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.spread .pages {
  display: flex;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  aspect-ratio: var(--spread-ratio);
  background: var(--paper);
}
.spread .pg { flex: 1 1 0; position: relative; min-width: 0; background: var(--paper); }
.spread .pg img { width: 100%; height: 100%; object-fit: contain; }
.spread .pg.blank { background: transparent; }
.spread .pg + .pg { box-shadow: inset 1px 0 0 rgba(0,0,0,.08); }
.reader-foot { padding: 0 var(--gutter) calc(22px + env(safe-area-inset-bottom, 0px)); }
.reader-foot input[type="range"] {
  width: 100%; max-width: 560px; display: block; margin: 0 auto;
  accent-color: var(--paper); background: transparent;
}

/* ======================================================== RESPONSIVE */
@media (max-width: 1000px) {
  .masthead .byline > :not(:first-child) { display: none; }   /* tablets: the name only, so the menu never wraps */
  .nav { gap: clamp(14px, 2.2vw, 28px); }
  .chapter-head h2 { grid-column: 2 / -1; }
  .chapter-head .facts { grid-column: 2 / -1; text-align: left; }
  .colophon .name { grid-column: 1 / -1; }
  .colophon .where, .colophon .links { grid-column: span 6; }
  .colophon .year { grid-column: 1 / -1; text-align: left; }
  .page-head h1, .page-head .head-main, .page-head .aside { grid-column: 1 / -1; }
  .series-head h1, .series-head .facts { grid-column: 1 / -1; }
  .series-head .facts { text-align: left; }
  .series-intro .prose { grid-column: 1 / span 10; }
  .about .portrait { grid-column: 1 / span 7; }
  .about .text { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  :root { --mark: 7px; --mark-gap: 6px; }
  .masthead { grid-template-columns: auto 1fr; gap: 8px; padding: 6px var(--gutter); }
  .wordmark { font-size: 17px; justify-self: start; white-space: nowrap; }
  .hide-s { display: none; }
  .contact h1 { grid-column: 1 / -1; }
  .masthead .byline { display: none; }
  .book3d-title { font-size: clamp(34px, 11vw, 60px); white-space: normal; }
  .book3d-hint { display: none; }
  .book3d-hud { gap: 12px; }
  .book3d-captions li { font-size: 16px; }
  .book3d-captions { right: var(--gutter); }
  .masthead nav { justify-self: end; }
  .nav { gap: 2px; }
  .nav a { font-size: 12px; letter-spacing: .08em; padding: 0 7px; }
  .nav a::after { left: 7px; right: 7px; }
  .colophon .name, .colophon .where, .colophon .links { grid-column: 1 / -1; }
  .colophon .year { grid-column: 1 / -1; text-align: left; }
  .justified { gap: 10px; }
  .chapter-head .numeral { grid-column: 1 / span 2; }
  .chapter-head h2, .chapter-head .facts { grid-column: 3 / -1; }
  .series-nav { flex-direction: column; }
  .about .portrait { grid-column: 1 / span 11; }
  .contact-list .k, .contact-list .v { grid-column: 1 / -1; }
  .contact-list .k { margin-bottom: 6px; }
  .lb-stage, .reader-stage { grid-template-columns: minmax(0, 1fr); padding: 0 12px 16px; }
  .lb-arrow { display: none; }
}
.reader-foot .mobile-nav { display: flex; justify-content: space-between; margin-top: 10px; }
@media (min-width: 701px) { .reader-foot .mobile-nav { display: none; } }
.reader-foot .mobile-nav button { min-height: 44px; padding: 0 4px; color: var(--paper); }

/* ================================================ MOTION & INTERACTION */
/* Photographs are always visible in full: as they enter the screen they only settle in with a short fade. */
html.motion .reveal .frame img { transition: opacity .6s var(--ease); }
html.motion .reveal figcaption { opacity: 0; transition: opacity .8s var(--ease); transition-delay: calc(var(--d, 0s) + .2s); }
html.motion .reveal.in figcaption { opacity: 1; }

/* Page changes crossfade; the header stays put. */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: cubic-bezier(.4, 0, .2, 1); }
::view-transition-group(photo) { animation-duration: .6s; animation-timing-function: cubic-bezier(.3, 0, .1, 1); }
html.vt .page-enter { animation: none; }

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

/* small refinements */
.colophon a[href^="mailto:"] { text-transform: none; letter-spacing: .04em; font-size: 13px; }

/* phones: the one-row header always fits (checked at 430, 390 and 360 px) */
@media (max-width: 430px) {
  .wordmark { font-size: 15px; }
  .nav a { font-size: 11px; letter-spacing: .04em; padding: 0 5px; }
  .nav a::after { left: 5px; right: 5px; }
}
@media (max-width: 374px) { .wordmark { font-size: 14px; } }
#lb-stage { touch-action: pan-y pinch-zoom; }
.buy-title:focus { outline: none; }
.nw { white-space: nowrap; }
.wordmark { display: inline-flex; align-items: center; gap: .42em; padding-block: max(0px, calc((44px - 1em) / 2)); }   /* a 44 px tap area; inline-block keeps the spaces between the words */
.link { position: relative; min-height: 44px; align-items: center; padding-bottom: 0; border-bottom: 0; }
.link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 10px; height: 1px; background: currentColor; }
.filters button { min-width: 44px; }
/* phones: each caption sits with its own photograph */
@media (max-width: 699px) { .fb-row { row-gap: 36px; } .fb-row .photo figcaption { margin-top: 8px; } }
/* the book views keep the phone shape on phones only (tablets keep 16:9, so the title stays in the first screen) */
/* phones held sideways: the buy section in two columns, the view never taller than the screen; compact carousel and viewer */
@media (orientation: landscape) and (max-height: 560px) {
  .buy-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 24px; align-items: start; }
  .shots-track { max-height: calc(100svh - var(--mh, 60px) - 72px); }
  .lb-bar { padding-top: 4px; padding-bottom: 4px; }
  .lb-caption { margin-top: 6px; }
  .lb-stage { padding-bottom: 6px; }
  .lightbox .reader-foot { padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px)); }
}
@media (orientation: landscape) and (max-height: 560px) and (pointer: coarse) {
  .stage { padding-top: 12px; }
  .masthead.is-over:not(:focus-within) { transform: translateY(-101%); }
}
/* tablets: the phone header (wordmark left, menu right) -- the centred wordmark has no room beside the menu here */
@media (max-width: 1000px) {
  .masthead { grid-template-columns: auto 1fr; }
  .masthead .byline { display: none; }
  .wordmark { justify-self: start; }
}
/* the smallest phones (320 px): the menu still fits */
@media (max-width: 359px) {
  .wordmark { font-size: 13px; }
  .nav a { padding: 0 3px; letter-spacing: .02em; }
  .nav a::after { left: 3px; right: 3px; }
}
/* lines of facts: a dot that would start a line becomes the line break */
.sep.is-break { display: block; height: 0; overflow: hidden; }
.lede, .title-l, .title-m, .buy-places { text-wrap: pretty; }
/* Work page: the filters sit flush right, like the chapter facts below them */
@media (min-width: 1001px) { .page-head .aside .filters { justify-content: flex-end; } }
/* captions under the narrower plates of a spread stay on one line where they can */
.fb-row .cap { column-gap: 10px; }
/* phones: the same scroll cue as on desktop, bottom left beside Skip (it fades out with the first scroll) */
@media (max-width: 700px) and (min-width: 360px) and (orientation: portrait) {
  .book3d-hint { display: block; left: var(--gutter); transform: none; white-space: nowrap; }
}
/* the scroll cue on the same line as Skip and the progress line */
.book3d-hint { line-height: 44px; }
/* the subtitle arrives with the title, not before it */
html.motion .book3d-sub { opacity: 0; transition: opacity 1s .25s; }
html.motion .book3d.is-ready .book3d-sub { opacity: 1; }
/* opening on the home page: the header is drawn clear over the book from the first frame (no fade from paper) */
html.b3-start .masthead { transition: none !important; }
@media (prefers-reduced-motion: no-preference) {
  html.b3-start .masthead:not(.is-over) { background: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; color: var(--paper); text-shadow: 0 1px 12px rgba(0, 0, 0, .4); }
  html.b3-start .masthead .byline, html.b3-start .masthead .nav a[aria-current="page"] { color: var(--paper); }
}
@media (max-width: 1000px) { .about.no-portrait .text { grid-column: 1 / -1; } }
/* Work filters: the labels sit on the line of the count beside them, the last one flush right */
.filters { column-gap: clamp(14px, 1.5vw, 22px); }
.filters button { display: inline-flex; align-items: flex-end; justify-content: center; column-gap: .4em; padding-bottom: 0; }
.filters button[aria-pressed="true"]::before { content: "—"; }
@media (min-width: 1001px) { .filters button:last-child { justify-content: flex-end; padding-right: 0; } }
/* phones: the photographs of one spread stay together, spreads clearly apart */
@media (max-width: 699px) { .from-book .fb-spreads { row-gap: 88px; } }
/* captions: place · year, as in the viewer */
.cap span:not(.plate) + .yr::before { content: "·"; margin-right: 10px; }
/* Work header: the filters get columns 8–12 so they stay on one line down to 1001 px */
@media (min-width: 1001px) { .page-head .head-main { grid-column: 1 / span 7; } .page-head .aside { grid-column: 8 / -1; } }
/* The carousel fills the whole screen on landscape screens (laptops, desktops, tablets and phones held sideways): each
   photograph covers it, centred on its focus point (content.js `focus`); caption and controls over a soft shade at the
   bottom. Upright screens keep the whole photograph at full width (a cover there would cut most of it away). */
@media (min-aspect-ratio: 6/5) {
  .stage { display: block; padding: 0; min-height: 0; height: 100vh; height: 100svh; }
  .stage-media { position: absolute; inset: 0; }
  .stage-slide img { object-fit: cover; object-position: var(--focus, 50% 50%); }
  /* a shade under the caption and controls, strong enough over bright water (the header brings its own) */
  .stage::after { content: ""; position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; bottom: 0; height: clamp(150px, 26vh, 260px); background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .7)); }
  .stage-nav button { opacity: 1; }
  .stage-ctrl {
    position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; z-index: 2;
    margin: 0; padding: 0 0 calc(clamp(12px, 2.6vh, 28px) + env(safe-area-inset-bottom, 0px)); border-top: 0; text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
  }
  .stage-cap { color: #fff; }
}
/* the chosen filter is underlined like the current menu item: its width never changes, so the row never jumps or wraps */
.filters button[aria-pressed="true"]::before { content: none; }
.filters button[aria-pressed="true"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 7px; }

/* ---- polish, round 2 ---- */
/* a long place name in a facts line wraps (the counts and years stay whole), so phones never scroll sideways */
.facts .nw:first-child { white-space: normal; }
/* <main> takes focus after each route change only so screen readers start there: no ring around the whole page */
main:focus, main:focus-visible { outline: none; }
/* every menu link is a full 44 px tap target */
.nav a { min-width: 44px; justify-content: center; }
/* the Book page: the usual section spacing between the book views and the Gallery */
.book-page .buy { padding-bottom: 0; }
/* the carousel's controls answer the pointer like the viewer's arrows */
@media (hover: hover) {
  .stage-nav button { transition: opacity .2s, transform .3s var(--ease); }
  .stage-pause:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
}
/* the outer arrows line up with the edges they belong to (their tap areas stay 44 px) */
.shots-ctrl > .shots-prev { display: inline-flex; align-items: center; justify-content: flex-start; }
.shots-ctrl > .shots-next { display: inline-flex; align-items: center; justify-content: flex-end; }
.book3d-skip { padding: 0 0 0 4px; }
/* Work filters: even gaps between the labels, the first flush left; each keeps a 44 px tap area */
.filters button { min-width: 0; position: relative; }
.filters button::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: max(100%, 44px); transform: translateX(-50%); }
.lb-caption .it { font-family: var(--serif); font-size: 15px; letter-spacing: 0; text-transform: none; }
/* a photograph that cannot load, on the dark viewer and carousel */
.lightbox .missing, .stage-slide .missing { background: transparent; border-color: rgba(245,243,238,.2); color: rgba(245,243,238,.7); }
/* opening on the home page: the book's colour behind the clear header until the book is drawn */
@media (prefers-reduced-motion: no-preference) { html.b3-start body { background: #3b3632; } }
/* the clear header over the book: a light shade of its own, so the small type reads over the pale prints */
.masthead.is-clear:not(.is-over)::before { content: ""; position: absolute; inset: 0 0 -32px; z-index: -1; pointer-events: none; background: linear-gradient(rgba(0, 0, 0, .4), rgba(0, 0, 0, 0)); }

/* ---- the Gallery page (every photograph, place by place) and its invitation on the home page ---- */
/* chapters without numerals: the place name starts at the left edge */
.chapter-head h2 { grid-column: 1 / span 7; }
@media (max-width: 1000px) { .chapter-head h2, .chapter-head .facts { grid-column: 1 / -1; } }
/* each place: modules that fill the whole width (composeGallery / galleryFit in app.js), one gap everywhere */
.g-blocks { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: var(--col-gap); }   /* (minmax: a module never widens the column) */
.g-mod, .g-split { min-width: 0; }
.g-mod { flex-wrap: nowrap; align-items: flex-start; }
.g-mosaic[data-side="right"] { flex-direction: row-reverse; }
.g-stack { display: flex; flex-direction: column; gap: var(--col-gap); }
.g-split { flex-wrap: nowrap; justify-content: space-between; align-items: flex-start; border-top: 1px solid var(--ink); padding-top: 14px; }
.g-split .g-split-head { display: block; border-top: 0; padding-top: 0; margin: 0; }
.g-split .g-split-head .facts { text-align: left; margin-top: 12px; }
.g-split-photos { display: flex; gap: var(--col-gap); flex: none; }
@media (max-width: 699px) {
  .g-blocks, .g-stack { row-gap: 10px; gap: 10px; }
  .g-mosaic, .g-mosaic[data-side="right"] { flex-direction: column; gap: 10px; }
  .g-stack { flex-direction: row; }
  .g-split { flex-direction: column; gap: 20px; }
  .g-split-photos { gap: 10px; }
}
/* the 3D book: no counter over the table */
.book3d-count { display: none; }
/* home: the invitation to the Gallery page, before the book */
.g-promo {
  display: grid; justify-items: center; gap: 16px; text-align: center;
  margin-top: clamp(72px, 10vw, 150px); padding: clamp(40px, 5vw, 76px) var(--gutter);
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule);
}
.g-promo-title { font-style: normal; max-width: 16em; }
.g-promo .lede { max-width: 28em; color: var(--ink-2); text-wrap: balance; }
.g-promo-btn { margin-top: 12px; padding: 18px 30px; font-size: 12px; }
/* two small places side by side (Gallery): each with its name, the photographs at one height across the row */
.g-duo { gap: calc(2 * var(--col-gap)); flex-wrap: nowrap; align-items: flex-start; }
.g-duo[hidden] { display: none; }
.chapter ~ .g-duo:not([hidden]), .g-duo ~ .chapter:not([hidden]) { margin-top: var(--section); }
.g-duo .chapter { margin-top: 0 !important; flex: none; min-width: 0; border-top: 1px solid var(--ink); padding-top: 14px; }
.g-duo .g-split-head { margin-bottom: clamp(20px, 3vw, 36px); }
@media (max-width: 699px) { .g-duo { flex-direction: column; gap: var(--section); } }
.g-duo .g-split-head { display: block; border-top: 0; padding-top: 0; }
.g-duo .g-split-head .facts { text-align: left; margin-top: 12px; }
/* the logo: crop marks with the subject stepping out past the top-right corner (index.html) */
.wordmark .mark { width: 1.62em; height: 1.48em; flex: none; margin-top: -.08em; overflow: visible; }
.wordmark .wm-text { white-space: nowrap; }
.masthead.is-over .mark, .masthead.is-clear .mark, html.b3-start .masthead .mark { filter: drop-shadow(0 1px 5px rgba(0, 0, 0, .45)); }
/* one name, one title: no byline in the header (the name is under the book's title and in the footer); the logo sits at
   the left, the menu at the right; over the closed book, where the big title is the name, the logo shows its mark alone */
.masthead .byline { display: none; }
.masthead { grid-template-columns: auto 1fr; }
.wordmark { justify-self: start; }
.wordmark .wm-text { transition: opacity .45s var(--ease), visibility 0s; }
.masthead.is-clear .wm-text, html.b3-start .masthead .wm-text { opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility 0s linear .45s; }
/* the Gallery page's banner: the title and the filters set in light type over one wide photograph, edge to edge */
.page-head.g-hero {
  position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end;
  margin: 0 calc(-1 * var(--gutter)) clamp(56px, 7vw, 110px); padding: 0 var(--gutter) clamp(24px, 3.4vw, 52px);
  min-height: clamp(380px, 50vw, 720px); max-height: calc(100svh - var(--mh, 72px)); color: var(--paper);
}
.g-hero .g-hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); }
.g-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, .28) 70%, rgba(0, 0, 0, .52)); }
.g-hero .title-l { color: var(--paper); text-shadow: 0 1px 24px rgba(0, 0, 0, .3); }
.g-hero .filters button { color: rgba(245, 243, 238, .82); text-shadow: 0 1px 10px rgba(0, 0, 0, .45); }
.g-hero .filters button[aria-pressed="true"] { color: #fff; }
@media (hover: hover) { .g-hero .filters button:hover { color: #fff; } }
.g-hero :focus-visible { outline-color: #fff; }
@media (max-width: 1000px) { .page-head.g-hero { min-height: clamp(360px, 92vw, 560px); } .g-hero::before { background: linear-gradient(rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .34) 62%, rgba(0, 0, 0, .6)); } }
@media (max-width: 700px) { .page-head.g-hero { min-height: clamp(460px, 134vw, 620px); } .g-hero .g-hero-img { object-position: 38% 50%; } }
/* the Book and About pages under their banners: the content starts close below */
.book-page .g-hero + .buy { padding-top: 0; }
.about .g-hero { margin-bottom: clamp(48px, 6vw, 96px); }
.about:has(.g-hero) { padding-top: 0; }
h2.buy-title { margin: 0; }
/* the home gallery: a photograph across the whole width between the spreads */
.fb-full { margin: 0 calc(-1 * var(--gutter)); }
.fb-full .photo-open { display: block; width: 100%; cursor: zoom-in; }
/* the whole photograph, never cropped: the full width when it fits the screen, otherwise as large as the screen allows */
.fb-full img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100svh - var(--mh, 72px)); margin: 0 auto; }
/* the photograph and its caption as one block, centred; the caption starts at the photograph's left edge */
.fb-full-in { width: fit-content; max-width: 100%; margin: 0 auto; }
.fb-full .cap { margin-top: 12px; padding: 0; text-align: left; }
.fb-full.is-edge .cap { padding: 0 var(--gutter); }
/* the emblem: one colour, like the type beside it (ink on paper, light over the dark book and carousel) */
/* the Sea and Mountains filters: one sequence of photographs from every place, under a single rule */
.g-theme { border-top: 1px solid var(--ink); padding-top: clamp(28px, 4vw, 48px); }
.g-theme[hidden] { display: none; }
