.categoryLanding {
  background: #f5f3ef;
  color: var(--ink, #151511);
  overflow-x: clip;
}

.categoryLanding * {
  box-sizing: border-box;
}

.categoryLanding .shopLinks a[aria-current="page"] {
  color: var(--orange, #f05a2a);
}

.categorySrOnly {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.categoryGallery {
  width: min(1500px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(28px, 4vw, 64px) 0 clamp(72px, 8vw, 128px);
}

.categoryGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.25vw, 20px);
}

.categoryCard {
  --card-delay: 0ms;
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 18px;
  background: #171714;
  color: #fff;
  isolation: isolate;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(14, 13, 10, .08);
  animation: categoryReveal .7s cubic-bezier(.22, 1, .36, 1) backwards;
  animation-delay: var(--card-delay);
  transition: transform .45s cubic-bezier(.22, 1, .36, 1), box-shadow .45s ease;
}

.categoryCard:nth-child(2) { --card-delay: 60ms; }
.categoryCard:nth-child(3) { --card-delay: 120ms; }
.categoryCard:nth-child(4) { --card-delay: 180ms; }
.categoryCard:nth-child(5) { --card-delay: 240ms; }
.categoryCard:nth-child(6) { --card-delay: 300ms; }
.categoryCard:nth-child(7) { --card-delay: 360ms; }
.categoryCard:nth-child(8) { --card-delay: 420ms; }
.categoryCard:nth-child(9) { --card-delay: 480ms; }

.categoryCard img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  filter: saturate(.94) contrast(1.02);
  transition: transform .85s cubic-bezier(.16, 1, .3, 1), filter .65s ease;
}

.categoryCard::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(180deg, rgba(8, 8, 7, .02) 35%, rgba(8, 8, 7, .8) 100%);
  transition: background .55s ease;
}

.categoryCard::after {
  position: absolute;
  right: 28px;
  bottom: 26px;
  left: 28px;
  height: 2px;
  content: "";
  background: var(--orange, #f05a2a);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1);
}

.categoryCard span {
  position: absolute;
  right: 28px;
  bottom: 38px;
  left: 28px;
  color: #fff;
  font-size: clamp(28px, 2.35vw, 44px);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1;
  text-shadow: 0 3px 24px rgba(0, 0, 0, .42);
  transform: translateY(0);
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), letter-spacing .5s ease;
}

.categoryCard:hover,
.categoryCard:focus-visible {
  z-index: 2;
  transform: translateY(-7px);
  box-shadow: 0 24px 58px rgba(14, 13, 10, .2);
}

.categoryCard:hover img,
.categoryCard:focus-visible img {
  transform: scale(1.08) rotate(.35deg);
  filter: saturate(1.1) contrast(1.06);
}

.categoryCard:hover::before,
.categoryCard:focus-visible::before {
  background: linear-gradient(180deg, rgba(8, 8, 7, 0) 25%, rgba(8, 8, 7, .9) 100%);
}

.categoryCard:hover::after,
.categoryCard:focus-visible::after {
  transform: scaleX(1);
}

.categoryCard:hover span,
.categoryCard:focus-visible span {
  letter-spacing: -.025em;
  transform: translateY(-8px);
}

.categoryCard:focus-visible {
  outline: 3px solid var(--orange, #f05a2a);
  outline-offset: 4px;
}

@keyframes categoryReveal {
  from {
    opacity: 0;
    transform: translateY(26px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@media (max-width: 640px) {
  .categoryLanding .shopLinks.open {
    display: flex;
  }

  .categoryGallery {
    width: calc(100% - 24px);
    padding-top: 12px;
  }

  .categoryGrid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .categoryCard {
    aspect-ratio: 4 / 3;
    border-radius: 16px;
  }

  .categoryCard span {
    right: 22px;
    bottom: 31px;
    left: 22px;
    font-size: clamp(31px, 10vw, 42px);
  }

  .categoryCard::after {
    right: 22px;
    bottom: 21px;
    left: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .categoryCard {
    animation: none;
    transition: none;
  }

  .categoryCard img,
  .categoryCard::after,
  .categoryCard span {
    transition: none;
  }
}
