:root {
  color-scheme: dark;
  font-family: Georgia, 'Times New Roman', serif;
  background: #000;
}

* { box-sizing: border-box; }

html, body, .experience { width: 100%; min-width: 100%; height: 100%; min-height: 100%; margin: 0; overflow: hidden; }

button, a { font: inherit; }

.experience { position: relative; background: #000; color: #fff; }

.wall {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  background: #050505;
}

.wall.is-dragging { cursor: grabbing; }

.mosaic {
  position: absolute;
  width: 3900px;
  height: 2100px;
  left: 50%;
  top: 50%;
  will-change: transform;
}

.intro {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: #000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-mark {
  display: grid;
  place-items: center;
  font: 25px/.8 Georgia, 'Times New Roman', serif;
  letter-spacing: -.13em;
}

body.intro-active .intro { opacity: 1; visibility: visible; }
body.intro-active .intro-mark { animation: intro-mark 1000ms cubic-bezier(.65,0,.35,1) both; }

body.intro-active .mosaic {
  filter: none;
  opacity: 1;
}

body.intro-active .tile {
  opacity: 0;
  filter: blur(3px) saturate(.8);
  transform: translate(var(--scatter-x), var(--scatter-y)) scale(var(--scatter-scale));
}

body.intro-measuring .tile { transform: none !important; }

body.intro-scattering .intro {
  opacity: 0;
  visibility: visible;
  transition: opacity 340ms ease;
}

body.intro-scattering .tile {
  opacity: var(--scatter-opacity);
  transition: opacity 190ms var(--scatter-delay) ease;
}

body.intro-active .masthead,
body.intro-active .dock {
  opacity: 0;
  pointer-events: none;
}

body.intro-leaving .intro {
  opacity: 0;
  visibility: visible;
  transition: opacity 620ms ease;
}

body.intro-leaving .mosaic {
  filter: blur(0);
  opacity: 1;
  transition: transform 680ms cubic-bezier(.2,.85,.2,1);
}

body.intro-leaving .tile {
  opacity: 1;
  filter: none;
  transform: none;
  transition: transform 390ms cubic-bezier(.2,.85,.2,1) var(--assemble-delay), opacity 280ms ease var(--assemble-delay), filter 280ms ease var(--assemble-delay);
}

body.intro-leaving .masthead,
body.intro-leaving .dock {
  opacity: 1;
  pointer-events: auto;
}

body.intro-leaving .masthead {
  transform: translateX(-50%) scale(1);
  transition: opacity 600ms 620ms ease, transform 800ms 520ms cubic-bezier(.2,.85,.2,1);
}

body.intro-leaving .dock { transition: opacity 520ms 900ms ease, transform 700ms 820ms cubic-bezier(.2,.85,.2,1); }

.tile {
  position: absolute;
  width: 214px;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #121212;
  cursor: pointer;
  appearance: none;
}

.tile::after {
  position: absolute;
  content: '';
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 0.5px rgb(0 0 0 / 30%);
  background: linear-gradient(180deg, rgb(0 0 0 / 4%) 15%, rgb(0 0 0 / 24%) 100%);
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

.tile:hover::after, .tile:focus-visible::after {
  background: rgb(255 255 255 / 13%);
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 72%);
}

.tile img, .tile video { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; transition: transform 420ms cubic-bezier(.2,.8,.2,1), filter 220ms ease; }
.tile:hover img, .tile:hover video, .tile:focus-visible img, .tile:focus-visible video { transform: scale(1.055); filter: saturate(1.15) contrast(1.05); }
.tile:focus-visible { outline: 0; }

.video-tile::before {
  position: absolute;
  z-index: 2;
  right: 9px;
  bottom: 8px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  content: '▶';
  color: #fff;
  font: 10px/1 Arial, sans-serif;
  text-indent: 1px;
  background: rgb(5 9 6 / 72%);
  border: 1px solid rgb(255 255 255 / 45%);
  border-radius: 50%;
  opacity: .1;
  transform: scale(.9);
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease;
}

.video-tile:hover::before, .video-tile:focus-visible::before, .video-tile.is-previewing::before { opacity: 1; transform: scale(1); background: rgb(26 48 29 / 92%); }

.masthead {
  position: fixed;
  z-index: 3;
  top: 14px;
  left: 50%;
  display: grid;
  width: max-content;
  transform: translateX(-50%);
  color: #fff;
  font-size: clamp(44px, 4.25vw, 70px);
  font-weight: 400;
  line-height: .76;
  letter-spacing: -.07em;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 1px 16px rgb(0 0 0 / 24%);
}

body.intro-active .masthead { transform: translateX(-50%) scale(.86); }

.dock {
  position: fixed;
  z-index: 5;
  bottom: 16px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  padding: 4px 6px;
  transform: translateX(-50%);
  background: rgb(14 22 15 / 90%);
  border: 1px solid rgb(255 255 255 / 11%);
  border-radius: 999px;
  box-shadow: 0 5px 18px rgb(0 0 0 / 20%);
  backdrop-filter: blur(10px);
}

.dock-button {
  min-width: 57px;
  padding: 8px 12px;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  background: rgb(35 48 35 / 82%);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease;
}

.dock-button:hover, .dock-button:focus-visible { background: #405543; outline: none; transform: translateY(-1px); }

.panel, .lightbox {
  position: fixed;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.panel.is-open, .lightbox.is-open { opacity: 1; visibility: visible; }

.panel {
  left: 50%;
  top: 50%;
  width: min(450px, calc(100vw - 32px));
  padding: 42px 32px 33px;
  transform: translate(-50%, -47%);
  color: #0d160f;
  background: #e9e7df;
  border-radius: 3px;
  box-shadow: 0 15px 60px rgb(0 0 0 / 45%);
}

.panel.is-open { transform: translate(-50%, -50%); }

.close {
  position: absolute;
  top: 9px;
  right: 12px;
  width: 30px;
  height: 30px;
  padding: 0;
  color: inherit;
  font: 30px/25px Arial, sans-serif;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.eyebrow { margin: 0 0 16px; font: 11px/1 Arial, sans-serif; letter-spacing: .12em; }
.panel h1 { margin: 0 0 16px; font-size: clamp(36px, 6vw, 56px); font-weight: 400; letter-spacing: -.06em; line-height: .86; }
.panel-copy { margin: 0 0 22px; max-width: 37ch; font-size: 18px; line-height: 1.1; }
.panel-link { color: inherit; font-size: 14px; }

.lightbox { inset: 0; display: grid; place-items: center; padding: 28px; background: #000; }
.lightbox.is-video { background: transparent; transition: opacity 0ms, visibility 0ms, background-color 140ms ease; }
.lightbox.is-video.is-black { background: #000; }
.lightbox img, .lightbox video { max-width: min(930px, 92vw); max-height: calc(100vh - 100px); object-fit: contain; box-shadow: 0 14px 50px rgb(0 0 0 / 50%); }
.lightbox video { width: min(930px, 92vw); background: #000; }
.lightbox-close { top: 16px; right: 22px; color: #fff; }
.lightbox-caption { position: fixed; bottom: 22px; left: 28px; right: 28px; display: flex; justify-content: space-between; font: 11px/1 Arial, sans-serif; letter-spacing: .06em; }
.lightbox img, .lightbox video, .lightbox-caption { position: relative; z-index: 2; }

.media-meta {
  position: fixed;
  z-index: 3;
  top: 16px;
  left: 16px;
  width: min(380px, calc(100vw - 70px));
  color: #fff;
  text-shadow: 0 1px 8px rgb(0 0 0 / 60%);
}

.media-title { margin: 0 0 8px; font-size: 18px; line-height: 1; letter-spacing: -.04em; }
.media-description { margin: 0; font: 18px/1 Georgia, 'Times New Roman', serif; white-space: pre-line; }
.lightbox.is-video .lightbox-caption { display: none; }
.lightbox.is-video .lightbox-close { display: none; }
.lightbox.is-video:not(.is-black) .media-description { opacity: 0; }
.lightbox.is-video:not(.is-black) video, .lightbox.is-video:not(.is-black) .media-controls { visibility: hidden; }

.media-controls {
  position: fixed;
  z-index: 4;
  left: 50%;
  bottom: 16px;
  display: flex;
  width: min(368px, calc(100vw - 32px));
  height: 44px;
  align-items: center;
  gap: 8px;
  padding: 4px 7px;
  transform: translateX(-50%);
  background: #1e1e1e;
  border: 1px solid #464646;
  border-radius: 999px;
  box-shadow: 0 4px 18px rgb(0 0 0 / 35%);
}

.media-control {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  color: #fff;
  font: 14px/1 Arial, sans-serif;
  background: #151515;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.media-control:hover, .media-control:focus-visible { background: #3b3b3b; outline: 0; }
.media-progress { position: relative; flex: 1; height: 4px; overflow: hidden; background: #454545; border-radius: 99px; }
.media-progress span { display: block; width: 0; height: 100%; background: #a4a4a4; }
.media-likes { flex: 0 0 auto; padding-right: 5px; font: 11px/1 Arial, sans-serif; color: #fff; }

.lightbox.is-opening img { animation: player-reveal 680ms 130ms cubic-bezier(.2,.85,.2,1) both; }
.lightbox.is-opening video { animation: player-center-grow 300ms 620ms cubic-bezier(.2,.85,.2,1) both; }
.lightbox.is-opening .lightbox-caption { animation: caption-reveal 580ms 390ms ease both; }
.lightbox.is-opening .media-title { animation: metadata-reveal 180ms ease both; }
.lightbox.is-opening .media-description { animation: metadata-reveal 260ms 360ms ease both; }
.lightbox.is-opening .media-controls { animation: controls-reveal 180ms 360ms ease both; }

.is-filtered .tile img, .is-filtered .tile video { filter: grayscale(1) contrast(1.14); }
.is-filtered .tile:hover img, .is-filtered .tile:hover video { filter: grayscale(.5) contrast(1.12); }

@keyframes intro-mark {
  0%, 9% { opacity: 0; transform: rotate(0deg) scale(.82); }
  20%, 48% { opacity: 1; transform: rotate(0deg) scale(1); }
  80% { opacity: 1; transform: rotate(42deg) scale(1); }
  100% { opacity: 0; transform: rotate(78deg) scale(.9); }
}

@keyframes player-reveal {
  from { opacity: 0; transform: scale(1.12); filter: blur(10px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

@keyframes caption-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes player-center-grow {
  from { opacity: 1; transform: scale(.23); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes metadata-reveal {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes controls-reveal {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
}

@media (max-width: 620px) {
  .masthead { top: 12px; font-size: 45px; }
  .dock { bottom: 12px; }
  .dock-button { min-width: 53px; padding: 8px 10px; }
  .mosaic { transform-origin: center; }
}
