﻿/* ============================================================
INSTANCIUM - DESIGN TOKENS (single source of truth)
One type scale, one spacing rhythm, one section cadence.
Loaded FIRST. English-only code and copy.
============================================================ */
:root {
    /* ---------- Palette ---------- */
    --inst-blue-600: #4a63e0;
    --inst-blue-500: #5b7cff;
    --inst-blue-400: #7b96ff;
    --inst-teal-500: #37c9a5;
    --inst-amber-500: #f5a524;
    --inst-violet-500: #8b7cf6;
    --inst-red-500: #f45b69;
    --inst-green-500: #3ddc97;
    --inst-ink: #0b0f1a;
    --inst-panel: #0e1322;
    --inst-surface: #11162a;
    --inst-raised: #161d33;
    --inst-overlay: #1a2240;
    --bg: var(--inst-ink);
    --bg-panel: var(--inst-panel);
    --surface: var(--inst-surface);
    --surface-raised: var(--inst-raised);
    --overlay: var(--inst-overlay);
    --scrim-rgb: 11, 15, 26;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --text-primary: #eef2ff;
    --text-muted: #a0aec0;
    --text-faint: #7a8ba8;
    --brand: var(--inst-blue-500);
    --brand-strong: var(--inst-blue-600);
    --brand-bright: var(--inst-blue-400);
    --brand-soft: rgba(91, 124, 255, 0.14);
    --accent-teal: var(--inst-teal-500);
    --accent-teal-soft: rgba(55, 201, 165, 0.14);
    --accent-amber: var(--inst-amber-500);
    --accent-amber-soft: rgba(245, 165, 36, 0.14);
    --accent-violet: var(--inst-violet-500);
    --accent-violet-soft: rgba(139, 124, 246, 0.14);
    --success: var(--inst-green-500);
    --warning: var(--inst-amber-500);
    --danger: var(--inst-red-500);
    --danger-soft: rgba(244, 91, 105, 0.14);
    --info: var(--inst-blue-500);
    --grad-brand: linear-gradient(135deg, #5b7cff 0%, #8b7cf6 100%);
    --grad-hero-text: linear-gradient(135deg, #ffffff 0%, #b8c1d9 100%);
    /* ---------- Type families ---------- */
    --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
    /* ---------- Type scale (one ramp, no jumps) ----------
   xs 12 / sm 14 / base 16 / lg 19 / xl 24 / 2xl 32 / 3xl 42 / 4xl 54 / 5xl 66 */
    --text-xs: clamp(0.72rem, 0.7rem + 0.08vw, 0.78rem);
    --text-sm: clamp(0.8125rem, 0.79rem + 0.12vw, 0.9rem);
    --text-base: clamp(0.9375rem, 0.9rem + 0.18vw, 1.0625rem);
    --text-lg: clamp(1.0625rem, 1rem + 0.28vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.15rem + 0.45vw, 1.5625rem);
    --text-2xl: clamp(1.5rem, 1.3rem + 0.9vw, 2.125rem);
    --text-3xl: clamp(1.875rem, 1.6rem + 1.3vw, 2.75rem);
    --text-4xl: clamp(2.25rem, 1.85rem + 1.9vw, 3.5rem);
    --text-5xl: clamp(2.25rem, 1.5rem + 3.2vw, 4.25rem);
    --leading-tight: 1.1;
    --leading-snug: 1.25;
    --leading-base: 1.6;
    --leading-relaxed: 1.65;
    --leading-normal: 1.5;
    --tracking-tight: -0.02em;
    --tracking-normal: 0;
    --tracking-wide: 0.08em;
    --tracking-kicker: 0.2em;
    /* ---------- Layout & section rhythm ---------- */
    --container: 1200px;
    --measure: 720px;
    --nav-h: 80px;
    --nav-offset: 96px;
    --section-pad-x: clamp(20px, 4vw, 40px);
    --section-pad-top: clamp(48px, 6vw, 84px);
    --section-pad-y: clamp(64px, 8vw, 116px);
    --band-ramp: clamp(72px, 10vw, 150px);
    --header-gap-1: 12px;
    --header-gap-2: 16px;
    --header-gap-3: clamp(32px, 4vw, 48px);
    --grid-gap: clamp(20px, 2.2vw, 32px);
    /* ---------- Spacing ---------- */
    --space-3xs: 4px;
    --space-2xs: 8px;
    --space-xs: 12px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-2xl: 64px;
    --space-3xl: 96px;
    --space-4xl: 128px;
    --space-5xl: 160px;
    /* ---------- Shape, depth, motion ---------- */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-card: 14px;
    --radius-lg: 18px;
    --radius-pill: 999px;
    --shadow-1: 0 10px 30px rgba(4, 8, 20, 0.45);
    --shadow-2: 0 24px 60px rgba(4, 8, 20, 0.55);
    --ring-brand: 0 0 0 3px rgba(91, 124, 255, 0.28);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --dur-1: 140ms;
    --dur-2: 280ms;
    --dur-3: 560ms;
    --z-sticky: 900;
    --z-nav: 1000;
    --z-modal: 1100;
    --z-toast: 1200;
}

/* ---------- Legacy aliases (kept for doctrine / footer / aig / modals) ---------- */
:root {
    --dc-brand: var(--brand);
    --dc-teal: var(--accent-teal);
    --dc-amber: var(--accent-amber);
    --dc-violet: var(--accent-violet);
    --dc-ink: var(--bg);
    --dc-panel: var(--bg-panel);
    --dc-surface: var(--surface);
    --dc-line: var(--line);
    --dc-muted: var(--text-muted);
    --dc-faint: var(--text-faint);
    --dc-mono: var(--font-mono);
    --pf-brand: var(--brand);
    --pf-teal: var(--accent-teal);
    --pf-amber: var(--accent-amber);
    --pf-line: var(--line);
    --pf-muted: var(--text-muted);
    --pf-surface: var(--surface);
    --rl-brand: var(--brand);
    --rl-teal: var(--accent-teal);
    --rl-amber: var(--accent-amber);
    --rl-line: var(--line);
    --rl-muted: var(--text-muted);
    --rl-surface: var(--surface);
    --sp-brand: var(--brand);
    --sp-teal: var(--accent-teal);
    --sp-amber: var(--accent-amber);
    --sp-line: var(--line);
    --sp-muted: var(--text-muted);
    --sp-surface: var(--surface);
    --ct-brand: var(--brand);
    --ct-teal: var(--accent-teal);
    --ct-amber: var(--accent-amber);
    --ct-line: var(--line);
    --ct-muted: var(--text-muted);
    --ct-surface: var(--surface);
    --ft-brand: var(--brand);
    --ft-teal: var(--accent-teal);
    --ft-amber: var(--accent-amber);
    --ft-line: var(--line);
    --ft-muted: var(--text-muted);
    --ft-surface: var(--surface);
    --aig-brand: var(--brand);
    --aig-teal: var(--accent-teal);
    --aig-amber: var(--accent-amber);
    --aig-line: var(--line);
    --aig-muted: var(--text-muted);
    --aig-surface: var(--surface);
    --ai-green: var(--success);
    --hs-yellow: var(--warning);
}
