/* Nova brand tokens — the aikho design language (warm paper · ink · ember).
   The raw --aikho-* palette is the source of truth; the shadcn-named vars below
   are remapped onto it, so the whole kernel UI (kernel/ui components + every
   journey) adopts the language, and app.input.css maps the shadcn names onto
   Tailwind utilities via @theme. The chrome + journey screens read the raw
   --aikho-* tokens directly. Loaded after app.css so these win via the cascade.
   A per-instance brand overlay (instances/<name>/brand/nova-tokens.css) wins. */
:root {
  /* ---------- aikho raw palette (source of truth) ---------- */
  --aikho-ink:        #0F1511;   /* near-black forest — dark surfaces (app bar, chat) */
  --aikho-ink-2:      #131A15;
  --aikho-ink-3:      #1B2419;   /* panel surface on dark */
  --aikho-ink-4:      #28342A;   /* hairline on dark */

  --aikho-ember:      #FF6B47;   /* signal accent — primary action */
  --aikho-ember-2:    #E8552F;   /* hover */
  --aikho-ember-3:    #C2401B;   /* press */
  --aikho-ember-tint: #FFD9CC;   /* soft accent surface */

  --aikho-ash:        #5C3A28;
  --aikho-ash-2:      #3D2418;

  --aikho-paper:      #FBFAF6;   /* warm off-white — cards */
  --aikho-paper-2:    #F4F1EA;   /* page background */
  --aikho-paper-3:    #E8E3D7;   /* muted / tertiary */
  --aikho-line:       #DCD6C7;   /* hairline borders on paper */

  --aikho-graphite:   #1A1F1B;   /* primary text */
  --aikho-graphite-2: #3A4239;   /* secondary text */
  --aikho-graphite-3: #6B736A;   /* tertiary / meta */
  --aikho-graphite-4: #9CA399;   /* placeholder / disabled */

  --aikho-clay:       #E8895A;   /* warm accent — avatars, illustration */
  --aikho-success:    #C2401B;
  --aikho-warning:    #E8A93A;
  --aikho-danger:     #D9492F;
  --aikho-info:       #6B8FB8;

  /* ---------- type ---------- */
  --font-sans: 'General Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --font-serif-italic: 'Fraunces', Georgia, 'Times New Roman', serif;

  /* ---------- shadows / motion (soft, warm, organic) ---------- */
  --shadow-1: 0 1px 2px rgba(26,31,27,0.04), 0 1px 1px rgba(26,31,27,0.03);
  --shadow-2: 0 4px 12px rgba(26,31,27,0.06), 0 1px 3px rgba(26,31,27,0.04);
  --shadow-3: 0 12px 32px rgba(26,31,27,0.08), 0 2px 6px rgba(26,31,27,0.04);
  --shadow-4: 0 24px 56px rgba(26,31,27,0.10), 0 4px 12px rgba(26,31,27,0.05);
  --shadow-press: inset 0 2px 4px rgba(26,31,27,0.08);
  --glow-ember: 0 0 0 4px rgba(255,107,71,0.18), 0 0 32px rgba(255,107,71,0.25);
  --ease-organic: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 140ms;
  --dur-base: 220ms;
  --dur-slow: 420ms;

  /* ---------- shadcn-named tokens → aikho (drive kernel/ui + Tailwind) ---------- */
  --radius: 0.75rem; /* 12px — the aikho system leans roomier */

  --background: var(--aikho-paper-2);
  --foreground: var(--aikho-graphite);
  --card: var(--aikho-paper);
  --card-foreground: var(--aikho-graphite);
  --popover: var(--aikho-paper);
  --popover-foreground: var(--aikho-graphite);

  --primary: var(--aikho-ember);
  --primary-foreground: var(--aikho-ink);

  --secondary: var(--aikho-paper-3);
  --secondary-foreground: var(--aikho-graphite);
  --muted: var(--aikho-paper-3);
  --muted-foreground: var(--aikho-graphite-3);
  --accent: var(--aikho-ember-tint);
  --accent-foreground: var(--aikho-ember-3);
  --destructive: var(--aikho-danger);
  --destructive-foreground: #ffffff;
  --border: var(--aikho-line);
  --input: var(--aikho-line);
  --ring: var(--aikho-ember);
}

/* Dark surface — the agent chat pane (and any inverted hero). Remaps the
   shadcn surface tokens to the ink scale so kernel/ui components invert too. */
.aikho-dark {
  --background: var(--aikho-ink);
  --card: var(--aikho-ink-3);
  --card-foreground: #F2EFE6;
  --popover: var(--aikho-ink-3);
  --popover-foreground: #F2EFE6;
  --foreground: #F2EFE6;
  --secondary: var(--aikho-ink-3);
  --secondary-foreground: #E7E4DA;
  --muted: var(--aikho-ink-3);
  --muted-foreground: #8E938A;
  --accent: var(--aikho-ink-3);        /* raised surface — the active app-bar pill */
  --accent-foreground: #F2EFE6;
  --border: var(--aikho-ink-4);
  --input: var(--aikho-ink-4);
  --ring: var(--aikho-ember);
  color-scheme: dark;
}

html {
  font-family: var(--font-sans);
}
.font-mono,
[class*="font-mono"] {
  font-family: var(--font-mono);
}
