:root {
  --paper: #e4d8c5;
  --stone: #b9aca0;
  --teal: #416b6c;
  --terracotta: #a36b65;
  --burgundy: #7e3b50;
  --ink: #292927;
  --line: rgba(41, 41, 39, 0.28);
  --pad: clamp(1.1rem, 3vw, 2.6rem);
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Courier New", Courier, monospace;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.22'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

html {
  background-color: var(--paper);
  background-image: var(--grain);
  background-size: 180px 180px;
  color-scheme: light;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0 auto;
  max-width: 70rem;
  padding: var(--pad);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

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

figcaption {
  font-style: normal;
}

ul {
  list-style: none;
}

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

a {
  color: inherit;
  text-underline-offset: 0.22em;
  transition: color 160ms ease;
}

a:hover {
  color: var(--burgundy);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 1px solid var(--burgundy);
  outline-offset: 3px;
}

::selection {
  background: var(--burgundy);
  color: var(--paper);
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--pad);
  top: 0.4rem;
  z-index: 2;
  padding: 0.35rem 0.45rem;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transform: translateY(-160%);
}

.skip:focus {
  transform: translateY(0);
}

/* Header */

.mast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0.45rem 1rem;
}

.mast h1 {
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  line-height: 1.2;
  text-transform: uppercase;
}

.mast h1 a {
  text-decoration: none;
}

.anno {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  line-height: 1;
}

.mast nav {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.15rem;
}

.mast nav a {
  padding: 0.4rem 0;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.mast nav a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

/* Opening */

.opening {
  margin-top: clamp(1.5rem, 4vw, 3rem);
  animation: reveal 1.15s ease both;
}

.plate {
  display: grid;
  gap: 1.2rem;
}

.opening-copy {
  max-width: 18rem;
}

.frame {
  position: relative;
  min-width: 0;
  background: #d9cebf;
  line-height: 0;
}

.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(41, 41, 39, 0.2);
  pointer-events: none;
}

.frame img {
  width: 100%;
}

.frame-drift {
  overflow: hidden;
}

.frame-drift img {
  transform-origin: 50% 62%;
  animation: drift 52s ease-in-out infinite alternate;
}

.plate-no {
  margin: 0 0 0.75rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.lede {
  margin: 0;
  max-width: 16rem;
  font-size: 1.2rem;
  line-height: 1.4;
}

.lede::before {
  content: "";
  display: block;
  width: 1.65rem;
  height: 1px;
  margin-bottom: 0.8rem;
  background: var(--burgundy);
}

/* Catalogue */

.releases,
.about,
.links,
.colophon {
  margin-top: clamp(3.5rem, 9vw, 6.75rem);
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
  scroll-margin-top: 1.25rem;
}

h2 {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.release-list {
  margin-top: 1rem;
}

.release {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  column-gap: 0.75rem;
  align-items: start;
}

.release + .release {
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}

.release-index {
  margin: 0;
  padding-top: 0.28rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.release-title {
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 400;
  line-height: 1.3;
}

.release-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  margin-top: 0.35rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
}

.release-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  margin-top: 0.55rem;
}

.release-links a,
.directory a {
  font-size: 0.875rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(41, 41, 39, 0.35);
}

.release-links a:hover,
.directory a:hover,
.credit a:hover {
  text-decoration-color: var(--burgundy);
}

.release-main:has(.frame-cover) {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  column-gap: 1.05rem;
  align-items: start;
}

.frame-cover {
  width: 6.5rem;
  aspect-ratio: 1;
  overflow: hidden;
}

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

/* Preview */

.player {
  display: grid;
  grid-template-columns: auto minmax(5rem, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  max-width: 22rem;
  margin-top: 0.8rem;
}

.player-toggle {
  appearance: none;
  margin: 0;
  padding: 0 0 0.08rem;
  border: 0;
  border-bottom: 1px solid rgba(41, 41, 39, 0.4);
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
  cursor: pointer;
}

.player-toggle:hover,
.player-toggle[aria-pressed="true"] {
  color: var(--burgundy);
  border-bottom-color: var(--burgundy);
}

.player-toggle:disabled {
  color: var(--stone);
  border-bottom-color: var(--stone);
  cursor: default;
}

.player-seek {
  display: block;
  min-width: 0;
}

.player-seek input[type="range"] {
  --p: 0%;
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 1.25rem;
  margin: 0;
  background: transparent;
  cursor: pointer;
}

.player-seek input[type="range"]::-webkit-slider-runnable-track {
  height: 1px;
  background: linear-gradient(to right, var(--teal) var(--p), var(--line) var(--p));
}

.player-seek input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 8px;
  height: 8px;
  margin-top: -3.5px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
}

.player-seek input[type="range"]::-moz-range-track {
  height: 1px;
  border: 0;
  background: linear-gradient(to right, var(--teal) var(--p), var(--line) var(--p));
}

.player-seek input[type="range"]::-moz-range-progress {
  background: transparent;
}

.player-seek input[type="range"]::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 0;
  background: var(--ink);
}

.player-time {
  min-width: 2.4rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* About */

.about-layout {
  margin-top: 1.2rem;
}

.about-copy p {
  max-width: 34em;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.about-figure {
  width: min(92%, 26rem);
  margin-top: 1.75rem;
  margin-left: auto;
  margin-right: calc(var(--pad) * -1);
}

.about-figure .plate-no {
  margin-top: 0.45rem;
  margin-bottom: 0;
}

/* Directory */

.directory {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  margin-top: 1.15rem;
}

/* Footer */

.colophon-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.credit {
  margin-top: 0.55rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.01em;
}

.credit a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(41, 41, 39, 0.4);
}

/* Wider pages */

@media (min-width: 800px) {
  .mast {
    grid-template-columns: auto auto minmax(0, 1fr);
    column-gap: 0;
  }

  .mast h1 {
    grid-column: 1;
    grid-row: 1;
    font-size: 1rem;
    letter-spacing: 0.26em;
  }

  .mast nav {
    grid-column: 2;
    grid-row: 1;
    margin-left: clamp(1.5rem, 3vw, 2.6rem);
  }

  .anno {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .plate {
    grid-template-columns: minmax(0, min(40rem, 68vh)) minmax(15rem, 18rem);
    gap: 0 clamp(1.75rem, 4vw, 3.75rem);
    align-items: end;
    justify-content: start;
  }

  .opening-copy {
    max-width: none;
    padding-bottom: clamp(0.5rem, 6vh, 3.5rem);
  }

  .lede {
    font-size: 1.3rem;
  }

  .about-layout {
    display: grid;
    grid-template-columns: minmax(0, 32rem) minmax(13rem, 22rem);
    column-gap: clamp(2.75rem, 6vw, 6rem);
    align-items: start;
    justify-content: start;
  }

  .about-figure {
    width: auto;
    margin-top: 4.25rem;
    margin-right: 0;
  }
}

@media (max-width: 420px) {
  .release-main:has(.frame-cover) {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.75rem;
  }

  .frame-cover {
    width: min(46vw, 9rem);
  }
}

@keyframes reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.075) translate3d(-1.2%, -0.8%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .opening,
  .frame-drift img,
  a,
  .player-toggle {
    animation: none;
    transition: none;
  }

  .frame-drift img { transform: none; }
}

@media (forced-colors: active) {
  html { background-image: none; }
  .frame::after { box-shadow: none; }
}

@media print {
  html {
    background: #fff;
    background-image: none;
  }

  body {
    max-width: none;
    color: #000;
  }

  .mast nav,
  .skip,
  .player {
    display: none;
  }

  .opening,
  .frame-drift img {
    animation: none;
    transform: none;
  }
}
