@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./assets/dm-sans-400.ttf") format("truetype");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./assets/dm-sans-500.ttf") format("truetype");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./assets/dm-sans-600.ttf") format("truetype");
}

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./assets/dm-sans-700.ttf") format("truetype");
}

:root {
  color-scheme: light;
  --ink: #101013;
  --accent: #e91e63;
  --violet: #4826a8;
  --card: #faf7ff;
  --page-edge: clamp(1.5rem, 6.667vw, 6rem);
  --grid-gap: clamp(0.5rem, 1.1vw, 1rem);
  --footer-height: 1.0625rem;
  --stage-top: clamp(8.75rem, 19.3svh, 11.25rem);
  --deck-bottom-gap: clamp(2rem, 7.5svh, 4.375rem);
  --stack-step: clamp(0.625rem, 0.9vw, 0.8125rem);
  font-family: "DM Sans", Arial, Helvetica, sans-serif;
}

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

html {
  min-width: 20rem;
  background: #ffffff;
}

body {
  min-width: 20rem;
  margin: 0;
  overflow-x: clip;
  background: #ffffff;
  color: var(--ink);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-180%);
  border-radius: 0.25rem;
  padding: 0.65rem 0.8rem;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.8rem;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-grid {
  display: grid;
  width: min(calc(100% - (2 * var(--page-edge))), 78rem);
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--grid-gap);
}

.site-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  width: 100%;
  padding-top: clamp(3.25rem, 5.6svh, 3.5rem);
  pointer-events: none;
}

.site-header__shell {
  display: flex;
  width: min(calc(100% - 3rem), 70.5rem);
  min-height: 2rem;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  pointer-events: auto;
}

.wordmark {
  display: block;
  line-height: 0;
  text-decoration: none;
}

.wordmark__asset {
  display: block;
  width: 7.5625rem;
  height: 2.5rem;
}

.desktop-nav {
  display: flex;
  min-height: 2.25rem;
  align-items: stretch;
  gap: clamp(1.5rem, 2.85vw, 2.55rem);
}

.nav-action,
.download-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.nav-action {
  padding: 0 0.05rem;
  color: var(--ink);
  text-decoration: none;
}

.nav-action::after {
  position: absolute;
  right: 0;
  bottom: -0.4rem;
  left: 0;
  height: 0.125rem;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--accent);
  content: "";
  transition: transform 180ms ease;
}

.nav-action__icon {
  width: 1.125rem;
  height: 1.125rem;
  flex: 0 0 auto;
  object-fit: contain;
}

.menu-toggle,
.mobile-nav {
  display: none;
}

.deck-scroll {
  position: relative;
  min-height: 100svh;
}

.deck-stage {
  position: sticky;
  top: 0;
  display: grid;
  height: 100svh;
  align-items: start;
  justify-items: center;
  overflow: clip;
}

.deck-grid {
  height: 100%;
}

.deck-slot {
  display: flex;
  min-width: 0;
  grid-column: 1 / -1;
  justify-content: center;
}

.deck-stack {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 1.865 / 1;
  isolation: isolate;
  opacity: 1;
  perspective: clamp(50rem, 82vw, 80rem);
  perspective-origin: 50% 42%;
  transform-style: preserve-3d;
}

.deck-card {
  position: absolute;
  inset: 0;
  z-index: calc(20 - var(--card-index, 0));
  overflow: hidden;
  border-radius: clamp(0.375rem, 0.55vw, 0.5rem);
  background: var(--card);
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: 50% 44%;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform, opacity;
}

.deck-card--one {
  --card-index: 0;
}

.deck-card__desktop-artwork {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.deck-card--two {
  --card-index: 1;
  transform: translate3d(0, calc(-1 * var(--stack-step)), 0) scale(0.982);
  opacity: 0.7;
}

.deck-card--three {
  --card-index: 2;
  transform: translate3d(0, calc(-2 * var(--stack-step)), 0) scale(0.964);
  opacity: 0.5;
}

.deck-card:nth-child(n + 4) {
  opacity: 0;
}

.download-action {
  min-height: 2.625rem;
  border: 0;
  border-radius: 0.3rem;
  padding: 0.5rem 0.85rem;
  background: var(--violet);
  color: #ffffff;
  cursor: pointer;
}

.download-action img {
  filter: brightness(0) invert(1);
}

.download-action:focus-visible {
  outline: 0.125rem solid #3b92ff;
  outline-offset: 0.2rem;
}

.site-footer {
  position: fixed;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--footer-height);
  background: linear-gradient(90deg, var(--violet) 0%, #7e239d 52%, var(--accent) 100%);
}

.nav-action:focus-visible,
.download-action:focus-visible,
.wordmark:focus-visible,
.menu-toggle:focus-visible,
.mobile-nav a:focus-visible {
  outline: 0.125rem solid var(--violet);
  outline-offset: 0.25rem;
}

@media (max-width: 47.9375rem) {
  :root {
    --page-edge: 1rem;
    --grid-gap: 0.5rem;
    --stage-top: clamp(8.5rem, 19.3svh, 11.25rem);
  }

  .site-header {
    padding-top: clamp(3.25rem, 5.6svh, 3.5rem);
  }

  .site-header__shell {
    width: calc(100% - (2 * clamp(2.75rem, 12vw, 3.45rem)));
  }

  .wordmark__asset {
    width: 6rem;
    height: auto;
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    width: 1.5rem;
    height: 1.5rem;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.25rem;
    border: 0;
    padding: 0.1rem;
    background: transparent;
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    width: 100%;
    height: 0.1rem;
    border-radius: 10rem;
    background: var(--ink);
    transform-origin: center;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(0.35rem) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-0.35rem) rotate(-45deg);
  }

  .mobile-nav {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: clamp(2.75rem, 12vw, 3.45rem);
    display: grid;
    min-width: min(15rem, calc(100vw - 2rem));
    gap: 0.125rem;
    border-radius: 0.5rem;
    padding: 0.45rem;
    background: #ffffff;
    box-shadow: 0 0.75rem 2.25rem rgba(16, 16, 19, 0.12);
    opacity: 0;
  }

  .mobile-nav[hidden] {
    display: none;
  }

  .mobile-nav a,
  .mobile-nav .download-action {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-radius: 0.25rem;
    padding: 0.75rem;
    font-size: 0.875rem;
    line-height: 1;
  }

  .mobile-nav a {
    color: var(--ink);
    text-decoration: none;
  }

  .mobile-nav a:active {
    background: #f2f0f8;
  }

  .mobile-nav .download-action {
    min-height: 0;
    justify-content: flex-start;
  }

  .deck-slot {
    grid-column: 2 / span 10;
  }

  .deck-stack {
    aspect-ratio: 0.517 / 1;
  }

  .deck-card__desktop-artwork {
    display: none;
  }

}

@media (hover: hover) and (pointer: fine) {
  .nav-action:hover::after {
    transform: scaleX(1);
  }
}

.nav-action:focus-visible::after {
  transform: scaleX(1);
}

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

  .deck-card::after {
    animation: none;
  }
}
