/* musimo.app tokens. Colour names match the app's --color-* tokens (frontend/src/theme/themes.ts).
   Dark is the default; light follows the visitor's system setting. [data-theme] forces either. */
:root, [data-theme="dark"] {
  color-scheme: dark;
  --color-canvas: #111716;
  --color-sidebar: #0e1312;
  --color-raised: #17201b;
  --color-sunken: #151c19;
  --color-hover: #1e2a23;
  --color-active: #263327;
  --color-text: #e8ece8;
  --color-muted: #93a39b;
  --color-faint: #819088;
  --color-line: #2a3630;
  --color-line-strong: #344035;
  --color-accent: #c3e4a2;
  --color-accent-ink: #172014;
  --color-accent-hot: #d9ff73;
  --color-good: #c3e4a2;
  --color-good-bg: #283a28;
  --color-good-line: #4b6743;
  --color-owned-bg: #2a3a27;
  --color-wave-bass: #ff4d5e;
  --color-wave-mids: #4ade80;
  --color-wave-highs: #4da6ff;
  /* site only */
  --color-nav-glass: color-mix(in oklab, var(--color-canvas) 76%, transparent);
  --wash-pink: #e48fc6;
  --wash-violet: #8a6ad8;
  --tint-teal: #2aa5b5;
  --tint-amber: #ee9a4d;
  --wash-strength: 34%;
  --tint-strength: 9%;
  --shadow-frame: 0 1px 0 0 rgb(255 255 255 / .04) inset, 0 40px 90px -40px rgb(0 0 0 / .85);
  --shadow-card: 0 1px 0 0 rgb(255 255 255 / .03) inset;
  --shadow-pop: 0 12px 32px -12px rgb(0 0 0 / .6);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --color-canvas: #f4f6f3; --color-sidebar: #e7ece4; --color-raised: #ffffff; --color-sunken: #ecf0ea;
    --color-hover: #dbe5d7; --color-active: #cadbc2; --color-text: #1c2518; --color-muted: #4c5946; --color-faint: #596553;
    --color-line: #c8d7c1; --color-line-strong: #a5bd98; --color-accent: #375b25; --color-accent-ink: #ffffff; --color-accent-hot: #2e551b;
    --color-good: #2e5c22; --color-good-bg: #dfeed6; --color-good-line: #7d9b71; --color-owned-bg: #dcead2;
    --color-wave-bass: #d92d43; --color-wave-mids: #16a34a; --color-wave-highs: #1d6fd8;
    --wash-strength: 30%; --tint-strength: 12%;
    --shadow-frame: 0 40px 80px -40px rgb(28 37 24 / .45); --shadow-card: 0 1px 2px rgb(28 37 24 / .06); --shadow-pop: 0 12px 32px -12px rgb(28 37 24 / .25);
  }
}
[data-theme="light"] {
  color-scheme: light;
  --color-canvas: #f4f6f3; --color-sidebar: #e7ece4; --color-raised: #ffffff; --color-sunken: #ecf0ea;
  --color-hover: #dbe5d7; --color-active: #cadbc2; --color-text: #1c2518; --color-muted: #4c5946; --color-faint: #596553;
  --color-line: #c8d7c1; --color-line-strong: #a5bd98; --color-accent: #375b25; --color-accent-ink: #ffffff; --color-accent-hot: #2e551b;
  --color-good: #2e5c22; --color-good-bg: #dfeed6; --color-good-line: #7d9b71; --color-owned-bg: #dcead2;
  --color-wave-bass: #d92d43; --color-wave-mids: #16a34a; --color-wave-highs: #1d6fd8;
  --wash-strength: 30%; --tint-strength: 12%;
  --shadow-frame: 0 40px 80px -40px rgb(28 37 24 / .45); --shadow-card: 0 1px 2px rgb(28 37 24 / .06); --shadow-pop: 0 12px 32px -12px rgb(28 37 24 / .25);
}
:root {
  --font-sans: "Geist", "Geist Variable", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", "Geist Mono Variable", ui-monospace, Menlo, monospace;
  --text-display: clamp(3rem, 1.9rem + 4.8vw, 6rem);     /* 48 → 96 */
  --text-h2: clamp(2rem, 1.55rem + 1.9vw, 3.25rem);       /* 32 → 52 */
  --text-h3: 1.25rem;                                     /* 20 */
  --text-lead: clamp(1.125rem, 1.03rem + .4vw, 1.375rem); /* 18 → 22 */
  --text-body: 1.0625rem;                                 /* 17 */
  --text-small: .9375rem;                                 /* 15 */
  --text-label: .75rem;                                   /* 12, mono, uppercase, .14em */
  --text-code: .9375rem;                                  /* 15, mono */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px; --space-10: 128px;
  --space-gutter: clamp(20px, 5vw, 48px);
  --space-section: clamp(88px, 11vw, 144px);
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 18px; --radius-xl: 24px; --radius-pill: 999px;
  --content: 1200px; --content-wide: 1560px;
  /* breakpoints: phone < 640, tablet 640–1023, desktop ≥ 1024 */
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--color-canvas); color: var(--color-text); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
*, *::before, *::after { box-sizing: border-box; }
a { color: var(--color-accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--color-accent-hot); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
[id] { scroll-margin-top: 80px; }
img { max-width: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
