/* Bootleg: a crumpled 70s drive-in one-sheet with a black credit block. */

@font-face {
  font-family: "Shrikhand";
  src: url("fonts/shrikhand-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: optional;
}

@font-face {
  font-family: "League Gothic";
  src: url("fonts/league-gothic-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: optional;
}

@font-face {
  font-family: "Antonio";
  src: url("fonts/antonio-latin-var.woff2") format("woff2-variations");
  font-weight: 400 700;
  font-display: optional;
}

:root {
  --orange: #ee5f24;
  --ink: #140c08;
  --yellow: #f6be2c;
  --cream: #ffe9b8;
  --tan: #d9c196;
  --rule: #4a3626;
  --wall: #241710;
  --wall-glow: #3a2517;
  --swash: "Shrikhand", Georgia, serif;
  --poster: "League Gothic", "Arial Narrow", Arial, sans-serif;
  --small: "Antonio", "Arial Narrow", Arial, sans-serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' \
width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence \
type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3CfeColorMatrix \
values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.1 -.2'/%3E%3C/filter%3E\
%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  --house-sleeve: url("\
data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%\
22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20viewBox%\
3D%220%200%201000%201000%22%3E%3Cdefs%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2\
F2000%2Fsvg%22%3E%20%3CclipPath%20id%3D%22a%22%3E%20%3Cpath%20d%3D%22m222.14\
%20355h755.71v490h-755.71z%22%20%2F%3E%20%3C%2FclipPath%3E%20%3C%2Fdefs%3E%2\
0%3Cg%20transform%3D%22scale%280.83333%200.83333%29%20translate%28-0.0%20-0.\
0%29%22%3E%3Cpath%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20d%3\
D%22m1200%20600c0%20214.36-114.36%20412.44-300%20519.62-185.64%20107.18-414.\
36%20107.18-600%200-185.64-107.18-300-305.26-300-519.62s114.36-412.44%20300-\
519.62c185.64-107.18%20414.36-107.18%20600%200%20185.64%20107.18%20300%20305\
.26%20300%20519.62z%22%20fill%3D%22%23ee5f24%22%20%2F%3E%3C%2Fg%3E%3Cg%20xml\
ns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22%23140c08%22%20t\
ransform%3D%22translate%28-100.811%20-100.211%29%20scale%281.00035%29%22%3E%\
3Cpath%20d%3D%22m788.34%20786.8h-376.68l-32.59%2057.625h441.74l-32.355-57.62\
5z%22%20fill%3D%22%23140c08%22%20%2F%3E%20%3Cg%20clip-path%3D%22url%28%23a%2\
9%22%3E%20%3Cpath%20d%3D%22m952.71%20355.46h-705.41c-6.6602-0.03125-13.059%2\
02.5938-17.777%207.2891-4.7227%204.6992-7.375%2011.086-7.375%2017.746v439.02\
c0%206.6602%202.6523%2013.047%207.375%2017.746%204.7188%204.6953%2011.117%20\
7.3203%2017.777%207.2891h103.91l42.746-75.809c2.082-3.918%206.1875-6.3359%20\
10.625-6.2578h390.85c4.4375-0.078125%208.543%202.3398%2010.625%206.2578l42.7\
46%2075.809h103.91c6.6602%200.03125%2013.059-2.5938%2017.777-7.2891%204.7227\
-4.6992%207.375-11.086%207.375-17.746v-439.02c0-6.6602-2.6523-13.047-7.375-1\
7.746-4.7188-4.6953-11.117-7.3203-17.777-7.2891zm-11.809%20347.27c0%203.1328\
-1.2422%206.1367-3.457%208.3516-2.2148%202.2148-5.2188%203.457-8.3516%203.45\
7h-657c-6.5234%200-11.809-5.2852-11.809-11.809v-297.44c0-6.5234%205.2852-11.\
809%2011.809-11.809h655.93c3.1328%200%206.1367%201.2422%208.3516%203.457s3.4\
57%205.2188%203.457%208.3516z%22%20fill%3D%22%23140c08%22%20%2F%3E%20%3C%2Fg\
%3E%20%3Cpath%20d%3D%22m284.25%20417.45v273.12h631.73v-273.12zm146.89%20191.\
29v-19.719c-0.29688-6.0664-5.1523-10.922-11.219-11.219-6.0703%200.29688-10.9\
22%205.1523-11.219%2011.219v19.719c-10.715-2.2305-20.547-7.543-28.289-15.281\
-7.7383-7.7422-13.051-17.574-15.281-28.289h19.836c4.8477-1.5938%208.1211-6.1\
172%208.1211-11.219%200-5.1016-3.2734-9.625-8.1211-11.215h-19.953c2.25-10.69\
5%207.5703-20.504%2015.309-28.223%207.7383-7.7148%2017.559-13.012%2028.262-1\
5.234v19.602c0.29688%206.0703%205.1484%2010.922%2011.219%2011.219%206.0664-0\
.29688%2010.918-5.1484%2011.215-11.219v-19.719c10.711%202.2461%2020.535%207.\
5625%2028.273%2015.301%207.7383%207.7383%2013.055%2017.562%2015.301%2028.273\
h-19.719c-4.8477%201.5898-8.1211%206.1133-8.1211%2011.215%200%205.1016%203.2\
734%209.625%208.1211%2011.219h19.836c-2.2305%2010.715-7.543%2020.547-15.281%\
2028.289-7.7422%207.7383-17.574%2013.051-28.289%2015.281zm247.97-13.816v0.00\
3906c0%203.3906-2.75%206.1367-6.1406%206.1367h-146.42c-3.3906%200-6.1406-2.7\
461-6.1406-6.1367v-81.715c0-1.625%200.64844-3.1875%201.8008-4.3398s2.7109-1.\
7969%204.3398-1.7969h146.89c1.625%200%203.1875%200.64453%204.3398%201.7969%2\
01.1523%201.1523%201.7969%202.7148%201.7969%204.3398zm111.82%2013.934v-19.83\
6c-0.31641-6.2891-5.5117-11.227-11.809-11.219-6.0195%200.35547-10.809%205.19\
53-11.098%2011.219v19.84c-10.746-2.2109-20.605-7.5312-28.352-15.301-7.7461-7\
.7656-13.039-17.641-15.223-28.391h19.723c3.5938%201.1836%207.543%200.56641%2\
010.609-1.6523%203.0664-2.2227%204.8828-5.7773%204.8828-9.5664%200-3.7852-1.\
8164-7.3438-4.8828-9.5625-3.0664-2.2227-7.0156-2.8359-10.609-1.6523h-18.777c\
2.2305-10.719%207.543-20.551%2015.285-28.289%207.7383-7.7422%2017.57-13.055%\
2028.289-15.285v19.719c0.28906%206.0273%205.0742%2010.863%2011.098%2011.219%\
206.2969%200.007813%2011.492-4.9258%2011.809-11.219v-19.719c10.715%202.2305%\
2020.547%207.543%2028.289%2015.285%207.7383%207.7383%2013.051%2017.57%2015.2\
81%2028.289h-20.309c-4.8477%201.5898-8.1211%206.1133-8.1211%2011.215%200%205\
.1016%203.2734%209.625%208.1211%2011.219h19.836c-2.1953%2010.746-7.4922%2020\
.609-15.238%2028.375-7.7422%207.7656-17.594%2013.09-28.332%2015.316z%22%20fi\
ll%3D%22%23140c08%22%20%2F%3E%20%3C%2Fg%3E%3C%2Fsvg%3E");
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  background: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem;
  background: var(--wall)
    radial-gradient(70% 50% at 50% 0, var(--wall-glow), transparent);
  color: var(--ink);
  font-family: var(--small);
  -webkit-font-smoothing: antialiased;
}

p, h1, h2, h3, ol, ul {
  margin: 0;
  padding: 0;
}

.hidden {
  display: none;
}

.player {
  position: relative;
  overflow: hidden;
  width: min(26rem, 100%);
  background: var(--orange);
  box-shadow: 0 18px 50px #0009;
}

/* The paper. Blended over the sheet and above its text, but under the
   covers, which sit at z-index 5 and stay clean. */
.paper-shade, .paper-wear {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: center / 100% 100% no-repeat;
}

.paper-shade {
  background-image: url("icons/paper-shade.webp");
  mix-blend-mode: soft-light;
}

.paper-wear {
  background-image: url("icons/paper-wear.webp");
  mix-blend-mode: screen;
  opacity: 0.55;
}

/* Fold creases: one down the middle, two across. */
.player::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px),
      #0000002e calc(50% - 1px), #ffffff26 50%, transparent calc(50% + 1px)),
    linear-gradient(0deg, transparent calc(33.3% - 1px),
      #00000026 calc(33.3% - 1px), #ffffff1f 33.3%,
      transparent calc(33.3% + 1px)),
    linear-gradient(0deg, transparent calc(66.6% - 1px),
      #00000026 calc(66.6% - 1px), #ffffff1f 66.6%,
      transparent calc(66.6% + 1px));
}

.player::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0.1;
  mix-blend-mode: multiply;
  background-image: var(--grain);
}

.masthead {
  display: flex;
  justify-content: space-between;
  padding: 1.1rem 1.25rem 0;
  font: 700 0.84rem var(--small);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.badge.off {
  text-decoration: line-through;
}

.tag {
  margin-top: 1rem;
  text-align: center;
  font: 400 1.95rem var(--poster);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.name {
  margin: 0.1rem 0 0.9rem;
  text-align: center;
  font: 400 min(5.5rem, 20vw) / 1.05 var(--swash);
  text-shadow: 0.28rem 0.28rem 0 var(--yellow);
  transform: rotate(-3deg);
}

.artbox {
  position: relative;
  z-index: 5;
  width: 72%;
  margin: 0 auto;
  transform: rotate(-1.5deg);
}

.art {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 0.4rem solid var(--ink);
  background: var(--orange) var(--house-sleeve) center / cover no-repeat;
}

.meta {
  padding: 1.3rem 1.25rem 0;
  text-align: center;
}

.title {
  font: 400 3.25rem / 1 var(--poster);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.artist {
  margin-top: 0.4rem;
  font: 700 1.4rem var(--small);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.album {
  margin-top: 0.25rem;
  font: 600 1rem var(--small);
  text-wrap: balance;
}

.toggle {
  position: relative;
  display: block;
  width: 11rem;
  margin: 1.1rem auto 0;
  padding: 0.7rem 0;
  border: 0;
  background: var(--ink);
  color: var(--yellow);
  font: 400 2rem var(--poster);
  letter-spacing: 0.1em;
  text-indent: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.toggle:hover {
  color: var(--cream);
}

.toggle:focus-visible {
  z-index: 6;
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.status {
  margin-top: 0.7rem;
  padding: 0 1.25rem;
  text-align: center;
  font: 600 1rem var(--small);
}

.billing {
  margin-top: 1.4rem;
  padding: 1.1rem 1.25rem 1.4rem;
  background: var(--ink);
  color: var(--cream);
}

.section-heading {
  margin-bottom: 0.45rem;
  color: var(--yellow);
  font: 700 0.84rem var(--small);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.history-list, .stream-list {
  list-style: none;
}

/* Five rows, reserved so nothing shifts on load. */
.history-list {
  min-height: calc(5 * 5.2rem);
}

.history-row {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  column-gap: 0.8rem;
  align-content: center;
  height: 5.2rem;
}

.history-row + .history-row, .stream-row + .stream-row {
  border-top: 1px solid var(--rule);
}

.history-art {
  position: relative;
  z-index: 5;
  grid-row: span 4;
  align-self: center;
  width: 3.5rem;
  height: 3.5rem;
  object-fit: cover;
  background: var(--orange) var(--house-sleeve) center / cover no-repeat;
}

.history-title, .history-artist, .history-time {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.history-title {
  font: 400 1.42rem / 1.1 var(--poster);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.history-artist {
  font: 600 0.9rem / 1.3 var(--small);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.history-album {
  display: none;
}

.history-time {
  color: var(--tan);
  font: 400 0.8rem / 1.3 var(--small);
}

.streams {
  margin-top: 1.4rem;
}

.stream-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.15rem 0.8rem;
  padding: 0.7rem 0;
}

.stream-format {
  font: 600 0.95rem var(--small);
  letter-spacing: 0.04em;
}

.stream-note {
  color: var(--tan);
  font-weight: 400;
}

.stream-url {
  position: relative;
  z-index: 5;
  grid-column: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--yellow);
  font: 400 0.86rem var(--small);
}

.stream-copy {
  position: relative;
  z-index: 5;
  grid-column: 2;
  grid-row: 1 / span 2;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--yellow);
  background: none;
  color: var(--cream);
  font: 600 0.84rem var(--small);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.stream-copy:hover {
  background: var(--yellow);
  color: var(--ink);
}

.stream-copy:focus-visible,
.stream-url:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(0.4rem);
  }
}

@keyframes develop {
  from {
    opacity: 0.35;
  }
}

.meta.enter {
  animation: settle 0.45s ease-out both;
}

.art.enter {
  animation: develop 0.6s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .meta.enter, .art.enter {
    animation: none;
  }
}

@media (max-width: 450px) {
  body {
    padding: 0;
  }

  .tag {
    font-size: 1.7rem;
  }

  .title {
    font-size: 2.9rem;
  }
}
