/* The Josse Lindh Collection: light and natural, like pressed leaves on recycled paper.
   Moss and fern greens, clay and sky accents, soft rounded shapes. */
:root {
  color-scheme: light;
  --bg: #f3f1e7;
  --bg-deep: #e7ecdc;
  --panel: #fbfaf4;
  --line: #d9dccb;
  --text: #22301f;
  --muted: #5d6957;
  --accent: #3f6b3a;
  --accent-soft: #dfe8d2;
  --cd: #2f6e74;
  --vinyl: #9a4f2c;
  --cassette: #7a6516;
  --usb: #56508f;
  --video: #8a3f6a;
  --radius: 14px;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
}

* {
  box-sizing: border-box;
}

/* A soft light falling from the top left, as through leaves; no photos needed, so nothing extra loads. */
body {
  margin: 0;
  background:
    radial-gradient(1200px 520px at 8% -8%, #e2ebd4 0%, transparent 62%),
    radial-gradient(900px 480px at 100% 0%, #efe8d6 0%, transparent 60%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

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

h1,
h2 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--text);
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.leaf {
  width: 24px;
  height: 24px;
  fill: var(--accent);
}

.hero {
  position: relative;
  padding: 28px 0 8px;
  max-width: 780px;
}

/* A large, faint branch beside the introduction on wide screens. Drawn in the stylesheet, so nothing extra loads. */
@media (min-width: 1240px) {
  .hero::after {
    content: '';
    position: absolute;
    top: 10px;
    left: calc(100% + 30px);
    width: 340px;
    height: 460px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 280'%3E%3Cg fill='none' stroke='%233f6b3a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M100 275C98 200 104 120 120 10'/%3E%3C/g%3E%3Cg fill='%233f6b3a'%3E%3Cpath d='M101 230c-30-4-52-22-60-48 28 2 50 20 60 48z'/%3E%3Cpath d='M103 190c26-8 50-30 54-58-26 8-48 28-54 58z'/%3E%3Cpath d='M106 150c-28-6-48-26-52-52 26 4 46 24 52 52z'/%3E%3Cpath d='M110 110c22-10 40-32 42-56-22 10-40 30-42 56z'/%3E%3Cpath d='M114 72c-20-8-34-26-34-46 20 6 32 24 34 46z'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
    opacity: 0.16;
    pointer-events: none;
  }
}

.hero h1 {
  font-size: clamp(2.3rem, 6vw, 3.8rem);
  line-height: 1.05;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.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(--accent-soft);
  border: 1px solid transparent;
  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: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px);
}

.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);
}

.filters label:hover {
  border-color: var(--accent);
}

.filter-input:checked + label {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.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-usb:checked) .card:not([data-kind~='USB']),
.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-usb:checked) .shelf:not(:has(.card[data-kind~='USB'])),
.collection:has(#kind-video:checked) .shelf:not(:has(.card[data-kind~='Video'])) {
  display: none;
}

.shelf h2 {
  margin: 36px 0 4px;
  font-size: 1.8rem;
}

/* A small sprig before each section title. */
.shelf h2::before {
  content: '';
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  margin-right: 0.4em;
  border-radius: 0 80% 0 80%;
  background: var(--accent);
  opacity: 0.75;
  vertical-align: -0.02em;
}

/* A section still waiting for its first entries. */
.coming-soon {
  margin: 8px 0 0;
  padding: 22px 24px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-style: italic;
  background: color-mix(in srgb, var(--panel) 60%, transparent);
}

.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: 22px;
}

.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);
  box-shadow: 0 6px 18px -10px rgba(34, 48, 31, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card a:hover .cover,
.card a:focus-visible .cover {
  transform: translateY(-4px);
  box-shadow: 0 14px 26px -12px rgba(34, 48, 31, 0.45);
}

.card-text {
  display: block;
  flex: 1;
  margin-top: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px dotted 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-usb {
  color: var(--usb);
}

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

.no-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--accent-soft), var(--panel));
  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: 20px;
  box-shadow: 0 10px 30px -18px rgba(34, 48, 31, 0.35);
  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: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  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: 64px;
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 2px dotted 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(24, 33, 22, 0.82);
  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: #3f6b3a;
  color: #3f6b3a;
}

/* 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: #3f6b3a;
  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;
}
