.archive-exhibit {
  position: relative;
  isolation: isolate;
  min-block-size: 74svh;
  background: #fff;
}

.archive-exhibit.is-animated { min-block-size: 424svh; }

.archive-exhibit-pin {
  position: relative;
  display: grid;
  place-items: center;
  block-size: 74svh;
  pointer-events: none;
}

.is-animated .archive-exhibit-pin {
  position: sticky;
  inset-block-start: 0;
  block-size: 100svh;
}

.archive-exhibit-title {
  margin: 0;
  color: #deddd9;
  text-align: center;
  font-size: clamp(4.5rem, 10.8vw, 13rem);
  font-weight: 900;
  line-height: .89;
  letter-spacing: -.085em;
}

html[lang="ar"] .archive-exhibit-title {
  font-size: clamp(3.5rem, 8.6vw, 10.5rem);
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: normal;
}

.archive-exhibit-line {
  display: block;
  padding: .1em .13em .18em;
  margin: -.1em -.13em -.18em;
}

html[lang="ar"] .archive-exhibit-line {
  padding-block-end: .28em;
  margin-block-end: -.28em;
}

.archive-exhibit-line > span { display: inline-block; }

.archive-exhibit-title.is-entering .archive-exhibit-line { overflow: clip; }

.archive-exhibit-title.is-entering .archive-exhibit-line > span {
  animation: archive-title-arrive 1.5s cubic-bezier(.16, 1, .3, 1) both;
  animation-delay: calc(var(--letter-order) * 85ms);
}

@keyframes archive-title-arrive {
  from { transform: translateY(115%); }
  to { transform: none; }
}

.archive-exhibit-jump {
  position: absolute;
  inset-block-end: clamp(1.25rem, 5svh, 3.5rem);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: .6em;
  min-block-size: 44px;
  padding-inline: 1.05em;
  border: 1px solid #16161635;
  border-radius: 99px;
  background: #fff;
  color: var(--ink);
  pointer-events: auto;
  font-size: clamp(.78rem, .9vw, .92rem);
  font-weight: 600;
  transition: background-color .22s, color .22s;
}

.archive-exhibit-jump:hover,
.archive-exhibit-jump:focus-visible { background: var(--ink); color: #fff; }

.archive-exhibit-field {
  position: absolute;
  z-index: 1;
  inset: 0;
  overflow: clip;
  pointer-events: none;
}

.archive-exhibit-pin { z-index: 0; }
.archive-exhibit-pin:has(.archive-exhibit-jump:focus-visible) { z-index: 2; }

.archive-exhibit-tile {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
}

.archive-exhibit-tile img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: clamp(.28rem, .65vw, .7rem);
  box-shadow: 0 .65rem 1.8rem #13131312;
  transform: translate3d(0, var(--drift, 0px), 0)
    rotate(calc(var(--turn) + var(--spin, 0deg)))
    scale(var(--depth-scale, 1));
}

.archive-exhibit-tile img[data-folder] { box-shadow: none; }
.archive-exhibit-tile[data-after] { display: none; }
.is-animated .archive-exhibit-tile[data-after] { display: block; }
.is-animated .archive-exhibit-tile img { filter: blur(var(--softness, 0px)); }

.archive-shelf { scroll-margin-block-start: var(--gutter); }

@media (max-width: 700px) {
  .archive-exhibit.is-animated { min-block-size: 312svh; }
  .is-animated .archive-exhibit-pin { block-size: 76svh; }

  .archive-exhibit-tile {
    left: var(--phone-x, var(--x));
    top: var(--phone-y, var(--y));
    width: var(--phone-w, var(--w));
  }

  .is-animated .archive-exhibit-tile[data-wide] { display: none; }
  .archive-exhibit-title { font-size: clamp(4.5rem, 14vw, 6.4rem); }
  html[lang="ar"] .archive-exhibit-title { font-size: clamp(3.1rem, 12vw, 5.75rem); }
}

@media (prefers-reduced-motion: reduce) {
  .archive-exhibit-title.is-entering .archive-exhibit-line > span { animation: none; }
  .archive-exhibit-jump { transition: none; }
}

@media (max-width:700px){
  .archive-exhibit-title{font-size:clamp(58px,15vw,86px);line-height:.98;letter-spacing:-.04em}
  html[lang="ar"] .archive-exhibit-title{font-size:clamp(44px,12vw,64px);line-height:1.55}
  .archive-exhibit-jump{
    min-block-size:48px;font-size:14px;line-height:1.5;
    inset-block-end:max(24px,env(safe-area-inset-bottom));
  }
}
