.studio-exhibit {
  --exhibit-rule: #cdbfa7;
  --exhibit-accent: #8b6744;
  --exhibit-direction: 1;
  padding-block: clamp(3.3rem, 6.4vw, 7.5rem);
  background: radial-gradient(ellipse at 50% 0%, #fffaf1 0%, transparent 63%), #efe7d9;
  border-block-end: 1px solid #ded1bc;
  color: var(--forest);
}

.studio-exhibit:dir(rtl) { --exhibit-direction: -1; }
.studio-exhibit > .frame { max-inline-size: 77rem; }

.exhibit-header {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr);
  align-items: end;
  gap: 1rem clamp(2rem, 7vw, 7rem);
  margin-block-end: clamp(1.75rem, 4vw, 3rem);
}
.exhibit-header h2 {
  margin-block-start: .65rem;
  font-size: clamp(3rem, 6.5vw, 6.5rem);
  text-wrap: balance;
}
.exhibit-header h2 em { color: var(--exhibit-accent); }
.exhibit-header > p { max-inline-size: 25rem; color: #455346; font-size: clamp(1.1rem, 1.65vw, 1.38rem); line-height: 1.48; }

.exhibit-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-block-end: 1.2rem;
  border-block: 1px solid var(--exhibit-rule);
}
.exhibit-tabs button {
  position: relative;
  min-block-size: 3.45rem;
  padding: .62rem .35rem;
  border: 0;
  background: transparent;
  color: #4c574b;
  font-size: clamp(.9rem, 2.6vw, 1.18rem);
  font-weight: 780;
  line-height: 1.25;
}
.exhibit-tabs button + button { border-inline-start: 1px solid var(--exhibit-rule); }
.exhibit-tabs button[aria-selected="true"], .exhibit-tabs button:hover { color: var(--forest); background: #f9f4ea; }
.exhibit-tabs button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 16% -1px;
  block-size: 3px;
  background: var(--exhibit-accent);
}
.exhibit-tabs button:focus-visible { z-index: 1; outline-offset: -4px; }

.exhibit-work {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(13rem, .7fr);
  align-items: center;
  gap: clamp(1.65rem, 6vw, 5rem);
}
.studio-exhibit:not(.is-enhanced) .exhibit-work + .exhibit-work { margin-block-start: 2.5rem; }
.exhibit-work[data-direction="previous"] { --exhibit-slide: -1; }
.exhibit-image {
  isolation: isolate;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  overflow: clip;
  block-size: clamp(21rem, 42vw, 33rem);
  background: radial-gradient(ellipse at 52% 41%, var(--exhibit-mat), #1b2521 86%);
  outline: 1px solid #f7e9cd49;
  outline-offset: -.72rem;
}
.exhibit-image::after {
  content: "";
  position: absolute;
  inset: -2rem;
  z-index: -1;
  background: var(--exhibit-artwork) center / cover no-repeat;
  filter: blur(2.1rem) saturate(.62) brightness(.52);
  opacity: .66;
  pointer-events: none;
}
html:is([data-a11y-color="contrast"], [data-a11y-color="yellow"]) .exhibit-image::after { content: none; }
.exhibit-image img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: contain;
  transform-origin: var(--exhibit-focus);
}
.studio-exhibit.is-enhanced [data-exhibit-swipe] { touch-action: pan-y pinch-zoom; }
.exhibit-work.is-detail .exhibit-image img { scale: 1.69; }

.exhibit-caption {
  padding: .65rem .87rem;
  background: #222e26;
  color: #f4e9d4;
  font-size: clamp(.91rem, 1.45vw, 1.08rem);
}
.exhibit-zoom {
  position: absolute;
  z-index: 3;
  inset-block-start: clamp(.85rem, 2vw, 1.35rem);
  right: clamp(.85rem, 2vw, 1.35rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: 2.75rem;
  gap: .5rem;
  padding: .4rem .6rem;
  border: 1px solid #cab99bb5;
  border-radius: 2px;
  background: #1b2b22e8;
  color: #f6e6c7;
  font-size: .95rem;
  font-weight: 750;
  line-height: 1.2;
}
.exhibit-zoom:hover { background: #34443a; }
.exhibit-zoom-icon {
  position: relative;
  flex: 0 0 1rem;
  block-size: 1rem;
  background:
    linear-gradient(currentColor, currentColor) center / 69% 1px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1px 69% no-repeat;
}
.exhibit-zoom[aria-pressed="true"] .exhibit-zoom-icon { background-size: 69% 1px, 0 0; }
.exhibit-zoom .exhibit-zoom-out, .exhibit-zoom[aria-pressed="true"] .exhibit-zoom-in { display: none; }
.exhibit-zoom[aria-pressed="true"] .exhibit-zoom-out { display: inline; }

.exhibit-story { padding-block: clamp(.6rem, 3vw, 2rem); }
.exhibit-story h3 { font-size: clamp(2.05rem, 4.4vw, 4.4rem); line-height: 1; letter-spacing: -.04em; text-wrap: balance; }
.exhibit-story p { margin-block: 1.15rem; max-inline-size: 29ch; color: #445246; font-size: clamp(1.08rem, 1.5vw, 1.32rem); line-height: 1.5; }
.exhibit-story a { display: inline-block; max-inline-size: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html:not(.motion-reduced) .exhibit-tabs button { transition: background .25s, color .25s; }
  html:not(.motion-reduced) .exhibit-image img { transition: scale .72s var(--ease); }
  html:not(.motion-reduced) .exhibit-work.is-arriving .exhibit-image img {
    animation: exhibit-photo-in .76s var(--ease) backwards;
  }
  html:not(.motion-reduced) .exhibit-work.is-arriving .exhibit-story:not(:focus-within) {
    animation: exhibit-copy-in .58s var(--ease) .11s backwards;
  }
}

@keyframes exhibit-photo-in {
  from { opacity: .1; translate: calc(1.6rem * var(--exhibit-direction) * var(--exhibit-slide, 1)) 0; }
  to { opacity: 1; translate: none; }
}
@keyframes exhibit-copy-in {
  from { opacity: .35; translate: 0 .85rem; }
  to { opacity: 1; translate: none; }
}

@media (max-width: 760px) {
  .exhibit-header, .exhibit-work { grid-template-columns: minmax(0, 1fr); }
  .exhibit-header { margin-block-end: 1.3rem; gap: .75rem; }
  .exhibit-header h2 { margin-block-start: .45rem; }
  .exhibit-tabs { margin-block-end: .8rem; }
  .exhibit-tabs button { min-block-size: 2.9rem; }
  .exhibit-work { gap: 1.15rem; }
  .exhibit-image { block-size: clamp(15rem, 78vw, 23rem); }
  .exhibit-caption { padding-inline: .65rem; }
  .exhibit-story { padding-block: .15rem; }
  .exhibit-story p { max-inline-size: 35ch; margin-block: .65rem .85rem; }
}
