/*
 * Second Brain design tokens: the one source for www and the app.
 * Base system: shadcn/ui zinc (the system uidesigner.ai is built on), Inter, pill actions,
 * large-radius surfaces. Brand: the aurora gradient from the logo, used sparingly
 * (logo, hero glow, one highlight per view), never as a background for body text.
 *
 * Themes: light by default, dark under prefers-color-scheme, and either forced with
 * <html data-theme="light|dark">. The public site forces dark.
 */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Type */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-display: clamp(2.75rem, 6vw, 4.4rem);
  --tracking-tight: -0.025em;
  --tracking-display: -0.035em;

  /* Shape */
  --radius-sm: 0.375rem;
  --radius: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-pill: 999px;

  /* Space (4px grid) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  /* Brand */
  --brand-violet: #6d5cff;
  --brand-fuchsia: #d946ef;
  --brand-amber: #ffb547;
  --aurora: linear-gradient(135deg, var(--brand-violet) 0%, var(--brand-fuchsia) 55%, var(--brand-amber) 100%);
  --aurora-soft: radial-gradient(60% 60% at 20% 30%, rgba(109, 92, 255, 0.45), transparent 70%),
    radial-gradient(50% 55% at 75% 25%, rgba(217, 70, 239, 0.35), transparent 70%),
    radial-gradient(55% 60% at 60% 85%, rgba(255, 181, 71, 0.3), transparent 70%);

  /* Light theme (shadcn zinc) */
  --background: #ffffff;
  --foreground: #09090b;
  --card: #ffffff;
  --card-foreground: #09090b;
  --popover: #ffffff;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --accent: #f4f4f5;
  --border: #e4e4e7;
  --input: #e4e4e7;
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --secondary: #f4f4f5;
  --secondary-foreground: #18181b;
  --ring: #a1a1aa;
  --destructive: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --shadow-sm: 0 1px 2px rgba(9, 9, 11, 0.06);
  --shadow: 0 1px 3px rgba(9, 9, 11, 0.08), 0 8px 24px -12px rgba(9, 9, 11, 0.18);
  --shadow-lg: 0 24px 64px -24px rgba(9, 9, 11, 0.35);
  --logo-mono-filter: invert(1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: #09090b;
    --foreground: #fafafa;
    --card: #18181b;
    --card-foreground: #fafafa;
    --popover: #18181b;
    --muted: #27272a;
    --muted-foreground: #a1a1aa;
    --accent: #27272a;
    --border: rgba(255, 255, 255, 0.1);
    --input: rgba(255, 255, 255, 0.15);
    --primary: #fafafa;
    --primary-foreground: #18181b;
    --secondary: #27272a;
    --secondary-foreground: #fafafa;
    --ring: #71717a;
    --destructive: #f87171;
    --success: #4ade80;
    --warning: #fbbf24;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 24px 64px -24px rgba(0, 0, 0, 0.8);
    --logo-mono-filter: none;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --background: #09090b;
  --foreground: #fafafa;
  --card: #18181b;
  --card-foreground: #fafafa;
  --popover: #18181b;
  --muted: #27272a;
  --muted-foreground: #a1a1aa;
  --accent: #27272a;
  --border: rgba(255, 255, 255, 0.1);
  --input: rgba(255, 255, 255, 0.15);
  --primary: #fafafa;
  --primary-foreground: #18181b;
  --secondary: #27272a;
  --secondary-foreground: #fafafa;
  --ring: #71717a;
  --destructive: #f87171;
  --success: #4ade80;
  --warning: #fbbf24;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 24px 64px -24px rgba(0, 0, 0, 0.8);
  --logo-mono-filter: none;
  color-scheme: dark;
}

/* Single-colour app logos are drawn white; light themes invert them. */
.logo-mono { filter: var(--logo-mono-filter); }
