/* Kai Yoda exhibition — editorial mosaic + lightbox */

.page-exhibition-case {
  --ex-ink: #0a0a0a;
  --ex-muted: rgba(10, 10, 10, 0.54);
  --ex-soft: rgba(10, 10, 10, 0.68);
  --ex-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ex-paper: #f4f2ee;
  --ex-gap: clamp(0.85rem, 1.8vw, 1.35rem);
  background: var(--ex-paper);
  color: var(--ex-ink);
}

.ex-case {
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--internal-page-top) clamp(1.25rem, 4vw, 4rem) 0;
}

.ex-case__kicker {
  margin: 0;
  font-size: var(--type-xs);
  letter-spacing: var(--tracking-wide);
  line-height: var(--leading-normal);
  text-transform: uppercase;
  color: var(--ex-muted);
}

.ex-case__intro {
  display: grid;
  gap: clamp(0.85rem, 2vw, 1.4rem);
  padding-bottom: clamp(2.4rem, 6vh, 4rem);
  max-width: min(100%, 54rem);
  min-width: 0;
}

.ex-case__artist {
  margin: 0;
  font-size: clamp(0.78rem, 1.1vw, 0.92rem);
  letter-spacing: 0.14em;
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--ex-ink);
}

.ex-case__artist-link,
.ex-case__address-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ex-ease);
}

.ex-case__artist-link:hover,
.ex-case__artist-link:focus-visible,
.ex-case__address-link:hover,
.ex-case__address-link:focus-visible {
  border-bottom-color: rgba(10, 10, 10, 0.55);
}

.ex-case__caption {
  margin-top: 0.7rem;
  max-width: 64ch;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  line-height: 1.55;
  color: var(--ex-muted);
  font-style: normal;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.18em;
}

.ex-case__caption > span {
  display: block;
}

.ex-case__caption em {
  font-style: italic;
}

.ex-case__title {
  margin: 0;
  max-width: min(100%, 72rem);
  width: 100%;
  font-size: clamp(2.8rem, 9.2vw, 9rem);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--ex-ink);
  overflow-wrap: normal;
  word-break: normal;
  word-wrap: normal;
  hyphens: none;
  white-space: normal;
}

.ex-case__title-line {
  display: block;
  max-width: 100%;
  /* Vertical reveal only — do not clip letters horizontally */
  clip-path: inset(0 -3vw);
  overflow: visible;
}

.ex-case__title-mask {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
  word-wrap: normal;
  hyphens: none;
  white-space: normal;
}

.js-enabled .ex-case__title-mask {
  transform: translateY(110%);
  transition: transform 1200ms var(--ex-ease);
}

.js-enabled .ex-case__title-line:nth-child(2) .ex-case__title-mask {
  transition-delay: 120ms;
}

.js-enabled .ex-case.is-ready .ex-case__title-mask,
.js-enabled .ex-case__intro.is-visible .ex-case__title-mask {
  transform: translateY(0);
}

.ex-case__dates {
  margin: 0;
  font-size: clamp(0.78rem, 1.1vw, 0.95rem);
  letter-spacing: 0.04em;
  line-height: 1.45;
  color: var(--ex-muted);
}

.ex-case__manifesto {
  max-width: min(100%, 46ch);
  margin: clamp(0.4rem, 1.5vh, 0.8rem) 0 0;
  font-size: clamp(1.05rem, 2.2vw, 1.65rem);
  line-height: 1.32;
  letter-spacing: 0.01em;
  font-weight: 400;
  color: var(--ex-ink);
  text-transform: uppercase;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  min-width: 0;
}

.ex-case__about,
.ex-case__gallery,
.ex-case__notes,
.ex-case__details {
  padding: clamp(2.4rem, 6vh, 4rem) 0;
  border-top: 1px solid rgba(10, 10, 10, 0.1);
}

.ex-case__gallery {
  border-top: none;
  padding-top: 0;
}

/*
 * Shared text section shell:
 * left = muted label, right = readable content (never crushed columns)
 */
.ex-case__about,
.ex-case__notes,
.ex-case__details {
  display: grid;
  grid-template-columns: minmax(7.5rem, 11.25rem) minmax(0, 56.25rem);
  column-gap: clamp(3rem, 7vw, 7.5rem);
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.ex-case__about > .ex-case__kicker,
.ex-case__notes > .ex-case__kicker,
.ex-case__details > .ex-case__kicker {
  margin: 0;
  max-width: none;
  width: 100%;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  white-space: normal;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1.35;
}

.ex-case__about[hidden],
.ex-case__notes[hidden] {
  display: none;
}

/* ABOUT — lead (black) + secondary (gray), 1 or 2 balanced columns */
.ex-case__about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.35rem, 2.8vw, 2.4rem);
  margin: 0;
  width: 100%;
  max-width: 56.25rem;
  min-width: 0;
  columns: auto;
  column-gap: normal;
}

.ex-case__about-grid.is-long {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
  max-width: min(56.25rem, 100%);
}

.ex-case__about-grid.is-long .ex-case__about-lead,
.ex-case__about-grid.is-long .ex-case__about-body {
  max-width: 34rem;
}

.ex-case__about-lead,
.ex-case__about-body {
  display: block;
  min-width: 0;
  max-width: none;
  letter-spacing: var(--tracking-normal);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.ex-case__about-grid p {
  margin: 0 0 1.25em;
  max-width: none;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.ex-case__about-grid p:last-child {
  margin-bottom: 0;
}

.ex-case__about-lead {
  font-size: clamp(1.02rem, 1.45vw, 1.22rem);
  line-height: 1.42;
  color: #111;
}

.ex-case__about-lead p {
  color: #111;
}

.ex-case__about-body {
  font-size: clamp(0.94rem, 1.15vw, 1.05rem);
  line-height: 1.62;
  color: rgba(0, 0, 0, 0.58);
}

.ex-case__about-body p {
  color: rgba(0, 0, 0, 0.58);
}

/* When ABOUT only has a lead (or short text), keep a single readable measure */
.ex-case__about-grid.is-short,
.ex-case__about-grid:not(:has(.ex-case__about-body)),
.ex-case__about-grid:has(.ex-case__about-body:empty) {
  grid-template-columns: 1fr;
  max-width: 42rem;
}

/* NOTE — single column by default; two columns only when marked long */
.ex-case__notes-grid {
  display: block;
  width: 100%;
  max-width: 56.25rem;
  min-width: 0;
  margin: 0;
  font-size: clamp(0.94rem, 1.15vw, 1.05rem);
  line-height: 1.62;
  letter-spacing: var(--tracking-normal);
  color: var(--ex-soft);
  columns: 1;
  column-gap: clamp(2.5rem, 4vw, 4rem);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.ex-case__notes-grid.is-long {
  columns: 2;
  column-width: min(100%, 18rem);
}

.ex-case__notes-grid p {
  margin: 0 0 1.25em;
  break-inside: avoid;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.ex-case__notes-grid p:last-child {
  margin-bottom: 0;
}

.ex-case__notes-grid--single {
  columns: 1;
  column-width: auto;
  max-width: 42rem;
}

/* Mosaic — installation views only */
.ex-case__mosaic {
  margin-top: clamp(1.2rem, 2.5vh, 1.8rem);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--ex-gap);
  align-items: start;
}

.ex-case__shot {
  margin: 0;
}

.ex-case__shot-media {
  overflow: hidden;
  background: #ebe7df;
}

.ex-case__shot-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  color: inherit;
}

.ex-case__shot-trigger:focus-visible {
  outline: 1px solid rgba(10, 10, 10, 0.55);
  outline-offset: 3px;
}

.ex-case__shot img {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: var(--object-position, 50% 48%);
  filter: saturate(0.92) contrast(0.98);
}

.ex-case__shot--lead {
  grid-column: 1 / -1;
}

.ex-case__shot--lead img {
  aspect-ratio: 16 / 10;
}

.ex-case__shot--pair-a {
  grid-column: 1 / span 5;
}

.ex-case__shot--pair-a img {
  aspect-ratio: 4 / 5;
}

.ex-case__shot--pair-b {
  grid-column: 6 / span 7;
  margin-top: clamp(1.5rem, 4vw, 3.5rem);
}

.ex-case__shot--pair-b img {
  aspect-ratio: 16 / 11;
}

.ex-case__shot--wide {
  grid-column: 1 / -1;
}

.ex-case__shot--wide img {
  aspect-ratio: 16 / 9;
}

.ex-case__shot--pair-c {
  grid-column: 1 / span 7;
}

.ex-case__shot--pair-c img {
  aspect-ratio: 5 / 4;
}

.ex-case__shot--pair-d {
  grid-column: 8 / span 5;
  margin-top: clamp(1.2rem, 3vw, 2.8rem);
}

.ex-case__shot--pair-d img {
  aspect-ratio: 3 / 4;
}

.ex-case__shot--finale {
  grid-column: 1 / -1;
}

.ex-case__shot--finale img {
  aspect-ratio: 16 / 10;
}

.js-enabled .ex-case__shot-media {
  opacity: 0;
  clip-path: inset(78% 0 0 0);
  transform: translate3d(0, 28px, 0) scale(1.03);
  transition:
    opacity 1100ms var(--ex-ease),
    clip-path 1300ms var(--ex-ease),
    transform 1300ms var(--ex-ease);
}

.js-enabled .ex-case__shot.is-visible .ex-case__shot-media {
  opacity: 1;
  clip-path: inset(0 0 0 0);
  transform: translate3d(0, 0, 0) scale(1);
}

.js-enabled .ex-case__caption {
  opacity: 0;
  transition: opacity 900ms var(--ex-ease) 180ms;
}

.js-enabled .ex-case__shot.is-visible .ex-case__caption {
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  .js-enabled .ex-case__shot.is-visible .ex-case__shot-trigger:hover img {
    transform: scale(1.015);
    transition: transform 560ms var(--ex-ease);
  }

  .ex-case__shot img {
    transition: transform 560ms var(--ex-ease);
  }
}

.ex-case__details-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.35rem, 3vw, 2.2rem) clamp(1.5rem, 3vw, 2.5rem);
  width: 100%;
  max-width: 56.25rem;
  min-width: 0;
}

.ex-case__details-list > div {
  min-width: 0;
}

.ex-case__details-list dt {
  margin: 0 0 0.35rem;
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ex-muted);
}

.ex-case__details-list dd {
  margin: 0;
  font-size: var(--type-base);
  line-height: var(--leading-reading);
  color: var(--ex-soft);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  min-width: 0;
}

.ex-case__download {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(10, 10, 10, 0.28);
  transition: border-color 0.3s ease;
}

.ex-case__download:hover,
.ex-case__download:focus-visible {
  border-color: rgba(10, 10, 10, 0.8);
}

.ex-case__nav {
  display: grid;
  gap: clamp(1.1rem, 2.4vh, 1.8rem);
  padding: clamp(2.8rem, 7vh, 4.6rem) 0 calc(var(--base-space) * 12);
  border-top: 1px solid rgba(10, 10, 10, 0.1);
  min-width: 0;
}

.ex-case__nav-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.85rem 1.5rem;
}

.ex-case__nav-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem 2rem;
  align-items: start;
}

.ex-case__nav-row:has(.ex-case__nav-link:only-child) {
  grid-template-columns: minmax(0, 1fr);
}

.ex-case__nav-link {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  font-size: clamp(0.68rem, 1vw, 0.82rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ex-ink);
  border-bottom: 0;
  transition: color 0.3s ease;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  line-height: 1.45;
}

.exhibition-nav-link {
  position: relative;
  display: inline-block;
  text-decoration: none;
  width: fit-content;
}

.exhibition-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.08em;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 350ms cubic-bezier(.16, 1, .3, 1);
}

.exhibition-nav-link:hover::after,
.exhibition-nav-link:focus-visible::after {
  transform: scaleX(1);
}

.ex-case__nav-link--all {
  letter-spacing: 0.14em;
}

.ex-case__nav-link--prev {
  text-align: right;
  justify-self: end;
}

.ex-case__nav-link:hover,
.ex-case__nav-link:focus,
.ex-case__nav-link:focus-visible {
  color: rgba(10, 10, 10, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  .exhibition-nav-link::after {
    transition: none;
  }
}

.ex-case__artist-list {
  margin: 0;
  max-width: 54rem;
  font-size: clamp(0.72rem, 1.05vw, 0.88rem);
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--ex-ink);
}

.ex-case__curator {
  margin: 0.35rem 0 0;
  font-size: clamp(0.72rem, 1.05vw, 0.88rem);
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ex-muted);
}

.js-enabled .ex-case-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 900ms var(--ex-ease),
    transform 900ms var(--ex-ease);
}

.js-enabled .ex-case-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Lightbox */
.ex-lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: rgba(10, 10, 10, 0.94);
}

.ex-lightbox.is-open {
  display: flex;
}

.ex-lightbox__figure {
  margin: 0;
  max-width: min(94vw, 1400px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.ex-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: transparent;
}

.ex-lightbox__caption {
  margin: 0;
  max-width: 56ch;
  text-align: center;
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.62);
  font-style: normal;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.18em;
}

.ex-lightbox__caption > span {
  display: block;
}

.ex-lightbox__caption em {
  font-style: italic;
}

.ex-lightbox__close {
  position: absolute;
  top: clamp(1rem, 3vw, 1.6rem);
  right: clamp(1rem, 3vw, 1.6rem);
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
}

.ex-lightbox__close:hover,
.ex-lightbox__close:focus-visible {
  text-decoration: underline;
}

.ex-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.ex-lightbox__nav--prev {
  left: clamp(0.6rem, 2vw, 1.4rem);
}

.ex-lightbox__nav--next {
  right: clamp(0.6rem, 2vw, 1.4rem);
}

.ex-lightbox__nav:hover,
.ex-lightbox__nav:focus-visible {
  color: #fff;
}

@media (max-width: 900px) {
  .ex-case__about,
  .ex-case__notes,
  .ex-case__details {
    grid-template-columns: 1fr;
    row-gap: 1.35rem;
    column-gap: 0;
  }

  .ex-case__about > .ex-case__kicker,
  .ex-case__notes > .ex-case__kicker,
  .ex-case__details > .ex-case__kicker {
    max-width: none;
  }

  .ex-case__about-grid,
  .ex-case__about-grid.is-long,
  .ex-case__about-grid.is-short {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 1.25rem;
  }

  .ex-case__notes-grid,
  .ex-case__notes-grid.is-long,
  .ex-case__notes-grid--single {
    columns: 1;
    column-width: auto;
    max-width: 100%;
  }

  .ex-case__details-list {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .ex-case__nav-row {
    grid-template-columns: 1fr;
  }

  .ex-case__nav-link--prev {
    text-align: left;
    justify-self: start;
  }

  .ex-case__title {
    max-width: 100%;
    font-size: clamp(2.6rem, 12vw, 4.8rem);
    letter-spacing: -0.028em;
  }

  .ex-case__manifesto {
    max-width: 100%;
  }

  .ex-case__mosaic {
    grid-template-columns: 1fr;
  }

  .ex-case__shot--lead,
  .ex-case__shot--pair-a,
  .ex-case__shot--pair-b,
  .ex-case__shot--wide,
  .ex-case__shot--pair-c,
  .ex-case__shot--pair-d,
  .ex-case__shot--finale {
    grid-column: 1;
    margin-top: 0;
  }

  .ex-case__shot--pair-a img,
  .ex-case__shot--pair-b img,
  .ex-case__shot--pair-c img,
  .ex-case__shot--pair-d img {
    aspect-ratio: 4 / 3;
  }

  .ex-lightbox__nav {
    top: auto;
    bottom: clamp(1rem, 4vw, 1.8rem);
    transform: none;
  }

  .ex-lightbox__nav--prev {
    left: calc(50% - 3.2rem);
  }

  .ex-lightbox__nav--next {
    right: calc(50% - 3.2rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .js-enabled .ex-case-reveal,
  .js-enabled .ex-case__title-mask,
  .js-enabled .ex-case__shot-media,
  .js-enabled .ex-case__caption {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
    clip-path: none !important;
  }
}

/* YouTube video grid — Kai Yoda */
.ex-case__videos {
  margin-top: clamp(3rem, 8vh, 5.5rem);
  padding-bottom: calc(var(--base-space, 8px) * 10);
  max-width: none;
  width: 100%;
}

.ex-case__video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.2vw, 1.6rem);
  margin-top: clamp(1.2rem, 3vh, 2rem);
  width: 100%;
}

.ex-case__video-card {
  min-width: 0;
  width: 100%;
}

.ex-case__video-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
  width: 100%;
}

.ex-case__video-embed,
.ex-case__video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.ex-case__video-sound {
  position: static;
  display: inline-block;
  width: fit-content;
  margin-top: 0.55rem;
  z-index: auto;
  border: 0;
  background: transparent;
  color: rgba(17, 17, 17, 0.72);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.2rem 0;
  text-decoration: none;
  text-underline-offset: 0.18em;
}

.ex-case__video-sound:hover,
.ex-case__video-sound:focus-visible {
  text-decoration: underline;
  outline: none;
}

.ex-case__video-title {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: var(--ex-soft, rgba(10, 10, 10, 0.68));
}

@media (max-width: 720px) {
  .ex-case__video-grid {
    grid-template-columns: 1fr;
  }
}

/* Per-exhibition framing — keep works visually centered in cropped mosaics */
.page-ex--kai-yoda .ex-case__shot--lead img { object-position: 38% 52%; }
.page-ex--kai-yoda .ex-case__shot--pair-a img { object-position: 50% 45%; }
.page-ex--kai-yoda .ex-case__shot--pair-b img { object-position: 48% 50%; }
.page-ex--kai-yoda .ex-case__shot--wide img { object-position: 50% 46%; }
.page-ex--kai-yoda .ex-case__shot--pair-c img { object-position: 52% 48%; }
.page-ex--kai-yoda .ex-case__shot--pair-d img { object-position: 45% 50%; }
.page-ex--kai-yoda .ex-case__shot--finale img { object-position: 50% 48%; }

.page-ex--laura-footes .ex-case__shot--lead img { object-position: 50% 45%; }
.page-ex--laura-footes .ex-case__shot--pair-a img { object-position: 48% 48%; }
.page-ex--laura-footes .ex-case__shot--pair-b img { object-position: 52% 46%; }
.page-ex--laura-footes .ex-case__shot--wide img { object-position: 50% 44%; }
.page-ex--laura-footes .ex-case__shot--pair-c img { object-position: 50% 48%; }
.page-ex--laura-footes .ex-case__shot--pair-d img { object-position: 48% 50%; }
.page-ex--laura-footes .ex-case__shot--finale img { object-position: 50% 46%; }

.page-ex--blake-daniels .ex-case__shot--lead img { object-position: 48% 42%; }
.page-ex--blake-daniels .ex-case__shot--pair-a img { object-position: 58% 48%; }
.page-ex--blake-daniels .ex-case__shot--pair-b img { object-position: 45% 46%; }
.page-ex--blake-daniels .ex-case__shot--wide img { object-position: 50% 45%; }
.page-ex--blake-daniels .ex-case__shot--pair-c img { object-position: 50% 48%; }
.page-ex--blake-daniels .ex-case__shot--pair-d img { object-position: 48% 50%; }
.page-ex--blake-daniels .ex-case__shot--finale img { object-position: 50% 46%; }

