@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 100%;
  font-display: swap;
  src: url("/assets/bricolage-grotesque.woff2") format("woff2");
}

/* Black, crimson and pink, as on the Dunkies Disney packaging. */
:root {
  color-scheme: dark;

  --black: #09090b;
  --card: #16161a;
  --crimson: #b70649;
  --crimson-deep: #7d0433;
  --pink: #ff5c9a;
  --pink-soft: #ffc2d8;
  --white: #fff;
  --grey: #a9a3ad;

  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  font-family: "Bricolage Grotesque", ui-rounded, "Segoe UI", system-ui, sans-serif;
  color: var(--white);
  background:
    radial-gradient(34rem 26rem at 50% 7rem, rgb(183 6 73 / 0.42), transparent 70%),
    var(--black);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Sparkles scattered over the page, like the ones across the packaging. */
.sky {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.sky i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  background: var(--crimson);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  animation: twinkle var(--pace) ease-in-out var(--wait) infinite alternate backwards;
}

.sky i:nth-child(3n) {
  background: var(--pink);
}

main {
  position: relative;
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 4.5svh, 3.5rem) 1.25rem 2rem;
}

header {
  text-align: center;
  margin-bottom: 1.5rem;
}

h1 {
  margin: 0;
  animation: settle 800ms var(--ease-out) backwards;
}

/* The white logo is used as a mask so it can be filled with a pink foil
   gradient and have a highlight swept across it. */
.logo {
  display: block;
  width: min(13.5rem, 58vw);
  aspect-ratio: 720 / 808;
  margin: 0 auto;
  background-image:
    linear-gradient(112deg, transparent 42%, rgb(255 255 255 / 0.9) 50%, transparent 58%),
    linear-gradient(180deg, #ff8ab6, #ec2f78 50%, #b70649);
  background-size:
    300% 100%,
    100% 100%;
  background-position:
    150% 0,
    0 0;
  background-repeat: no-repeat;
  -webkit-mask: url("/assets/logo-mask.webp") center / contain no-repeat;
  mask: url("/assets/logo-mask.webp") center / contain no-repeat;
  filter: drop-shadow(0 0 1.5rem rgb(255 92 154 / 0.35));
  animation: shine 7s ease-in-out 900ms infinite;
}

header p {
  margin: 1rem auto 0;
  max-width: 19rem;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--pink-soft);
  text-wrap: balance;
  animation: settle 800ms var(--ease-out) 120ms backwards;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  perspective: 60rem;
}

/* The links are dealt in one after another, like cards onto a table. */
nav li {
  animation: deal 600ms var(--ease-out) backwards;
}
nav li.wide {
  grid-column: 1 / -1;
  animation-delay: 260ms;
}
nav li:nth-child(2) {
  animation-delay: 360ms;
}
nav li:nth-child(3) {
  animation-delay: 440ms;
}
nav li:nth-child(4) {
  animation-delay: 520ms;
}
nav li:nth-child(5) {
  animation-delay: 600ms;
}

nav a {
  position: relative;
  display: flex;
  height: 100%;
  overflow: hidden;
  border-radius: 1.125rem;
  color: var(--white);
  text-decoration: none;
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition:
    transform 160ms ease-out,
    box-shadow 200ms ease;
}

/* Glare that follows the pointer or finger (see foil.js). */
nav a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at var(--glare-x, 50%) var(--glare-y, 0%),
    rgb(255 255 255 / 0.28),
    transparent 55%
  );
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
}

nav a:hover::after,
nav a:active::after {
  opacity: 1;
}

nav a:active {
  transform: scale(0.975);
}

nav a:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}

.text {
  position: relative;
  display: grid;
  gap: 0.125rem;
  min-width: 0;
}

.text strong {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.text small {
  font-size: 0.875rem;
  line-height: 1.3;
}

/* Whatnot is the main thing to do here, so it is the one loud card. */
.featured {
  align-items: center;
  gap: 1rem;
  min-height: 6.25rem;
  padding: 1rem 1.25rem 1rem 1rem;
  background: linear-gradient(160deg, #d2135c, var(--crimson) 45%, var(--crimson-deep));
  box-shadow:
    0 1rem 2.25rem -1rem rgb(255 60 130 / 0.75),
    inset 0 1px 0 rgb(255 255 255 / 0.25);
}

.swoosh {
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: 78%;
  fill: var(--pink);
}

.swoosh path:first-child {
  opacity: 0.28;
}

.swoosh path:last-child {
  opacity: 0.4;
}

/* The Whatnot app icon. The rounded corners here only shape the pulsing ring. */
.chip {
  position: relative;
  flex: none;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 34%;
  box-shadow: 0 0 0 0 rgb(255 228 6 / 0.6);
  animation: ping 2.8s ease-out 1.6s infinite;
}

.chip svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0.25rem 0.5rem rgb(0 0 0 / 0.3));
}

.featured .text strong {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.featured .text small {
  font-size: 0.9375rem;
  color: #ffe1ec;
}

/* The other four are trading-card tiles: artwork on top, name plate below. */
.tile {
  --glow: var(--crimson);
  flex-direction: column;
  gap: 0.625rem;
  padding: 0.5rem 0.5rem 0.875rem;
  background: linear-gradient(180deg, #1d1d22, var(--card));
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.09),
    0 0.75rem 1.5rem -1rem #000;
}

.tile:hover {
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--glow) 70%, transparent),
    0 1rem 2rem -1rem var(--glow);
}

.tile .art {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: 0.75rem;
  background: var(--art);
}

.tile .art svg {
  width: 3.5rem;
  height: 3.5rem;
  filter: drop-shadow(0 0.25rem 0.5rem rgb(0 0 0 / 0.3));
}

.tile .art img {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  object-fit: contain;
  filter: drop-shadow(0 0.25rem 0.75rem rgb(0 0 0 / 0.5));
}

.tile .text {
  padding: 0 0.375rem;
}

.tile .text strong {
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.tile .text small {
  color: var(--grey);
}

.instagram {
  --glow: #e1306c;
  --art: linear-gradient(35deg, #f9a03f, #e1306c 45%, #833ab4 80%, #515bd4);
}

.discord {
  --glow: #5865f2;
  --art: linear-gradient(160deg, #7783ff, #4752d6);
}

.rips {
  --glow: #6a5cf0;
  --art: radial-gradient(circle at 50% 45%, #3b2c9c, #120e33 78%);
}

.checklist {
  --glow: #d9b45a;
  --art: radial-gradient(circle at 50% 45%, #5a4a1c, #1a1508 78%);
}

footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--grey);
  animation: settle 800ms var(--ease-out) 800ms backwards;
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(0.75rem) scale(0.96);
  }
}

@keyframes deal {
  from {
    opacity: 0;
    transform: translateY(2.25rem) rotate(-4deg) scale(0.94);
  }
}

@keyframes twinkle {
  from {
    opacity: 0.1;
    transform: scale(0.45) rotate(-12deg);
  }
  to {
    opacity: 0.9;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes shine {
  0%,
  70% {
    background-position:
      150% 0,
      0 0;
  }
  100% {
    background-position:
      -50% 0,
      0 0;
  }
}

@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 rgb(255 228 6 / 0.6);
  }
  60%,
  100% {
    box-shadow: 0 0 0 0.875rem rgb(255 228 6 / 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
