/* Top artists, top albums, top genres. */

/* Artists */
.artists-page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
.artist-deck {
  position: relative;
  flex: 1;
  min-height: 380px;
  max-width: 460px;
  width: 100%;
  margin: 24px auto 0;
}
.artist-card {
  --artist-accent: #f1e7d7;
  position: absolute;
  top: 0;
  left: 50%;
  width: min(400px, calc(100% - 22px));
  height: min(100%, 570px);
  min-height: 390px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: #111116;
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.54),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateX(20px) scale(0.93);
  transition:
    transform 480ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 320ms ease,
    visibility 320ms,
    filter 320ms ease;
}
.artist-card::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  pointer-events: none;
}
.artist-card.is-active {
  z-index: 4;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}
.artist-card.is-next {
  z-index: 3;
  visibility: visible;
  opacity: 0.38;
  pointer-events: auto;
  transform: translateX(-50%) translateX(31px) scale(0.94) rotate(1.4deg);
  filter: brightness(0.7);
}
.artist-card.is-prev {
  z-index: 2;
  visibility: visible;
  opacity: 0.2;
  pointer-events: auto;
  transform: translateX(-50%) translateX(-31px) scale(0.93) rotate(-1.6deg);
  filter: brightness(0.6);
}
.artist-card__rank,
.artist-card__share {
  position: absolute;
  z-index: 4;
  top: 14px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}
.artist-card__rank {
  left: 16px;
  color: var(--artist-accent);
}
.artist-card__share {
  right: 16px;
  color: rgba(255,255,255,.88);
  text-transform: uppercase;
}
.artist-card__image {
  position: relative;
  flex: 1 1 56%;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 20%, color-mix(in srgb, var(--artist-accent) 45%, #222), #0a0a0d 70%);
}
.artist-card__image > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 50% 25%;
  filter: saturate(1.02) contrast(1.04) brightness(0.9);
}
.artist-card__image::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 42%, rgba(8, 8, 11, 0.18) 62%, rgba(9, 9, 12, 0.9) 100%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.12), transparent 30%);
}
.artist-card__rankmark {
  position: absolute;
  z-index: 2;
  left: 16px;
  bottom: 4px;
  color: rgba(255, 255, 255, 0.95);
  font-family: var(--title);
  font-size: clamp(52px, 9vw, 84px);
  line-height: 0.8;
  font-weight: 800;
  letter-spacing: -0.07em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}
.artist-card__sticker {
  position: absolute;
  z-index: 2;
  right: 14px;
  top: 38px;
  width: 36px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  background: var(--artist-accent);
  color: #101012;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.15;
  font-weight: 700;
  text-align: center;
  transform: rotate(3deg);
}
.artist-card__info {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  padding: 0 18px 16px;
}
.artist-card__info h2 {
  margin: -2px 0 0;
  overflow: hidden;
  color: var(--cream);
  font-family: var(--title);
  font-size: clamp(28px, 4.2vw, 40px);
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: -0.045em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.artist-card__track {
  margin: 7px 0 0;
  color: rgba(245, 238, 226, 0.72);
  font-size: 11.5px;
}
.artist-card__track em {
  color: rgba(245, 238, 226, 0.82);
  font-style: normal;
}
.artist-card__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 12px;
  padding: 9px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}
.artist-card__stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.artist-card__stats div + div {
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}
.artist-card__stats strong {
  color: rgba(245, 238, 226, 0.96);
  font-family: var(--title);
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.artist-card__stats span {
  color: rgba(245, 238, 226, 0.64);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.artist-card__play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--artist-accent);
  font-size: 11px;
  font-weight: 700;
}
.artist-controls {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 15px;
}
.artist-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}
.artist-dot {
  width: 5px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(245, 238, 226, 0.26);
  transition: width 220ms ease, background 160ms ease;
}
.artist-dot.is-active {
  width: 18px;
  background: var(--periwinkle);
}

/* Albums */
.albums-page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
.album-pile {
  position: relative;
  flex: 0 0 auto;
  height: clamp(180px, 28vh, 255px);
  max-width: 560px;
  width: 100%;
  margin: 8px auto 0;
}
.album-pile__cover {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(118px, 17vw, 178px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  background: #151519;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.48);
  transform-origin: 50% 80%;
}
.album-pile__cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.album-pile__cover--0 {
  z-index: 1;
  transform: translate(-117%, -44%) rotate(-10deg);
}
.album-pile__cover--1 {
  z-index: 2;
  transform: translate(-82%, -53%) rotate(-5deg);
}
.album-pile__cover--2 {
  z-index: 5;
  transform: translate(-50%, -59%) rotate(1deg);
}
.album-pile__cover--3 {
  z-index: 3;
  transform: translate(-18%, -51%) rotate(6deg);
}
.album-pile__cover--4 {
  z-index: 1;
  transform: translate(18%, -42%) rotate(11deg);
}
.album-list {
  width: 100%;
  max-width: 620px;
  margin: auto auto 0;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.album-row {
  display: grid;
  grid-template-columns: 28px 40px minmax(0, 1fr) 68px;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 6px 2px;
  border-bottom: 1px solid rgba(245, 238, 226, 0.08);
}
.album-row:last-child {
  border-bottom: 0;
}
.album-row__rank {
  color: rgba(245, 238, 226, 0.55);
  font-size: 10px;
}
.album-row__cover {
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.06);
}
.album-row__cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.album-row__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.album-row__meta strong {
  overflow: hidden;
  color: rgba(245, 238, 226, 0.94);
  font-size: 13.5px;
  line-height: 1.1;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.album-row__meta small {
  overflow: hidden;
  color: rgba(245, 238, 226, 0.68);
  font-size: 11.5px;
  line-height: 1.1;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.album-row__plays {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.album-row__plays strong {
  color: var(--cream);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
}
.album-row__plays small {
  color: rgba(245, 238, 226, 0.62);
  font-size: 10.5px;
}
.albums-page .source-note {
  margin-top: 8px;
}

/* Genres */
.genres-page {
  min-height: 100%;
  max-width: 660px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.genres-page .story-heading h1 {
  color: var(--pink);
  font-size: clamp(38px, 7vw, 64px);
}
.genres-page .story-heading .eyebrow {
  color: rgba(255, 156, 159, 0.68);
}
.genre-list {
  margin-top: clamp(45px, 10vh, 100px);
  width: 100%;
}
.genre-row {
  width: 100%;
  min-height: 73px;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr) 55px 22px;
  gap: 11px;
  align-items: center;
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid rgba(245, 238, 226, 0.34);
  background: transparent;
  color: var(--pink);
  text-align: left;
  transition: color 150ms ease, opacity 150ms ease;
}
.genre-row:hover {
  opacity: 0.8;
}
.genre-row__rank {
  align-self: start;
  margin-top: 15px;
  color: currentColor;
  font-family: var(--mono);
  font-size: 11.5px;
}
.genre-row__name {
  font-family: var(--title);
  font-size: clamp(30px, 5.4vw, 50px);
  line-height: 0.9;
  font-weight: 700;
  letter-spacing: -0.04em;
  transform: scaleX(1.02);
  transform-origin: 0 50%;
}
.genre-row__share {
  align-self: end;
  margin-bottom: 6px;
  color: rgba(245, 238, 226, 0.68);
  font-size: 12px;
  text-align: right;
}
.genre-row__action {
  display: grid;
  place-items: center;
  justify-self: end;
}
.genre-play {
  width: 15px;
  height: 15px;
}
.genre-row__action .genre-eq {
  display: none;
  height: 17px;
  color: currentColor;
}
.genre-row.is-active {
  color: var(--cream);
}
.genre-row.is-active .genre-eq {
  display: inline-flex;
}
.genre-row.is-active .genre-play {
  display: none;
}
.genre-row.is-active .genre-row__share {
  color: rgba(245, 238, 226, 0.9);
}
.genres-page .tap-note {
  margin-top: auto;
}

@media (max-width: 760px) {
  .artist-deck {
    min-height: 390px;
    margin-top: 15px;
  }
  .artist-card {
    height: min(100%, 490px);
    min-height: 390px;
  }
  .artist-card__info {
    padding-inline: 14px;
  }
  .artist-card__info h2 {
    font-size: clamp(27px, 8vw, 36px);
  }
  .album-pile {
    height: 175px;
  }
  .album-pile__cover {
    width: 112px;
  }
  .album-row {
    grid-template-columns: 23px 30px minmax(0, 1fr) 51px;
    gap: 8px;
  }
  .album-list {
    margin-bottom: 4px;
  }
  .genre-list {
    margin-top: 44px;
  }
  .genre-row {
    min-height: 66px;
    grid-template-columns: 20px minmax(0, 1fr) 42px 18px;
    gap: 8px;
    padding-block: 9px;
  }
  .genre-row__rank {
    margin-top: 10px;
    font-size: 10px;
  }
  .genre-row__name {
    font-size: clamp(25px, 7.8vw, 33px);
  }
  .genre-row__share {
    margin-bottom: 4px;
    color: rgba(245,238,226,.78);
    font-size: 11.5px;
  }
}

/* Album totals under the cover pile */
.album-glance {
  width: 100%;
  max-width: 620px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 9px auto 0;
  padding: 14px 16px;
  border: 1px solid rgba(245, 238, 226, 0.12);
  border-radius: 12px;
  background: rgba(5, 6, 8, 0.26);
}
.album-glance > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.album-glance > div + div {
  padding-left: 12px;
  border-left: 1px solid rgba(245, 238, 226, 0.1);
}
.album-glance strong {
  color: var(--cream);
  font-family: var(--title);
  font-size: clamp(24px, 2.7vw, 29px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.album-glance span {
  color: rgba(245, 238, 226, 0.7);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .album-glance {
    gap: 8px;
    margin-top: 7px;
    padding: 12px 10px;
  }
  .album-glance > div + div {
    padding-left: 8px;
  }
  .album-glance strong {
    font-size: 22px;
  }
  .album-glance span {
    font-size: 9.5px;
  }
}

@media (max-width: 760px) and (max-height: 760px) {
  .album-pile {
    height: 142px;
    margin-top: 4px;
  }
  .album-pile__cover {
    width: 96px;
  }
  .album-glance {
    margin-top: 4px;
    padding: 10px 9px;
  }
  .album-glance span {
    font-size: 9.5px;
  }
  .album-list {
    padding-top: 8px;
  }
  .album-row {
    min-height: 47px;
    padding-block: 4px;
  }
}
