/* ==========================================================================
   dl.hr.wtf — HR's releases, free, in full quality
   Same house as aobvr. and celes.wav: a cold near-black ground, ice type, no
   hue of its own. The colour arrives with the record — each release carries an
   accent read off its sleeve, and the fog behind the page is that sleeve out of
   focus. Over everything, grain.
   What is different here is the job. This is not a portfolio or a listening
   page: people come to take a file away and put it in a set, so the download is
   the loudest thing on every row and the format is stated before anyone has to
   ask.
   ========================================================================== */

/* ==========================================================================
   Fonts — the two latin files, served locally, variable on weight so one file
   covers 400–700. Arial is metric-matched underneath so the swap does not move
   the page.
   ========================================================================== */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans Fallback";
  src: local("Arial");
  ascent-override: 94.42%;
  descent-override: 24.33%;
  line-gap-override: 0%;
  size-adjust: 102.74%;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial");
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
  size-adjust: 107.12%;
}

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  /* The ground and the type never change. Only --acc does. */
  --ink: #05070b;
  --ice: #eef3f5;
  --steel: #8d99a3;
  --slate: #5d6060;

  /* The record's colour. Every release carries its own; this is only what the
     page wears before one is in view. Violet because need it was the last out. */
  --acc: #a855f7;
  --acc-ink: #05070b;              /* type that sits on top of the accent */

  --display: "Instrument Sans", "Instrument Sans Fallback", ui-sans-serif, system-ui, sans-serif;
  --text: "Inter", "Inter Fallback", ui-sans-serif, system-ui, sans-serif;

  --gutter: clamp(16px, 2.6vw, 44px);
  --measure: min(1180px, 100% - (var(--gutter) * 2));
  --dock-h: 84px;

  --radius: 14px;
  --pill: 999px;
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* One hairline, used everywhere something needs an edge rather than a box. */
  --rule: rgba(238, 243, 245, .12);
  --rule-strong: rgba(238, 243, 245, .22);
}

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

html {
  background: var(--ink);
  color-scheme: dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  color: var(--ice);
  font: 400 15px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* No dead space under the page until the dock is actually there. */
body { padding-bottom: 48px; }
body.dock-open { padding-bottom: calc(var(--dock-h) + 28px); }

a { color: inherit; text-decoration: none; }
img, svg, canvas, video { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 4px; }

/* Read, not seen. */
.sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap { width: var(--measure); margin-inline: auto; }

/* ==========================================================================
   Weather — the fog behind, the grain over. Both fixed, both decorative, both
   invisible to a screen reader and skipped entirely for reduced motion.
   The fog is two layers so a new record can cross-fade into place instead of
   cutting; site.js alternates them.
   ========================================================================== */
.fog {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--ink);
  pointer-events: none;
}
.fog__layer {
  position: absolute;
  inset: -12%;
  background-position: center;
  background-size: cover;
  opacity: 0;
  filter: blur(34px) saturate(1.4) brightness(.95);
  transition: opacity 1.4s ease;
  animation: fog-breathe 24s ease-in-out infinite alternate;
}
.fog__layer.is-on { opacity: .55; }
/* Pull the middle back down so type stays readable over a bright sleeve. */
.fog::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(130% 100% at 60% 28%, transparent 14%, rgba(5, 7, 11, .78) 72%, var(--ink) 100%);
}
@keyframes fog-breathe {
  from { transform: scale(1) rotate(0deg); }
  to   { transform: scale(1.12) rotate(2.5deg); }
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background: url("../img/grain-light.png") 0 0 / 256px 256px;
  opacity: .07;
  animation: grain-jump .7s steps(1, end) infinite;
}
@keyframes grain-jump {
  0%   { background-position: 0 0; }
  17%  { background-position: -71px 45px; }
  33%  { background-position: 38px -96px; }
  50%  { background-position: -120px -33px; }
  67%  { background-position: 84px 118px; }
  83%  { background-position: -26px 71px; }
}

/* ==========================================================================
   Pills — flat, blurred, with a light that follows the pointer. site.js sets
   --x/--y on hover; without it they are still perfectly good buttons.
   ========================================================================== */
.btn {
  --x: 50%;
  --y: 50%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 46px;
  padding: 0 1.35em;
  border-radius: var(--pill);
  background: rgba(238, 243, 245, .08);
  box-shadow: inset 0 0 0 1px var(--rule-strong);
  color: var(--ice);
  font: 600 15px/1 var(--display);
  white-space: nowrap;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: transform .26s var(--ease), background-color .4s, box-shadow .4s;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(22em 22em at var(--x) var(--y), rgba(255, 255, 255, .22), transparent 60%);
  transition: opacity .4s;
}
.btn:hover { transform: translateY(-1px); background: rgba(238, 243, 245, .13); }
.btn:hover::before { opacity: 1; }
.btn:active { transform: translateY(0) scale(.985); }

/* The one that matters on every row. It wears the record's colour. */
.btn--get {
  background: var(--acc);
  color: var(--acc-ink);
  box-shadow: none;
  font-weight: 700;
}
.btn--get:hover { background: var(--acc); filter: brightness(1.08); }
.btn--get::before { background: radial-gradient(22em 22em at var(--x) var(--y), rgba(255, 255, 255, .35), transparent 60%); }

.btn--quiet { min-height: 38px; font-size: 14px; font-weight: 600; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ==========================================================================
   Head — the mark, and nothing else. No nav: there is one page.
   ========================================================================== */
.head { padding: clamp(28px, 5vw, 56px) 0 clamp(36px, 7vw, 84px); }
.mark {
  font: 700 clamp(40px, 9vw, 86px)/1 var(--display);
  letter-spacing: -.045em;
  /* Caps in one word were landing a pixel apart: the rasteriser grid-fits each
     glyph on its own, and at this size that rounding is visible — the R sat
     above the H. geometricPrecision asks for true outline positions instead of
     snapped ones, so the whole word sits on one line. */
  text-rendering: geometricPrecision;
}
.mark__dot { color: var(--acc); }        /* the full stop takes the record's colour */

/* The R is NOT nudged. Measured by supersampling the outline at 8x: H and R
   have the same ascent to three decimals (62.000 each; the O does overshoot, at
   62.875). Any step between them in a screenshot is the rasteriser snapping the
   two glyphs to different pixel rows, not the typeface — correcting it here
   just moves the error to the other side. */
.mark__r { /* kept as a hook; no offset */ }

/* ==========================================================================
   A release — SoundCloud's shape, in this house's clothes.
   Sleeve on the left; to its right the play, the name, the waveform, and the
   files underneath where SoundCloud puts its play counts. The difference is
   what the row is for: there, a number you read; here, the button you came for.
   ========================================================================== */
.rel {
  display: grid;
  grid-template-columns: clamp(104px, 16vw, 184px) 1fr;
  gap: clamp(16px, 2.4vw, 26px);
  padding: clamp(24px, 4vw, 40px) 0;
  border-top: 1px solid var(--rule);
}
.rel:first-of-type { border-top: 0; }

.rel__art {
  width: 100%;
  height: auto;              /* or the height attribute wins and aspect-ratio is ignored */
  aspect-ratio: 1;
  border-radius: var(--radius);
  object-fit: cover;
  background: rgba(238, 243, 245, .05);
  box-shadow: 0 18px 50px -24px rgba(0, 0, 0, .9), inset 0 0 0 1px var(--rule);
}

.rel__body { min-width: 0; display: flex; flex-direction: column; gap: 12px; }

.rel__top { display: flex; align-items: flex-start; gap: 14px; }

/* The play. Circular and in the record's colour, the one warm thing in the row. */
.play {
  flex: none;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--acc);
  color: var(--acc-ink);
  box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .8);
  transition: transform .2s var(--ease), filter .2s;
}
.play:hover { transform: scale(1.06); filter: brightness(1.08); }
.play:active { transform: scale(.97); }
.play svg { width: 24px; height: 24px; fill: currentColor; }
.play .play__bars { display: none; }
.play.is-playing .play__tri { display: none; }
.play.is-playing .play__bars { display: block; }

.rel__id { flex: 1; min-width: 0; }
.rel__artist { color: var(--steel); font-size: 13.5px; line-height: 1.2; }
.rel__title {
  margin-top: 2px;
  font: 700 clamp(20px, 2.6vw, 30px)/1.15 var(--display);
  letter-spacing: -.02em;
  text-rendering: geometricPrecision;
  overflow-wrap: anywhere;
}
.rel__count { flex: none; color: var(--slate); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   The waveform. Two stacked copies of the same bars: the dim one underneath,
   the lit one clipped to however far through the track you are. It is plain
   SVG in the HTML, so it is there before any script runs and stays there if
   none ever does.
   ========================================================================== */
.wave {
  position: relative;
  height: clamp(44px, 5.5vw, 60px);
  cursor: pointer;
  touch-action: none;
}
.wave svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.wave__base { fill: rgba(238, 243, 245, .26); }
.wave__lit { fill: var(--acc); }
.wave__fill {
  position: absolute;
  inset: 0;
  clip-path: inset(0 100% 0 0);          /* nothing lit until something plays */
  transition: clip-path .08s linear;
}
.wave:hover .wave__base { fill: rgba(238, 243, 245, .34); }
.wave__time {
  position: absolute;
  right: 0; bottom: 0;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(5, 7, 11, .62);
  color: var(--steel);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

/* ==========================================================================
   The files. One row per variant, numbered, with the spec stated plainly —
   the people taking these are putting them on CDJs and 48 kHz / 24-bit is the
   answer to the question they were about to ask.
   ========================================================================== */
.files { display: flex; flex-direction: column; margin-top: 2px; }

.file {
  display: grid;
  grid-template-columns: 30px minmax(0, max-content) 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 9px 10px 9px 4px;
  border-radius: 10px;
  transition: background-color .22s var(--ease);
}
.file { cursor: pointer; }                 /* the whole row starts the track */
.file + .file { box-shadow: inset 0 1px 0 0 var(--rule); }
.file:hover { background: rgba(238, 243, 245, .045); box-shadow: none; }
.file:hover + .file { box-shadow: none; }

.file__play {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--steel);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  transition: background-color .2s, color .2s;
}
.file__play:hover, .file__play.is-playing { background: var(--acc); color: var(--acc-ink); }

.file__name { font: 600 15px/1.2 var(--display); }
.file__spec { color: var(--slate); font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Held. The button keeps its size and its place in the row — a row that
   reflows when a download goes away reads as a broken page rather than a held
   one — and loses the record's colour, which is the part that says press me.
   Not a [disabled] link: it is not a link at all, so there is no href on the
   page to read off and paste. */
.btn--held {
  background: rgba(238, 243, 245, .055);
  color: var(--slate);
  box-shadow: inset 0 0 0 1px var(--rule);
  font-weight: 600;
  cursor: not-allowed;
}
.btn--held:hover { background: rgba(238, 243, 245, .055); transform: none; filter: none; }
.btn--held::before { content: none; }
.file.is-held { cursor: default; }
.file.is-held .file__name { color: var(--steel); }
/* The number stays, the affordance goes: a held row is not a transport. */
.file__play:disabled, .play:disabled { color: var(--slate); cursor: not-allowed; }
.file__play:disabled:hover, .play:disabled:hover { background: none; color: var(--slate); transform: none; }
.play:disabled { opacity: .5; }
.file.is-held:hover { background: none; }
.file.is-held:hover + .file { box-shadow: inset 0 1px 0 0 var(--rule); }

/* Why it is held, in the margin rather than in a box. */
.rel__held {
  margin: 12px 0 2px 4px;
  padding-left: 11px;
  border-left: 1px solid var(--rule);
  color: var(--steel);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 680px) {
  .rel { grid-template-columns: 1fr; }
  .rel__art { width: clamp(120px, 38vw, 180px); }
  .file { grid-template-columns: 26px 1fr auto; gap: 10px; }
  .file__spec { display: none; }      /* the row is the name and the button */
}

/* ==========================================================================
   The gate. Asked once, then never again on this device.
   It is a real <dialog> so Escape, focus trapping and the backdrop come from
   the browser rather than from script, and so it still behaves if site.js
   never loads — the form posts on its own and the server redirects to the file.
   ========================================================================== */
.gate {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: rgba(12, 15, 20, .86);
  box-shadow: inset 0 0 0 1px var(--rule-strong), 0 40px 90px -30px rgba(0, 0, 0, .95);
  -webkit-backdrop-filter: blur(26px) saturate(140%);
  backdrop-filter: blur(26px) saturate(140%);
  color: var(--ice);
}
.gate::backdrop { background: rgba(5, 7, 11, .7); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.gate__in { padding: clamp(22px, 4vw, 30px); }
.gate__title { font: 700 22px/1.2 var(--display); letter-spacing: -.02em; }
.gate__sub { margin-top: 8px; color: var(--steel); font-size: 14px; }
.gate__form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }

.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  border-radius: 12px;
  border: 1px solid var(--rule-strong);
  background: rgba(238, 243, 245, .05);
  color: var(--ice);
  transition: border-color .2s, background-color .2s;
}
.field input::placeholder { color: var(--slate); }
.field input:focus { outline: none; border-color: var(--acc); background: rgba(238, 243, 245, .08); }

/* The opt-in is deliberately separate from the download and deliberately not
   pre-ticked: the file arrives either way, so agreeing to hear from HR later is
   a real choice rather than the price of the record. */
.optin {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(238, 243, 245, .035);
  color: var(--steel);
  font-size: 14px;
  cursor: pointer;
}
.optin input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--acc); flex: none; }
.optin b { color: var(--ice); font-weight: 600; }

.gate__fine { margin-top: 14px; color: var(--slate); font-size: 12.5px; line-height: 1.5; }
.gate__err { margin-top: 10px; color: #ff8b8f; font-size: 13.5px; }

/* ==========================================================================
   The dock. Fixed at the foot, revealed once something plays. Glass over the
   page rather than a slab under it, so the record showing through stays part
   of it, and it wears that record's accent like everything else.
   ========================================================================== */
.dock {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 30;
  background: rgba(8, 11, 16, .72);
  box-shadow: inset 0 1px 0 0 var(--rule-strong), 0 -24px 50px -30px rgba(0, 0, 0, .9);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  transform: translateY(100%);
  transition: transform .34s var(--ease);
}
.dock.is-on { transform: none; }
.dock[hidden] { display: none; }

.dock__in {
  width: var(--measure);
  margin-inline: auto;
  min-height: var(--dock-h);
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) minmax(0, 2fr) auto;
  align-items: center;
  gap: clamp(10px, 1.6vw, 20px);
  padding: 12px 0;
}

.dock__transport { display: flex; align-items: center; gap: 6px; }
.dock__btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--steel);
  transition: color .2s, background-color .2s, transform .18s var(--ease);
}
.dock__btn svg { width: 19px; height: 19px; fill: currentColor; }
.dock__btn:hover { color: var(--ice); background: rgba(238, 243, 245, .08); }
.dock__btn:active { transform: scale(.94); }

.dock__btn--main {
  width: 44px; height: 44px;
  background: var(--acc);
  color: var(--acc-ink);
}
.dock__btn--main svg { width: 22px; height: 22px; }
.dock__btn--main:hover { background: var(--acc); color: var(--acc-ink); filter: brightness(1.08); }
.dock__btn--main .play__bars { display: none; }
.dock__btn--main.is-playing .play__tri { display: none; }
.dock__btn--main.is-playing .play__bars { display: block; }

.dock__art {
  width: 52px; height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(238, 243, 245, .06);
  box-shadow: inset 0 0 0 1px var(--rule);
}

.dock__id { min-width: 0; }
.dock__title {
  font: 600 14.5px/1.25 var(--display);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dock__artist { color: var(--steel); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.dock__seek { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dock__t { color: var(--slate); font-size: 12px; font-variant-numeric: tabular-nums; flex: none; }
.dock__bar {
  position: relative;
  flex: 1;
  height: 16px;                       /* a generous hit area around a thin line */
  display: flex; align-items: center;
  cursor: pointer;
}
.dock__bar::before {
  content: "";
  position: absolute; inset-inline: 0;
  height: 3px;
  border-radius: 2px;
  background: rgba(238, 243, 245, .16);
}
.dock__bar-fill {
  position: relative;
  height: 3px;
  width: 0;
  border-radius: 2px;
  background: var(--acc);
}
.dock__bar-fill::after {
  content: "";
  position: absolute;
  right: -5px; top: 50%;
  width: 10px; height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: var(--acc);
  opacity: 0;
  transition: opacity .2s;
}
.dock__bar:hover .dock__bar-fill::after { opacity: 1; }

.dock__right { display: flex; align-items: center; gap: 10px; }
.dock__slider {
  width: 78px;
  accent-color: var(--acc);
  background: none;
}
.dock__get { flex: none; }

/* Narrow: the transport, who it is, and the way out. The seek line goes full
   width underneath rather than being squeezed between them. */
@media (max-width: 860px) {
  .dock__in { grid-template-columns: auto auto minmax(0, 1fr) auto; row-gap: 8px; }
  .dock__seek { grid-column: 1 / -1; }
  .dock__slider, .dock__vol { display: none; }
}
@media (max-width: 520px) {
  .dock__art { display: none; }
  .dock__get { padding: 0 .9em; }
}

/* ==========================================================================
   Who to ask about what. Two people work on this record label's one page and
   each gets the other's mail: site faults to HR, music to me. A hairline, two
   columns, two addresses — the same shape the other sites use.
   ========================================================================== */
.help {
  margin-top: clamp(56px, 9vw, 110px);
  padding: clamp(28px, 4vw, 44px) 0 clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--rule);
}
.help__h {
  font: 600 13px/1.2 var(--display);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: clamp(22px, 3vw, 34px);
}
.help__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(26px, 5vw, 72px);
}
.help__role { font: 600 15px/1.2 var(--display); color: var(--ice); }
.help__name { margin-top: 3px; color: var(--steel); font-size: 13.5px; }
.help__does { margin: 14px 0 0; padding: 0; list-style: none; }
.help__does li {
  position: relative;
  padding-left: 19px;
  color: var(--steel);
  font-size: 14px;
  line-height: 1.55;
}
.help__does li + li { margin-top: 5px; }
/* A dash rather than a bullet: this page has no round things in it. */
.help__does li::before { content: "—"; position: absolute; left: 0; color: var(--slate); }
.help__mail {
  display: block;
  width: fit-content;
  margin-top: 16px;
  color: var(--ice);
  font: 600 14.5px/1.2 var(--display);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--rule);
  transition: color .2s, border-color .2s;
}
.help__mail:hover { color: var(--acc); border-bottom-color: var(--acc); }
/* A second address is the same thing again, not a new idea: it stacks. */
.help__mail + .help__mail { margin-top: 7px; }
.help__ig {
  display: block;
  width: fit-content;
  margin-top: 13px;
  color: var(--steel);
  font-size: 13.5px;
  text-decoration: none;
  transition: color .2s;
}
.help__ig:hover { color: var(--acc); }

@media (max-width: 560px) {
  .help__cols { grid-template-columns: 1fr; gap: 30px; }
}
