/* Section labels precede the images; artwork titles and descriptions follow. */
:root {
  --fg: #e5e2dc;
  --muted: #b9b6b0;
}

body {
  isolation: isolate;
  font-family: ExhibitionSerif, Georgia, serif;
  font-size: 19px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.site-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
}

.site-background video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  visibility: hidden;
  transition: opacity .65s ease;
}

.site-background video.is-current {
  opacity: 1;
  visibility: visible;
}

.site-background video.is-entering {
  z-index: 1;
  opacity: 1;
  visibility: visible;
}

.site-background::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: rgba(0, 0, 0, .72);
  opacity: var(--background-shade, 1);
  transition: opacity .2s linear;
}

.background-motion {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease;
}

.background-motion.is-visible {
  opacity: 1;
}

.text-motion-active {
  filter: url("#text-ripple");
}

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .text-motion-active {
    filter: none;
  }
}

body.watching-film .site-background video {
  object-fit: contain;
}

body.watching-film .site-header {
  background: linear-gradient(rgba(0, 0, 0, .65), transparent);
  border-color: transparent;
}

.film-finale {
  height: 100vh;
  height: 100svh;
  scroll-margin-top: -110px;
  margin-top: 110px;
  padding: 32px clamp(20px, 4vw, 64px);
  position: relative;
  display: flex;
  align-items: flex-end;
  color: #fff;
}

.film-finale-controls {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  font: 400 11px/1.5 ExhibitionSans, Arial, sans-serif;
  text-shadow: 0 1px 8px #000;
}

.film-finale-controls p {
  margin: 0;
  letter-spacing: .13em;
}

.film-timeline {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 14px;
  font-variant-numeric: tabular-nums;
}

#film-duration {
  text-align: right;
}

#film-seek {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 24px;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
}

#film-seek::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(to right, #fff var(--film-progress, 0%), rgba(255,255,255,.35) var(--film-progress, 0%));
}

#film-seek::-moz-range-track {
  height: 2px;
  border-radius: 2px;
  background: rgba(255,255,255,.35);
}

#film-seek::-moz-range-progress {
  height: 2px;
  background: #fff;
}

#film-seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -5px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 5px rgba(0,0,0,.5);
}

#film-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 5px rgba(0,0,0,.5);
}

#film-seek:focus-visible {
  outline: 1px solid #fff;
  outline-offset: 5px;
  border-radius: 2px;
}

#film-seek:disabled {
  cursor: default;
  opacity: .4;
}

.film-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.film-actions button,
.film-actions a {
  padding: 8px 0;
}

.film-actions button:hover,
.film-actions a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .site-background::after,
  .site-background video {
    transition: none;
  }
}

.site-header {
  background: rgba(8, 8, 8, .72);
}

.background-toggle {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: .05em;
  text-align: left;
}

.brand {
  display: block;
  width: 210px;
  flex: 0 0 auto;
  line-height: 0;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
  filter: invert(1);
  opacity: .9;
}

.artwork {
  isolation: isolate;
  background: transparent;
}

/* Each region uses its original coordinates, so the composition remains unchanged. */
.composition {
  background: transparent;
}

.composition-stage {
  position: relative;
  width: min(100%, calc(var(--image-height-limit, 1100px) * var(--composition-ratio)));
  aspect-ratio: var(--composition-ratio);
  margin-inline: auto;
}

.chapter-tresor .composition {
  --image-height-limit: 800px;
}

.image-filters {
  position: absolute;
  pointer-events: none;
}

/* Original lettering stays visible independently of the interactive photographs. */
.composition-lettering {
  position: absolute;
  display: block;
  overflow: hidden;
  z-index: 2;
  isolation: isolate;
  cursor: default;
  user-select: none;
}

.lettering-source {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: opacity .2s ease;
}

.artwork[data-ink] > img {
  filter: url(#ink-alpha);
  transition: opacity .2s ease;
}

[data-ink][data-motion="active"] > .lettering-source,
.artwork[data-ink][data-motion="active"] > img {
  opacity: 0;
}

.artwork-region {
  position: absolute;
  overflow: hidden;
}

.composition .artwork-region img {
  position: absolute;
  max-width: none;
  max-height: none;
  object-fit: fill;
}

/* Each Treasure Room display pairs its overall view with a detail. */
.composition-grid .composition-stage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px 48px;
  width: 100%;
  aspect-ratio: auto;
}

.composition-grid .artwork-region {
  position: relative;
  aspect-ratio: 3 / 2;
}

@media (max-width: 650px) {
  .composition-grid .composition-stage {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .composition-grid .artwork-region:nth-child(2n + 3) {
    margin-top: 20px;
  }
}

.artwork-region .zoom-hint {
  bottom: 6px;
  right: 6px;
  padding: 2px 6px;
  font-size: 16px;
  line-height: 1.4;
  opacity: 0;
}

.artwork-region:hover .zoom-hint,
.artwork-region:focus-visible .zoom-hint {
  opacity: 1;
}

#photo-frame {
  position: relative;
  overflow: hidden;
  flex: none;
}

#photo-frame #large-photo {
  position: absolute;
  max-width: none;
  max-height: none;
  object-fit: fill;
}

@media (hover: none) {
  .artwork-region .zoom-hint {
    display: none;
  }
}

.artwork img {
  -webkit-user-drag: none;
  user-select: none;
}

.artwork-motion {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}

.artwork-motion.is-visible {
  opacity: 1;
}

.zoom-hint {
  z-index: 2;
}

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .artwork-motion {
    display: none;
  }
}

.site-header,
.chapter-nav,
.eyebrow,
.zoom-hint,
.film-link,
.site-footer > a,
.footer-brand,
.lightbox-toolbar,
.lightbox-bottom {
  font-family: ExhibitionSans, Arial, sans-serif;
}

.hero-copy,
.chapter-heading,
.chapter-intro {
  max-width: 470px;
  text-align: left;
}

.hero-copy {
  max-width: none;
  margin: 0 0 32px;
  padding-bottom: 0;
}

.chapter-heading {
  margin-bottom: 28px;
}

.chapter .chapter-heading h2.eyebrow {
  font: 400 10px/1.6 ExhibitionSans, Arial, sans-serif;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.eyebrow {
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: .13em;
  margin-bottom: 16px;
}

.eyebrow span {
  margin-right: 14px;
}

.hero h1,
.chapter h2,
.gift h3,
.footer-title {
  font-family: ExhibitionSerif, Georgia, serif;
  font-weight: 400;
  text-align: left;
  letter-spacing: 0;
}

.hero h1 {
  font: 400 10px/1.6 ExhibitionSans, Arial, sans-serif;
  letter-spacing: .13em;
  margin: 0;
}

.translation {
  color: #fff;
  position: static;
  font-size: 21px;
  line-height: 1.35;
  font-style: normal;
  margin: 26px 0 0;
  text-align: left;
}

.hero-footer {
  display: block;
  max-width: 470px;
  font-size: 17px;
  line-height: 1.5;
  margin-top: 26px;
  text-align: left;
}

.hero-footer p {
  margin: 0 0 14px;
}

.hero-footer p:last-child {
  text-align: left;
}

.intro-line {
  display: block;
}

.text-unit {
  display: inline-block;
}

.hero-footer p,
.chapter-description p,
#photo-caption {
  text-wrap: pretty;
}

.chapter-subtitle,
.gift h3,
.chapter-nav a {
  text-wrap: balance;
}

.chapter-intro {
  display: block;
  margin: 32px 0 0;
}

.chapter h2 {
  font-size: 29px;
  line-height: 1.18;
  margin: 0 0 13px;
}

.chapter-subtitle,
.chapter h2.chapter-subtitle {
  font-size: 17px;
  line-height: 1.5;
  margin: 0;
}

.caption-title,
.gift h3 {
  color: #fff;
}

.chapter-description {
  font-size: 19px;
  line-height: 1.55;
  margin-top: 23px;
  text-align: left;
}

.chapter-description p {
  margin: 0 0 17px;
}

.chapter-description p:last-child {
  margin-bottom: 0;
}

.chapter-description:empty {
  display: none;
}

.gift h3 {
  max-width: 470px;
  font-size: 17px;
  line-height: 1.5;
  text-transform: uppercase;
  margin: 0 0 26px;
}

.gift h3 span {
  display: block;
  font-size: 10px;
  line-height: 1.6;
  margin: 0 0 7px;
}

/* Keep the original groups and lettering, with the detail group underneath. */
.gift .paired-images {
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.gift .composition-stage {
  width: 100%;
}

.gift + .gift {
  margin-top: clamp(72px, 8vw, 110px);
}

.design-images {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
}

.design-images > figure:last-child {
  grid-column: 1 / -1;
}

@media (max-width: 750px) {
  .design-images {
    grid-template-columns: minmax(0, 1fr);
  }
}

.site-footer {
  max-width: 1100px;
  padding-left: 26px;
  padding-right: 26px;
  text-align: left;
}

.footer-title {
  font-size: 29px;
  line-height: 1.2;
  margin-bottom: 25px;
}

.site-footer > a {
  font-size: 11px;
  letter-spacing: .06em;
  margin: 16px 0;
}

.footer-brand {
  font-size: 10px;
  letter-spacing: .15em;
}

.film {
  display: block;
  border: 0;
  padding: 0;
  margin-top: 38px;
}

.film-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.film-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.closing-film video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.film-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
}

.film-caption .film-link {
  font-size: 11px;
}

.film-unavailable {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.film-status {
  font-size: 17px;
  color: var(--muted);
  margin: 12px 0 0;
}

@media (max-width: 750px) {
  .film-finale {
    scroll-margin-top: -95px;
  }

  .brand {
    width: 145px;
  }

  #menu-toggle {
    font-size: 11px;
    max-width: none;
    white-space: nowrap;
  }

  #menu-toggle span {
    margin-left: 6px;
  }

  .hero-copy {
    margin: 0 0 26px;
    padding-bottom: 0;
  }

  .translation {
    font-size: 20px;
    margin-top: 26px;
  }

  .hero-footer {
    font-size: 17px;
  }

  .hero-footer p:last-child {
    margin-top: 14px;
  }

  .chapter h2 {
    font-size: 26px;
  }

  .chapter-intro {
    margin: 26px 0 0;
  }

  .chapter-description {
    font-size: 18px;
    line-height: 1.6;
  }

  .site-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .footer-title {
    font-size: 27px;
  }
}
