/* The Ren Collection: a record-shop shelf, dark by default, light if the visitor prefers it. */
:root {
  color-scheme: dark light;
  --bg: #121212;
  --panel: #1c1c1c;
  --line: #2e2e2e;
  --text: #ededed;
  --muted: #a0a0a0;
  --accent: #e0694f;
  --cd: #7fb7d9;
  --vinyl: #e0694f;
  --cassette: #d9b45a;
  --video: #a99be0;
  --radius: 10px;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.55;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f3ee;
    --panel: #ffffff;
    --line: #e2ddd4;
    --text: #1b1b1b;
    --muted: #5f5f5f;
    --accent: #b5442c;
    --cd: #2d6f99;
    --vinyl: #b5442c;
    --cassette: #8a6a12;
    --video: #5b4aa8;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

a {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

main,
.site-header,
.site-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.disc {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0 26%, #0d0d0d 28% 100%);
  box-shadow: inset 0 0 0 4px #2a2a2a;
}

.hero {
  padding: 28px 0 8px;
  max-width: 760px;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  line-height: 1.05;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.lede {
  font-size: 1.2rem;
  color: var(--muted);
  margin-top: 0;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.stats li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  color: var(--muted);
}

.stats strong {
  color: var(--text);
}

/* The format filter works without any scripts: each choice is a radio button. */
.filters {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 0;
  margin-top: 16px;
  background: var(--bg);
}

.filter-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.filters label {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 16px;
  background: var(--panel);
}

.filter-input:checked + label {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.filter-input:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.collection:has(#kind-cd:checked) .card:not([data-kind~='CD']),
.collection:has(#kind-vinyl:checked) .card:not([data-kind~='Vinyl']),
.collection:has(#kind-cassette:checked) .card:not([data-kind~='Cassette']),
.collection:has(#kind-video:checked) .card:not([data-kind~='Video']) {
  display: none;
}

/* A section with nothing left to show under the chosen filter is hidden, heading and all. */
.collection:has(#kind-cd:checked) .shelf:not(:has(.card[data-kind~='CD'])),
.collection:has(#kind-vinyl:checked) .shelf:not(:has(.card[data-kind~='Vinyl'])),
.collection:has(#kind-cassette:checked) .shelf:not(:has(.card[data-kind~='Cassette'])),
.collection:has(#kind-video:checked) .shelf:not(:has(.card[data-kind~='Video'])) {
  display: none;
}

.shelf h2 {
  margin: 28px 0 4px;
  font-size: 1.6rem;
}

.count {
  color: var(--muted);
  font-weight: 400;
  font-size: 1rem;
}

.shelf-blurb {
  color: var(--muted);
  margin-top: 0;
}

.grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 18px;
}

.card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.cover {
  display: block;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: transform 0.15s ease;
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card a:hover .cover,
.card a:focus-visible .cover {
  transform: translateY(-3px);
}

.card-text {
  display: block;
  flex: 1;
  margin-top: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--line);
}

/* On phones the covers are small, so give the dividing line more room on both sides. */
@media (max-width: 640px) {
  .card-text {
    margin-top: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
  }
}

.card-title {
  display: block;
  font-weight: 650;
}

.card-artist,
.card-meta {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 0 5px;
  margin-right: 4px;
}

.chip-cd {
  color: var(--cd);
}

.chip-vinyl {
  color: var(--vinyl);
}

.chip-cassette {
  color: var(--cassette);
}

.chip-blu-ray,
.chip-dvd-r {
  color: var(--video);
}

.no-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  background: radial-gradient(circle, var(--line) 0 12%, var(--panel) 13% 100%);
  border-radius: var(--radius);
}

/* The contact form at the bottom of the front page: one field under another, in a panel. */
.contact {
  max-width: 620px;
  margin: 56px auto 0;
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  scroll-margin-top: 16px;
}

.contact h2 {
  margin: 0 0 6px;
  font-size: 1.6rem;
}

.contact-intro {
  margin: 0 0 24px;
  color: var(--muted);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-form label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.contact-form textarea {
  min-height: 170px;
  resize: vertical;
}

.contact-form input:hover,
.contact-form select:hover,
.contact-form textarea:hover {
  border-color: var(--muted);
}

/* A clear coloured ring shows which box you are typing in. */
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent);
  outline: 2px solid transparent;
}

.contact-form .button {
  align-self: flex-start;
  margin-top: 4px;
  padding: 12px 32px;
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s;
}

.contact-form .button:hover {
  filter: brightness(1.1);
}

.contact-form .button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.contact.edit {
  margin-top: 32px;
}

.contact.edit textarea {
  min-height: 90px;
}

@media (max-width: 560px) {
  .contact {
    padding: 22px 18px;
  }

  .contact-form .button {
    align-self: stretch;
  }
}

/* Hidden from people; only automated spam tools fill it in. */
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* A release page: photos on the left, details on the right; stacked on phones. */
.crumbs {
  margin: 4px 0 18px;
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
}

.release {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 36px;
  align-items: start;
}

@media (max-width: 760px) {
  .release {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

@media (min-width: 761px) {
  .photos {
    position: sticky;
    top: 16px;
  }
}

.main-photo img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.thumbs {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.thumbs img {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
}

.photo-credit {
  font-size: 0.85rem;
  color: var(--muted);
}

.eyebrow {
  margin: 0;
  color: var(--muted);
}

.info h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.1;
  margin: 6px 0 4px;
}

.artist {
  font-size: 1.2rem;
  color: var(--muted);
  margin-top: 0;
}

.details,
.credits {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 18px;
  margin: 18px 0;
}

.details dt,
.credits dt {
  color: var(--muted);
}

.details dd,
.credits dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 480px) {
  .credits {
    grid-template-columns: 1fr;
  }

  .credits dd {
    margin-bottom: 8px;
  }
}

.button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
}

.info h2 {
  margin: 28px 0 8px;
  font-size: 1.25rem;
}

.tracklist {
  width: 100%;
  border-collapse: collapse;
}

.tracklist td,
.tracklist th {
  padding: 7px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.tracklist .heading th {
  padding-top: 16px;
  color: var(--muted);
  font-weight: 650;
}

.tracklist .pos {
  color: var(--muted);
  width: 3.2em;
  white-space: nowrap;
}

.tracklist .dur {
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.tracklist .index .title {
  font-weight: 650;
}

.track-artist {
  color: var(--muted);
  font-size: 0.9rem;
}

.notes {
  color: var(--muted);
  min-width: 0;
  overflow-wrap: anywhere;
}

.muted {
  color: var(--muted);
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 40px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.pager a {
  text-decoration: none;
  max-width: 48%;
  overflow-wrap: anywhere;
}

.pager a[rel='next'] {
  text-align: right;
}

.site-footer {
  margin-top: 56px;
  padding-top: 20px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

/* Outline icons (Instagram, share buttons), drawn in the page's text colour. */
.icon {
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.2em;
}

.icon .fill,
.icon .dot {
  fill: currentColor;
  stroke: none;
}

/* Share buttons under a release's tracklist. */
.page-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 20px 0 8px;
}

.page-share-label {
  margin-right: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.share-link {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.share-link[hidden] {
  display: none;
}

.share-link:hover,
.share-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.share-link .icon {
  width: 1.15rem;
  height: 1.15rem;
}

.share-note {
  flex-basis: 100%;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.share-note:empty {
  display: none;
}

.instagram {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-weight: 600;
}

.follow {
  margin-top: 0;
}

/* Photo viewer: a bordered card that grows over the page (see lightbox.js), as on the blog. */
.lightbox {
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  background: none;
  overflow: visible;
}

.lightbox::backdrop {
  background: rgba(5, 5, 6, 0.86);
  animation: lb-fade 0.3s ease both;
}

.lb-card {
  position: relative;
  padding: 0.75rem;
  border-radius: 16px;
  background: #f7f4ee;
  color: #2b2824;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  animation: lb-grow 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}

.lb-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-width: min(18rem, 80vw);
  min-height: 12rem;
  border-radius: 8px;
  background: #e9e5dd;
  overflow: hidden;
}

.lb-img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(92vw - 1.5rem, 82rem);
  max-height: calc(100vh - 11rem);
  max-height: calc(100dvh - 11rem);
  transition: opacity 0.25s ease;
}

.lb-switching .lb-img {
  opacity: 0;
}

/* Arrows: a big tap area on each half of the photo, the arrow shows on hover. */
.lb-arrow {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 35%;
  border: 0;
  background: none;
  color: #fff;
  font: 300 3.5rem/1 system-ui, sans-serif;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.lb-prev {
  left: 0;
  padding-left: 1rem;
  text-align: left;
}

.lb-next {
  right: 0;
  padding-right: 1rem;
  text-align: right;
}

.lb-stage:hover .lb-arrow,
.lb-arrow:focus-visible {
  opacity: 1;
}

.lb-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  max-width: min(92vw - 1.5rem, 82rem);
  padding: 0.8rem 0.25rem 0.1rem;
}

.lb-caption {
  margin: 0;
  font: 600 1.05rem/1.3 system-ui, sans-serif;
}

.lb-count {
  margin: 0.2rem 0 0;
  color: #77726a;
  font: 500 0.75rem ui-monospace, monospace;
  letter-spacing: 0.08em;
}

.lb-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.lb-share-label {
  margin-right: 0.2rem;
  color: #77726a;
  font: 500 0.7rem ui-monospace, monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lb-share-link {
  display: inline-grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  padding: 0;
  border: 1px solid #d6d0c5;
  border-radius: 999px;
  background: none;
  color: #2b2824;
  font: 500 0.78rem system-ui, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.lb-share-link:hover {
  border-color: #a4561a;
  color: #a4561a;
}

/* The X sits on the card's corner. */
.lb-close {
  position: absolute;
  top: -0.9rem;
  right: -0.9rem;
  z-index: 1;
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid #f7f4ee;
  border-radius: 50%;
  background: #2b2824;
  color: #f7f4ee;
  font: 400 1.5rem/1 system-ui, sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, background 0.2s ease;
}

.lb-close:hover {
  background: #a4561a;
  transform: rotate(90deg);
}

.lb-closing .lb-card {
  animation: lb-shrink 0.25s ease-in both;
}

.lb-closing::backdrop {
  animation: lb-fade 0.25s ease reverse both;
}

@keyframes lb-grow {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
}

@keyframes lb-shrink {
  to {
    opacity: 0;
    transform: scale(0.8);
  }
}

@keyframes lb-fade {
  from {
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .lb-card {
    padding: 0.5rem;
    border-radius: 12px;
  }

  .lb-img {
    max-width: calc(100vw - 2rem);
    max-height: calc(100dvh - 14rem);
  }

  .lb-bar {
    max-width: calc(100vw - 2rem);
  }

  .lb-close {
    top: -0.75rem;
    right: -0.5rem;
  }

  /* No hover on phones: show the arrows faintly so people know they can move on. */
  .lb-arrow {
    opacity: 0.7;
    font-size: 2.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lb-card,
  .lightbox::backdrop {
    animation: none;
  }

  .lb-img {
    transition: none;
  }
}

.lb-share-link .icon {
  width: 1.1rem;
  height: 1.1rem;
}

.lb-note {
  margin: 0.4rem 0.25rem 0;
  color: #77726a;
  font-size: 0.85rem;
}

.lb-note:empty {
  display: none;
}

/* The collector's description of a video, one bullet per line. */
.about {
  margin: 0 0 1em;
  padding-left: 1.2em;
}

.about li {
  margin: 0.2em 0;
}
