/* ==========================================================================
   Keysmith — Core Tokens
   Colors + Type foundations. Import once at root.
   ========================================================================== */

/* ── Fonts ─────────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Unbounded";
  src: url("https://cdn.claudesign.ai/keysmith/assets/c920c00876215ab1f902482a2fbb1eb307fe2cd5e7380ea307f7e4de1e064f72/Unbounded-VariableFont_wght.ttf") format("truetype-variations");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

/* Google Fonts — inherited from the oviato-ai-app codebase (renamed to Keysmith).
   Unbounded (uploaded) replaces display usage; Outfit + JetBrains Mono retained. */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&family=Noto+Emoji&display=swap");

:root {
  /* ── Brand ────────────────────────────────────────────────────────────
     Coral is the Keysmith signature. Used for the logo, primary CTAs,
     and the single "hero" accent per screen. Use sparingly.
     ─────────────────────────────────────────────────────────────────── */
  --ks-coral:            #ee6055;
  --ks-coral-hover:      #f27469;
  --ks-coral-press:      #d94f46;
  --ks-coral-glow:       rgba(238, 96, 85, 0.12);
  --ks-coral-border:     rgba(238, 96, 85, 0.22);
  --ks-coral-gradient:   linear-gradient(135deg, #f27469 0%, #ee6055 55%, #d94f46 100%);

  /* ── Neutrals (dark command-center theme) ──────────────────────────── */
  --ks-ink:              #0b0e14;   /* Page bg */
  --ks-ink-raised:       #0f1219;   /* Modals, sheets */
  --ks-ink-sidebar:      #0d1018;
  --ks-surface:          #141820;   /* Card */
  --ks-surface-hover:    #191f2a;
  --ks-surface-input:    #0e1118;
  --ks-border:           #1e2438;
  --ks-border-strong:    #283048;

  /* Light-mode companions (for marketing / slides) */
  --ks-paper:            #e0fbfc;   /* Pale cyan — bg from palette swatch */
  --ks-paper-raised:     #ffffff;
  --ks-mist:             #98c1d9;   /* Blue-grey — palette swatch */
  --ks-slate:            #293241;   /* Deep navy — palette swatch, on-light text */

  /* ── Text ─────────────────────────────────────────────────────────── */
  --ks-fg:               #e8eaf0;
  --ks-fg-1:             #e8eaf0;   /* Primary */
  --ks-fg-2:             #a0a8bc;   /* Secondary */
  --ks-fg-3:             #7a8499;   /* Tertiary / muted */
  --ks-fg-4:             #454d60;   /* Disabled, placeholder */
  --ks-on-coral:         #ffffff;   /* Text on coral */

  /* ── Status ───────────────────────────────────────────────────────── */
  --ks-success:          #4ade80;
  --ks-success-glow:     rgba(74, 222, 128, 0.10);
  --ks-danger:           #f87171;
  --ks-danger-glow:      rgba(248, 113, 113, 0.08);
  --ks-warning:          #facc15;
  --ks-warning-glow:     rgba(250, 204, 21, 0.08);
  --ks-info:             #98c1d9;   /* Uses the brand mist */
  --ks-info-glow:        rgba(152, 193, 217, 0.12);
  --ks-special:          #a78bfa;   /* Skills / MPC share "A" */
  --ks-special-glow:     rgba(167, 139, 250, 0.10);

  /* ── Type families ────────────────────────────────────────────────── */
  --font-display: "Unbounded", "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  --font-emoji:   "Noto Emoji", sans-serif;

  /* ── Type scale (semantic) ────────────────────────────────────────── */
  --fs-hero:      40px;    /* marketing hero */
  --fs-h1:        20px;    /* app page title */
  --fs-h2:        18px;
  --fs-h3:        16px;
  --fs-title:     14px;    /* card title */
  --fs-body:      13px;
  --fs-small:     12px;
  --fs-caption:   11px;
  --fs-label:     10px;    /* uppercase section labels */
  --fs-mono-xl:   28px;    /* balance */
  --fs-mono-lg:   18px;
  --fs-mono-md:   12px;
  --fs-mono-sm:   10px;

  --lh-tight:     1.15;
  --lh-snug:      1.3;
  --lh-normal:    1.5;
  --lh-relaxed:   1.65;

  /* ── Spacing (4px base) ───────────────────────────────────────────── */
  --sp-0: 0;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 40px;
  --sp-9: 56px;

  /* ── Radius ───────────────────────────────────────────────────────── */
  --r-pill:   9999px;   /* buttons, inputs, badges */
  --r-card:   12px;
  --r-lg:     16px;     /* modals, hero cards */
  --r-sm:     8px;      /* sidebar items, icon tiles */
  --r-xs:     4px;

  /* ── Shadow / elevation ───────────────────────────────────────────── */
  --sh-card-hover:   0 8px 24px rgba(0, 0, 0, 0.30);
  --sh-cta-hover:    0 3px 14px rgba(238, 96, 85, 0.22);
  --sh-modal:        0 16px 48px rgba(0, 0, 0, 0.55);
  --sh-dropdown:     0 8px 24px rgba(0, 0, 0, 0.40);
  --sh-toast:        0 4px 16px rgba(0, 0, 0, 0.30);
  --sh-status-glow:  0 0 8px rgba(74, 222, 128, 0.30);
  --sh-focus-ring:   0 0 0 2px rgba(238, 96, 85, 0.15);
  --sh-inset-hi:     0 0 0 1px rgba(255, 255, 255, 0.03) inset;

  /* ── Motion ───────────────────────────────────────────────────────── */
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);
  --dur-xs:       120ms;
  --dur-sm:       200ms;
  --dur-md:       300ms;
  --dur-lg:       500ms;
}

/* ── Semantic element defaults ─────────────────────────────────────────── */

html, body {
  background: var(--ks-ink);
  color: var(--ks-fg-1);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, .ks-h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--ks-fg-1);
  letter-spacing: -0.01em;
}
h2, .ks-h2 {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--ks-fg-1);
}
h3, .ks-h3 {
  font-family: var(--font-body);
  font-size: var(--fs-h3);
  font-weight: 600;
  color: var(--ks-fg-1);
}

.ks-hero {
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 800;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  color: var(--ks-fg-1);
}

.ks-title     { font-size: var(--fs-title);   font-weight: 600; color: var(--ks-fg-1); }
.ks-body      { font-size: var(--fs-body);    font-weight: 400; color: var(--ks-fg-1); }
.ks-small     { font-size: var(--fs-small);   font-weight: 400; color: var(--ks-fg-2); }
.ks-caption   { font-size: var(--fs-caption); font-weight: 400; color: var(--ks-fg-3); }

.ks-label {
  font-size: var(--fs-label);
  font-weight: 600;
  color: var(--ks-fg-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ks-mono   { font-family: var(--font-mono); }
.ks-amount {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-xl);
  font-weight: 800;
  color: var(--ks-success);
  letter-spacing: -0.01em;
}

code, .ks-code {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-md);
  color: var(--ks-fg-2);
}
