/* /music: suzy's playlists. Palette, type, background stickers and the
   phone layout come from /styles.css (the link page), so this is another page
   of the same site; only the jukebox pieces live here. */
:root {
  --spotify: #1ED760;
}

/* wider than the link page's 30rem column: the cards hold a cover and two
   buttons side by side, and at 30rem they read small on a desktop */
.page {
  max-width: 38rem;
}

/* ---------- header: back pill, then the title tag ---------- */

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  box-shadow: 3px 4px 0 var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}

.back svg {
  width: 12px;
  height: 12px;
}

/* "suzy's" sits on the "jukebox" pill, the way "Hello! my name is" sits on
   the name tag on the link page. */
.head {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem 0 2.6rem;
}

.head-small {
  position: relative;
  z-index: 1;
  margin-bottom: -0.7em;
  padding: 0.5em 1.1em;
  border-radius: 999px;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  box-shadow: 2px 3px 0 var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-4deg) translateX(-2.2em);
}

.head h1 {
  margin: 0;
  padding: 0.04em 0.3em 0.12em;
  border-radius: 18px;
  background: var(--pink);
  border: 3px solid var(--ink);
  box-shadow: 5px 6px 0 var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3.2rem, 16vw, 5rem);
  line-height: 1;
  transform: rotate(-2deg);
}

.vinyl {
  position: absolute;
  right: calc(50% - 11.6rem);
  top: -0.7rem;
  width: 68px;
  height: 68px;
  transform: rotate(14deg);
}

/* ---------- playlist cards ---------- */

.lists {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.list {
  display: grid;
  grid-template-columns: 176px 1fr;
  gap: 20px;
  align-items: center;
  padding: 16px;
  border-radius: 28px;
  text-align: left;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 5px 7px 0 var(--ink);
}

.cover {
  display: block;
  width: 176px;
  height: 176px;
  border-radius: 16px;
  border: 2.5px solid var(--ink);
}

.list h2 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 1.1;
}

.plays {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.play {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 16px 5px 5px;
  border-radius: 999px;
  background: #fff;
  border: 2.5px solid var(--ink);
  box-shadow: 2px 3px 0 var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
}

.play-tile {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-tile.spotify { background: var(--spotify); }
.play-tile.youtube { background: var(--red); }

.play-tile svg,
.play-tile img {
  width: 21px;
  height: 21px;
}

.play-go {
  margin-left: auto;
  width: 17px;
  height: 17px;
  opacity: 0.55;
}

.play:hover {
  transform: translate(-1px, -2px);
  box-shadow: 3px 5px 0 var(--ink);
}

.play:active {
  transform: none;
  box-shadow: 1px 1px 0 var(--ink);
}

/* ---------- "Show songs" and the player it opens (music.js) ---------- */

.songs {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  border: 2.5px dashed var(--ink);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.songs svg {
  width: 14px;
  height: 14px;
}

.songs[aria-expanded="true"] {
  border-style: solid;
  background: var(--spotify);
}

.songs[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.embed {
  grid-column: 1 / -1;
}

.embed iframe {
  display: block;
  width: 100%;
  height: 352px;
  border: 0;
  border-radius: 14px;
}

.play:focus-visible,
.back:focus-visible,
.songs:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes spin { to { rotate: 360deg; } }
  .vinyl { animation: spin 6s linear infinite; }
  .play { transition: transform 0.18s ease, box-shadow 0.18s ease; }
  .songs svg { transition: transform 0.2s ease; }
}

/* styles.css pins the link page to exactly one phone screen. This page grows
   when a player opens, so the body may scroll here. */
@media (max-width: 600px) {
  body {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .head {
    margin: 1.2rem 0 1.8rem;
  }

  .list {
    grid-template-columns: 128px 1fr;
    gap: 14px;
    padding: 12px;
  }

  .cover {
    width: 128px;
    height: 128px;
  }

  .list h2 {
    font-size: 1.6rem;
    margin-bottom: 10px;
  }

  .plays {
    gap: 9px;
  }

  .play {
    font-size: 1.05rem;
  }

  .play-tile {
    width: 34px;
    height: 34px;
  }

  .vinyl {
    right: calc(50% - 9.6rem);
    width: 56px;
    height: 56px;
  }
}

/* "suzy's" is drawn as its own tag above the title; this copy reads it into
   the h1 for screen readers and search, which see "suzy's jukebox". */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
