/* ============================================================
   CapFront Design System — global entry point
   Consumers link THIS file only. Import order matters:
   fonts → tokens → base.
   ============================================================ */

/* inlined tokens/fonts.css */
/* ============================================================
   CapFront — Fonts  (2026 rebrand)
   Display / headings : Space Grotesk  (distinctive, engineered, confident)
   Body / UI          : Plus Jakarta Sans (warm, highly legible)
   Data / figures     : Space Mono     (tabular, for $ amounts & rates)
   Space Grotesk + Space Mono share a lineage, so display and data
   feel like one voice. Loaded from Google Fonts; self-host before launch.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Space+Mono:wght@400;700&display=swap');

/* inlined tokens/colors.css */
/* ============================================================
   CapFront — Color Tokens  (2026 rebrand)
   A challenger identity for SMB capital:
     violet  #7C5CFF  (primary — bold, forward, ownable)
     teal    #00D2B4  (accent/spark — momentum, "go")
     ink     #14121F  (near-black with a violet undertone)
   The whole field of competitors leans blue/green; violet+teal
   makes CapFront instantly recognizable and distinctly modern.
   ============================================================ */

:root {
  /* ---- Brand: Violet (primary) ---- */
  --violet-50:  #F2EFFF;
  --violet-100: #E4DEFF;
  --violet-200: #C9BEFF;
  --violet-300: #AB9BFF;
  --violet-400: #9179FF;
  --violet-500: #7C5CFF; /* core brand violet */
  --violet-600: #6A45F5;
  --violet-700: #5733DB; /* primary action */
  --violet-800: #4426A8;
  --violet-900: #2E1A73;

  /* ---- Brand: Teal (accent / spark / momentum) ---- */
  --teal-50:  #E2FBF6;
  --teal-100: #BCF5EB;
  --teal-200: #84ECDB;
  --teal-300: #46E0C8;
  --teal-400: #14D6BA;
  --teal-500: #00D2B4; /* core accent teal */
  --teal-600: #00B099;
  --teal-700: #008976;
  --teal-800: #00685A;
  --teal-900: #084F46;

  /* ---- Ink: near-black with a violet undertone ---- */
  --ink-950: #0B0A12;
  --ink-900: #14121F; /* primary dark surface + headings */
  --ink-800: #1E1B2E;
  --ink-700: #2A2640;

  /* ---- Neutrals: faintly violet-cool gray ramp ---- */
  --neutral-0:   #FFFFFF;
  --neutral-50:  #F8F7FB;
  --neutral-100: #F1EFF6;
  --neutral-200: #E4E1EC;
  --neutral-300: #CFCAD9;
  --neutral-400: #A29DB4;
  --neutral-500: #726D85;
  --neutral-600: #524D63;
  --neutral-700: #3A3548;
  --neutral-800: #262232;
  --neutral-900: #15121E;

  /* ---- Semantic (finance) ---- */
  --green-50:  #E5F8EE;
  --green-500: #14B86A; /* approved / funded / positive */
  --green-600: #0E9A57;
  --amber-50:  #FDF3DE;
  --amber-500: #F0A91B; /* pending / review / attention */
  --amber-600: #CC8A0C;
  --red-50:    #FDEAEB;
  --red-500:   #F0444C; /* declined / error */
  --red-600:   #D02D35;

  /* ============================================================
     SEMANTIC ALIASES — reach for these in product code
     ============================================================ */

  /* Text */
  --text-strong:   var(--ink-900);
  --text-body:     var(--neutral-700);
  --text-muted:    var(--neutral-500);
  --text-subtle:   var(--neutral-400);
  --text-inverse:  var(--neutral-0);
  --text-link:     var(--violet-600);
  --text-on-brand: var(--neutral-0);

  /* Surfaces */
  --surface-page:    var(--neutral-50);
  --surface-card:    var(--neutral-0);
  --surface-sunken:  var(--neutral-100);
  --surface-inverse: var(--ink-900);
  --surface-brand:   var(--violet-600);
  --surface-accent-soft: var(--teal-50);
  --surface-brand-soft:  var(--violet-50);

  /* Borders */
  --border-subtle:  var(--neutral-200);
  --border-default: var(--neutral-300);
  --border-strong:  var(--neutral-400);
  --border-brand:   var(--violet-500);
  --border-accent:  var(--teal-500);

  /* Actions — primary = violet (bold), accent = teal (go) */
  --action-primary-bg:       var(--violet-600);
  --action-primary-bg-hover: var(--violet-700);
  --action-primary-bg-press: var(--violet-800);
  --action-primary-fg:       var(--neutral-0);

  --action-accent-bg:        var(--teal-500);
  --action-accent-bg-hover:  var(--teal-600);
  --action-accent-bg-press:  var(--teal-700);
  --action-accent-fg:        var(--ink-900);

  --action-secondary-bg:       var(--neutral-0);
  --action-secondary-bg-hover: var(--neutral-100);
  --action-secondary-fg:       var(--violet-700);
  --action-secondary-border:   var(--neutral-300);

  /* Focus ring — teal pops on violet and on white alike */
  --focus-ring: var(--teal-400);

  /* Status */
  --status-success-fg: var(--green-600);
  --status-success-bg: var(--green-50);
  --status-warning-fg: var(--amber-600);
  --status-warning-bg: var(--amber-50);
  --status-danger-fg:  var(--red-600);
  --status-danger-bg:  var(--red-50);
  --status-info-fg:    var(--teal-700);
  --status-info-bg:    var(--teal-50);

  /* Signature gradients — violet → teal momentum */
  --gradient-brand: linear-gradient(120deg, var(--violet-700) 0%, var(--violet-500) 45%, var(--teal-500) 100%);
  --gradient-spark: linear-gradient(120deg, var(--teal-400) 0%, var(--teal-600) 100%);
  --gradient-ink:   linear-gradient(155deg, var(--ink-900) 0%, var(--violet-900) 120%);
}

/* inlined tokens/typography.css */
/* ============================================================
   CapFront — Typography Tokens
   ============================================================ */

:root {
  /* Families */
  --font-display: 'Space Grotesk', 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body:    'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono:    'Space Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* Weights */
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;
  --weight-extra:    700; /* Space Grotesk tops out at 700 */

  /* Type scale — fluid-ish, fixed px for predictability.
     Display sizes pair with --font-display; the rest with --font-body. */
  --text-display-xl: 64px;  /* hero relaunch headline */
  --text-display-lg: 52px;
  --text-display-md: 40px;
  --text-h1: 34px;
  --text-h2: 27px;
  --text-h3: 22px;
  --text-h4: 19px;
  --text-body-lg: 18px;
  --text-body-md: 16px;  /* base */
  --text-body-sm: 14px;
  --text-caption: 13px;
  --text-overline: 12px; /* uppercase eyebrow labels */

  /* Line heights */
  --leading-tight:   1.08;  /* display */
  --leading-snug:    1.22;  /* headings */
  --leading-normal:  1.55;  /* body */
  --leading-relaxed: 1.7;   /* long-form */

  /* Letter spacing */
  --tracking-tight:   -0.02em; /* display & large headings */
  --tracking-snug:    -0.01em;
  --tracking-normal:  0;
  --tracking-wide:    0.04em;
  --tracking-overline: 0.14em; /* uppercase eyebrows */
}

/* inlined tokens/spacing.css */
/* ============================================================
   CapFront — Spacing, Radii, Sizing
   8px base grid. Use --space-* for padding/margin/gap.
   ============================================================ */

:root {
  /* Spacing scale (8px base) */
  --space-0:  0;
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* Layout */
  --container-max: 1200px;
  --container-wide: 1320px;
  --gutter: 24px;

  /* Radii — soft, friendly fintech (not pill-everything, not sharp) */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;  /* default card / input */
  --radius-lg: 16px;
  --radius-xl: 24px;  /* large feature cards / hero panels */
  --radius-2xl: 32px;
  --radius-pill: 999px;

  /* Control heights */
  --control-sm: 36px;
  --control-md: 44px;  /* meets 44px touch target */
  --control-lg: 54px;
}

/* inlined tokens/elevation.css */
/* ============================================================
   CapFront — Elevation, Shadows, Motion  (2026 rebrand)
   Shadows are ink/violet-tinted (not pure black) so they sit
   naturally on the violet-cool neutral surfaces.
   ============================================================ */

:root {
  /* Shadows — soft, layered, ink-violet-tinted */
  --shadow-xs: 0 1px 2px rgba(20, 18, 31, 0.06);
  --shadow-sm: 0 1px 3px rgba(20, 18, 31, 0.09), 0 1px 2px rgba(20, 18, 31, 0.05);
  --shadow-md: 0 4px 14px rgba(20, 18, 31, 0.10), 0 2px 5px rgba(20, 18, 31, 0.05);
  --shadow-lg: 0 14px 34px rgba(20, 18, 31, 0.14), 0 5px 10px rgba(20, 18, 31, 0.06);
  --shadow-xl: 0 28px 64px rgba(20, 18, 31, 0.20), 0 10px 20px rgba(20, 18, 31, 0.08);

  /* Brand glow — violet for primary, teal for accent/focus */
  --shadow-violet: 0 10px 30px rgba(124, 92, 255, 0.40);
  --shadow-accent: 0 8px 24px rgba(0, 210, 180, 0.40);
  --ring-accent: 0 0 0 3px rgba(0, 210, 180, 0.42);
  --ring-focus:  0 0 0 3px rgba(0, 210, 180, 0.48);

  /* Motion — confident, no bounces */
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);   /* @kind other */
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1); /* @kind other */
  --ease-in-out:   cubic-bezier(0.65, 0, 0.35, 1); /* @kind other */
  --duration-fast:   120ms; /* @kind other */
  --duration-normal: 200ms; /* @kind other */
  --duration-slow:   360ms; /* @kind other */
}

/* inlined tokens/base.css */
/* ============================================================
   CapFront — Base layer
   Minimal element defaults wired to tokens. Consumers get sensible
   typography & box-sizing out of the box.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body-md);
  line-height: var(--leading-normal);
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-strong);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-snug);
  margin: 0;
  font-weight: var(--weight-bold);
}

p { margin: 0; }

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-standard);
}
a:hover { color: var(--violet-800); }

/* Eyebrow / overline utility */
.cf-overline {
  font-family: var(--font-body);
  font-size: var(--text-overline);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-overline);
  text-transform: uppercase;
  color: var(--teal-700);
}

/* Tabular figures for money & rates */
.cf-figure {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

@keyframes cfMenuIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}

::selection { background: var(--teal-200); color: var(--ink-900); }

:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
  border-radius: var(--radius-xs);
}

