.iw-gallery {
  --gallery-gutter: clamp(1.25rem, 5vw, 6.5rem);
  --gallery-white: #fffdf9;
  --gallery-line: rgb(255 255 255 / .66);
  position: relative;
  isolation: isolate;
  inline-size: 100%;
  background: #242524;
  color: var(--gallery-white);
}
.iw-gallery.is-enhanced { height: 320vh; height: 320svh; }
.iw-gallery * { box-sizing: border-box; }
.iw-gallery-sr, .iw-gallery-skip:not(:focus) {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.iw-gallery-skip:focus {
  position: absolute; z-index: 8;
  inset-block-start: 5.5rem; inset-inline-start: var(--gallery-gutter);
  padding: .7rem 1rem; background: white; color: #181a19;
}
.iw-gallery-stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  overflow: hidden;
}
.iw-gallery.is-enhanced .iw-gallery-stage { position: sticky; top: 0; }
.iw-gallery-films, .iw-gallery-film, .iw-gallery-negative, .iw-gallery-negative picture,
.iw-gallery-negative img, .iw-gallery-negative video, .iw-gallery-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}
.iw-gallery-films { z-index: -3; overflow: hidden; pointer-events: none; }
.iw-gallery-film {
  --g-a: 0;
  opacity: var(--g-a);
  overflow: hidden;
}
.iw-gallery-film:first-child { --g-a: 1; }
.iw-gallery-negative {
  transform-origin: 50% 50%;
  transform: translate3d(var(--g-pan-x, 0px), calc(var(--g-shift, 0px) + var(--g-pan-y, 0px)), 0) scale(var(--g-scale, 1));
}
.iw-gallery-negative :is(img,video) { display: block; object-fit: cover; object-position: 50% 50%; }
.iw-gallery-negative video { opacity: 0; transition: opacity .4s ease; }
.iw-gallery-negative video.has-frame { opacity: 1; }
.iw-gallery-shade {
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(0deg, rgb(11 14 14 / .9),rgb(13 15 15 / .79) 10%,rgb(15 17 17 / .48) 30%,transparent 57%),
    linear-gradient(180deg,rgb(16 18 19 / .31),transparent 18%);
}
.iw-gallery-edition {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  inline-size: 100%;
  max-inline-size: 132rem;
  margin-inline: auto;
  padding-inline: max(var(--gallery-gutter), env(safe-area-inset-left)) max(var(--gallery-gutter), env(safe-area-inset-right));
  padding-block-end: max(.8rem, env(safe-area-inset-bottom));
}
.iw-gallery-titles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-block-end: clamp(1.4rem, 3.6vh, 3.6rem);
}
.iw-gallery-caption {
  grid-area: 1/1;
  min-width: 0;
  align-self: end;
  justify-self: start;
  max-width: 100%;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .26s ease-out, transform .38s ease-out;
}
.iw-gallery-caption[aria-hidden=true] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(.4rem);
}
.iw-gallery .iw-gallery-subject {
  color: var(--gallery-white);
  font-family: var(--sans);
  font-size: clamp(.95rem, 1.22vw, 1.35rem);
  font-weight: 500;
  line-height: 1.35;
  margin: 0 0 .8rem;
}
.iw-gallery .iw-gallery-heading {
  font-family: var(--iw-latin-display,Georgia,serif);
  font-weight: 400;
  font-size: clamp(4.8rem, 10.8vw, 12rem);
  line-height: .93;
  letter-spacing: -.057em;
  text-wrap: nowrap;
  margin: 0;
  color: var(--gallery-white);
}
.iw-gallery .iw-gallery-heading--beige { font-size: clamp(3.8rem,8.75vw,10rem); }
.iw-gallery-note-link, .iw-gallery-portfolio-link {
  display: inline-flex; align-items: center; min-height: 44px;
  font: 600 1rem/1.35 var(--sans);
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .44em;
}
.iw-gallery-note-link { margin-block-start: .3rem; }
.iw-gallery-entry { display:flex;align-items:center;flex-wrap:wrap;gap:.4rem 1.5rem;margin-block-start:.85rem }
.iw-gallery-entry .iw-gallery-note-link {margin:0;font-weight:450}
.iw-gallery-door {display:inline-flex;align-items:center;justify-content:center;min-height:45px;padding:.5rem 1.6rem;border-radius:5rem;border:1px solid #f1e8d6;background:#eee8dc;color:#23241e;text-decoration:none;font:600 1rem/1.14 var(--sans);transition:background .18s,color .18s}
.iw-gallery-door:hover {background:#fffaf0;color:#171811}
@media(max-width:550px){.iw-gallery-entry{margin-top:.42rem;gap:.4rem 1.1rem}.iw-gallery-door{padding:.45rem 1.2rem;min-height:44px}}
.iw-gallery :is(a,button):focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.iw-gallery-note-link:hover, .iw-gallery-portfolio-link:hover { text-decoration-thickness: 2px; }
.iw-gallery-rail {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  column-gap: 1.2rem;
  border-top: 1px solid var(--gallery-line);
}
.iw-gallery-contents, .iw-gallery-transport { display: flex; align-items: stretch; }
.iw-gallery-contents { gap: clamp(1rem,3vw,3.6rem); }
.iw-gallery-transport { gap: 1.2rem; }
.iw-gallery-rail :is(a,button) {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  border: 0;
  background: none;
  color: var(--gallery-white);
  padding: 0;
  text-decoration: none;
  cursor: pointer;
}
.iw-gallery-rail :is(a,button):hover { text-decoration: underline; text-underline-offset: .4em; }
.iw-gallery-contents a {
  font: 550 .85rem/1.05 var(--sans);
  letter-spacing: .056em;
  white-space: nowrap;
}
.iw-gallery-contents a[aria-current=step] { font-weight: 750; }
.iw-gallery-contents a[aria-current=step]::before {
  position: absolute;
  content: "";
  inset: -2px 0 auto;
  border-top: 3px solid var(--gallery-white);
}
.iw-gallery-transport :is(button,a) { font: 600 .91rem/1.15 var(--sans); }
.iw-gallery-transport [data-gallery-next] { text-decoration: underline; text-underline-offset: .35em; }
.iw-gallery-transport [hidden] { display: none; }

/* A single fold of the project book opens over the film. */
.iw-gallery-note {
  --sheet-pad: clamp(1.35rem,3.4vw,3.6rem);
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  width: min(36rem,100%);
  max-width: 100%;
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  padding: 0;
  border: 0;
  background: #f2f2ed;
  color: #212624;
  overflow: auto;
  overscroll-behavior: contain;
}
html[dir=rtl] .iw-gallery-note { inset: 0 auto 0 0; }
html:has(.iw-gallery-note[open]) { overflow: hidden; }
.iw-gallery-note:not([open]) { display: none; }
.iw-gallery-note::backdrop { background: rgb(10 14 14 / .67); }
.iw-gallery-sheet { padding: max(1.2rem,env(safe-area-inset-top)) var(--sheet-pad) max(2rem,env(safe-area-inset-bottom)); }
.iw-gallery-sheet-head {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  border-bottom: 1px solid #91958d;
  margin-block-end: clamp(1.3rem,3.5vh,2.6rem);
}
.iw-gallery-sheet-head p { font: 600 .93rem/1.3 var(--sans); }
.iw-gallery-sheet-head button {
  min-height: 46px; border: 0; background: transparent; padding: 0 .2rem;
  color: inherit; text-decoration: underline; text-underline-offset: .3rem;
  cursor: pointer; font-size: 1rem;
}
.iw-gallery-sheet h2 {
  color: inherit; font: 400 clamp(2.3rem,5.3vw,4.1rem)/1 var(--iw-latin-display,Georgia,serif);
  text-align: start; letter-spacing: -.045em; padding-block: .04em; margin-block: 0 .8rem;
}
html[dir=rtl] .iw-gallery-sheet h2 { text-align: right; }
.iw-gallery-sheet figure { margin: 0 0 1.75rem; }
.iw-gallery-sheet img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.iw-gallery-sheet figcaption { color: #47504a; font: 500 .9rem/1.4 var(--sans); margin-top: .45rem; }
.iw-gallery-sheet h3 { color: inherit; font: 400 clamp(1.85rem,4vw,3rem)/1.07 var(--serif); margin-block: 0 .65rem; }
.iw-gallery-sheet-copy { font: 400 1.12rem/1.58 var(--sans); }
.iw-gallery-credit { color: #46504a; margin-top: .85rem; font: 500 .95rem/1.5 var(--sans); }
.iw-gallery-portfolio-link { margin-top: 1rem; }
@media (prefers-reduced-motion:no-preference) {
  .iw-gallery-note[open] { animation: iw-gallery-curtain .38s cubic-bezier(.17,.7,.25,1) both; }
  html[dir=rtl] .iw-gallery-note[open] { --curtain-direction: -1; }
  .iw-gallery-note[open]::backdrop { animation: iw-gallery-dim .32s ease-out; }
  @keyframes iw-gallery-curtain { from { transform: translateX(calc(100% * var(--curtain-direction,1))); } to { transform: none; } }
  @keyframes iw-gallery-dim { from { opacity: 0; } to { opacity: 1; } }
}

@media (max-width: 43.75rem) {
  .iw-gallery-edition { padding-block-end: max(.45rem,env(safe-area-inset-bottom)); }
  .iw-gallery-titles { margin-block-end: .9rem; }
  .iw-gallery .iw-gallery-heading { font-size: clamp(3.3rem,14.7vw,5.9rem); }
  .iw-gallery .iw-gallery-heading--beige { font-size: clamp(2.8rem,12.4vw,5rem); }
  .iw-gallery-subject { margin-bottom: .55rem; }
  .iw-gallery-note-link { margin-top: .15rem; }
  .iw-gallery-rail { flex-wrap: wrap; row-gap: 0; }
  .iw-gallery-contents { width: 100%; justify-content: space-between; gap: .6rem; }
  .iw-gallery-contents a { min-height: 44px; font-size: .8rem; }
  .iw-gallery-transport { width: 100%; justify-content: space-between; flex-direction: row-reverse; }
  .iw-gallery-transport :is(a,button) { min-height: 44px; }
  .iw-gallery-shade {
    background: linear-gradient(0deg,rgb(11 14 14 / .95),rgb(13 15 15 / .85) 17%,rgb(15 17 17 / .53) 39%,transparent 66%),
                linear-gradient(180deg,rgb(16 18 19 / .31),transparent 18%);
  }
}
@media (max-height: 450px) and (orientation: landscape) {
  .iw-gallery-edition { padding-block-end: max(.1rem,env(safe-area-inset-bottom)); }
  .iw-gallery-titles { margin-block-end: .2rem; }
  .iw-gallery .iw-gallery-heading { font-size: clamp(2.5rem,11vh,4.1rem); }
  .iw-gallery-subject { margin-block-end: .25rem; }
  .iw-gallery-rail { flex-wrap: nowrap; }
  .iw-gallery-contents,.iw-gallery-transport { width: auto; gap: .85rem; }
  .iw-gallery-rail :is(a,button),.iw-gallery-note-link { min-height: 36px; }
  .iw-gallery-shade { background: linear-gradient(0deg, #111513ef, #12151485 39%, transparent 74%); }
}
@media (prefers-reduced-motion:reduce) {
  .iw-gallery-negative { transform: none; }
  .iw-gallery-caption,.iw-gallery-negative video { transition: none; }
}
html[data-iw-reduced-motion=true] .iw-gallery-negative { transform: none; }
html[data-iw-reduced-motion=true] .iw-gallery :is(.iw-gallery-caption,video,dialog) { transition: none; animation: none; }
html[data-iw-contrast=true] .iw-gallery-shade { background: linear-gradient(0deg,#0a0d0dfa 0%,#0a0d0df2 32%,transparent 72%); }
html[data-iw-contrast=true] .iw-gallery-sheet { background: #0d100e; color: white; }
html[data-iw-contrast=true] .iw-gallery-sheet :is(figcaption,.iw-gallery-credit) { color: white; }
html:is([data-iw-large-text=true],[data-iw-spacing=true]) .iw-gallery .iw-gallery-heading { text-wrap: wrap; overflow-wrap: anywhere; font-size: clamp(2.2rem,9vw,7rem); }
html:is([data-iw-large-text=true],[data-iw-spacing=true]) .iw-gallery-contents { flex-wrap: wrap; }
html:is([data-iw-large-text=true],[data-iw-spacing=true]) .iw-gallery-contents a { white-space: normal; }
html:is([data-iw-large-text=true],[data-iw-spacing=true]) .iw-gallery-edition { max-height: 100%; overflow: auto; }
@media (forced-colors: active) {
  .iw-gallery-caption,.iw-gallery-rail { background: Canvas; color: CanvasText; }
  .iw-gallery-note-link,.iw-gallery-rail :is(button,a) { color: LinkText; }
}
