/* DEEP LISON
 *
 * One style sheet, no build step. Order: fonts, tokens, base, bar, deck, sections, shows,
 * pages, form, footer, small screens, motion and contrast preferences.
 *
 * The layout hangs on one vertical line: the needle. It rises from the stem of the I in the
 * wordmark; text columns below the deck start at the same line.
 */

/* ── Fonts (self-hosted; the file name changes if a font ever does) ───────── */

@font-face {
  font-family: "Inter";
  src: url("/assets/font/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/font/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DL Geometric";
  src: url("/assets/font/dl-geometric-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ───────────────────────────────────────────────────────────────── */

:root {
  color-scheme: dark;

  /* Contrast against --bg: ink 16.3, muted 7.4, border 3.4 (controls), line 1.6 (decoration only). */
  --bg: #0b0a09;
  --ink: #ece9e2;
  --muted: #a39e94;
  --border: #6b665e;
  --line: #37342f;
  /* The waveform's three bands. Keep in step with App\Media\Waveform. */
  --band-low: #4f4a43;
  --band-mid: #9a958a;
  --band-high: #ece9e2;
  /* The only colour on the site, and only while a show is playing. */
  --on-air: #f04a26;

  --m: clamp(20px, 4.4vw, 64px);                     /* page margin */
  --w: clamp(280px, 56vw, 900px);                    /* width of the wordmark */
  --needle: calc(var(--m) + 0.5983 * var(--w));      /* x of the stem of the I: 3440 / 5750 */
  --gutter: 28px;                                    /* distance of text from the needle */
  --u: clamp(8px, 1.7vh, 18px);                      /* vertical rhythm, follows the viewport height */
  --bar-h: clamp(56px, 8vh, 72px);
  --band-h: clamp(150px, 24vh, 250px);

  --text: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "DL Geometric", "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ── Base ─────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 0.9375rem/1.45 var(--text);
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
::selection { background: var(--ink); color: var(--bg); }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.28em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
img, svg, canvas { display: block; }
h1, h2, h3, p, ul, ol, address { margin: 0; }
address { font-style: normal; }

/* Small capitals line: labels, states, times. Figures here are tabular with a slashed zero, like
   a counter on a deck; running text keeps plain figures. */
.micro {
  font-size: 0.6875rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-feature-settings: "tnum", "zero", "ss01", "case";
  color: var(--muted);
}

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

.skip {
  position: absolute;
  z-index: 3;
  top: -100px;
  left: var(--m);
  padding: 10px 14px;
  background: var(--ink);
  color: var(--bg);
}
.skip:focus { top: 12px; }

/* ── Bar ──────────────────────────────────────────────────────────────────── */

/* Laid over the top of the page, so the needle can run up behind it. */
.bar {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  height: var(--bar-h);
  padding: 0 var(--m);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
}
.bar nav { display: flex; gap: 28px; font-size: 0.8125rem; }
.bar nav a { padding: 14px 0; }
.bar nav a[aria-current] { text-decoration: underline; text-underline-offset: 0.28em; text-decoration-thickness: 1px; }
.bar-home { margin-right: auto; padding: 14px 0; }
.bar-home .wordmark { width: 132px; }

/* Round letters reach a little past the baseline and the cap height: let them. */
.wordmark { width: var(--w); height: auto; aspect-ratio: 5750 / 739; overflow: visible; fill: var(--ink); }

/* ── Deck ─────────────────────────────────────────────────────────────────── */

.deck {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--bar-h) 0 var(--m);
  overflow: hidden;                /* the needle is taller than the deck */
}

/* One line in the bar's row, left of the needle: the next show, or the stance. */
.note {
  position: absolute;
  top: 0;
  left: var(--m);
  height: var(--bar-h);
  max-width: calc(var(--needle) - var(--m) - 20px);
  display: flex;
  align-items: center;
}

/* Top zone: the show left of the needle, the screen right of it. */
.top {
  flex: none;
  display: grid;
  grid-template-columns: calc(var(--needle) - var(--m) - var(--gutter)) minmax(0, 1fr);
  column-gap: calc(2 * var(--gutter));
  align-items: start;
  min-height: clamp(150px, 22vh, 220px);
  padding: var(--u) var(--m) 0;
}
.show { font: inherit; }
.show > span { display: block; }
.show .num {
  margin: calc(var(--u) * 1.4) 0 0 -0.045em;
  font: 400 clamp(84px, 15vh, 152px)/0.8 var(--display);
  font-feature-settings: "lnum";
}
.show .title { margin-top: calc(var(--u) * 1.2); font-size: clamp(1rem, 1.4vw, 1.25rem); letter-spacing: -0.01em; }

.screen { justify-self: end; width: 100%; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 24px; }

/* The disc is the play control. */
.play { flex: none; display: flex; align-items: center; gap: 22px; text-align: left; }
.play:hover { text-decoration: none; }
.disc { position: relative; display: block; flex: none; width: clamp(112px, 19vh, 184px); aspect-ratio: 1; }
.disc img { position: absolute; inset: 0; width: 100%; height: 100%; }
/* A show without a measured waveform, or one still to come: the bare hub. */
.disc--blank::before { content: ""; position: absolute; inset: 33%; border: 1px solid var(--border); border-radius: 50%; }
.play .disc::after {                /* play */
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -9px 0 0 -6px;
  border-left: 16px solid var(--ink);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}
.play .label b { display: block; font-weight: 500; font-feature-settings: "tnum", "zero", "ss01"; }
.play .label small { display: block; margin-top: 5px; }
.play:hover .disc img, .play:focus-visible .disc img { filter: brightness(1.25); }
.play:active .disc { transform: scale(0.98); }

.video {
  display: none;
  position: relative;
  flex: 0 1 auto;                  /* gives way to the play control beside it */
  width: clamp(356px, 44vh, 520px);
  min-width: 0;
  aspect-ratio: 16 / 9;
  min-height: 200px;               /* YouTube asks for a player of at least 200 by 200 */
  border: 1px solid var(--line);
  background: #000;
}
.video iframe { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; border: 0; }   /* above the loading line */
.video p { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; }

/* Open: the visitor has pressed play, the screen is on. Controls stay outside the video. */
.is-open .video { display: block; animation: screen-on 0.5s ease both; }
@keyframes screen-on { from { opacity: 0; } }
.is-open .play { flex-direction: column; gap: 10px; text-align: center; }
.is-open .play .disc { width: 64px; }
.is-open .play .disc::after { margin: -7px 0 0 -4px; border-left-width: 12px; border-top-width: 7px; border-bottom-width: 7px; }
.is-open .play .label small { display: none; }
.is-loading .play { cursor: progress; }
.is-playing .play .disc::after {    /* pause */
  margin: -8px 0 0 -7px;
  width: 14px;
  height: 16px;
  border: 0;
  border-left: 5px solid var(--ink);
  border-right: 5px solid var(--ink);
}

/* Portrait (config artist.portrait): while a show plays, the artist stands where the video would,
   facing the play control. The player runs underneath, unseen and at a size YouTube accepts. If
   playback does not start, deck.js adds is-revealed and the screen is the video again. */
.deck--portrait .video {
  order: -1;
  width: auto;
  height: clamp(200px, 30vh, 320px);
  aspect-ratio: 18 / 25;           /* the picture's format */
  overflow: hidden;
  border: 0;
  background: var(--bg);
}
.deck--portrait .video iframe { min-width: 200px; min-height: 200px; }
.deck--portrait .video canvas { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.deck--portrait.is-open .screen { justify-content: flex-start; gap: 40px; }
.deck--portrait .video.is-revealed {
  width: clamp(356px, 44vh, 520px);
  height: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: #000;
}
.deck--portrait .video.is-revealed canvas { display: none; }

/* While nothing is released: when the next show comes. */
.soon { text-align: right; font-size: clamp(1.125rem, 1.7vw, 1.5rem); line-height: 1.25; letter-spacing: -0.01em; }
.soon .micro { display: block; margin-bottom: 6px; }

/* Lower zone: everything the needle runs through, then the wordmark it rises from. */
.lower { flex: 1; display: flex; flex-direction: column; margin-top: calc(var(--u) * 1.6); }
.groove { position: relative; flex: 1; display: flex; flex-direction: column; }

.band { position: relative; flex: none; height: var(--band-h); }
.band img, .band canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.band img { transition: opacity 0.5s ease; }
.band canvas { opacity: 0; transition: opacity 0.5s ease; cursor: grab; touch-action: pan-y; }
.band.is-live img { opacity: 0; }
.band.is-live canvas { opacity: 1; }
.band.is-dragging canvas { cursor: grabbing; }
.band--blank::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); }

.transport { flex: none; }
.overview { position: relative; height: 30px; margin: calc(var(--u) * 1.4) var(--m) 0; cursor: pointer; touch-action: pan-y; }
.overview canvas { width: 100%; height: 100%; }
/* The slider is there for keyboards and assistive technology; pointers use the strip itself. */
.overview input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.overview:focus-within { outline: 2px solid var(--ink); outline-offset: 6px; }
.times { display: flex; justify-content: space-between; margin: 6px var(--m) 0; }

.info { flex: none; min-height: 58px; margin: var(--u) var(--m) 0 calc(var(--needle) + var(--gutter)); padding-bottom: var(--u); }
.state { display: flex; align-items: center; gap: 8px; }
.dot { display: none; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--on-air); }
.is-playing .dot { display: block; }
.show-links { display: flex; flex-wrap: wrap; gap: 0 22px; margin-top: 4px; }
.show-links a { padding: 6px 0; }

.needle {
  position: absolute;
  top: -100vh;
  bottom: calc(-1 * var(--u));     /* down through the foot's padding, onto the top of the I */
  left: calc(var(--needle) - 0.5px);
  width: 1px;
  background: var(--ink);
  pointer-events: none;
  transform-origin: 50% 100%;
  animation: needle-rise 1.1s var(--ease) both;
}
@keyframes needle-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.foot { flex: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: var(--u) var(--m) 0; }
.home { flex: none; display: block; }
.links { display: flex; justify-content: flex-end; gap: 22px; font-size: 0.8125rem; }
.links a { padding: 14px 0 0; }

/* ── Sections below the deck: label left of the needle, content right of it ── */

.section {
  display: grid;
  grid-template-columns: calc(var(--needle) - var(--m) + var(--gutter)) minmax(0, 1fr);
  padding: clamp(48px, 7vw, 96px) var(--m);
  border-top: 1px solid var(--line);
}

.statement { font-size: clamp(1.5rem, 2.6vw, 2.25rem); line-height: 1.15; letter-spacing: -0.015em; }
.lead { margin-top: 20px; font-size: 1.0625rem; }
.lead a, .more, .hint a, .prose a, .alert a, .dates a { text-decoration: underline; text-underline-offset: 0.28em; text-decoration-thickness: 1px; }
.lead a:hover, .more:hover, .hint a:hover, .prose a:hover, .alert a:hover, .dates a:hover { text-decoration-thickness: 2px; }
.empty { color: var(--muted); }

.tracks { list-style: none; padding: 0; columns: 2 300px; column-gap: calc(2 * var(--gutter)); counter-reset: track; }
.tracks li { display: grid; grid-template-columns: 2.6em minmax(0, 1fr); padding: 7px 0; break-inside: avoid; counter-increment: track; }
.tracks li::before {
  content: counter(track, decimal-leading-zero);
  padding-top: 0.38em;
  font-size: 0.6875rem;
  line-height: 1.3;
  letter-spacing: 0.09em;
  font-feature-settings: "tnum", "zero", "ss01";
  color: var(--muted);
}
.tracks .sep, .tracks .track-title { color: var(--muted); }

.dates { list-style: none; padding: 0; }
.dates li { display: grid; grid-template-columns: minmax(9em, 15em) minmax(0, 1fr); gap: 2px 24px; padding: 14px 0; border-top: 1px solid var(--line); }
.dates li:first-child { border-top: 0; padding-top: 0; }
.dates time { font-feature-settings: "tnum", "ss01"; }
.dates .micro { margin-left: 10px; }
.past-title { margin: 48px 0 16px; }
.dates--past { color: var(--muted); }

/* ── Shows ────────────────────────────────────────────────────────────────── */

.shows { padding: clamp(48px, 7vw, 96px) var(--m); border-top: 1px solid var(--line); }
.shows h2 { margin-bottom: 40px; }
.grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 44px 28px; }
.card { display: block; }
.card:hover { text-decoration: none; }
.card > span { display: block; }
.card .disc { width: auto; margin-bottom: 16px; }
.card .disc img { transition: transform 1.4s var(--ease); }
a.card:hover .disc img, a.card:focus-visible .disc img { transform: rotate(140deg); }
.card .no { font: 400 1.75rem/1 var(--display); font-feature-settings: "lnum"; }
.card .meta { margin-top: 6px; }
/* The show that is on the deck right now. */
.card[aria-current] .no::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 10px;
  border-radius: 50%;
  background: var(--ink);
  vertical-align: 0.5em;
}
.card--soon .no { color: var(--muted); }

/* ── Pages without a deck: enquiries, legal, errors ───────────────────────── */

.page {
  display: grid;
  grid-template-columns: calc(var(--needle) - var(--m) + var(--gutter)) minmax(0, 1fr);
  align-content: start;
  min-height: 78vh;
  padding: calc(var(--bar-h) + clamp(32px, 6vw, 80px)) var(--m) clamp(64px, 9vw, 120px);
}
.page-body { max-width: 38rem; }
.page-body > p + p { margin-top: 20px; }

.prose { line-height: 1.6; }
.prose section + section { margin-top: 72px; }
.prose h2 { margin-bottom: 20px; font-size: 1.5rem; font-weight: 400; line-height: 1.2; letter-spacing: -0.01em; }
.prose h3 { margin: 36px 0 8px; font-size: 0.9375rem; font-weight: 500; }
.prose p + p, .prose address + p, .prose p + address { margin-top: 12px; }
.prose .lead { margin-top: 0; }
.prose .updated { margin-top: 36px; color: var(--muted); }
.prose code { font: 0.875em/1 ui-monospace, Menlo, Consolas, monospace; }
.prose address { font-style: normal; }
.legal-id { display: block; width: auto; max-width: 100%; height: auto; }
.lang-switch { margin-bottom: 32px; color: var(--muted); }
.lang-switch [aria-current] { color: var(--ink); }
.binding { margin-bottom: 40px; padding: 2px 0 2px 16px; border-left: 2px solid var(--line); color: var(--muted); }
.binding a { color: var(--ink); }

.debug { margin-top: 32px; padding: 16px; overflow: auto; border: 1px solid var(--line); font: 0.75rem/1.5 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; }

/* ── Form ─────────────────────────────────────────────────────────────────── */

.form { display: grid; gap: 28px; margin-top: 40px; }
.field label { display: block; margin-bottom: 6px; font-size: 0.6875rem; line-height: 1.3; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea {
  display: block;
  width: 100%;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;                 /* 16px: below that iOS zooms into the field */
  line-height: 1.5;
}
.field textarea { min-height: 9.5em; resize: vertical; }
.field input:hover, .field textarea:hover { border-bottom-color: var(--ink); }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 6px; border-bottom-color: var(--ink); }
/* Errors are marked by weight and by words, not by colour: the one colour stays reserved. */
.field [aria-invalid="true"] { padding-bottom: 11px; border-bottom: 2px solid var(--ink); }
.field .error { margin-top: 8px; font-size: 0.8125rem; font-weight: 500; }
.field input:-webkit-autofill, .field textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 100px var(--bg) inset;
  caret-color: var(--ink);
}

.button {
  justify-self: start;
  padding: 15px 28px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 500 0.9375rem/1 var(--text);
  cursor: pointer;
}
.button:hover { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: 0.5; cursor: progress; pointer-events: none; }

.alert { margin-top: 32px; padding: 2px 0 2px 16px; border-left: 2px solid var(--ink); font-weight: 500; }
.alert:focus { outline: none; }
.hint { font-size: 0.8125rem; color: var(--muted); }
.hint a { color: var(--ink); }

/* A field people never see. Moved out of view rather than removed, because bots check for that. */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Footer ───────────────────────────────────────────────────────────────── */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 32px;
  padding: 28px var(--m) 36px;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--muted);
}
.footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 22px; }
.footer a { padding: 8px 0; }
.footer a:hover { color: var(--ink); }
.link-button {
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.link-button:hover { color: var(--ink); }

/* ── Consent banner ───────────────────────────────────────────────────────── */

/* Hidden until the consent script decides to show it; stays hidden if JS is off, so no
   script can load without a choice either way. */
.consent {
  position: fixed;
  left: var(--m);
  right: var(--m);
  bottom: var(--m);
  z-index: 20;
  max-width: 30rem;
  padding: 20px 22px 22px;
  border: 1px solid var(--ink);
  background: var(--bg);
}
.consent[hidden] { display: none; }
.consent-head { margin: 0 0 10px; }
.consent-text { margin: 0 0 18px; font-size: 0.875rem; line-height: 1.55; }
.consent-text a { color: var(--ink); text-decoration: underline; text-underline-offset: 0.28em; text-decoration-thickness: 1px; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.consent-actions .button { padding: 11px 22px; font-size: 0.875rem; }

/* ── Small screens ────────────────────────────────────────────────────────── */

/* Not enough room beside the wordmark for the channel links: the footer carries them. */
@media (max-width: 920px) {
  .links { display: none; }
}

/* Not enough room for the play control beside the video: it sits above it. */
@media (max-width: 880px) {
  .is-open .screen { flex-direction: column; align-items: flex-end; gap: 10px; }
  .is-open .play { flex-direction: row; align-items: center; text-align: left; }
  .is-open .video { width: 100%; }
  .deck--portrait.is-open .screen { gap: 14px; }
  .deck--portrait.is-open .video:not(.is-revealed) { width: auto; align-self: flex-start; }
  .deck--portrait.is-open .video.is-revealed { width: 100%; }
}

/* Below 760px the wordmark spans the page, so the needle sits at 60% of the width and there is
   no room beside it: zones stack, the show's links move left of the needle. */
@media (max-width: 760px) {
  :root {
    --w: calc(100% - 2 * var(--m));   /* resolved where it is used: always against the page width */
    --band-h: clamp(130px, 20vh, 170px);
  }

  .note { position: static; height: auto; max-width: none; padding: 2px var(--m) 0; }
  .note--statement { display: none; }

  .top { grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; min-height: 0; }
  .show .num { font-size: clamp(72px, 12vh, 96px); }
  .screen { width: auto; }
  .play { flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
  .play .disc { width: clamp(96px, 15vh, 120px); }
  .soon { font-size: 1.0625rem; }

  .is-open .top { grid-template-columns: minmax(0, 1fr); row-gap: var(--u); }
  .is-open .show { display: flex; align-items: baseline; gap: 14px; }
  .is-open .show .num { order: -1; margin: 0; font-size: 44px; }
  .is-open .show .title { display: none; }
  .is-open .screen { justify-self: stretch; width: 100%; align-items: stretch; }
  .is-open .play { justify-content: flex-start; }
  .is-open .play .disc { width: 48px; }

  .needle { top: -14px; }
  .info { margin-left: var(--m); margin-right: 0; max-width: calc(var(--needle) - var(--m) - 14px); }
  .home { flex: 1; }
  .wordmark { width: 100%; }
  .bar-home .wordmark { width: 112px; }

  .section, .page { grid-template-columns: minmax(0, 1fr); row-gap: 20px; }
  .dates li { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 20px; }
}

/* ── Preferences ──────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  .needle, .is-open .video { animation: none; }
  .band img, .band canvas, .card .disc img { transition: none; }
  a.card:hover .disc img, a.card:focus-visible .disc img { transform: none; }
}

@media (forced-colors: active) {
  .needle, .dot { forced-color-adjust: none; }
  .button, .field input, .field textarea { border-color: CanvasText; }
}