/* Site components that replace the Sandbox plugins (see assets/js/src/site.js). */

/* Homepage slideshow: stacked images, crossfaded */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #1e2228;
}
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slide.is-active { opacity: 1; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(30, 34, 40, .4);
}
.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
}

/* Album masonry: JS deals items into .masonry-col columns; CSS columns without JS */
.masonry { column-gap: 1.5rem; }
@media (min-width: 768px) { .masonry { columns: 2; } }
@media (min-width: 1200px) { .masonry { columns: 3; } }
.masonry-item { break-inside: avoid; margin-bottom: 1.5rem; }
.masonry.is-ready { display: flex; align-items: flex-start; gap: 1.5rem; columns: auto; }
.masonry-col { flex: 1 1 0; min-width: 0; }
.masonry-item img { width: 100%; height: auto; }

/* YouTube poster until clicked */
.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: .4rem;
  overflow: hidden;
}
.video-embed > button {
  all: unset;
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.video-embed img,
.video-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}
.video-embed-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4.5rem;
  height: 4.5rem;
  margin: -2.25rem 0 0 -2.25rem;
  border-radius: 50%;
  background: var(--bs-primary);
  box-shadow: 0 0 0 .5rem rgb(255 255 255 / .25);
  transition: transform .2s ease;
}
.video-embed-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: .8rem 0 .8rem 1.3rem;
  border-color: transparent transparent transparent #fff;
}
.video-embed > button:hover .video-embed-play,
.video-embed > button:focus-visible .video-embed-play { transform: scale(1.08); }
.video-embed > button:focus-visible { outline: 3px solid var(--bs-primary); outline-offset: -3px; }

/* Exhibitions/Publications table of contents */
@media (min-width: 768px) { .toc-list { columns: 2; column-gap: 2rem; } }
.toc-list li { break-inside: avoid; padding: .15rem 0; }
.multialbum-entry { scroll-margin-top: 7rem; }
