/* [origin ref=asp-ucb req=REQ-PLAYER-019 c4=design_prototype/design_system]
   [intent]Single source of truth for colour, type, spacing, radii, elevation and motion (S.L.O.B. palette, Fraunces + Inter,
   Material-style tonal surfaces). Website pages, the Leptos player and Storybook import this file unchanged.[/intent]
   [/origin] */
/* [origin ref=asp-oui req=REQ-PLAYER-019 c4=design_prototype/design_system]
   [intent]Stroke widths beyond the hairline (focus outline and offset, tab indicator, pull-quote rule), icon and round
   control sizes, and the toggle switch geometry are tokens too, so component CSS carries no width or size literal.[/intent]
   [/origin] */

@font-face {
  font-family: 'Fraunces'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/Fraunces-latin-wght.woff2) format('woff2');
}
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(../fonts/Inter-latin-wght.woff2) format('woff2');
}

:root {
  color-scheme: dark;

  /* Palette: surfaces from deepest to highest */
  --abyss: #05090f; --ink: #080e18; --hull: #0d1622; --deck: #131f2e; --rail: #1e2d3f;
  /* Text */
  --fog: #e8eef4; --moon: #dfe7ef; --haze: #a3b4c4; --mute: #74869a;
  /* Accent (brass) and secondary (verdigris) */
  --brass: #d2a856; --brass-d: #9a7530; --verdigris: #6fb79c; --verdigris-d: #3f7d68;
  --danger: #e08a7a;

  /* Semantic roles */
  --surface-page: var(--hull);
  --surface-bar: var(--ink);
  --surface-1: var(--deck);
  --surface-2: var(--rail);
  --text-strong: var(--fog);
  --text: var(--moon);
  --text-soft: var(--haze);
  --text-faint: var(--mute);
  --accent: var(--brass);
  --accent-on: var(--abyss);
  --accent-2: var(--verdigris);
  --line: rgb(163 180 196 / 0.16);
  --scrim: rgb(5 9 15 / 0.72);
  --state-hover: rgb(232 238 244 / 0.08);
  --state-press: rgb(232 238 244 / 0.12);
  --focus: var(--brass);
  --accent-wash: rgb(210 168 86 / 0.14);

  /* Type */
  --font-serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-xs: 0.75rem; --fs-sm: 0.875rem; --fs-md: 1rem; --fs-lg: 1.25rem;
  --fs-xl: 1.625rem; --fs-2xl: 2.25rem; --fs-3xl: clamp(2.5rem, 7vw, 4.25rem);
  --lh-tight: 1.15; --lh-body: 1.6;
  --fw-regular: 400; --fw-medium: 500; --fw-semibold: 600;
  --tracking-caps: 0.12em;

  /* Spacing (4px base) */
  --sp-1: 0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem; --sp-4: 1rem; --sp-5: 1.5rem;
  --sp-6: 2rem; --sp-7: 3rem; --sp-8: 4.5rem;
  --gutter: var(--sp-4);
  --measure: 38rem;
  --page-max: 72rem;

  /* Sizes */
  --touch: 2.75rem;
  --cover-sm: 3rem; --cover-md: 3.5rem; --cover-card: 100%; --cover-now: min(78vw, 22rem);
  --bar-h: 4.5rem;
  --border-w: 1px; --progress-h: 0.25rem; --scrub-h: 0.375rem;
  /* Strokes beyond the hairline (asp-oui): focus ring, selected-tab indicator, pull-quote rule */
  --outline-w: 2px; --outline-offset: 2px; --indicator-w: 2px; --rule-w: 3px;
  /* Icons and round controls (asp-oui) */
  --icon-sm: 1.25rem; --icon-md: 1.5rem; --icon-lg: 2rem;
  --btn-play: 4rem; --btn-transport: 3.25rem;
  /* Toggle switch (asp-oui): track and thumb; the thumb sits var(--sp-1) in from either end */
  --switch-w: 3rem; --switch-h: 1.75rem; --switch-thumb: 1rem;

  /* Radii */
  --radius-sm: 0.5rem; --radius: 0.75rem; --radius-lg: 1rem; --radius-xl: 1.75rem; --radius-full: 999px;

  /* Elevation (tonal surface + shadow) */
  --elev-0: none;
  --elev-1: 0 1px 2px rgb(0 0 0 / 0.4), 0 1px 3px 1px rgb(0 0 0 / 0.25);
  --elev-2: 0 2px 6px 2px rgb(0 0 0 / 0.3), 0 1px 2px rgb(0 0 0 / 0.5);
  --elev-3: 0 8px 24px rgb(0 0 0 / 0.5), 0 2px 6px rgb(0 0 0 / 0.5);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --dur-fast: 120ms; --dur: 200ms; --dur-slow: 360ms; --dur-loop: 1400ms;
}

@media (min-width: 48rem) {
  :root { --gutter: var(--sp-6); --cover-now: 24rem; --bar-h: 5rem; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur: 0ms; --dur-slow: 0ms; --dur-loop: 0ms; }
}
