@import url("https://fonts.googleapis.com/css2?family=Fanwood+Text&family=Montserrat:wght@300;400&display=swap");

:root {
  --black: #080808;
  --ink: #d8d4cd;
  --muted: #76736e;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

html { background: var(--black); }

.js body {
  opacity: 1;
}

.js body:not(.is-page-ready) .intro h1,
.js body:not(.is-page-ready) .subtitle,
.js body:not(.is-page-ready) .stamp { opacity: 0; }

.js body.is-page-leaving { pointer-events: none; }

body {
  overflow: hidden;
  color: var(--ink);
  background: var(--black);
  font-family: "Montserrat", Arial, sans-serif;
}

body.is-collection {
  overflow-x: hidden;
  overflow-y: auto;
}

.home {
  position: relative;
  display: grid;
  grid-template-columns: minmax(330px, 39vw) 1fr;
  width: 100vw;
  height: 100svh;
  min-height: 650px;
}

.intro {
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 7vw 3vw 7vw 7vw;
  text-align: left;
  pointer-events: none;
}

.intro__copy {
  pointer-events: auto;
  transition: opacity 320ms ease, transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}


h1 {
  margin: 0;
  color: #fff;
  font-family: "Fanwood Text", "Fanwood", Georgia, serif;
  font-size: clamp(2.8rem, 4.2vw, 5rem);
  font-weight: 400;
  font-style: normal;
  line-height: 1;
  letter-spacing: -0.025em;
}

.subtitle {
  margin: 1.5rem 0 0;
  color: #8c8984;
  font-size: clamp(0.62rem, 0.64vw, 0.76rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-transform: uppercase;
}

.collection-trigger {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  margin: 3.4rem 0 0;
  padding: 0 0 0.38rem;
  color: #d8d4cd;
  border: 0;
  border-bottom: 1px solid rgb(255 255 255 / 0.18);
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease;
}

.collection-trigger span {
  font-family: "Fanwood Text", "Fanwood", Georgia, serif;
  font-size: 1.25rem;
}

.collection-trigger small {
  color: #77736e;
  font-size: 0.54rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.collection-trigger:hover,
.collection-trigger:focus-visible {
  color: #fff;
  border-color: rgb(255 255 255 / 0.55);
  outline: none;
}

.tabletop {
  position: relative;
  min-width: 0;
  margin: 0;
}

.stamp-burst {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  will-change: left, top;
}

.stamp-burst__photo {
  --burst-x: 0px;
  --burst-y: 0px;
  --burst-angle: 0deg;
  position: absolute;
  left: 0;
  bottom: 0;
  display: block;
  width: clamp(108px, 11.5vw, 180px);
  height: auto;
  padding: 0;
  border: clamp(3px, 0.28vw, 5px) solid #f1eee7;
  background: none;
  opacity: 0;
  box-shadow: 0 15px 30px rgb(0 0 0 / 0.28);
  transform: translate3d(-50%, 12px, 0) rotate(0deg) scale(0.2);
  transform-origin: 50% 100%;
  transition:
    opacity 150ms ease,
    transform 380ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--burst-out-delay);
  will-change: transform, opacity;
}

.stamp-burst__photo:nth-child(1) { --burst-x: -90px; --burst-y: -46px; --burst-angle: -12deg; }
.stamp-burst__photo:nth-child(2) { --burst-x: -48px; --burst-y: -84px; --burst-angle: -6deg; }
.stamp-burst__photo:nth-child(3) { --burst-x: 0px; --burst-y: -106px; --burst-angle: 0deg; }
.stamp-burst__photo:nth-child(4) { --burst-x: 48px; --burst-y: -84px; --burst-angle: 6deg; }
.stamp-burst__photo:nth-child(5) { --burst-x: 90px; --burst-y: -46px; --burst-angle: 12deg; }

.stamp-burst.is-visible .stamp-burst__photo {
  opacity: 1;
  transform:
    translate3d(calc(-50% + var(--burst-x)), var(--burst-y), 0)
    rotate(var(--burst-angle))
    scale(1);
  transition-delay: var(--burst-delay);
}

.stamp {
  --angle: 0deg;
  --drag-tilt: 0deg;
  --lift: 0px;
  --stamp-scale: 1;
  position: absolute;
  z-index: 1;
  width: clamp(132px, 14vw, 228px);
  margin: 0;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transform: translate3d(0, var(--lift), 0) rotate(calc(var(--angle) + var(--drag-tilt))) scale(var(--stamp-scale));
  transform-origin: 50% 55%;
  transition:
    transform 420ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 140ms ease;
  will-change: left, top, transform;
}

.stamp:hover,
.stamp:focus-visible {
  z-index: 40;
  outline: none;
  --lift: -1px;
  --stamp-scale: 1.004;
  opacity: 0.97;
}

.stamp.is-dragging {
  z-index: 50;
  cursor: grabbing;
  --lift: -5px;
  --stamp-scale: 1.016;
  opacity: 1;
  transition:
    transform 110ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 100ms ease;
}

.stamp.is-settling {
  transition: transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

.stamp__paper {
  width: 100%;
}

.stamp img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.home.is-leaving .intro__copy,
.home.is-leaving .stamp {
  opacity: 0;
  transition: opacity 260ms ease;
}

.stamp--one { left: 3%; top: 17%; --angle: -12deg; }
.stamp--two { left: 36%; top: 12%; --angle: 8deg; }
.stamp--three { left: 60%; top: 37%; --angle: -6deg; }
.stamp--four { left: 8%; top: 54%; --angle: 11deg; }
.stamp--five { left: 34%; top: 66%; --angle: -14deg; }
.stamp--six { left: 29%; top: 34%; --angle: 4deg; }
.stamp--seven { left: 64%; top: 61%; --angle: -8deg; }

.collection-page {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(280px, 32vw) minmax(0, 1fr);
  min-height: 100svh;
  visibility: hidden;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 380ms ease, transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.collection-page.is-visible {
  position: relative;
  inset: auto;
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.collection-heading {
  align-self: start;
  display: flex;
  height: 100svh;
  min-height: 100svh;
  flex-direction: column;
  justify-content: center;
  padding: 7vw 3vw 7vw 7vw;
}

.collection-heading__copy {
  margin-top: auto;
  margin-bottom: auto;
}

.collection-back {
  align-self: flex-start;
  margin: 0;
  padding: 0.35rem 0;
  color: #6f6c67;
  border: 0;
  background: none;
  font: 300 0.56rem/1 "Montserrat", sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 180ms ease;
}

.collection-back:hover,
.collection-back:focus-visible {
  color: #fff;
  outline: none;
}

.collection-heading h1 {
  font-size: clamp(3.2rem, 5vw, 6rem);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  align-items: start;
  gap: clamp(1.5rem, 3vw, 4rem);
  padding: 10vh 5vw 18vh 2vw;
}

.gallery-photo {
  --photo-x: 0px;
  --photo-y: 0px;
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  transform: translate3d(var(--photo-x), var(--photo-y), 0);
  transition: opacity 180ms ease, transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
  touch-action: pan-y;
}

.gallery-photo:nth-child(3n + 2) {
  margin-top: 12vh;
}

.gallery-photo:hover,
.gallery-photo:focus-visible {
  z-index: 4;
  opacity: 0.94;
  outline: none;
}

.gallery-photo.is-photo-dragging {
  z-index: 12;
  cursor: grabbing;
  transition: opacity 100ms ease;
}

.gallery-photo img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  visibility: hidden;
  padding: clamp(1rem, 4vw, 4rem);
  background: rgb(5 5 5 / 0.92);
  opacity: 0;
  transition: opacity 280ms ease, visibility 0s linear 280ms;
}

.lightbox.is-open {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.lightbox__image {
  display: block;
  max-width: min(88vw, 1500px);
  max-height: 86svh;
  width: auto;
  height: auto;
  transform: scale(0.9);
  opacity: 0;
  transition: transform 520ms cubic-bezier(0.16, 1, 0.3, 1), opacity 260ms ease;
}

.lightbox.is-open .lightbox__image {
  transform: scale(1);
  opacity: 1;
}

.lightbox__close {
  position: absolute;
  top: clamp(1rem, 2.5vw, 2rem);
  right: clamp(1rem, 2.5vw, 2rem);
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  color: #fff;
  border: 0;
  background: none;
  font: 300 2rem/1 "Fanwood Text", Georgia, serif;
  cursor: pointer;
  opacity: 0.72;
  transition: opacity 180ms ease, transform 180ms ease;
}

.lightbox__close:hover,
.lightbox__close:focus-visible {
  opacity: 1;
  transform: rotate(4deg);
  outline: none;
}

@media (max-width: 760px) {
  body {
    overflow-y: auto;
  }

  .home {
    display: block;
    height: auto;
    min-height: 100svh;
  }

  .intro {
    height: 31svh;
    min-height: 220px;
    justify-content: center;
    padding: 1.75rem 1.5rem 1rem;
  }

  .collection-trigger {
    margin-top: 2.2rem;
  }

  h1 {
    font-size: clamp(2.25rem, 10.5vw, 3.65rem);
  }

  .tabletop {
    height: 96svh;
    min-height: 750px;
  }

  .stamp-burst__photo {
    width: clamp(82px, 25vw, 116px);
    border-width: 3px;
  }

  .stamp-burst__photo:nth-child(1) { --burst-x: -50px; --burst-y: -29px; }
  .stamp-burst__photo:nth-child(2) { --burst-x: -27px; --burst-y: -59px; }
  .stamp-burst__photo:nth-child(3) { --burst-x: 0px; --burst-y: -78px; }
  .stamp-burst__photo:nth-child(4) { --burst-x: 27px; --burst-y: -59px; }
  .stamp-burst__photo:nth-child(5) { --burst-x: 50px; --burst-y: -29px; }

  .stamp {
    width: clamp(122px, 36vw, 178px);
  }

  .stamp--one { left: 5%; top: 2%; }
  .stamp--six { left: 54%; top: 7%; }
  .stamp--two { left: 10%; top: 21%; }
  .stamp--five { left: 55%; top: 30%; }
  .stamp--three { left: 14%; top: 41%; }
  .stamp--seven { left: 56%; top: 52%; }
  .stamp--four { left: 14%; top: 63%; }

  body.is-collection {
    overflow: hidden;
  }

  .collection-page {
    display: flex;
    width: 100vw;
    height: 100svh;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
  }

  .collection-heading {
    flex: 0 0 78vw;
    min-height: 100svh;
    padding: 1.75rem 1.5rem 2rem;
    scroll-snap-align: start;
  }

  .collection-heading h1 {
    font-size: clamp(2.8rem, 14vw, 4.5rem);
  }

  .photo-grid {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 1.4rem;
    width: max-content;
    padding: 9svh 16vw 9svh 0;
  }

  .gallery-photo,
  .gallery-photo:nth-child(3n + 2) {
    flex: 0 0 auto;
    width: auto;
    height: auto;
    max-height: 76svh;
    margin: 0;
    touch-action: pan-x;
    scroll-snap-align: center;
  }

  .gallery-photo img {
    width: auto;
    max-width: 82vw;
    height: auto;
    max-height: 76svh;
  }

  .lightbox {
    padding: 1rem;
  }

  .lightbox__image {
    max-width: 92vw;
    max-height: 82svh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stamp,
  .stamp.is-dragging,
  .stamp.is-settling {
    transition: none;
  }

  .stamp-burst__photo {
    transition: none;
  }

  .intro h1,
  .subtitle,
  .stamp {
    animation: none !important;
  }

  .collection-page,
  .intro__copy,
  .gallery-photo,
  .lightbox,
  .lightbox__image {
    transition: none;
  }
}
