/* Koza.live theme — matched to kozasound.com:
   black background · metallic gold accent (#dbaf5a→#9e7018) · slate panels · white text */
:root {
  --bg: #000000;
  --panel-2: #353746;     /* kozasound slate */
  --fg: #ffffff;
  --muted: #9a9aa8;
  --gold: #dbaf5a;        /* kozasound primary accent */
  --gold-deep: #9e7018;
  --gold-grad: linear-gradient(to right, var(--gold), var(--gold-deep));
  --live: #fa233b;        /* from kozasound palette */
  --line: #2a2a33;
  /* Type stacks live here too — DOCS.md tells you to "edit the variables at the
     top of styles.css", so all of them need to actually be at the top. */
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --grotesk: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Visible to screen readers, invisible on screen. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Nothing set outline:none, but the UA default ring is nearly invisible on a
   black background — make keyboard focus unmissable. */
:is(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 0;
}

html, body { overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  /* gold-gradient text, matching kozasound headings */
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.wordmark .dot {
  /* keep the dot solid gold for a crisp brand mark */
  -webkit-text-fill-color: var(--gold);
  color: var(--gold);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  border-radius: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  font-weight: 600;
  border: 1px solid var(--line);
}
.pill--live { color: var(--live); border-color: var(--live); }
.pill--radio { color: var(--gold); border-color: rgba(219, 175, 90, 0.35); }
.led {
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
  animation: blink 1.8s ease-in-out infinite;
}

@keyframes blink {
  0%   { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  70%  { box-shadow: 0 0 0 8px transparent; opacity: 0.6; }
  100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
}

/* ---------- Stage / views ---------- */
/* The page scrolls as a whole: the stage fills the first screen below the top
   bar and the footer sits under it. A fixed-height stage with its own inner
   scroller left phones scrolling a small box while the footer took half the
   screen. svh = the viewport with the browser toolbars showing. */
.stage {
  flex: 1 0 auto;
  min-height: calc(100vh - 61px);
  min-height: calc(100svh - 61px);
  display: flex;
  position: relative;
  overflow-x: clip;
}
.view {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* "safe center" keeps content centered when it fits, but falls back to the
     top (instead of clipping it) when the view is shorter than its content. */
  justify-content: safe center;
  padding: 2rem 16px;
}
/* The .view class sets display:flex, which overrides the UA [hidden] rule.
   Re-assert it so toggled-off views actually disappear (otherwise live +
   radio + loading all stack into the same row and the radio grid blows out). */
.view[hidden] { display: none; }

/* gold glow */
.pulse {
  position: absolute;
  width: min(60vw, 420px); height: min(60vw, 420px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(219, 175, 90, 0.22), transparent 70%);
  filter: blur(22px);
  animation: breathe 6s ease-in-out infinite;
  z-index: 0;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50%      { transform: scale(1.15); opacity: 0.85; }
}

/* ---------- Live player ---------- */
.player-frame {
  width: 100%;
  max-width: 1100px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(219, 175, 90, 0.25);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.player-frame iframe { width: 100%; height: 100%; border: 0; }

.placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.5rem; text-align: center; padding: 2rem;
}
.placeholder strong { font-size: 2rem; letter-spacing: 0.1em; color: var(--gold); }
.placeholder code { color: var(--gold); font-size: 0.85em; }
.placeholder-led {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--live); margin-bottom: 0.5rem;
  animation: blink 1.6s ease-in-out infinite;
}

/* ============================================================
   RADIO — simple centered "now playing" card
   ============================================================ */
.radio-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 380px;
  min-width: 0;   /* allow shrink below content min-width (nowrap track titles) */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.7rem;
}

/* Small label system */
.kicker {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---- Album art (square, fixed, never overflows the viewport) ---- */
.art {
  width: min(180px, 50vw);
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(219,175,90,0.45);
  border-radius: 12px;
  background:
    radial-gradient(120% 120% at 30% 20%, rgba(219,175,90,0.18), transparent 55%),
    #000;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: relative;
}
.art-cover {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.art-monogram {
  font-family: var(--grotesk);
  font-weight: 800;
  font-size: clamp(3rem, 11vw, 5.2rem);
  line-height: 1;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  user-select: none;
}

/* ---- Status + now playing ---- */
.radio-status {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.68rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold);
  margin-top: 0.35rem;
}
.led-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 6px var(--live);
  animation: blink 1.8s ease-in-out infinite;
}
.now-title {
  font-family: var(--grotesk);
  font-weight: 800;
  font-size: clamp(1.3rem, 5vw, 1.8rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  /* wrap to at most 2 lines, then ellipsis — no overflow */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  width: 100%;
}
.now-playing { width: 100%; min-width: 0; }
.now-artist {
  font-family: var(--grotesk);
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: -0.15rem;
  max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---- Transport (play/pause is a WCAG 1.4.2 requirement, not decoration) ---- */
.transport {
  display: flex; align-items: center; justify-content: center;
  gap: 1.1rem;
  margin-top: 0.55rem;
}
.tbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}
.tbtn svg { width: 20px; height: 20px; fill: currentColor; display: block; }
.tbtn:hover { color: var(--gold); border-color: rgba(219,175,90,0.5); }
.tbtn:active { transform: scale(0.94); }
.tbtn--main {
  width: 52px; height: 52px;
  color: #000;
  background: var(--gold-grad);
  border-color: var(--gold);
}
.tbtn--main svg { width: 24px; height: 24px; }
.tbtn--main:hover { color: #000; filter: brightness(1.08); }
/* Swap the glyph from the button's own playing state — no JS icon juggling. */
.tbtn--main .i-pause { display: none; }
.tbtn--main.is-playing .i-play { display: none; }
.tbtn--main.is-playing .i-pause { display: block; }

/* ---- Time + dynamic progress bar ---- */
.time-row {
  display: flex; align-items: center; gap: 0.7rem;
  width: 100%; margin-top: 0.4rem;
}
.t {
  font-family: var(--mono); font-size: 0.7rem;
  color: var(--muted); min-width: 34px;
}
.t:last-child { text-align: right; }
.progress {
  flex: 1; height: 4px; border-radius: 999px;
  background: var(--line);
  position: relative; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: var(--gold-grad);
  transition: width 0.25s linear;
}

/* ---- Up-next queue ---- */
/* Autoplay-blocked prompt + a pulsing play button until the first tap. */
.tap-hint {
  margin-top: 0.7rem;
  font-family: var(--mono); font-size: 0.68rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold);
  animation: blink-text 1.8s ease-in-out infinite;
}
.tap-hint[hidden] { display: none; }
@keyframes blink-text { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.tbtn--main.needs-tap { animation: blink 1.8s ease-in-out infinite; color: var(--gold); }

/* "Stream Koza on": gold brand icons. Spotify, Apple Music and YouTube get
   larger square tiles; the rest sit smaller underneath. Icons are inline SVG
   filled with currentColor, so they take the site gold. */
.stream-on {
  width: 100%; margin-top: 1rem;
  display: flex; flex-direction: column; align-items: center;
  gap: 0.75rem;
}
.stream-icons {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 0.9rem;
}
.stream-icons--major { gap: 1.25rem; }
.stream-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  color: var(--gold);
  border: 1px solid rgba(219, 175, 90, 0.35);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.08s ease, filter 0.15s ease;
}
.stream-icon svg { width: 20px; height: 20px; fill: currentColor; display: block; }
.stream-icon--major { width: 58px; height: 58px; border-color: rgba(219, 175, 90, 0.6); }
.stream-icon--major svg { width: 30px; height: 30px; }
.stream-icon--text {
  width: auto; padding: 0 0.7rem;
  font-family: var(--mono); font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.stream-icon:hover, .stream-icon:focus-visible {
  color: #fff; border-color: var(--gold);
  transform: translateY(-1px);
  filter: drop-shadow(0 0 6px rgba(219, 175, 90, 0.45));
}

.queue {
  width: 100%; margin-top: 0.6rem;
  border-top: 1px solid var(--line);
  padding-top: 0.7rem;
}
.queue-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.35rem;
}
.playlist { list-style: none; text-align: left; }
.playlist li { border-bottom: 1px solid var(--line); }
.playlist li:last-child { border-bottom: 0; }
/* Rows are real <button>s now (keyboard-operable); strip the UA chrome. */
.pl-row {
  display: flex; align-items: center; gap: 0.65rem;
  width: 100%;
  padding: 0.5rem 0.3rem;
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
}
.pl-row:hover { background: rgba(219,175,90,0.06); }
.pl-thumb {
  width: 40px; height: 40px; flex: none;
  border-radius: 6px; overflow: hidden;
  border: 1px solid var(--line);
  background: radial-gradient(120% 120% at 30% 20%, rgba(219,175,90,0.18), transparent 55%), #000;
}
.pl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-text { display: flex; flex-direction: column; min-width: 0; }
.pl-title {
  font-family: var(--grotesk); font-size: 0.85rem; line-height: 1.25; color: var(--fg);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pl-artist {
  font-family: var(--grotesk); font-size: 0.72rem; line-height: 1.2; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pl-row:hover .pl-title,
.pl-row:focus-visible .pl-title { color: var(--gold); }
.playlist li.empty {
  display: block; cursor: default; line-height: 1.6;
  padding: 0.5rem 0.3rem;
  color: var(--muted); font-family: var(--mono); font-size: 0.74rem;
}

/* ---------- Misc ---------- */
.muted { color: var(--muted); }
code {
  background: #00000060; padding: 0.1em 0.35em;
  border-radius: 4px; font-size: 0.85em; color: var(--gold);
}
/* ---------- Site footer (social banner · à la kozasound.com) ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #000, #060606);
  padding: 2.4rem 1.5rem 2.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
}
.footer-social {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 520px;
  justify-content: center;
}
.footer-rule {
  flex: 1;
  height: 1px;
  max-width: 90px;
  background: var(--gold-grad);
  opacity: 0.7;
}
.social-link {
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  transition: transform 0.15s ease, color 0.15s ease, filter 0.15s ease;
}
.social-link svg { width: 22px; height: 22px; fill: currentColor; display: block; }
.social-link:hover {
  color: #fff;
  transform: translateY(-2px);
  filter: drop-shadow(0 0 6px rgba(219, 175, 90, 0.55));
}
.watch-live {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}
.watch-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}
.watch-link {
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid rgba(219, 175, 90, 0.45);
  border-radius: 0;
  padding: 0.5rem 1.1rem;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}
.watch-link:hover { color: #fff; border-color: var(--gold); transform: translateY(-1px); }
.kozasound-btn {
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: #000;
  background: var(--gold-grad);
  border: 1px solid var(--gold);
  border-radius: 0;
  padding: 0.6rem 1.35rem;
  transition: filter 0.15s ease, transform 0.08s ease;
}
.kozasound-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
/* "Operated by" + GRG single-line lockup (white colourway, per the GRG brand
   guide for dark grounds). 220px keeps it above the guide's 200px minimum. */
.footer-grg {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.15s ease;
}
.footer-grg:hover { opacity: 1; }
.footer-grg img { width: 220px; height: auto; display: block; }
.footer-grg-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-legal a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(219, 175, 90, 0.45);
  text-underline-offset: 2px;
}
.footer-legal a:hover { color: var(--gold); }
.footer-legal {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: center;
  max-width: 560px;
}
.footer-legal .lower { text-transform: lowercase; }
.footer-links {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.footer-links a { color: var(--gold); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* ---------- Legal / privacy page ---------- */
.legal {
  flex: 1;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3.5rem;
}
.legal a { color: var(--gold); }
.legal h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: 0.02em;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 0.4rem;
}
.legal .updated {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 2rem;
}
.legal h2 {
  font-size: 1.25rem; color: var(--gold); margin: 2rem 0 0.6rem;
  padding-top: 1rem; border-top: 1px solid var(--line);
}
.legal h3 { font-size: 1.02rem; color: var(--fg); margin: 1.3rem 0 0.4rem; }
.legal h4 { font-size: 0.92rem; color: var(--gold); margin: 1rem 0 0.3rem; }
.legal p { color: #d6d6de; line-height: 1.7; margin-bottom: 0.9rem; font-size: 0.95rem; }
.legal ul { margin: 0 0 1rem 1.25rem; }
.legal li { color: #d6d6de; line-height: 1.7; margin-bottom: 0.5rem; font-size: 0.95rem; }
.legal .back {
  display: inline-block; margin-bottom: 2rem;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; text-decoration: none; color: var(--gold);
}
.legal .back:hover { text-decoration: underline; }

.dev-bar {
  position: fixed; bottom: 12px; left: 12px;
  display: flex; gap: 6px; align-items: center;
  background: #000000cc; border: 1px solid var(--line);
  padding: 6px 10px; border-radius: 10px;
  font-size: 0.72rem; color: var(--muted); z-index: 50;
}
/* display:flex above beats the UA [hidden] rule, so without this the dev bar
   showed on the public site too (same trap as .view[hidden]). */
.dev-bar[hidden] { display: none; }
.dev-bar button {
  background: var(--panel-2); color: var(--fg); border: 1px solid var(--line);
  border-radius: 0; padding: 3px 8px; cursor: pointer; font-size: 0.72rem;
}
.dev-bar button:hover { border-color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  .pulse, .led, .placeholder-led, .led-dot, .tap-hint, .tbtn--main.needs-tap { animation: none; }
  .progress-fill { transition: none; }
}

/* Windows High Contrast drops background images but still honours
   color:transparent — which made the wordmark, the album monogram and the
   privacy-page h1 literally invisible. Repaint them in system colours. */
@media (forced-colors: active) {
  .wordmark, .art-monogram, .legal h1 {
    background: none;
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
  }
  .wordmark .dot { color: CanvasText; -webkit-text-fill-color: CanvasText; }
  .tbtn--main { background: ButtonFace; color: ButtonText; border: 1px solid ButtonBorder; }
  .tbtn svg { fill: currentColor; }
}
