/* Fetish Radio — site styles.
 *
 * Tokens mirror palette.py, which lifted them from the design canvas. If a
 * colour changes, change it in palette.py and re-run the build: build.py
 * writes the :root block below from those values, so this file's tokens are
 * generated, not hand-kept-in-sync.
 *
 * Foggy, minimal, moody coastal (FR context §5): paper ground, indigo ink for
 * anything clickable, generous whitespace, one accent used sparingly.
 */

:root {
  --paper: #F6F2E9;
  --indigo: #26315F;
  --apricot: #D9814A;
  --olive: #8E8A3F;
  --ink: #17171A;
  --prose: #2E2C28;
  --muted: #5A5750;
  --muted-light: #8A8578;
  --muted-faint: #A9A497;
  --muted-mid: #B4AFA2;
  --rule: #E4DED0;
  --rule-strong: #C9C3B4;
  --panel: #EFEADD;
  --panel-line: #DDD6C6;
  --error: #A6323F;
  --serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', Palatino, serif;
  --mono: 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--indigo); text-decoration: none; }
a:hover { color: var(--apricot); }

/* Focus is never removed — only restyled. Keyboard operability is a Task 4.5
 * requirement, and an invisible focus ring is the same as no keyboard support. */
:focus-visible {
  outline: 2px solid var(--apricot);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  font-family: var(--mono);
  font-size: 12px;
}
.skip:focus {
  left: 12px; top: 12px;
  padding: 10px 14px;
  background: var(--indigo); color: var(--paper);
  z-index: 10;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); }

/* --------------------------------------------------------------------- */
/* Masthead                                                              */
/* --------------------------------------------------------------------- */

.masthead {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px clamp(20px, 5vw, 64px) 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
/* Inline SVG, so the mark takes its colour from `color` and can differ per
 * context instead of being baked indigo. */
.wordmark { color: var(--indigo); display: block; }
.wordmark:hover { color: var(--apricot); }
.wordmark .mark { display: block; width: 152px; height: auto; }
@media (max-width: 520px) { .wordmark .mark { width: 118px; } }

.nav {
  display: flex;
  gap: clamp(16px, 3vw, 28px);
  align-items: baseline;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav a { color: var(--ink); }
.nav a[aria-current="page"] {
  color: var(--indigo);
  border-bottom: 1px solid var(--apricot);
  padding-bottom: 2px;
}
/* Routed but empty. Still a real link — a dead-looking nav item that 404s is
 * worse than one that says "nothing here yet". */
.nav a.pending { color: var(--muted-mid); }

.foot {
  max-width: 1180px;
  margin: 80px auto 0;
  padding: 20px clamp(20px, 5vw, 64px) 40px;
  border-top: 1px solid var(--rule);
  display: flex;
  /* One item since 2026-08-22 (footer reduced to "Vinyl only"). space-between
   * would pin a lone child to the left; flex-end keeps it on the right. */
  justify-content: flex-end;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --------------------------------------------------------------------- */
/* Shared type                                                           */
/* --------------------------------------------------------------------- */

h1 {
  font-size: clamp(30px, 4.2vw, 40px);
  font-weight: 400;
  color: var(--indigo);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.eyebrow, .meta, .filters-label, .tag, .chip {
  font-family: var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--olive);
  margin: 0 0 12px;
}
.meta { font-size: 11px; color: var(--muted); margin: 8px 0 0; }
.specs { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 16px; }

.rule-h {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--olive);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 10px;
  margin: 30px 0 0;
}

.empty { color: var(--muted); font-size: 16px; }
.prose p { max-width: 62ch; color: var(--prose); }

/* --------------------------------------------------------------------- */
/* Archive                                                               */
/* --------------------------------------------------------------------- */

.archive-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 16px;
}

.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filters-label { font-size: 10px; letter-spacing: 0.14em; color: var(--olive); }

.chip {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--indigo);
  background: none;
  border: 1px solid var(--rule-strong);
  padding: 5px 11px;
  cursor: pointer;
  font-family: var(--mono);
}
.chip:hover { border-color: var(--indigo); }
.chip.is-on { border-color: var(--indigo); background: var(--indigo); color: var(--paper); }

.grid {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  /* Bigger targets (Colby, 2026-08-22): same auto-fill arrangement, fewer and
   * larger cards. 320px lands 3 across at 1180px instead of 5. */
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 44px 36px;
}
.card a { display: flex; flex-direction: column; gap: 12px; }
.card-series {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: -8px;
}
.card-date { font-size: 22px; color: var(--indigo); line-height: 1.25; }
.card-dur {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: -6px;
}
.cover {
  width: 100%;
  /* `height: auto` is load-bearing. The <img> carries width/height attributes
   * so the browser reserves space before the image loads, but those attributes
   * are presentational hints — they set a definite `height: 600px`, which CSS
   * `width: 100%` does not override and which makes `aspect-ratio` inert. Every
   * cover rendered 600px tall until this line existed. */
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: var(--rule);
}

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--indigo);
  border: 1px solid var(--indigo);
  padding: 3px 8px;
}
.tag-alt { color: var(--olive); border-color: var(--rule-strong); }

/* --------------------------------------------------------------------- */
/* Mix page                                                              */
/* --------------------------------------------------------------------- */

.mix-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.mix-head h1 { font-size: clamp(34px, 6vw, 58px); letter-spacing: -0.015em; line-height: 1.02; }
/* The series reads as an eyebrow but is part of the title element, so the
 * page's accessible name is "<series> <date>" rather than a bare date. */
.mix-head h1 .series {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 12px;
}
.mix-head h1 .mix-date { display: block; }
.mix-head .tags { margin: 0; }
.mix-head .tag { font-size: 10px; padding: 4px 10px; }

/* Waveform. Revealed by JS — `hidden` in the source so a no-JS reader never
 * sees an empty 132px hole where a picture should be. */
.wave-wrap { margin-top: 30px; }
.wave {
  display: block;
  width: 100%;
  height: 132px;
  border-bottom: 1px solid var(--ink);
  cursor: pointer;
}
.wave-marks { position: relative; height: 26px; }
.wave-mark { position: absolute; top: 0; }
.wave-mark i { display: block; width: 1px; height: 7px; background: var(--apricot); }
.wave-mark span {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--muted-light);
  margin-top: 4px;
  transform: translateX(-50%);
  white-space: nowrap;
}

.player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 18px 22px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
}
.player audio { flex: 1 1 320px; min-width: 260px; height: 40px; }

.quality fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.quality legend {
  float: left;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--olive);
  padding: 0 14px 0 0;
}
.q-opt {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--indigo);
  border: 1px solid var(--indigo);
  padding: 9px 16px;
  cursor: pointer;
}
.q-opt:has(input:checked) { background: var(--indigo); color: var(--paper); }
/* Radios stay in the accessibility tree and stay focusable — only visually
 * collapsed. Hiding them with display:none would take the whole control away
 * from keyboard and screen-reader users. */
.q-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.q-opt:focus-within { outline: 2px solid var(--apricot); outline-offset: 3px; }

.warn {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--apricot);
  margin-top: 9px;
}
#audio-error { color: var(--error); }

.mix-body {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 44px;
  margin-top: 40px;
}
@media (max-width: 820px) {
  .mix-body { grid-template-columns: 1fr; gap: 28px; }
}

.tracklist { list-style: none; margin: 0; padding: 0; }
.track { border-bottom: 1px solid var(--rule); }
.track-seek {
  display: flex;
  align-items: baseline;
  gap: 20px;
  width: 100%;
  padding: 13px 0;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.track-seek.is-static { cursor: default; }
.track-seek:hover:not(.is-static) .who { color: var(--apricot); }
.track .at {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-faint);
  width: 52px;
  flex-shrink: 0;
}
.track .who { flex-grow: 1; font-size: 17px; }
.track .artist { color: var(--indigo); }
/* The row the transport is currently inside. */
.track.is-playing .who { color: var(--apricot); }
.track.is-playing .at { color: var(--apricot); }

.side .cover { margin-bottom: 26px; }
.note { font-size: 16px; line-height: 1.6; color: var(--prose); margin: 16px 0 0; text-wrap: pretty; }
.hardware { margin-top: 14px; font-size: 16px; line-height: 1.75; color: var(--prose); }

.colophon {
  margin: 26px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
  line-height: 1.9;
}
.colophon dt { display: inline; text-transform: uppercase; }
.colophon dd { display: inline; margin: 0 0 0 10px; }
.colophon dd::after { content: ""; display: block; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
