@font-face {
  font-family: 'Grenze Gotisch';
  src: url('/fonts/grenze-gotisch.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Familjen Grotesk';
  src: url('/fonts/familjen-grotesk.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* True black is the brand: everything else is light escaping from it. */
  --void: #000;
  --ultraviolet: #bb00ff;
  --plasma: #e08bff;
  --dusk: #120c17;
  --dusk-raised: #231a2b;
  --dusk-high: #322839;
  --ink: #fff;
  --ash: #b5abbd;
  --line: color-mix(in srgb, var(--ink) 10%, transparent);
  --danger: #ff5c8a;
  --on-accent: #fff;

  /* Set per listener on the Appearance page. */
  --round: 1;
  --bar-glass: 50%;
  --tint-strength: 0.5;

  --brand: 'Grenze Gotisch', 'Times New Roman', serif;
  --display: 'Familjen Grotesk', system-ui, sans-serif;
  --text: 'Familjen Grotesk', system-ui, sans-serif;

  --step--1: 0.8125rem;
  --step-0: 0.9375rem;
  --step-1: 1.125rem;
  --step-2: 1.5rem;
  --step-3: 2.25rem;
  --step-4: 3.5rem;

  --dock-height: 88px;
}

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

html { background: var(--void); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font: 400 var(--step-0) / 1.5 var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

input, textarea {
  -webkit-user-select: text;
  user-select: text;
}

img { -webkit-user-drag: none; }

h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, canvas, svg { display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--plasma); outline-offset: 2px; }
::selection { background: var(--ultraviolet); color: var(--on-accent); }

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

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

.wordmark {
  font: 700 1.75rem / 1 var(--brand);
  letter-spacing: 0.005em;
  color: var(--ink);
}

.icon {
  width: 1.25rem; height: 1.25rem; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.icon-play, .icon-pause, .icon-next, .icon-prev, .icon-heart { fill: currentColor; }
.icon-verified path:first-child { fill: currentColor; }
.icon-verified path:last-child { stroke: #000; }

/* Buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0 1.375rem;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.btn-primary { background: var(--ultraviolet); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--ultraviolet) 82%, #fff); box-shadow: 0 0 28px color-mix(in srgb, var(--ultraviolet) 55%, transparent); }

.btn-quiet { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-quiet:hover { box-shadow: inset 0 0 0 1px var(--plasma); }

.btn-danger { background: var(--danger); color: #000; }
.btn-danger:hover { background: #ff85a7; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.titled { display: inline-flex; align-items: center; gap: 0.5em; min-width: 0; }
.titled > .icon { width: 0.92em; height: 0.92em; color: var(--plasma); }

.toast .icon { width: 1.125rem; height: 1.125rem; }
.toast .icon-heart { color: #ff0000; }
.toast .icon-ok { color: #8a0ae6; }
.toast .icon-alert { color: #d0104a; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  color: var(--ash);
  transition: color 0.15s, background-color 0.15s;
}
.icon-btn:hover { color: var(--ink); background: var(--dusk-raised); }
.icon-btn[aria-pressed='true'] { color: var(--plasma); }

/* Forms */

.field { display: grid; gap: 0.375rem; }
.field > span { color: var(--ash); font-size: var(--step--1); }

.input {
  width: 100%; min-height: 2.75rem; padding: 0 0.875rem;
  background: var(--dusk);
  border: 1px solid var(--line);
  border-radius: calc(6px * var(--round));
}
.input:focus { outline: none; border-color: var(--plasma); }
.input::placeholder { color: var(--ash); opacity: 0.75; }

/* Dialogs */

dialog {
  width: min(30rem, calc(100vw - 2rem));
  padding: 1.75rem;
  background: var(--dusk);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: calc(10px * var(--round));
  box-shadow: 0 0 80px color-mix(in srgb, var(--ultraviolet) 25%, transparent);
}
dialog::backdrop { background: rgb(0 0 0 / 0.75); }
dialog h2 { font: 700 var(--step-2) / 1.15 var(--display); margin-bottom: 1rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 0.625rem; margin-top: 1.5rem; }
.form-error { color: var(--danger); font-size: var(--step--1); min-height: 1.25em; margin-top: 0.5rem; }

/* Toast */

.toast {
  position: fixed; left: 50%; bottom: calc(var(--dock-height) + 0.5rem); z-index: 70;
  transform: translate(-50%, 0.5rem);
  max-width: calc(100vw - 2rem); padding: 0.625rem 1.125rem;
  background: var(--ink); color: var(--void);
  border-radius: 999px;
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

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