@font-face {
  font-family: 'DM Sans';
  src: url('fonts/dm-sans-regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'DM Sans';
  src: url('fonts/dm-sans-medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Safiro';
  src: url('fonts/safiro-medium-webfont.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --paper: #fff;
  --ink: #292b28;
  --ink-secondary: #494844;
  --line: rgb(41 43 40 / 16%);
  --sans: 'Safiro', 'DM Sans', Arial, sans-serif;
  --header-height: 6.5rem;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}

body.modal-open {
  overflow: hidden;
}

p,
h1,
h2,
h3,
figure,
blockquote {
  margin: 0;
}

button {
  color: inherit;
  font: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

.wrap {
  width: min(1152px, calc(100% - 96px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: grid;
  align-items: center;
  min-height: var(--header-height);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  color: inherit;
  text-decoration: none;
}

.header-logo {
  display: block;
  flex: none;
  width: 78px;
  height: auto;
}

.wordmark {
  width: fit-content;
  font: 500 19px/1.35 var(--sans);
  letter-spacing: .24em;
}

.wordmark strong {
  font-weight: 700;
}

.brand-association {
  display: block;
  margin-top: 4px;
  color: var(--ink-secondary);
  font-size: 15px;
  line-height: 1.4;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.site-header nav { display: flex; gap: 20px; }
.site-header nav a {
  display: block;
  padding-block: 14px;
  color: inherit;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
}
.site-header nav a:hover,
.site-header nav a[aria-current] { text-decoration: underline; text-underline-offset: 5px; }

.intro {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(42px, 7.7vw, 112px);
  min-height: calc(100svh - var(--header-height));
  padding-block: clamp(40px, 6vh, 76px);
}

.cover-artwork {
  width: min(100%, 438px);
}

.cover-image {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.cover-image img {
  display: block;
  width: 100%;
  height: auto;
}

.intro-copy {
  max-width: 56ch;
}

.intro-copy h2 {
  max-width: 17ch;
  font: 400 clamp(38px, 4.7vw, 67px)/1.07 var(--sans);
  letter-spacing: -.035em;
  text-wrap: balance;
}

.intro-copy blockquote {
  margin-top: clamp(20px, 3vw, 37px);
  color: var(--ink-secondary);
  font-size: clamp(17px, 1.7vw, 21px);
  font-style: italic;
  line-height: 1.7;
}

@media (prefers-reduced-motion: no-preference) {
  :root {
    --portrait-fade: 2.4s;
  }
  .current.is-ready .invitation-logos {
    animation: intro-fade .85s ease-out .1s both;
  }
  .current.is-ready .invitation-artwork {
    animation: intro-fade 1.25s ease-in-out .7s both;
  }
  .current.is-ready .invitation-copy {
    animation: intro-fade 1.1s ease-out 1.7s both;
  }
  .intro.is-ready .cover-image {
    animation: intro-fade var(--portrait-fade) ease-in-out both;
  }
  .intro.is-ready .intro-copy {
    animation: intro-fade 1.2s ease-out var(--portrait-fade) both;
  }
}
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .current:not(.is-ready) :is(.invitation-logos, .invitation-artwork, .invitation-copy),
  .intro:not(.is-ready) :is(.cover-image, .intro-copy) {
    opacity: 0;
  }
}
.current .invitation-copy:focus-within,
.intro .cover-image:focus-visible {
  animation: none;
  opacity: 1;
}
@keyframes intro-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.current {
  padding-block: clamp(56px, 7vw, 100px) clamp(64px, 9vw, 128px);
}

.invitation {
  margin-inline: auto;
}

.invitation-layout,
.split-section {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(42px, 7.7vw, 112px);
}

.invitation-layout {
  align-items: start;
}

.invitation-artwork {
  width: min(100%, 438px);
}

.invitation-artwork img {
  display: block;
  width: 100%;
  height: auto;
}

.invitation-logos {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px clamp(18px, 6vw, 80px);
  margin-bottom: clamp(48px, 6vw, 80px);
}

.invitation-logos img {
  display: block;
  height: auto;
  max-width: 100%;
}

.sac-logo { width: 92px; }
.ghmp-logo { width: 180px; }
.foundation-logo { width: 220px; }

.detail-label {
  color: var(--ink-secondary);
  font-size: 15px;
  letter-spacing: .06em;
}

.invitation h1 {
  font: 400 clamp(23px, 2.5vw, 31px)/1.15 var(--sans);
}

.invitation h2 {
  margin-top: 12px;
  font: 400 clamp(30px, 4.2vw, 49px)/1.15 var(--sans);
  letter-spacing: -.025em;
  text-wrap: balance;
}

.exhibition-title {
  margin-top: 14px;
  font: 400 clamp(27px, 3.7vw, 43px)/1.22 var(--sans);
  color: var(--ink-secondary);
}

.exhibition-details {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.opening-date {
  margin-top: 8px;
  font-size: clamp(21px, 2.4vw, 27px);
}

.exhibition-opening > p:last-child {
  margin-top: 8px;
  color: var(--ink-secondary);
  font-size: 16px;
}

.exhibition-facts {
  margin: 22px 0 0;
  font-size: 16px;
}
.exhibition-facts div + div { margin-top: 14px; }
.exhibition-facts dt { color: var(--ink-secondary); }
.exhibition-facts dd { margin: 2px 0 0; }

.exhibition-link {
  display: inline-block;
  margin-top: 32px;
  padding-block: 8px;
  color: var(--ink);
  font-size: 16px;
  text-underline-offset: 5px;
}

.text-page {
  padding-block: clamp(38px, 6vw, 80px) clamp(56px, 8vw, 112px);
}

.intro + .text-page {
  padding-block-start: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.text-section {
  max-width: 48rem;
  padding-block: clamp(20px, 3vw, 32px);
  border-top: 1px solid var(--line);
}

.split-section {
  max-width: none;
}

.split-section + .split-section {
  margin-block-start: clamp(24px, 4vw, 60px);
  padding-block-start: clamp(28px, 4vw, 60px);
}

.split-section--text-only > div {
  grid-column: -2 / -1;
}

.split-section-image {
  width: min(100%, 438px);
}

.split-section-image img {
  display: block;
  width: 100%;
  height: auto;
}

.milada-rectified {
  aspect-ratio: .6198;
  overflow: hidden;
  container-type: inline-size;
}

.milada-rectified img {
  transform-origin: top left;
  /* Four-corner correction based on the edges of the backing sheet in IMG_1887. */
  transform: translate(-24.409834cqw, -1.794406cqw) perspective(100cqw) matrix3d(
    1.38694022, -.01077109, -.02907978, 0,
    .2138324, 1.60255436, -.21097237, 0,
    0, 0, 1, 0,
    0, 0, 0, 1
  );
}

.zvonik-crop {
  aspect-ratio: 1286 / 1965;
  overflow: hidden;
}

.zvonik-crop img {
  /* Crop to the artwork at (94, 33) in the 1400 × 2029 reference. */
  width: calc(100% * 1400 / 1286);
  transform: translate(-6.714286%, -1.626417%);
}

.text-section h2 {
  margin-bottom: 12px;
  font: 400 clamp(24px, 3vw, 34px)/1.18 var(--sans);
  letter-spacing: -.02em;
  overflow-wrap: break-word;
}

.author-years {
  color: var(--ink-secondary);
  font: 400 .58em/1.5 var(--sans);
  letter-spacing: normal;
  white-space: nowrap;
}

.text-copy {
  max-width: 66ch;
  color: var(--ink-secondary);
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.7;
}

.text-copy p + p,
.text-copy ul + p { margin-top: 1em; }

.text-copy ul {
  margin-block: .5em 0;
  padding-inline-start: 1.2em;
}

.text-copy strong { color: var(--ink); }

.contact-section h2 {
  margin-bottom: 24px;
}

.contact-details {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: .45rem clamp(20px, 4vw, 48px);
  margin: 0;
}

.contact-details dd {
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.contact-details a {
  color: inherit;
  text-underline-offset: .22em;
}

.project {
  max-width: 960px;
  margin-inline: auto;
}

.project h1 {
  margin-bottom: clamp(18px, 3vw, 32px);
  font: 400 clamp(28px, 4vw, 46px)/1.15 var(--sans);
  letter-spacing: -.02em;
}

.project video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #171815;
}

@media (prefers-reduced-motion: no-preference) {
  .text-section {
    animation: intro-fade .85s ease-out .12s both;
  }
  .text-section:nth-of-type(2) { animation-delay: .95s; }
  .text-section:nth-of-type(3) { animation-delay: 1.78s; }
  .text-section:nth-of-type(4) { animation-delay: 2.61s; }
  .contact-section:focus-within { animation: none; }
}

.image-dialog {
  width: min(1440px, calc(100% - 40px));
  max-height: 92dvh;
  padding: 24px;
  border: 0;
  background: var(--paper);
  color: var(--ink);
}
.image-dialog::backdrop {
  background: rgb(255 255 255 / 94%);
}
.dialog-controls {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  margin-bottom: 12px;
}
.dialog-controls button {
  padding: 8px;
  border: 0;
  background: transparent;
}
.dialog-canvas {
  display: grid;
  place-items: center;
  height: max(120px, calc(90dvh - 115px));
  overflow: auto;
  overscroll-behavior: contain;
}
.dialog-canvas img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  margin: auto;
  object-fit: contain;
}
.dialog-canvas.is-zoomed {
  display: block;
  place-items: normal;
}
.dialog-canvas.is-zoomed img {
  width: auto;
  height: auto;
  max-height: none;
  margin: 0;
}

@media (max-width: 760px) {
  .wrap {
    width: calc(100% - 40px);
  }

  .intro {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 34px;
    padding-block: 30px 52px;
  }

  .cover-artwork {
    width: min(100%, 350px);
    margin-inline: auto;
  }

  .intro-copy {
    width: min(100%, 32rem);
    margin-inline: auto;
  }

  .intro-copy h2 {
    font-size: clamp(34px, 7vw, 49px);
  }

  .exhibition-details {
    margin-top: 30px;
  }

  .invitation-layout,
  .split-section {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .invitation-artwork,
  .split-section-image {
    width: min(100%, 350px);
    margin-inline: auto;
  }

  .sac-logo { width: 76px; }
  .ghmp-logo { width: 150px; }
  .foundation-logo { width: 200px; }

  .image-dialog {
    width: calc(100% - 24px);
    padding: 16px;
  }
}

@media (max-width: 1100px) {
  html { scroll-padding-top: 9.5rem; }
  .header-inner { flex-direction: column; gap: 4px; padding-block: 12px 4px; }
  .header-brand { gap: 12px; }
  .header-logo { width: clamp(56px, 8vw, 72px); }
  .wordmark { font-size: clamp(11px, 2.5vw, 19px); letter-spacing: .18em; }
  .site-header nav { flex-wrap: wrap; justify-content: center; gap: 0 clamp(10px, 2vw, 24px); }
  .site-header nav a { padding-block: 8px; }
}

@media (max-width: 480px) {
  .header-inner { width: calc(100% - 24px); }
  .site-header nav a { font-size: 14px; }
  .brand-association { font-size: 13px; }
  .contact-details { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .contact-details dd:not(:last-child) { margin-bottom: .65rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
