@font-face {
  font-family: "ABC Maxi Round";
  src:
    url("/fonts/ABCMaxiRoundVariable.woff2") format("woff2"),
    url("/fonts/ABCMaxiRoundVariable.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* -------- BASE -------- */
body {
  margin: 0 auto 20px;
  width: 50%;
  max-width: 800px;
  background: #000;
  color: #fff;
  font-family: "ABC Maxi Round", sans-serif;
  font-size: 18px;
  font-weight: 300;
}

html {
  scrollbar-gutter: stable;
}

body.collection-page {
  width: inherit;
  max-width: 100%;
  margin: 0;
  padding: 0 20px 20px;
}

body.full-width {
  width: inherit;
  max-width: 100%;
  margin: 0;
  padding: 0 20px 20px;
}

body.home {
  max-width: none;
}

body.collection-page header {
  position: static;
}

@media (max-width: 768px) {
  body {
    width: inherit;
    max-width: 100%;
    margin: 20px;
  }
}

header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: inherit;
  padding: 12px 20px;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  box-sizing: border-box;
}

@media (min-width: 769px) {
  header {
    background: transparent;
  }
}

@media (max-width: 900px) {
  header {
    background: #000;
  }
}

header nav {
  display: flex;
  gap: 16px;
}

header nav a[aria-current="page"] {
  color: hotpink;
  text-decoration-thickness: 2px;
  border-bottom: none;
}

/* -------- WORK PAGE THEMES -------- */
body.word-bath {
  background: #012fd7;
}

body.slack {
  background: #dedede;
  color: #000;
}

body.eight-bit-products {
  background: #00b4e5;
  color: #000;
}

body.grover {
  background: #fff;
  color: #333;
}

body.every-day-is-payday {
  background: #27ae60;
  color: #f2c94c;
}

body.fuzzco {
  background: #ff0201;
  color: #fff;
}

/* -------- TYPOGRAPHY -------- */
a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

a:hover {
  color: hotpink;
  border-bottom-color: hotpink;
}

a:has(> img),
a:has(> .image-frame) {
  border-bottom: none;
}

a:has(> img):hover,
a:has(> .image-frame):hover {
  border-bottom-color: transparent;
}

body.home header > a {
  border-bottom: none;
}

.writing-index figure {
  margin-bottom: 16px;
}

p {
  margin-bottom: 16px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 8px;
  font-weight: 700;
}

body.categories h1 {
  font-size: clamp(48px, 10vw, 120px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  text-align: center;
}

body.categories .back-link {
  text-align: center;
  margin-bottom: 32px;
}

body.categories .back-link span {
  margin-right: 8px;
  opacity: 0.6;
}

/* -------- LAYOUT -------- */
section {
  margin: 20px 0;
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: center;
}

.logo-grid a {
  display: block;
  border-bottom: none;
}

.logo-grid img {
  width: 100%;
  height: auto;
  display: block;
}

.two-col-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.two-col-grid figure {
  margin: 0;
}

.two-col-grid img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 900px) {
  .two-col-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .two-col-grid {
    grid-template-columns: 1fr;
  }
}

.big-cartel-three-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.big-cartel-three-grid figure {
  margin: 0;
}

.big-cartel-three-grid img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 900px) {
  .big-cartel-three-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .big-cartel-three-grid {
    grid-template-columns: 1fr;
  }
}

.big-cartel-two-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.big-cartel-two-grid figure {
  margin: 0;
}

.big-cartel-two-grid img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 600px) {
  .big-cartel-two-grid {
    grid-template-columns: 1fr;
  }
}

.grover-benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.grover-benefits-grid figure {
  margin: 0;
}

.grover-benefits-grid img {
  width: 100%;
  height: auto;
  display: block;
}

.grover-signup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.grover-signup-grid figure {
  margin: 0;
}

.grover-signup-grid img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 700px) {
  .grover-signup-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .grover-benefits-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .logo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .logo-grid {
    grid-template-columns: 1fr;
  }
}

hr {
  border: 0;
  border-top: 1px solid currentColor;
  margin: 20px 0;
}

/* -------- MEDIA -------- */
img {
  width: 100%;
  height: auto;
  border-radius: 0.5vw;
}

.image-frame {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 0.5vw;
}

.image-frame.is-loaded {
  background: transparent;
}

.image-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0.02;
  animation: image-skeleton-pulse 1.6s ease-in-out infinite;
  pointer-events: none;
  border-radius: inherit;
}

.image-frame.is-loaded::before {
  opacity: 0;
  animation: none;
}

.image-frame img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 400ms ease;
}

.image-frame.is-loaded img {
  opacity: 1;
}

@keyframes image-skeleton-pulse {
  0%,
  100% {
    opacity: 0.22;
  }
  50% {
    opacity: 0.55;
  }
}

figure {
  margin: 24px 0 40px;
  text-align: center;
}

figcaption {
  opacity: 0.75;
  text-align: center;
}

body.home .masonry figcaption,
body.categories figcaption {
  padding-top: 12px;
}

body.home .masonry figcaption p,
body.categories figcaption p {
  margin: 0;
}

body.home .masonry figcaption p + p,
body.categories figcaption p + p {
  margin-top: 0;
}

/* -------- POSTERS -------- */
.poster-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.poster-grid > * {
  width: 100%;
}

.poster-grid figure {
  margin: 0;
}

@media (max-width: 768px) {
  .poster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* -------- COLUMNS -------- */
.columns {
  display: grid;
  gap: 16px;
}

.columns-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.columns-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.columns-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.columns-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.columns figure {
  margin: 0;
}

.masonry {
  column-count: 2;
  column-gap: 56px;
  max-width: none;
  width: 60%;
  margin: 0 auto;
}

.masonry figure {
  break-inside: avoid;
  margin: 0 0 56px;
}

.masonry figure.span-full {
  column-span: all;
  width: 100%;
}

.masonry figure.tile-small {
  width: 70%;
}

.masonry figure:nth-child(4n + 1) {
  margin-top: 12px;
  transform: translateX(-6px);
}

.masonry figure:nth-child(4n + 2) {
  margin-top: 36px;
  transform: translateX(8px);
}

.masonry figure:nth-child(4n + 3) {
  margin-top: 8px;
  transform: translateX(2px);
}

.masonry figure:nth-child(4n) {
  margin-top: 28px;
  transform: translateX(-4px);
}

.masonry figure:nth-child(5n + 1) {
  margin-top: 44px;
  transform: translateX(12px);
  width: 88%;
}

.masonry figure:nth-child(5n + 2) {
  margin-top: 6px;
  transform: translateX(-10px);
  width: 94%;
}

.masonry figure:nth-child(5n + 4) {
  margin-top: 22px;
  transform: translateX(6px);
  width: 82%;
}

.masonry figure:nth-child(6n + 2) {
  width: 78%;
}

.masonry figure:nth-child(6n + 5) {
  width: 90%;
}

.masonry figure:nth-child(6n + 1) {
  width: 92%;
}

.masonry figure:nth-child(6n + 4) {
  width: 96%;
}

.masonry h1,
.masonry h3,
.masonry > p {
  column-span: all;
  width: 100%;
}

/* -------- INFO PHOTOS -------- */
.info-photo-scatter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 40px;
  row-gap: 0;
  margin-top: 200px;
  position: relative;
}

.info-photo-scatter figure {
  margin: 0;
  position: relative;
  z-index: 1;
}

.info-photo-scatter figure:nth-child(n + 2) {
  margin-top: -140px;
}

.info-photo-scatter figure:nth-child(3),
.info-photo-scatter figure:nth-child(6) {
  grid-column: 1 / -1;
  width: 100%;
  transform: translateX(0) translateY(-80px);
  z-index: 1;
}

.info-photo-scatter figure:nth-child(4n + 1) {
  margin-top: -80px;
  transform: translateX(-26px) translateY(-40px) rotate(-2deg);
  width: 86%;
  z-index: 4;
}

.info-photo-scatter figure:nth-child(4n + 2) {
  margin-top: -120px;
  transform: translateX(34px) translateY(-90px) rotate(2.2deg);
  width: 98%;
  z-index: 5;
}

.info-photo-scatter figure:nth-child(2) {
  z-index: 0;
}

.info-photo-scatter figure:nth-child(4n + 3) {
  margin-top: -140px;
  transform: translateX(22px) translateY(-60px) rotate(-1.6deg);
  width: 78%;
}

.info-photo-scatter figure:nth-child(4n) {
  margin-top: -110px;
  transform: translateX(-30px) translateY(-70px) rotate(1.2deg);
  width: 90%;
  z-index: 3;
}

.info-photo-scatter figure:nth-child(6) {
  width: 52%;
}

.info-photo-scatter figure:nth-child(7) {
  width: 80%;
}

.info-photo-scatter figure:last-child {
  width: 66% !important;
  justify-self: end;
  z-index: 6;
}

@media (max-width: 900px) {
  .info-photo-scatter {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 24px;
    margin-top: 48px;
  }

  .info-photo-scatter figure {
    width: 100%;
    transform: none;
    margin: 0 0 24px;
    z-index: auto;
  }

  .info-photo-scatter figure:nth-child(3),
  .info-photo-scatter figure:nth-child(6) {
    grid-column: auto;
    margin-top: 0;
  }

  .info-photo-scatter figure:nth-child(n + 2) {
    margin-top: 0;
  }

  .info-photo-scatter figure:nth-child(4n + 1),
  .info-photo-scatter figure:nth-child(4n + 2),
  .info-photo-scatter figure:nth-child(4n + 3),
  .info-photo-scatter figure:nth-child(4n) {
    margin-top: 0;
  }
}

@media (max-width: 900px) {
  .masonry {
    column-count: 1;
    column-gap: 0;
    width: 100%;
  }

  .masonry figure {
    width: 100%;
    transform: none;
    margin: 0 0 32px;
  }

  .masonry figure:nth-child(4n + 1),
  .masonry figure:nth-child(4n + 2),
  .masonry figure:nth-child(4n + 3),
  .masonry figure:nth-child(4n) {
    margin-top: 0;
  }
}

/* -------- ICONS -------- */
.icon-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.icon-grid img {
  width: 100%;
}

/* -------- POST LIST -------- */
.post-list article {
  margin-bottom: 80px;
}

/* -------- COLLECTION GRID -------- */
.collection-grid {
  column-count: 6;
  column-gap: 16px;
  font-size: 14px;
}

.my-collection-hero {
  font-size: 9vw;
}

.alcohol-collection .collection-hero {
  font-size: 9.6vw;
  letter-spacing: -0.4vw;
  line-height: 0.9;
  white-space: nowrap;
}

.alcohol-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  column-count: initial;
}

.alcohol-grid .collection-item {
  display: block;
  margin-bottom: 0;
}

.collection-item {
  break-inside: avoid;
  display: inline-block;
  margin-bottom: 16px;
  width: 100%;
}

.collection-item img {
  width: 100%;
}

.collection-item p {
  margin-bottom: 0;
}

@media (min-width: 1400px) {
  .collection-grid {
    column-count: 10;
  }
  .alcohol-grid {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
}

@media (min-width: 1800px) {
  .collection-grid {
    column-count: 14;
  }
  .alcohol-grid {
    grid-template-columns: repeat(14, minmax(0, 1fr));
  }
}

@media (min-width: 2200px) {
  .collection-grid {
    column-count: 20;
  }
  .alcohol-grid {
    grid-template-columns: repeat(20, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .collection-grid {
    column-count: 4;
  }
  .alcohol-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .collection-grid {
    column-count: 3;
  }
  .alcohol-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .collection-grid {
    column-count: 2;
  }
  .alcohol-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* -------- POST NAV -------- */
article nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
}

/* -------- PROJECT NAV -------- */
.project-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.project-nav-item {
  flex: 1;
}

/* -------- CAROUSEL -------- */
.carousel {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  aspect-ratio: 2 / 3;
  overflow: hidden;
}

.carousel .image-frame {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
}

.carousel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}

.carousel img.active {
  opacity: 1;
}
