/* soundfobia.org — ascetic dark */
:root {
  --bg: #0b0b0b;
  --bg-2: #121212;
  --line: #222;
  --line-2: #333;
  --fg: #d8d6ce;
  --dim: #77756f;
  --dimmer: #4a4945;
  --acc: #e8e5da;
  --mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

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

html { background: var(--bg); color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.5 var(--mono);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 96px;
}

/* subtle film grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--fg); color: var(--bg); }

a { color: inherit; text-decoration: none; }

:focus-visible { outline: 1px solid var(--fg); outline-offset: 2px; }

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: clamp(280px, 38vw, 560px);
  overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--line-2);
}

/* static fallback (no JS / before canvas is ready) */
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  opacity: .85;
}
.hero.is-live .hero__img { visibility: hidden; }

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* scanlines */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.22) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}

/* overlay content */
.hero__inner {
  position: absolute;
  inset: 0;
  z-index: 2;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(18px, 2.4vw, 32px) 24px clamp(24px, 3.4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}
.hero__inner button { pointer-events: auto; }

.hero__top,
.hero__bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}
.hero__top { align-items: flex-start; }

.label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  color: var(--fg);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 4px 8px;
  white-space: nowrap;
}
.label--dim { color: var(--dim); }

.hero__clock { color: var(--dim); font-variant-numeric: tabular-nums; }

.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--dimmer);
}
.hero.is-playing .dot { background: #c8442f; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.hero__brand { pointer-events: none; }

.hero__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.stats {
  display: flex;
  margin: 0;
  background: var(--bg);
}
.stats > div {
  padding: 6px 12px 7px;
  border-left: 1px solid var(--line-2);
}
.stats > div:first-child { border-left: 0; }
.stats dt {
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--dimmer);
}
.stats dd {
  margin: 0;
  font-size: 13px;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.hero__actions { display: flex; gap: 6px; }

.act {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 340px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  color: var(--fg);
  font: inherit;
  text-align: left;
  padding: 7px 12px 8px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.act:hover { border-color: var(--fg); }
.act--main { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.act--main:hover { background: #fff; }
.act__ico {
  flex: none;
  width: 0; height: 0;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent currentColor;
}
.act__txt { display: flex; flex-direction: column; min-width: 0; }
.act__k { font-size: 9px; letter-spacing: .2em; text-transform: uppercase; opacity: .6; }
.act__v { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* registration / crop marks */
.crop {
  position: absolute;
  z-index: 2;
  width: 14px; height: 14px;
  border-color: rgba(216,214,206,.55);
  border-style: solid;
  border-width: 0;
  pointer-events: none;
}
.crop--tl { top: 10px; left: 10px; border-top-width: 1px; border-left-width: 1px; }
.crop--tr { top: 10px; right: 10px; border-top-width: 1px; border-right-width: 1px; }
.crop--bl { bottom: 10px; left: 10px; border-bottom-width: 1px; border-left-width: 1px; }
.crop--br { bottom: 10px; right: 10px; border-bottom-width: 1px; border-right-width: 1px; }

/* vertical genre strip on the right edge */
.hero__genres {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 14px;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-size: 10px;
  letter-spacing: .22em;
  white-space: nowrap;
  text-transform: uppercase;
  color: var(--dim);
  background: var(--bg);
  padding: 10px 4px;
  pointer-events: none;
}
@media (max-width: 1180px) { .hero__genres { display: none; } }

.logo {
  margin: 0;
  font-size: clamp(30px, 6.4vw, 72px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: .95;
  color: var(--acc);
  text-transform: lowercase;
}
.hero .logo {
  display: inline-block;
  background: var(--bg);
  padding: .12em .22em .16em;
  margin-left: -.22em;
}
.logo span { color: var(--dim); font-weight: 400; }

.hero__sub {
  display: table;
  margin: 0 0 0 -.22em;
  padding: 4px 8px 5px;
  background: var(--fg);
  color: var(--bg);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* ---------- sets ---------- */
.sets { margin-top: clamp(32px, 5vw, 64px); }

.sets__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-2);
}

.sets__head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--dim);
}
.count { color: var(--dimmer); }

.list { list-style: none; margin: 0; padding: 0; }

.set {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  transition: background .15s;
}
.set:hover { background: var(--bg-2); }

.set__link {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 2.6em 1.6em 1fr auto;
  align-items: baseline;
  gap: 0 12px;
  padding: 14px 8px;
}

.set__no { color: var(--dimmer); font-size: 12px; font-variant-numeric: tabular-nums; }

.set__play {
  position: relative;
  align-self: center;
  width: 10px; height: 10px;
}
.set__play::before {
  content: "";
  position: absolute; inset: 0;
  border-style: solid;
  border-width: 5px 0 5px 9px;
  border-color: transparent transparent transparent var(--dimmer);
  transition: border-color .15s;
}
.set:hover .set__play::before { border-left-color: var(--fg); }

.set__main { min-width: 0; display: flex; flex-wrap: wrap; gap: 0 14px; }
.set__artist { color: var(--acc); font-weight: 700; }
.set__title { color: var(--dim); }
.set:hover .set__title { color: var(--fg); }

.set__tags { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

.tag {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
  border: 1px solid var(--line-2);
  padding: 1px 6px;
  white-space: nowrap;
}

.set__dl {
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: var(--dimmer);
  border-left: 1px solid transparent;
  transition: color .15s;
}
.set__dl:hover { color: var(--fg); }

/* currently playing */
.set.is-active { background: var(--bg-2); }
.set.is-active .set__no { color: var(--fg); }
.set.is-active .set__title { color: var(--fg); }
.set.is-active .set__play::before {
  border: 0;
  width: 2px; height: 10px;
  left: 1px;
  background: var(--fg);
  box-shadow: 5px 0 0 var(--fg);
}
.set.is-active.is-paused .set__play::before {
  width: 0; height: 0; left: 0; background: none; box-shadow: none;
  border-style: solid;
  border-width: 5px 0 5px 9px;
  border-color: transparent transparent transparent var(--fg);
}
.set.is-active:not(.is-paused) .set__no {
  animation: blink 1.2s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

/* ---------- footer ---------- */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 80px;
  padding-top: 24px;
  padding-bottom: 24px;
  color: var(--dim);
  font-size: 12px;
}
.foot__dim { color: var(--dimmer); }

/* ---------- player ---------- */
.player {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px max(24px, calc((100vw - 1080px) / 2 + 24px));
  background: rgba(11,11,11,.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--line-2);
}
.player[hidden] { display: none; }

.player__btn, .player__x {
  flex: none;
  background: none;
  border: 1px solid var(--line-2);
  color: var(--fg);
  cursor: pointer;
  font: inherit;
}
.player__btn { width: 40px; height: 40px; position: relative; }
.player__btn:hover { border-color: var(--fg); }
.player__btn .ico {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-35%, -50%);
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent var(--fg);
}
.player.is-playing .player__btn .ico {
  transform: translate(-50%, -50%);
  border: 0;
  width: 10px; height: 14px;
  border-left: 3px solid var(--fg);
  border-right: 3px solid var(--fg);
}

.player__x { width: 28px; height: 28px; border-color: transparent; color: var(--dim); font-size: 18px; line-height: 1; }
.player__x:hover { color: var(--fg); }

.player__info { flex: 1; min-width: 0; }
.player__now { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 8px; }
.player__now #p-artist { color: var(--acc); font-weight: 700; }
.player__title { color: var(--dim); }

.player__bar {
  position: relative;
  height: 14px;
  cursor: pointer;
}
.player__bar::before,
.player__buf,
.player__prog {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  height: 2px;
}
.player__bar::before { right: 0; background: var(--line-2); }
.player__buf { width: 0; background: var(--dimmer); }
.player__prog { width: 0; background: var(--fg); }
.player__prog::after {
  content: "";
  position: absolute;
  right: -1px; top: -4px;
  width: 2px; height: 10px;
  background: var(--fg);
}

.player__time { flex: none; color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---------- small screens ---------- */
@media (max-width: 720px) {
  body { font-size: 13px; }
  .wrap { padding: 0 16px; }
  .hero { height: 380px; }
  .hero__inner { padding: 14px 16px 18px; }
  .hero__genres, .stats, .label--dim, .crop { display: none; }
  .hero__top { justify-content: flex-end; }
  .hero__bottom { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero__side { align-items: stretch; }
  .hero__actions .act { flex: 1; }
  .label { font-size: 10px; }
  .hero__sub { font-size: 9px; letter-spacing: .06em; }
  .set__link { grid-template-columns: 2.2em 1.2em 1fr; padding: 12px 4px; }
  .set__main { flex-direction: column; }
  .set__tags { grid-column: 3; justify-content: flex-start; margin-top: 6px; }
  .set__dl { padding: 0 12px; }
  .player { gap: 12px; padding: 10px 16px; }
  .player__time { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .set.is-active .set__no { animation: none; }
}

.set__tags:empty { display: none; }
