:root {
  --bg: #0b0d12;
  --ink: #f4f7fb;
  --muted: #9aa7b7;
}

* {
  box-sizing: border-box;
}

html,
body {
  overflow-y: hidden;
  overflow-y: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(90vw 60vh at 20% 12%, #171c24 0%, transparent 58%),
    radial-gradient(70vw 60vh at 80% 88%, #131821 0%, transparent 56%),
    linear-gradient(170deg, #0b0d12 0%, #11151c 52%, #0b0d12 100%);
}

.center {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1.2rem;
  padding: 2rem 1rem;
}

.intro {
  margin: 0;
  color: var(--ink);
  opacity: 0.88;
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  text-align: center;
}

.coverflow {
  width: min(980px, 100%);
  height: min(70vh, 520px);
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 0.25rem;
}

.track {
  position: relative;
  height: 100%;
  perspective: 1100px;
  transform-style: preserve-3d;
  touch-action: pan-y;
}

.card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(220px, 30vw, 320px);
  aspect-ratio: 1 / 1.1;
  margin: 0;
  padding: 1.2rem;
  display: grid;
  place-items: center;
  gap: 0;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
  backdrop-filter: blur(6px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  transform-style: preserve-3d;
  filter: grayscale(1) saturate(0.15) brightness(0.6);
  transition: transform 320ms ease, opacity 320ms ease, filter 320ms ease, box-shadow 320ms ease;
}

.card.is-falling {
  animation-name: fall-in;
  animation-duration: 760ms;
  animation-timing-function: cubic-bezier(0.16, 0.84, 0.26, 1.03);
  animation-fill-mode: both;
}

.card img {
  width: clamp(84px, 11vw, 124px);
  height: clamp(84px, 11vw, 124px);
  object-fit: contain;
}

.card:focus-visible {
  outline: 2px solid #90b8ff;
  outline-offset: 4px;
}

.card.is-active {
  filter: none;
  box-shadow: 0 30px 56px rgba(0, 0, 0, 0.58);
}

@keyframes fall-in {
  0% {
    transform: var(--fall-start);
    opacity: 0;
  }

  72% {
    transform: var(--fall-overshoot);
    opacity: 1;
  }

  100% {
    transform: var(--fall-target);
    opacity: var(--fall-opacity, 1);
  }
}

.nav {
  height: 48px;
  width: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.nav:hover {
  background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 700px) {
  .center {
    min-height: 100dvh;
    padding: 1.25rem 0.8rem;
    gap: 0.75rem;
  }

  .intro {
    font-size: clamp(0.9rem, 3.8vw, 1rem);
  }

  .coverflow {
    grid-template-columns: 1fr;
    height: min(62dvh, 500px);
  }

  .nav {
    display: none;
  }
}
