/* Flat screenprint palette, after 1970s festival posters. */
:root {
  --sky: #cfe0ea;       /* page */
  --ink: #2f2a3d;       /* plum-black ink */
  --muted: #56566a;
  --sun: #e8823a;
  --lav: #a48dcf;
  --leaf: #5f9b47;
  --sea: #6b9fc2;
  --apricot: #e9b864;
  --rose: #d47c86;
  --blank: #e9eef1;
  --shellac: #1a1a1a;
  --groove: #3a3a3a;
  --rule-soft: #a9bfcc;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sky: #1e2638;
    --ink: #ece6d8;
    --muted: #a9a8bb;
    --blank: #2c3548;
    --rule-soft: #39445a;
  }
}
:root[data-theme="dark"] {
  --sky: #1e2638;
  --ink: #ece6d8;
  --muted: #a9a8bb;
  --blank: #2c3548;
  --rule-soft: #39445a;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font-family: "Spectral", Georgia, serif;
  font-size: 1.1875rem;
  line-height: 1.6;
  overflow-x: hidden;
}

main, footer {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---- Layout: on narrow screens the shelf sits under the intro ---- */
.layout { display: flex; flex-direction: column; }
.content { display: contents; }
.hero   { order: 1; }
.side   { order: 2; width: 100%; max-width: 44rem; margin: 3.5rem auto 0; padding: 0 16px; }
main    { order: 3; }
footer  { order: 4; width: 100%; }

/* ---- Hero: a record against a dawn band ---- */
.hero {
  padding: 3rem 16px 3.5rem;
  text-align: center;
}
.label {
  display: block;
  width: min(26rem, 100%);
  height: auto;
  margin: 0 auto 2.5rem;
}
.shellac { fill: var(--shellac); }
.groove  { fill: none; stroke: var(--groove); stroke-width: 1; }
.paper   { fill: var(--sun); }
.rule    { fill: none; stroke: #2f2a3d; stroke-width: 1.2; }
.hole    { fill: var(--sky); }
.label text { fill: #2f2a3d; font-family: "Poiret One", sans-serif; }
.arc-top    { font-size: 50px; letter-spacing: 2px; }
.arc-bottom { font-size: 36px; letter-spacing: 1px; }
.mid        { font-size: 30px; }

.disc {
  transform-origin: 200px 200px;
  animation: spin 3.2s cubic-bezier(.15, .6, .3, 1) both;
}
/* 78 rpm is one turn every 0.77 s; it starts there and runs down to a stop. */
@keyframes spin {
  from { transform: rotate(-1440deg); }
  to   { transform: rotate(0deg); }
}

.lede {
  font-size: 1.375rem;
  line-height: 1.5;
  max-width: 32rem;
  margin: 0 auto;
  text-align: left;
}

/* ---- Sections ---- */
main { padding-top: 2.5rem; width: 100%; }
h2 {
  font-family: "Poiret One", sans-serif;
  font-weight: 400;
  font-size: 2.5rem;
  line-height: 1.2;
  margin: 0 0 .5rem;
}
section + section { margin-top: 5rem; }
.note { color: var(--muted); font-size: 1rem; margin: 0 0 1.5rem; }

/* ---- The shelf: records seen side-on ---- */
.shelf {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 15rem;
  padding: 1rem 4px 0;
  border-bottom: 10px solid var(--ink);   /* the plank */
  overflow-x: auto;
  scrollbar-width: thin;
}
.spine {
  flex: 1 0 1.75rem;
  min-width: 0;
  height: 13rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: .6rem 0;
  border: 1.5px solid var(--ink);
  border-bottom: 0;
  background: var(--c);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  transition: transform .2s ease;
}
.spine:not(.done) { border-style: dashed; color: var(--muted); }
.spine .sn {
  font-family: "Poiret One", sans-serif;
  font-size: 1rem;
  line-height: 1;
}
.spine .st {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: .85rem;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 11rem;
}
.spine.done { color: #2f2a3d; }
.spine.done .st { font-weight: 600; }
.spine:hover { transform: translateY(-.4rem); }
.spine[aria-selected="true"] { transform: translateY(-1rem); }
.spine:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }

/* ---- The pulled record ---- */
.pulled {
  display: grid;
  grid-template-columns: 17rem 1fr;
  gap: 2rem;
  align-items: center;
}
.sleeve-wrap { position: relative; width: 17rem; height: 11rem; }
.sleeve {
  position: absolute; left: 0; top: 0;
  width: 11rem; height: 11rem;
  border: 1.5px solid var(--ink);
  z-index: 1;
}
.record {
  position: absolute; left: .5rem; top: .5rem;
  width: 10rem; height: 10rem;
}
.record svg { width: 100%; height: 100%; display: block; }
.record .hole { fill: var(--sky); }
.rec-n { font-family: "Poiret One", sans-serif; font-size: 22px; fill: #2f2a3d; }
.record.out { animation: slide-out .5s ease-out forwards; }
@keyframes slide-out {
  from { transform: translateX(0) rotate(-120deg); }
  to   { transform: translateX(6rem) rotate(0deg); }
}

.details .ep { color: var(--muted); font-size: 1rem; margin: 0; }
.details h3 {
  font-family: "Poiret One", sans-serif;
  font-weight: 400;
  font-size: 2rem;
  line-height: 1.15;
  margin: .1rem 0 .5rem;
}
.details p { margin: 0 0 .5rem; }
.details .status { color: var(--muted); font-size: 1rem; }

/* ---- Footer ---- */
footer {
  margin-top: 5rem;
  padding-bottom: 3rem;
  color: var(--muted);
  font-size: .9375rem;
}

/* ---- Wide screens: the catalogue is a stack of records down the left side ---- */
@media (min-width: 64rem) {
  .layout { display: grid; grid-template-columns: 19rem 1fr; align-items: start; }
  .side { order: 0; }
  .content { display: block; min-width: 0; order: 1; }
  .side {
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    margin: 0;
    padding: 2.5rem 1.75rem 2rem 1.25rem;
    scrollbar-width: thin;
  }
  .side h2 { font-size: 2rem; }
  .side .note { font-size: .9375rem; margin-bottom: 1.25rem; }
  main { padding-top: 3.5rem; }

  .shelf {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding: 0 0 0 0;
    overflow: visible;
  }
  .spine {
    flex: none;
    height: 2.35rem;
    flex-direction: row;
    gap: .7rem;
    padding: 0 .75rem;
    border-bottom: 1.5px solid var(--ink);
    text-align: left;
  }
  .spine:not(.done) { border-style: dashed; }
  .spine .sn { width: 1.4rem; text-align: right; flex: none; }
  .spine .st {
    writing-mode: horizontal-tb;
    transform: none;
    max-height: none;
    font-size: .9375rem;
    min-width: 0;
  }
  .spine:hover { transform: translateX(.4rem); }
  .spine[aria-selected="true"] { transform: translateX(1.1rem); }
}

@media (prefers-reduced-motion: reduce) {
  .disc, .record.out { animation: none; }
  .record.out { transform: translateX(6rem); }
  .spine { transition: none; }
}

@media (max-width: 34rem) {
  body { font-size: 1.0625rem; }
  .lede { font-size: 1.1875rem; }
  h2 { font-size: 2rem; }
  .pulled { grid-template-columns: 1fr; gap: 1.25rem; }
}
