:root {
  color-scheme: dark;
  --black: #000;
  --white: #f2f2f2;
  --grey: #8a8a8a;
  --line: #303030;
  --pad: clamp(1rem, 3vw, 3rem);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--black);
  color: var(--white);
  font-family: "Avenir Next", Avenir, "Helvetica Neue", "Segoe UI", sans-serif;
  font-weight: 300;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  color: inherit;
  font: inherit;
}
::selection {
  color: var(--black);
  background: var(--white);
}

header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  padding: 1.25rem var(--pad);
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.opening {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(3rem, 8vh, 6rem);
  padding: 6rem var(--pad) 3rem;
  background: #000;
  text-align: center;
}
.opening h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 4rem);
  font-weight: 300;
  letter-spacing: -0.025em;
}
.identity {
  display: grid;
  gap: 1.75rem;
}
.setup {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--line);
  color: var(--grey);
  list-style: none;
  font-size: clamp(0.72rem, 1vw, 0.82rem);
  line-height: 1.45;
  letter-spacing: 0.05em;
}
.setup li {
  list-style: none;
}
.setup li::marker {
  content: "";
}
.setup li:first-child {
  color: var(--white);
  font-weight: 600;
}
.enter {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  width: clamp(8rem, 13vw, 10rem);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition:
    color 0.2s,
    background 0.2s;
}
.enter i {
  font-size: 1rem;
  font-style: normal;
}
.enter:hover {
  color: var(--black);
  background: var(--white);
}

.exhibition {
  padding: clamp(6rem, 11vw, 11rem) var(--pad);
}
.gallery {
  display: flow-root;
  position: relative;
}
.gallery-path {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.gallery-path path {
  fill: none;
  stroke: rgba(242, 242, 242, 0.68);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 2 10;
  vector-effect: non-scaling-stroke;
}
.artwork {
  position: relative;
  z-index: 1;
  width: 100%;
  margin: 0;
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.7s,
    transform 0.7s;
}
.artwork.visible {
  opacity: 1;
  transform: none;
}
.artwork button {
  display: block;
  width: fit-content;
  max-width: min(90vw, 100%);
  margin-left: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.frame {
  display: flex;
  width: fit-content;
  max-width: min(90vw, 100%);
  max-height: 90svh;
  overflow: hidden;
  background: transparent;
}
.frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(90vw, 100%);
  max-height: 90svh;
  object-fit: contain;
  filter: grayscale(1);
  transition: filter 0.35s;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
.artwork button:hover img {
  filter: grayscale(0);
}
.artwork figcaption {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.65rem;
  margin-top: 0.65rem;
  border-top: 1px solid var(--line);
}
.artwork small {
  color: var(--grey);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
}
.empty {
  min-height: 45vh;
  display: grid;
  place-items: center;
  color: var(--grey);
  border: 1px solid var(--line);
  font-size: 0.7rem;
}

footer {
  display: flex;
  justify-content: center;
  padding: 4rem var(--pad);
  border-top: 1px solid var(--line);
}
footer a {
  padding: 0.8rem 1rem;
  border: 1px solid var(--grey);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition:
    color 0.2s,
    background 0.2s;
}
footer a:hover {
  color: var(--black);
  background: var(--white);
}

.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 1rem;
  border: 0;
  color: var(--white);
  background: rgba(0, 0, 0, 0.98);
  opacity: 0;
  transition: opacity 0.2s;
}
.lightbox[open] {
  display: grid;
  grid-template-columns: 4rem 1fr 4rem;
  place-items: center;
  opacity: 1;
}
.lightbox::backdrop {
  background: #000;
}
.lightbox figure {
  margin: 0;
  max-width: min(78vw, 1100px);
  max-height: 93vh;
}
.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 84vh;
  margin: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
.lightbox figcaption {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.7rem;
}
.lightbox figcaption small {
  color: var(--grey);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
}
.lightbox-close,
.lightbox-nav {
  width: 3rem;
  height: 3rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #000;
  cursor: pointer;
  transition: border-color 0.2s;
}
.lightbox-close:hover,
.lightbox-nav:hover {
  border-color: var(--white);
}
.lightbox-close {
  position: fixed;
  z-index: 2;
  top: 1rem;
  right: 1rem;
  font-size: 1.3rem;
}

@media (max-width: 720px) {
  .lightbox[open] {
    grid-template-columns: 1fr 1fr;
    align-content: center;
    gap: 1rem;
  }
  .lightbox figure {
    grid-column: 1 / -1;
    grid-row: 1;
    max-width: 94vw;
  }
  .lightbox-nav {
    grid-row: 2;
  }
  .lightbox-nav.prev {
    justify-self: end;
  }
  .lightbox-nav.next {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
  .artwork {
    opacity: 1;
    transform: none;
  }
}
