/* ==========================================================================
   Album Card — LP Sleeve + Vinyl
   Pure square sleeve with vinyl disc sliding out on hover.
   No info bar — the artwork IS the identity.
   ========================================================================== */

.album-card {
  position: relative;
  cursor: pointer;
  transition: transform var(--duration-normal) var(--ease-out-expo),
              box-shadow var(--duration-normal) var(--ease-out-expo);
}

.album-card:hover {
  transform: scale(1.04);
  z-index: 2;
}

.album-card:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
  z-index: 2;
}

/* ---- Artwork (the sleeve) ---- */
.album-card__artwork {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  z-index: 1;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--duration-normal) var(--ease-out-expo);
}

.album-card:hover .album-card__artwork {
  box-shadow: var(--shadow-lg);
}

.album-card__artwork img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out-expo),
              filter var(--duration-normal) ease;
}

.album-card:hover .album-card__artwork img {
  transform: scale(1.05);
  filter: brightness(1.06) saturate(1.12);
}

/* ==========================================================================
   Vinyl LP Disc — Hyper-realistic multi-layer CSS
   ==========================================================================
   Layer stack (top to bottom):
   1. ::after  — conic light reflection sheen (the vinyl "rainbow")
   2. image 1  — radial: spindle hole + label + rim (opaque zones)
   3. image 2  — repeating-radial: fine groove micro-texture
   4. bg-color — base vinyl surface
   ========================================================================== */

.album-card__vinyl {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: 88%;
  aspect-ratio: 1;
  border-radius: 50%;
  margin-top: 6%;
  transform: translateX(0%);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);

  /* Depth & rim lighting */
  box-shadow:
    -6px 0 30px hsl(0 0% 0% / 0.7),           /* drop shadow behind sleeve */
    inset 0 0 0 1px hsl(240 6% 18% / 0.6),     /* outer rim highlight */
    inset 0 0 0 3px hsl(240 6% 8%),             /* rim thickness */
    inset 0 0 40px hsl(0 0% 0% / 0.25);         /* inner depth shadow */

  /* Base vinyl color */
  background-color: #08080E;

  background-image:
    /* ── Layer 1: Label + hole + dead-wax + rim (opaque) ── */
    radial-gradient(circle at center,
      /* Spindle hole */
      #030306 0%,
      #030306 3.8%,
      /* Hole rim — raised metal edge */
      hsl(240 6% 28%) 3.8%,
      hsl(240 6% 20%) 4.2%,
      hsl(240 6% 12%) 4.6%,
      /* Label — warm gold, expanded to realistic LP proportion (~24%) */
      #6B4E0A 5.2%,
      #7A5C10 6%,
      #96720E 7.5%,
      #B8882A 9%,
      #C49630 10.5%,
      #D4A033 12%,
      #DFBA5C 13.5%,
      /* label detail ring 1 */
      #C89830 14%,
      #DFBA5C 14.5%,
      /* mid label body */
      #D4A033 16%,
      #DFBA5C 17%,
      /* label detail ring 2 */
      #C89830 17.5%,
      #DFBA5C 18%,
      /* label fade-out */
      #D4A033 19.5%,
      #C49630 20.5%,
      #B8882A 21.5%,
      #96720E 22.5%,
      #7A5C10 23.2%,
      #6B4E0A 23.8%,
      /* Label edge — sharp ring */
      hsl(240 6% 22%) 24%,
      hsl(240 6% 14%) 24.2%,
      hsl(240 6% 8%) 24.5%,
      /* Dead wax (smooth area between label and grooves) */
      #0A0A12 25%,
      #0B0B14 25.5%,
      #09090F 26%,
      /* Groove area — transparent so repeating-radial shows through */
      transparent 26.5%,
      transparent 91%,
      /* Lead-out groove → transition back to opaque */
      #09090F 91.5%,
      #0B0B14 92%,
      /* Outer rim — raised edge with highlight */
      hsl(240 6% 10%) 92.5%,
      hsl(240 6% 13%) 93.5%,
      hsl(240 6% 16%) 95%,
      hsl(240 6% 14%) 96.5%,
      hsl(240 6% 11%) 98%,
      hsl(240 6% 7%) 100%
    ),

    /* ── Layer 2: Fine groove micro-texture ── */
    repeating-radial-gradient(circle at center,
      #08080E 0px,
      #08080E 1.6px,
      #0E0E19 1.6px,
      #0C0C16 2px,
      #08080E 2.3px
    );
}

/* Light sheen — the signature vinyl "rainbow" reflection */
.album-card__vinyl::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 160deg at 46% 44%,
    transparent 0deg,
    hsl(200 30% 90% / 0.06) 25deg,
    hsl(220 25% 85% / 0.04) 45deg,
    transparent 75deg,
    hsl(40 30% 90% / 0.05) 130deg,
    hsl(30 25% 85% / 0.03) 160deg,
    transparent 200deg,
    hsl(280 20% 85% / 0.04) 250deg,
    hsl(300 15% 80% / 0.03) 280deg,
    transparent 320deg,
    hsl(200 30% 90% / 0.04) 350deg,
    transparent 360deg
  );
  /* Mask: hide sheen over label and hole, show only on groove area */
  mask-image: radial-gradient(circle at center,
    transparent 0%, transparent 24.5%,
    black 26.5%, black 91%,
    transparent 92%
  );
  -webkit-mask-image: radial-gradient(circle at center,
    transparent 0%, transparent 24.5%,
    black 26.5%, black 91%,
    transparent 92%
  );
  pointer-events: none;
}

/* Slide-out + idle spin on hover */
.album-card:hover .album-card__vinyl {
  --vinyl-peek: 40%;
  transform: translateX(40%) rotate(15deg);
  animation: vinyl-spin 4s linear 0.6s infinite;
}

@keyframes vinyl-spin {
  from { transform: translateX(var(--vinyl-peek, 40%)) rotate(0deg); }
  to { transform: translateX(var(--vinyl-peek, 40%)) rotate(360deg); }
}

/* Scale down slide-out to fit within smaller column gaps */
@media (max-width: 1024px) {
  .album-card:hover .album-card__vinyl {
    --vinyl-peek: 20%;
    transform: translateX(20%) rotate(10deg);
  }
}

@media (max-width: 768px) {
  .album-card:hover .album-card__vinyl {
    --vinyl-peek: 14%;
    transform: translateX(14%) rotate(8deg);
  }
}

@media (max-width: 480px) {
  .album-card:hover .album-card__vinyl {
    --vinyl-peek: 12%;
    transform: translateX(12%) rotate(6deg);
  }
}

/* ---- Album title overlay ---- */
.album-card__title-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 0.75rem 0.75rem;
  background: linear-gradient(to top, hsl(240 10% 4% / 0.85) 0%, hsl(240 10% 4% / 0.4) 60%, transparent 100%);
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--duration-normal) var(--ease-out-cubic),
              transform var(--duration-normal) var(--ease-out-cubic);
  pointer-events: none;
  z-index: 3;
}

.album-card:hover .album-card__title-overlay,
.album-card:focus-visible .album-card__title-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Play overlay ---- */
.album-card__play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: hsl(240 10% 6% / 0.45);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out-cubic);
}

.album-card:hover .album-card__play {
  opacity: 1;
}

.album-card__play-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  filter: drop-shadow(0 0 12px var(--color-accent-subtle));
  transform: scale(0.7);
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

.album-card:hover .album-card__play-icon {
  transform: scale(1);
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .album-card__vinyl {
    transition: none;
  }
  .album-card:hover .album-card__vinyl {
    animation: none;
  }
}
