/* Margin — one stylesheet. Layout idea: a ruled page. A thin red rule runs down the left like the
   margin line of a notebook; section labels sit to its left as margin notes, the work to its right. */

/* ---------- Fonts (self-hosted, OFL — licences sit next to the files) ---------- */

@font-face {
  font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url('../fonts/cormorant-garamond-cyrillic-wght-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 300 700; font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-wght-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 300 700; font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-ext-wght-italic.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond'; font-style: italic; font-weight: 300 700; font-display: swap;
  src: url('../fonts/cormorant-garamond-cyrillic-wght-italic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Jost'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/jost-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Jost'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/jost-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Jost'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/jost-cyrillic-wght-normal.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ---------- Tokens ---------- */

:root {
  --paper: #f6f3ee;
  --wall: #ebe6de;
  --ink: #17150f;
  --ink-2: #48433a;
  --ink-3: #6b655a;
  --hair: rgba(23, 21, 15, .13);
  --red: #c4311d;

  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: clamp(20px, 4.2vw, 64px);
  --note: 0px;     /* width of the margin-notes column */
  --gap: 0px;      /* space between the notes and the work; the red rule runs down its middle */
  --header-h: 60px;
  --maxw: 1680px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: light;
}
@media (min-width: 760px) { :root { --header-h: 72px; } }
@media (min-width: 1100px) { :root { --note: 104px; --gap: 48px; } }

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

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, figure, dl, dd, ol { margin: 0; }
ol { padding: 0; list-style: none; }
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; }
em { font-style: italic; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }
::selection { background: var(--ink); color: var(--paper); }

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  padding: 10px 16px; background: var(--ink); color: var(--paper);
}
.skip:focus { top: 12px; }

/* Small capitals used for every label, note and control. */
.label {
  font: 500 .7rem/1.5 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.label--quiet { font-weight: 400; }
.label em { font-style: normal; }

/* ---------- Page frame ---------- */

.page { position: relative; }

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

.band { display: grid; grid-template-columns: var(--note) minmax(0, 1fr); column-gap: var(--gap); }
.band > .note { grid-column: 1; }
.band > .main { grid-column: 2; min-width: 0; }

@media (max-width: 1099px) {
  .band { display: block; }
  .band > .note { margin-bottom: 18px; }
  .band > .note:empty { display: none; }
}

/* The margin rule. Its x matches the middle of the gap between notes and work at every width. */
.rule {
  position: absolute; z-index: 30; top: 0; bottom: 0; width: 1px;
  background: var(--red); opacity: .62; pointer-events: none;
  display: none;
}
@media (min-width: 760px) {
  .rule { display: block; left: calc(max(0px, (100% - var(--maxw)) / 2) + var(--gutter) - 16px); }
}
@media (min-width: 1100px) {
  .rule { left: calc(max(0px, (100% - var(--maxw)) / 2) + var(--gutter) + var(--note) + var(--gap) / 2); }
}

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

.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hair);
}
.top__bar { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 36px); height: var(--header-h); }

.brand {
  margin-right: auto;
  display: inline-flex; align-items: center;
  font: 600 1.7rem/1 var(--serif);
  letter-spacing: -.01em;
  color: var(--ink);
}
/* Below the width where the page rule appears, the wordmark carries a short one of its own. */
.brand::before {
  content: ''; width: 1px; height: 1.15em; margin-right: .5em; background: var(--red);
}
@media (min-width: 760px) { .brand::before { content: none; } .brand { font-size: 1.95rem; } }

.top__nav { display: flex; gap: clamp(14px, 2vw, 30px); }
.top__nav a, .toggle button {
  font: 500 .7rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3); padding-block: 10px;
  transition: color .25s;
}
.top__nav a:hover, .toggle button:hover { color: var(--ink); }
@media (max-width: 419px) { .top__works { display: none; } }

/* Only where there are two layouts to choose from, and only once the script that switches them runs. */
.toggle { display: none; }
@media (min-width: 760px) {
  .js .toggle { display: flex; gap: 4px; padding-left: clamp(14px, 2.4vw, 36px); border-left: 1px solid var(--hair); }
}
.toggle button { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; position: relative; }
.toggle svg { width: 11px; height: 11px; fill: currentColor; }
.toggle button::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 1px;
  background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.toggle button[aria-pressed='true'] { color: var(--ink); }
.toggle button[aria-pressed='true']::after { transform: scaleX(1); }

/* ---------- Intro ---------- */

/* Kept short on purpose: the first row of pictures has to start well inside the first screen. */
.intro { padding-block: clamp(30px, 6vh, 60px) clamp(28px, 5vh, 52px); }
.intro h1 {
  max-width: 14.5em; /* two lines on a tablet and up, three on a phone */
  font: 500 clamp(2.45rem, 5vw, 4.5rem)/1 var(--serif);
  letter-spacing: -.02em;
  color: var(--ink);
  text-wrap: balance;
}
.intro h1 em { font-weight: 400; }
.intro__status { margin-top: clamp(18px, 3vh, 30px); display: flex; flex-wrap: wrap; gap: 6px 18px; min-height: 1.5em; }
.intro__status .tag { color: var(--red); }
@media (min-width: 1100px) { .intro .note { padding-top: .9em; text-align: right; } }

/* ---------- Works: shared ---------- */

.works-sec { padding-bottom: clamp(56px, 10vh, 120px); }
@media (min-width: 1100px) {
  .works-sec .note { text-align: right; }
}
/* On a phone the count is already in the line above; the first picture moves up instead. */
@media (max-width: 759px) {
  .works-sec .note { display: none; }
  .works .work:first-child { padding-top: 0; }
}

.works__message { padding-block: 40px; max-width: 46ch; }

.work { --ar: 1; --tone: var(--wall); }

.work__figure {
  aspect-ratio: var(--ar);
  background: var(--tone);
  box-shadow: 0 1px 2px rgba(23, 21, 15, .12), 0 22px 40px -22px rgba(23, 21, 15, .42);
  transition: box-shadow .5s var(--ease), transform .5s var(--ease);
}
.work__open { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.work__img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .7s ease; }
.work__img.is-in { opacity: 1; }

.work__no { display: flex; align-items: center; gap: .6em; }
/* Who made it: the collection is of other people's work, so the name leads, as on a museum label. */
.work__artist { font: 500 1.02rem/1.3 var(--sans); letter-spacing: .015em; color: var(--ink); margin-bottom: -8px; }
.work__title { font: 500 2.4rem/1.02 var(--serif); font-style: italic; letter-spacing: -.012em; color: var(--ink); text-wrap: balance; transition: color .25s; }
.work__meta { color: var(--ink-3); font-size: .95rem; line-height: 1.5; }
.work__meta span { display: block; }
.work__text { max-width: 44ch; }
.work__buy { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.work__price {
  font: 500 1rem/1.2 var(--sans); letter-spacing: .08em; color: var(--ink);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.work__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }

.work--sold .work__price { display: inline-flex; align-items: center; gap: .6em; text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; color: var(--red); }
.work--sold .work__price::before { content: ''; width: .72em; height: .72em; border-radius: 50%; background: var(--red); }

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex; align-items: center; gap: .9em;
  padding: 1.05em 1.5em;
  font: 500 .7rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  color: var(--paper); background: var(--ink); border: 1px solid var(--ink);
  transition: background .3s, color .3s, opacity .3s;
}
.btn::after, .link::after {
  content: ''; flex: none; width: 1.5em; height: .75em; background: currentColor;
  -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat;
  transition: transform .35s var(--ease);
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M0 6h22M17 1l5 5-5 5' fill='none' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E");
}
.btn:hover { background: transparent; color: var(--ink); }
.btn:hover::after, .link:hover::after { transform: translateX(5px); }
.btn[disabled] { opacity: .5; cursor: progress; }
.btn--light { color: var(--ink); background: var(--paper); border-color: var(--paper); }
.btn--light:hover { color: var(--paper); background: transparent; }

.link {
  display: inline-flex; align-items: center; gap: .8em;
  font: 500 .7rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink); padding-block: .5em; border-bottom: 1px solid var(--ink);
}

/* ---------- Works on a phone, and in the walk-through: one work at a time ---------- */

.work { padding-block: 26px 46px; }
.work + .work { border-top: 1px solid var(--hair); }
.work__figure { width: min(100%, calc(74vh * var(--ar))); width: min(100%, calc(74svh * var(--ar))); margin-inline: auto; }
.work__label { margin-top: 26px; display: grid; gap: 14px; justify-items: start; }
.work__no { margin-bottom: -4px; }
.work__buy { margin-top: 8px; }

@media (min-width: 760px) {
  /* Walk-through: each work fills the window; the label hangs to its right, as in a museum. */
  [data-view='walk'] { scroll-snap-type: y proximity; }
  [data-view='walk'] .work {
    --pad: clamp(28px, 6vh, 64px);
    --room: calc(100vh - var(--header-h) - 2 * var(--pad));
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 23rem);
    column-gap: clamp(36px, 5.5vw, 96px);
    align-items: center;
    min-height: calc(100vh - var(--header-h));
    padding-block: var(--pad);
    border-top: 0;
    scroll-snap-align: start;
  }
  @supports (height: 100svh) {
    [data-view='walk'] .work { --room: calc(100svh - var(--header-h) - 2 * var(--pad)); min-height: calc(100svh - var(--header-h)); }
  }
  [data-view='walk'] .work__figure { width: min(100%, calc(var(--room) * var(--ar))); margin: 0; justify-self: center; }
  [data-view='walk'] .work__label { margin-top: 0; gap: 18px; }
  [data-view='walk'] .work__artist { font-size: 1.08rem; margin-bottom: -10px; }
  [data-view='walk'] .work__title { font-size: clamp(2.5rem, 3.7vw, 4.1rem); }
  [data-view='walk'] .work__buy { margin-top: 14px; padding-top: 22px; border-top: 1px solid var(--hair); width: 100%; }

  /* A panorama gets the full width, with its label set in two columns underneath. */
  [data-view='walk'] .work--wide { grid-template-columns: minmax(0, 1fr); row-gap: clamp(22px, 4vh, 40px); align-content: center; }
  [data-view='walk'] .work--wide .work__figure { width: min(100%, calc((var(--room) - 15rem) * var(--ar))); justify-self: start; }
  [data-view='walk'] .work--wide .work__label {
    width: 100%; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(36px, 5.5vw, 96px); align-items: start;
  }
  [data-view='walk'] .work--wide .work__no,
  [data-view='walk'] .work--wide .work__artist,
  [data-view='walk'] .work--wide .work__title,
  [data-view='walk'] .work--wide .work__meta { grid-column: 1; }
  /* The price sits on the label's last line, beside the year and size, so the whole work fits one screen. */
  [data-view='walk'] .work--wide .work__text { grid-column: 2; grid-row: 1 / span 3; align-self: start; }
  [data-view='walk'] .work--wide .work__buy { grid-column: 2; grid-row: 4; margin-top: 0; align-self: end; }
  [data-view='walk'] .work--wide .work__meta span { display: inline; }
  [data-view='walk'] .work--wide .work__meta span + span::before { content: ' · '; }

  /* ---------- Grid: every work at once, hung in justified rows (widths come from view.js) ---------- */

  [data-view='grid'] .works { display: flex; flex-wrap: wrap; align-items: flex-start; gap: clamp(44px, 6vh, 76px) clamp(26px, 3vw, 52px); }
  [data-view='grid'] .work {
    flex: calc(var(--ar) * 100) 1 calc(var(--ar) * 300px);   /* until view.js has measured */
    min-width: 0; padding: 0; border: 0;
    container-type: inline-size;
  }
  [data-view='grid'] .work[style*='--w'] { flex: none; width: var(--w); }
  [data-view='grid'] .work__figure { width: 100%; }
  [data-view='grid'] .work__open { cursor: pointer; }
  [data-view='grid'] .work__figure:hover,
  [data-view='grid'] .work__figure:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 1px 2px rgba(23, 21, 15, .12), 0 34px 50px -26px rgba(23, 21, 15, .5);
  }
  [data-view='grid'] .work__label { margin-top: 20px; gap: 9px; }
  [data-view='grid'] .work__artist { font-size: .9rem; margin-bottom: -5px; }
  /* A tall, narrow picture has a narrow label: the title shrinks with it rather than breaking into four lines. */
  [data-view='grid'] .work__title { font-size: clamp(1.4rem, 10cqi, 1.75rem); cursor: pointer; }
  [data-view='grid'] .work__title:hover,
  [data-view='grid'] .work__figure:hover + .work__label .work__title { color: var(--red); }
  [data-view='grid'] .work__meta { font-size: .86rem; }
  [data-view='grid'] .work__text {
    font-size: .93rem; line-height: 1.55;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
  }
  [data-view='grid'] .work__buy { margin-top: 6px; gap: 8px 18px; }
  [data-view='grid'] .work__price { font-size: .86rem; }
  [data-view='grid'] .work__actions { gap: 8px 16px; }
  [data-view='grid'] .work .btn { padding: 0 0 .5em; background: none; color: var(--ink); border: 0; border-bottom: 1px solid var(--ink); gap: .8em; }
  [data-view='grid'] .work .btn:hover { color: var(--red); border-color: var(--red); }
  [data-view='grid'] .work .link { border-bottom-color: transparent; color: var(--ink-3); }
  [data-view='grid'] .work .link::after { content: none; }
  [data-view='grid'] .work .link:hover { color: var(--ink); border-bottom-color: currentColor; }
}

/* The numbers in the margin while walking through. */
.walk-index { display: none; }
@media (min-width: 1100px) {
  [data-view='walk'] .works-sec .note { display: flex; flex-direction: column; }
  [data-view='walk'] .walk-index {
    display: block; position: sticky; top: calc(50vh - 6.5rem); margin-top: 28vh; margin-bottom: 30vh;
  }
  .walk-index ol { display: grid; justify-items: end; gap: 2px; }
  .walk-index a {
    display: block; padding: 5px 0 5px 14px;
    font: 500 .7rem/1 var(--sans); letter-spacing: .16em; color: var(--ink-3); opacity: .55;
    font-variant-numeric: tabular-nums;
    transition: opacity .3s, color .3s, transform .4s var(--ease);
  }
  .walk-index a:hover { opacity: 1; }
  .walk-index a[aria-current='true'] { color: var(--red); opacity: 1; transform: translateX(-6px); }
}

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

.about { padding-block: clamp(64px, 12vh, 150px); border-top: 1px solid var(--hair); }
.about__grid { display: grid; gap: 44px; }
.about__text { display: grid; gap: 18px; justify-items: start; max-width: 40rem; }
.about__text > p:not(.lede) { max-width: 54ch; }
.lede {
  font: 500 clamp(1.9rem, 3.5vw, 3.2rem)/1.08 var(--serif); letter-spacing: -.015em; color: var(--ink);
  text-wrap: balance; margin-bottom: 10px;
}
.facts { width: 100%; margin-block: 14px 10px; border-top: 1px solid var(--hair); }
.facts > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 16px; align-items: baseline; padding-block: 13px; border-bottom: 1px solid var(--hair); }
.facts dd { color: var(--ink); }
.about__figure { max-width: 26rem; }
.about__figure img { width: 100%; background: var(--wall); box-shadow: 0 1px 2px rgba(23, 21, 15, .12), 0 22px 40px -22px rgba(23, 21, 15, .42); }
.about__figure figcaption { margin-top: 14px; }
.about__figure figcaption em { font-style: italic; text-transform: none; letter-spacing: .04em; font-family: var(--serif); font-size: 1.05rem; }
@media (min-width: 760px) {
  .about__grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, .8fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
  .about__figure { justify-self: end; width: 100%; margin-top: 8px; }
}
@media (min-width: 1100px) { .about .note, .closing .note { text-align: right; padding-top: .55em; } }

/* ---------- Closing invitation + footer ---------- */

.closing { background: var(--ink); color: #cfc9be; padding-top: clamp(72px, 14vh, 170px); }
.closing .label { color: #a39c8f; }
.closing__lede {
  font: 500 clamp(3rem, 8.4vw, 7.6rem)/.94 var(--serif); letter-spacing: -.025em; color: var(--paper);
  text-wrap: balance;
}
.closing__text { margin-top: clamp(22px, 4vh, 40px); max-width: 46ch; }
.closing__actions { margin-top: clamp(26px, 4vh, 44px); display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.closing__number { font: 400 1rem/1 var(--sans); letter-spacing: .08em; color: var(--paper); font-variant-numeric: tabular-nums; }
.foot { margin-top: clamp(72px, 14vh, 170px); }
.foot__row { display: flex; flex-wrap: wrap; gap: 10px 32px; padding-block: 26px 30px; border-top: 1px solid rgba(246, 243, 238, .16); }
.foot__row a { margin-left: auto; color: var(--paper); }
@media (max-width: 559px) { .foot__row a { margin-left: 0; } }

/* ---------- Enlarged view ---------- */

.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--wall); color: var(--ink-2); overflow: hidden;
}
.lightbox[open] { display: grid; place-items: center; }
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox::backdrop { background: var(--wall); }
.lightbox figure { display: grid; justify-items: center; gap: 18px; padding: 56px 3vw 22px; cursor: zoom-out; }
.lightbox img {
  max-width: 94vw; max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px); width: auto; height: auto;
  box-shadow: 0 2px 4px rgba(23, 21, 15, .14), 0 40px 70px -34px rgba(23, 21, 15, .55);
}
.lightbox figcaption { text-align: center; }
.lightbox__close { position: absolute; top: 14px; right: var(--gutter); padding: 12px 0; color: var(--ink); border-bottom: 1px solid currentColor; }

/* ---------- Toast ---------- */

.toast {
  position: fixed; z-index: 80; left: 50%; bottom: clamp(18px, 4vh, 36px);
  width: max-content; max-width: min(34rem, calc(100vw - 32px));
  padding: 15px 20px; background: var(--ink); color: var(--paper); font-size: .95rem; line-height: 1.45;
  box-shadow: 0 18px 40px -18px rgba(23, 21, 15, .6);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  transition: opacity .35s, transform .45s var(--ease);
}
.toast.is-up { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Motion ---------- */

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform 1s var(--ease); transition-delay: var(--delay, 0ms); }
.js .work__label.reveal { transition-delay: calc(var(--delay, 0ms) + 110ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

::view-transition-group(*) { animation-duration: .62s; animation-timing-function: var(--ease); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .4s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .top, .toast, .rule, .work__actions { display: none !important; }
  .js .reveal, .work__img { opacity: 1 !important; transform: none !important; }
  .closing { background: none; color: inherit; }
  .closing__lede, .closing__number { color: var(--ink); }
}
