/* vdo – shared tokens and primitives */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wdth,wght@12..96,75..100,300..800&family=Fraunces:opsz,wght,SOFT@9..144,600..800,0..100&display=swap');

:root {
  --ink: #1a1530;         /* page */
  --ink-2: #221b3d;       /* panels */
  --ink-3: #2d2550;       /* raised / hover */
  --line: #3e3466;
  --text: #f2edff;
  --muted: #aaa0cc;
  --faint: #7a7099;
  --marquee: #ffc94d;     /* the one bright thing: marquee bulb */
  --marquee-ink: #2b1d00;
  --live: #52d6a4;
  --warn: #ffb347;
  --danger: #ff6b7d;
  --focus: #9d8cff;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --shadow: 0 18px 50px rgb(8 4 20 / 55%);

  --font: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* the logo and big headings */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --display-weight: 700;
  --display-stretch: 100%;
  --display-tracking: -0.01em;
  --display-axes: 'SOFT' 100; /* Fraunces' rounded, softer letter shapes */
  --wordmark-tracking: 0.01em;
  --step--1: 0.8125rem;
  --step-0: 0.9375rem;
  --step-1: 1.125rem;
  --step-2: 1.5rem;
  --step-3: 2.25rem;
  --step-4: 3.25rem;

  color-scheme: dark;
}

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

html, body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

[v-cloak] { display: none !important; }

.icon { display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; flex: none; }
.icon svg { width: 100%; height: 100%; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }

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

* {
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 40px;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--ink-2);
  color: var(--text);
  font-weight: 600;
  font-size: var(--step-0);
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:hover { background: var(--ink-3); border-color: #54478a; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn .icon { width: 18px; height: 18px; }

.btn-primary {
  background: var(--marquee);
  border-color: var(--marquee);
  color: var(--marquee-ink);
}
.btn-primary:hover { background: #ffd877; border-color: #ffd877; }

.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgb(255 255 255 / 6%); border-color: transparent; }

.btn-lg { min-height: 48px; padding: 0.7rem 1.5rem; font-size: var(--step-1); border-radius: var(--r-md); }

.input {
  width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgb(0 0 0 / 22%);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.input::placeholder { color: var(--faint); }
.input:focus { border-color: var(--focus); }

.label { display: block; font-size: var(--step--1); color: var(--muted); margin-bottom: 0.35rem; }

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--faint);
  flex: none;
}
.dot.live { background: var(--live); box-shadow: 0 0 0 3px rgb(82 214 164 / 18%); }
.dot.paused { background: var(--marquee); }
.dot.buffering { background: var(--warn); animation: blink 1s infinite; }
.dot.off { background: var(--danger); }

@keyframes blink { 50% { opacity: 0.35; } }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 7%);
  color: var(--muted);
  font-size: var(--step--1);
  white-space: nowrap;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgb(10 6 24 / 72%);
  backdrop-filter: blur(8px);
}

.dialog {
  width: min(440px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--ink-2);
  box-shadow: var(--shadow);
}
.dialog h2 { margin: 0 0 0.35rem; font-size: var(--step-2); line-height: 1.15; letter-spacing: -0.01em; }
.dialog p { margin: 0 0 1.25rem; color: var(--muted); }
.dialog .error { color: var(--danger); margin: 0.75rem 0 0; font-size: var(--step--1); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text);
}
.icon-btn:hover { background: rgb(255 255 255 / 10%); }
.icon-btn .icon { width: 22px; height: 22px; }

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgb(255 255 255 / 15%);
  border-top-color: var(--marquee);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.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;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
