/* =========================================================
   MUSIC
========================================================= */

.music-section {
  position: relative;
  overflow: hidden;

  background:
    radial-gradient(
      circle at 75% 30%,
      rgba(112, 70, 116, 0.13),
      transparent 35%
    ),
    #070707;

  color: #fff;

  padding: 150px 0 120px;
}

/* =========================================================
   MUSIC INTRO
========================================================= */

.music-intro {
  position: relative;

  min-height: 620px;

  margin-bottom: 40px;

  overflow: hidden;

  isolation: isolate;
}

/* =========================================================
   GIANT BACKGROUND WORD
========================================================= */

.music-intro-word {
  position: absolute;

  left: -2vw;
  bottom: -5vw;

  font-family: var(--serif);

  font-size: clamp(13rem, 27vw, 30rem);

  line-height: 0.65;

  font-weight: 400;

  letter-spacing: -0.07em;

  color: rgba(255, 255, 255, 0.035);

  white-space: nowrap;

  pointer-events: none;

  user-select: none;

  transform: translateX(0);
}

/* =========================================================
   CATALOGUE NUMBER
========================================================= */

.music-intro-number {
  position: absolute;

  right: 4vw;
  top: 70px;

  font-family: var(--serif);

  font-size: clamp(8rem, 16vw, 15rem);

  line-height: 0.7;

  color: rgba(255, 255, 255, 0.045);

  letter-spacing: -0.08em;

  pointer-events: none;
}

/* =========================================================
   TOP METADATA
========================================================= */

.music-intro-meta {
  position: absolute;

  top: 15px;
  left: 0;
  right: 0;

  display: flex;

  justify-content: space-between;

  padding-bottom: 15px;

  border-bottom: 1px solid rgba(255, 255, 255, 0.1);

  color: rgba(255, 255, 255, 0.42);

  font-size: 0.52rem;

  text-transform: uppercase;

  letter-spacing: 0.16em;
}

/* =========================================================
   MAIN CONTENT
========================================================= */

.music-intro-content {
  position: absolute;

  left: 7vw;
  top: 155px;

  z-index: 5;
}

/* =========================================================
   KICKER
========================================================= */

.music-intro-kicker {
  display: flex;

  align-items: center;

  gap: 14px;

  margin-bottom: 30px;

  color: rgba(255, 255, 255, 0.5);

  font-size: 0.52rem;

  text-transform: uppercase;

  letter-spacing: 0.18em;
}

.intro-line {
  display: block;

  width: 48px;

  height: 1px;

  background: rgba(255, 255, 255, 0.45);
}

/* =========================================================
   TITLE
========================================================= */

.music-intro-title {
  max-width: 850px;

  margin: 0;

  font-family: var(--serif);

  font-size: clamp(4.8rem, 9vw, 10rem);

  line-height: 0.76;

  font-weight: 400;

  letter-spacing: -0.055em;
}

.music-intro-title em {
  display: inline-block;

  margin-left: 0.1em;

  font-style: italic;

  font-weight: 400;

  transform: translateY(0.08em);
}

/* =========================================================
   DESCRIPTION
========================================================= */

.music-intro-description {
  display: flex;

  align-items: flex-end;

  gap: 80px;

  margin-top: 50px;

  margin-left: 12vw;
}

.music-intro-description p {
  max-width: 290px;

  margin: 0;

  color: rgba(255, 255, 255, 0.48);

  font-size: 0.7rem;

  line-height: 1.8;
}

/* =========================================================
   SCROLL PROMPT
========================================================= */

.music-intro-scroll {
  display: flex;

  align-items: center;

  gap: 14px;

  color: rgba(255, 255, 255, 0.35);

  font-size: 0.48rem;

  text-transform: uppercase;

  letter-spacing: 0.15em;

  white-space: nowrap;
}

.music-intro-scroll i {
  display: grid;

  place-items: center;

  width: 28px;
  height: 28px;

  border: 1px solid rgba(255, 255, 255, 0.22);

  border-radius: 50%;

  font-style: normal;

  font-size: 0.65rem;
}

/* =========================================================
   RELEASE MARKER
========================================================= */

.music-intro-release {
  position: absolute;

  right: 5vw;
  bottom: 80px;

  z-index: 5;

  display: flex;

  flex-direction: column;

  align-items: flex-end;

  gap: 5px;

  text-align: right;
}

.release-label {
  color: rgba(255, 255, 255, 0.3);

  font-size: 0.44rem;

  text-transform: uppercase;

  letter-spacing: 0.16em;
}

.music-intro-release strong {
  font-family: var(--serif);

  font-size: 4rem;

  font-weight: 400;

  line-height: 0.8;

  color: rgba(255, 255, 255, 0.8);
}

.music-intro-release > span:last-child {
  color: rgba(255, 255, 255, 0.48);

  font-size: 0.48rem;

  text-transform: uppercase;

  letter-spacing: 0.13em;
}

/* =========================================================
   VERTICAL RULE
========================================================= */

.music-intro-rule {
  position: absolute;

  left: 4vw;
  top: 0;
  bottom: 0;

  width: 1px;

  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 255, 255, 0.16) 20%,
    rgba(255, 255, 255, 0.16) 80%,
    transparent
  );
}

.music-intro-rule span {
  position: absolute;

  top: 27%;

  left: -2px;

  width: 5px;
  height: 5px;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.65);
}

/* =========================================================
   DESKTOP PARALLAX DEPTH
========================================================= */

@media (min-width: 901px) {
  .music-intro-word {
    will-change: transform;
  }

  .music-intro-number {
    will-change: transform;
  }

  .music-intro-content {
    will-change: transform;
  }

  .music-intro-release {
    will-change: transform;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 720px) {
  .music-intro {
    min-height: 600px;

    margin-bottom: 20px;
  }

  .music-intro-meta {
    gap: 15px;

    font-size: 0.43rem;
  }

  .music-intro-meta span:nth-child(2) {
    display: none;
  }

  .music-intro-word {
    left: -5vw;
    bottom: 20px;

    font-size: 40vw;
  }

  .music-intro-number {
    top: 110px;
    right: 5vw;

    font-size: 35vw;
  }

  .music-intro-content {
    left: 7vw;
    top: 150px;
  }

  .music-intro-title {
    font-size: 4.4rem;

    line-height: 0.78;
  }

  .music-intro-description {
    display: block;

    margin-top: 45px;
    margin-left: 18vw;
  }

  .music-intro-scroll {
    margin-top: 25px;
  }

  .music-intro-release {
    right: 7vw;
    bottom: 50px;
  }

  .music-intro-rule {
    left: 4vw;
  }
}

/* =========================================================
   AMBIENT BACKGROUND
========================================================= */

.music-ambient {
  position: absolute;

  width: 65vw;
  height: 65vw;

  right: -20vw;
  top: 5%;

  border-radius: 50%;

  background: radial-gradient(
    circle,
    rgba(115, 72, 119, 0.22),
    transparent 68%
  );

  filter: blur(35px);

  pointer-events: none;
}

.music-noise {
  position: absolute;
  inset: 0;

  opacity: 0.045;

  pointer-events: none;

  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");

  mix-blend-mode: screen;
}

.music-inner {
  position: relative;
  z-index: 2;
}

/* =========================================================
   HEADER
========================================================= */

.music-heading-row {
  display: flex;

  justify-content: space-between;
  align-items: flex-end;

  gap: 40px;

  margin-bottom: 70px;
}

.music-heading-row .display-title {
  max-width: 720px;
}

.music-heading-row .section-note {
  max-width: 280px;
}

/* =========================================================
   RECORD PLAYER
========================================================= */

.record-player {
  position: relative;

  display: grid;

  grid-template-columns:
    minmax(280px, 1fr)
    minmax(280px, 0.8fr)
    minmax(300px, 1.15fr);

  align-items: center;

  min-height: 610px;

  padding: 70px 6vw;

  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.1);

  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.055),
    rgba(255, 255, 255, 0.012)
  );

  isolation: isolate;
}

/* =========================================================
   PLAYER LIGHT
========================================================= */

.player-glow {
  position: absolute;

  width: 600px;
  height: 600px;

  left: 18%;
  top: -20%;

  border-radius: 50%;

  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.09),
    transparent 65%
  );

  filter: blur(30px);

  pointer-events: none;

  z-index: -1;
}

/* =========================================================
   SLEEVE
========================================================= */

.sleeve-wrap {
  position: relative;

  z-index: 5;

  justify-self: start;

  perspective: 1200px;
}

.sleeve {
  position: relative;

  width: min(31vw, 390px);

  aspect-ratio: 1;

  overflow: hidden;

  background: #111;

  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55);

  transform-style: preserve-3d;

  transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sleeve img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transition:
    transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.8s ease;
}

/* =========================================================
   SLEEVE SHEEN
========================================================= */

.sleeve-sheen {
  position: absolute;

  inset: 0;

  pointer-events: none;

  background: linear-gradient(
    125deg,
    rgba(255, 255, 255, 0.2),
    transparent 28%,
    transparent 62%,
    rgba(255, 255, 255, 0.06)
  );

  mix-blend-mode: screen;

  opacity: 0.7;
}

/* =========================================================
   SLEEVE LABEL
========================================================= */

.sleeve-label {
  display: flex;

  justify-content: space-between;

  width: min(31vw, 390px);

  margin-top: 15px;

  color: rgba(255, 255, 255, 0.4);

  font-size: 0.55rem;

  text-transform: uppercase;

  letter-spacing: 0.15em;
}

/* =========================================================
   VINYL
========================================================= */

.vinyl-stage {
  position: relative;

  z-index: 3;

  width: 370px;
  height: 370px;

  margin-left: -100px;

  display: grid;

  place-items: center;

  perspective: 1000px;
}

.vinyl {
  position: relative;

  width: 340px;

  aspect-ratio: 1;

  border-radius: 50%;

  background: radial-gradient(
    circle at center,
    #282828 0 6%,
    #101010 6.5% 12%,
    #151515 12.5% 100%
  );

  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);

  transform: rotate(-8deg) translateZ(0);

  transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* =========================================================
   VINYL GROOVES
========================================================= */

.vinyl::before {
  content: "";

  position: absolute;

  inset: 4%;

  border-radius: 50%;

  border: 1px solid rgba(255, 255, 255, 0.08);

  box-shadow:
    inset 0 0 0 20px rgba(255, 255, 255, 0.015),
    inset 0 0 0 42px rgba(255, 255, 255, 0.02),
    inset 0 0 0 66px rgba(255, 255, 255, 0.018),
    inset 0 0 0 90px rgba(255, 255, 255, 0.012);
}

.vinyl-grooves {
  position: absolute;

  inset: 10%;

  border-radius: 50%;

  background: repeating-radial-gradient(
    circle,
    transparent 0 5px,
    rgba(255, 255, 255, 0.028) 5.5px 6px
  );

  opacity: 0.8;
}

/* =========================================================
   VINYL HIGHLIGHT
========================================================= */

.vinyl-highlight {
  position: absolute;

  inset: 0;

  border-radius: 50%;

  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.12),
    transparent 30%,
    transparent 70%,
    rgba(255, 255, 255, 0.025)
  );

  opacity: 0.45;

  pointer-events: none;
}

/* =========================================================
   VINYL LABEL
========================================================= */

.vinyl-label {
  position: absolute;

  inset: 36%;

  border-radius: 50%;

  display: grid;

  place-content: center;

  text-align: center;

  background: #8c806b;

  color: #161616;

  text-transform: uppercase;

  font-size: 0.46rem;

  letter-spacing: 0.1em;
}

.vinyl-label small {
  display: block;

  margin-top: 4px;

  font-size: 0.8rem;

  font-weight: 600;
}

.vinyl-hole {
  position: absolute;

  width: 8px;
  height: 8px;

  inset: 0;

  margin: auto;

  border-radius: 50%;

  background: #050505;
}

/* =========================================================
   PLAYING STATE
========================================================= */

.record-player.is-playing .sleeve {
  transform: translateX(-22px) rotateY(-2deg);
}

.record-player.is-playing .sleeve img {
  transform: scale(1.025);
}

.vinyl {
  --vinyl-start: -8deg;

  transform: rotate(var(--vinyl-start)) translateZ(0);

  transform-origin: center center;

  will-change: transform;

  /*
    DO NOT transition transform.
    JS needs to freeze the record exactly
    where the animation stopped.
  */
}

.vinyl.is-spinning {
  animation: spinRecord 7s linear infinite;
}

@keyframes spinRecord {
  from {
    transform: rotate(var(--vinyl-start)) translateZ(0);
  }

  to {
    transform: rotate(calc(var(--vinyl-start) + 360deg)) translateZ(0);
  }
}

/* =========================================================
   PLAYER INFORMATION
========================================================= */

.player-info {
  position: relative;

  z-index: 6;

  padding-left: 15px;
}

.player-type {
  margin-bottom: 14px;

  color: rgba(255, 255, 255, 0.42);

  font-size: 0.58rem;

  text-transform: uppercase;

  letter-spacing: 0.17em;
}

.player-info h3 {
  margin-bottom: 20px;

  font-family: var(--serif);

  font-size: clamp(3rem, 5vw, 5.5rem);

  line-height: 0.82;

  font-weight: 400;

  letter-spacing: -0.03em;
}

.player-info > p {
  max-width: 330px;

  color: rgba(255, 255, 255, 0.58);

  font-size: 0.77rem;

  line-height: 1.8;
}

/* =========================================================
   PROGRESS
========================================================= */

.player-progress {
  display: flex;

  align-items: center;

  gap: 12px;

  margin-top: 38px;

  color: rgba(255, 255, 255, 0.4);

  font-size: 0.5rem;

  letter-spacing: 0.1em;
}

.progress-line {
  position: relative;

  flex: 1;

  height: 1px;

  background: rgba(255, 255, 255, 0.18);
}

.progress-line i {
  display: block;

  width: 0;

  height: 100%;

  background: #fff;

  transition: width 0.1s linear;
}

/* =========================================================
   CONTROLS
========================================================= */

.player-controls {
  display: flex;

  align-items: center;

  gap: 14px;

  margin-top: 24px;
}

.icon-btn,
.play-btn {
  min-height: 44px;

  border: 1px solid rgba(255, 255, 255, 0.22);

  background: rgb(101, 3, 101);

  cursor: pointer;
  color: white;

  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
}

.icon-btn {
  width: 44px;

  border-radius: 50%;
}

.play-btn {
  display: flex;

  align-items: center;

  gap: 10px;

  padding: 0 22px;

  border-radius: 999px;

  text-transform: uppercase;

  letter-spacing: 0.12em;

  font-size: 0.56rem;
}

.icon-btn:hover,
.play-btn:hover {
  background: #fff;

  color: #000;

  transform: translateY(-2px);
}

.icon-btn:active,
.play-btn:active {
  transform: translateY(0);
}

/* =========================================================
   STREAMING LINKS
========================================================= */

.platform-links {
  display: flex;

  gap: 22px;

  margin-top: 28px;
}

.platform-links a {
  color: rgba(255, 255, 255, 0.5);

  text-decoration: none;

  font-size: 0.57rem;

  text-transform: uppercase;

  letter-spacing: 0.14em;

  transition: color 0.25s ease;
}

.platform-links a:hover {
  color: #fff;
}

/* =========================================================
   RELEASE CAROUSEL
========================================================= */

.release-rail {
  display: flex;

  width: max-content;
  min-width: 100%;

  justify-content: center;

  gap: 18px;

  overflow-x: auto;

  padding: 50px max(30px, 4vw) 10px;

  scrollbar-width: none;

  cursor: grab;

  touch-action: pan-y;

  scroll-behavior: smooth;

  /*
    Keeps the first/last artwork from
    touching the edge of the viewport.
  */

  scroll-padding-inline: max(30px, 4vw);
}

.release-rail::-webkit-scrollbar {
  display: none;
}

.release-rail:active {
  cursor: grabbing;
}

.release-card {
  flex: 0 0 150px;

  border: 0;

  padding: 0;

  background: none;

  color: #fff;

  text-align: left;

  cursor: pointer;

  opacity: 0.42;

  transform: translateY(0);

  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
}

.release-card:hover,
.release-card.active {
  opacity: 1;

  transform: translateY(-7px);
}

.release-card img {
  width: 150px;

  aspect-ratio: 1;

  margin-bottom: 12px;

  object-fit: cover;

  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.25);
}

.release-card span {
  display: block;

  font-size: 0.55rem;

  text-transform: uppercase;

  letter-spacing: 0.08em;
}

.release-card small {
  display: block;

  margin-top: 3px;

  color: rgba(255, 255, 255, 0.38);

  font-size: 0.48rem;

  text-transform: uppercase;

  letter-spacing: 0.08em;
}

/* =========================================================
   ACCESSIBILITY
========================================================= */

.release-card:focus-visible,
.icon-btn:focus-visible,
.play-btn:focus-visible,
.platform-links a:focus-visible {
  outline: 1px solid #fff;

  outline-offset: 5px;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 980px) {
  .record-player {
    grid-template-columns:
      1fr
      1fr;

    padding: 50px;
  }

  .sleeve {
    width: min(40vw, 360px);
  }

  .sleeve-label {
    width: min(40vw, 360px);
  }

  .vinyl-stage {
    margin-left: -70px;
  }

  .player-info {
    grid-column: 1 / -1;

    padding: 35px 0 0;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 720px) {
  .music-section {
    padding: 100px 0 85px;
  }

  .music-heading-row {
    display: block;

    margin-bottom: 50px;
  }

  .music-heading-row .section-note {
    margin-top: 25px;
  }

  .record-player {
    grid-template-columns: 1fr;

    min-height: auto;

    padding: 32px 24px 45px;
  }

  .release-rail {
    justify-content: flex-start;

    gap: 14px;

    padding: 35px 24px 10px;
  }

  .release-card {
    flex-basis: 120px;
  }

  .release-card img {
    width: 120px;
  }

  .sleeve {
    width: min(76vw, 330px);

    margin: 0 auto;
  }

  .sleeve-label {
    width: min(76vw, 330px);

    margin: 15px auto 0;
  }

  .vinyl-stage {
    width: 100%;

    height: 300px;

    margin: -40px 0 -20px;
  }

  .vinyl {
    width: min(72vw, 300px);
  }

  .player-info {
    padding-top: 0;
  }

  .player-info h3 {
    font-size: 3rem;
  }

  .release-card {
    flex-basis: 120px;
  }

  .release-card img {
    width: 120px;
  }

  .release-rail {
    gap: 14px;

    padding-top: 35px;
  }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .record-player.is-playing .vinyl {
    animation: none;
  }

  .sleeve,
  .sleeve img,
  .vinyl,
  .release-card,
  .icon-btn,
  .play-btn {
    transition: none;
  }
}
