/* ============================================================
   Foremai — Design Tokens (single source of truth)
   Dark-futuristic AI design system. Rebrand = change --accent-* only.
   ============================================================ */
:root {
  /* ---- Background ramp (page -> deepest) ---- */
  --bg-base: #06070A;   /* page root / footer chrome */
  --bg-900:  #0A0C12;   /* THE section background (all sections) */
  --bg-800:  #0F121A;   /* reserved (app chrome only) */

  /* ---- Surface ramp (raised UI) ---- */
  --surface-1: #12151F;
  --surface-2: #181C28;
  --surface-3: #1F2433;
  --surface-glass: rgba(20, 24, 36, 0.55);

  /* ---- Text ramp ---- */
  --text-primary:   #F4F6FB;
  --text-secondary: #B6BDCC;
  --text-muted:     #8A92A6;
  --text-faint:     #5A6273;
  --text-on-accent: #0A0612;

  /* ---- Borders (low-alpha whites) ---- */
  --border-subtle:  rgba(255,255,255,0.06);
  --border-default: rgba(255,255,255,0.10);
  --border-strong:  rgba(255,255,255,0.16);
  --ring: #7C6BFF;

  /* ---- Accent (AI) — the only brand color, used sparingly ---- */
  --accent:        #7C6BFF;
  --accent-hover:  #8E80FF;
  --accent-press:  #6A57F0;
  --accent-2:      #22D3EE;
  --accent-soft:   rgba(124,107,255,0.14);
  --accent-glow:   rgba(124,107,255,0.40);

  /* ---- Semantic ---- */
  --success: #34D399; --success-soft: rgba(52,211,153,0.14);
  --warning: #FBBF24; --warning-soft: rgba(251,191,36,0.14);
  --error:   #F87171; --error-soft:   rgba(248,113,113,0.14);
  --info:    #38BDF8; --info-soft:    rgba(56,189,248,0.14);

  /* ---- Gradients (subtle; one per section max) ---- */
  --grad-accent:  linear-gradient(135deg, #7C6BFF 0%, #22D3EE 100%);
  --grad-aurora:  radial-gradient(60% 80% at 50% 0%, rgba(124,107,255,0.22) 0%, rgba(34,211,238,0.08) 40%, transparent 70%);
  --grad-surface: linear-gradient(180deg, #12151F 0%, #0A0C12 100%);
  --grad-text:    linear-gradient(90deg, #F4F6FB 0%, #B7AEFF 60%, #7CE7F5 100%);

  /* ---- Elevation ---- */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.35);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.45);
  --shadow-lg: 0 24px 64px rgba(0,0,0,0.55);
  --shadow-glow: 0 0 0 1px var(--accent-soft), 0 12px 40px var(--accent-glow);
  --focus-ring: 0 0 0 3px var(--accent-soft);

  /* ---- Fonts ---- */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;
  /* OpenType features: contextual alternates + tabular-friendly legibility for Inter */
  --font-feat-sans: "cv11" 1, "ss01" 1, "liga" 1, "calt" 1;

  /* ---- Letter-spacing (tracking) ---- */
  --tracking-tighter: -0.03em;
  --tracking-tight:   -0.02em;
  --tracking-snug:    -0.01em;
  --tracking-normal:  0;
  --tracking-wide:    0.02em;
  --tracking-caps:    0.08em;

  /* ---- Fluid type scale (aligned to premium SaaS hierarchy) ---- */
  --fs-display: clamp(3rem, 1.7rem + 5.4vw, 4.5rem);   /* 48 -> 72 */
  --fs-h1:      clamp(2.5rem, 1.7rem + 3vw, 3.5rem);    /* 40 -> 56 */
  --fs-h2:      clamp(2rem, 1.5rem + 2vw, 2.75rem);     /* 32 -> 44 */
  --fs-h3:      clamp(1.75rem, 1.5rem + 1vw, 2rem);     /* 28 -> 32 */
  --fs-h4:      clamp(1.375rem, 1.25rem + 0.5vw, 1.5rem); /* 22 -> 24 */
  --fs-h5:      clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem); /* 18 -> 20 */
  --fs-lead:    clamp(1.125rem, 1.02rem + 0.5vw, 1.375rem);
  --fs-body-lg: 1.125rem;
  --fs-body:    1rem;
  --fs-small:   0.875rem;
  --fs-micro:   0.75rem;
  --fs-caption: 0.75rem;

  /* ---- Line heights ---- */
  --lh-tight:  1.08;
  --lh-heading: 1.15;
  --lh-snug:   1.4;
  --lh-body:   1.65;
  --lh-relaxed: 1.75;

  /* ---- Readable measure ---- */
  --measure:      68ch;
  --measure-lead: 60ch;

  /* ---- Spacing (4pt base / 8pt rhythm) ---- */
  --space-0: 0;     --space-1: 4px;   --space-2: 8px;   --space-3: 12px;
  --space-4: 16px;  --space-5: 20px;  --space-6: 24px;  --space-7: 28px;
  --space-8: 32px;  --space-10: 40px; --space-12: 48px; --space-14: 56px;
  --space-16: 64px; --space-20: 80px; --space-24: 96px; --space-28: 112px;
  --space-30: 120px;--space-32: 128px;--space-40: 160px;

  /* ---- Radii ---- */
  --radius-sm: 8px;  --radius-md: 12px; --radius-lg: 16px;
  --radius-xl: 24px; --radius-2xl: 32px; --radius-pill: 999px;

  /* ---- Containers ---- */
  --container-sm: 640px;  --container-md: 768px;  --container-lg: 1024px;
  --container-xl: 1200px; --container-2xl: 1320px;
  --gutter: clamp(20px, 5vw, 48px);

  /* ---- Section rhythm ---- */
  --section-y:    clamp(72px, 9vw, 136px);
  --section-y-lg: clamp(104px, 13vw, 200px);
  --stack:        clamp(16px, 2vw, 28px);
}
