/* ============================================================
   科临数据 · 设计系统 Tokens (v2026-04-30)
   建立完整的设计变量层 — 颜色 / 圆角 / 间距 / 阴影 / 动效曲线
   定位：百亿级公司视觉质感 (参考 Stripe / Linear / Vercel)
   ============================================================ */

:root {
    /* ====== 品牌色阶 (基于 #1e5c8a 派生 11 阶) ====== */
    --brand-50:  #f0f7ff;
    --brand-100: #e0eefe;
    --brand-200: #bbdcfd;
    --brand-300: #7ec0fb;
    --brand-400: #3a9ef5;
    --brand-500: #1480e1;
    --brand-600: #0964c2;
    --brand-700: #0b519d;
    --brand-800: #0e4380;
    --brand-900: #0f3568;
    --brand-950: #0a2347;

    /* ====== 深空色阶 (Hero 暗色背景体系) ====== */
    --space-50:  #f8fafc;
    --space-100: #f1f5f9;
    --space-200: #e2e8f0;
    --space-300: #cbd5e1;
    --space-400: #94a3b8;
    --space-500: #64748b;
    --space-600: #475569;
    --space-700: #334155;
    --space-800: #1e293b;
    --space-900: #0f172a;
    --space-950: #020617;
    --space-deep: #050a1a;
    --space-night: #060f24;

    /* ====== 强调色 (区域配色，与现有 map 一致) ====== */
    --accent-asia:    #38bdf8;   /* 亚洲青 */
    --accent-europe:  #c084fc;   /* 欧洲紫 */
    --accent-americas:#34d399;   /* 美洲绿 */
    --accent-mideast: #fbbf24;   /* 中东橙 */

    /* 状态色 */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger:  #ef4444;
    --color-info:    #0ea5e9;

    /* ====== 圆角系统 ====== */
    --radius-xs:   4px;
    --radius-sm:   8px;
    --radius-md:   12px;
    --radius-lg:   16px;
    --radius-xl:   24px;
    --radius-2xl:  32px;
    --radius-pill: 999px;

    /* ====== 间距系统 (4px 基底) ====== */
    --space-1:  0.25rem;   /* 4px  */
    --space-2:  0.5rem;    /* 8px  */
    --space-3:  0.75rem;   /* 12px */
    --space-4:  1rem;      /* 16px */
    --space-5:  1.25rem;   /* 20px */
    --space-6:  1.5rem;    /* 24px */
    --space-8:  2rem;      /* 32px */
    --space-10: 2.5rem;    /* 40px */
    --space-12: 3rem;      /* 48px */
    --space-16: 4rem;      /* 64px */
    --space-20: 5rem;      /* 80px */
    --space-24: 6rem;      /* 96px */

    /* ====== 阴影系统 (高级感分层) ====== */
    --shadow-xs:    0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-sm:    0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.06);
    --shadow-md:    0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg:    0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.06);
    --shadow-xl:    0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.06);
    --shadow-2xl:   0 25px 50px -12px rgba(15, 23, 42, 0.2);

    /* 品牌色辉光 (CTA / 高亮元素) */
    --shadow-glow-brand:    0 0 24px rgba(20, 128, 225, 0.35), 0 0 60px rgba(20, 128, 225, 0.15);
    --shadow-glow-brand-lg: 0 0 40px rgba(20, 128, 225, 0.5),  0 0 100px rgba(20, 128, 225, 0.25);

    /* 暗背景上的高光阴影 */
    --shadow-elevated-dark: 0 24px 48px -12px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04);

    /* ====== 缓动曲线 (Apple / Linear 同款) ====== */
    --ease-spring:  cubic-bezier(0.32, 0.72, 0, 1);          /* 主要交互弹簧曲线 */
    --ease-smooth:  cubic-bezier(0.4, 0, 0.2, 1);            /* 平滑曲线 */
    --ease-snap:    cubic-bezier(0.5, 0, 0, 1);              /* 快速响应 */
    --ease-soft:    cubic-bezier(0.25, 0.46, 0.45, 0.94);    /* 柔和过渡 */
    --ease-back:    cubic-bezier(0.34, 1.56, 0.64, 1);       /* 回弹效果 */

    /* ====== 时长 ====== */
    --duration-fast:    150ms;
    --duration-normal:  300ms;
    --duration-slow:    500ms;
    --duration-slower:  800ms;
    --duration-cinematic: 1200ms;

    /* ====== Z-index 层级 ====== */
    --z-base:    1;
    --z-raised:  10;
    --z-overlay: 100;
    --z-sticky:  200;
    --z-modal:   1000;
    --z-toast:   1100;
    --z-tooltip: 1200;

    /* ====== 字体系统 ====== */
    --font-sans:    'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
    --font-display: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
    --font-mono:    'JetBrains Mono', 'SF Mono', Consolas, monospace;

    /* ====== 字号 ====== */
    --text-xs:   0.75rem;     /* 12 */
    --text-sm:   0.875rem;    /* 14 */
    --text-base: 1rem;        /* 16 */
    --text-lg:   1.125rem;    /* 18 */
    --text-xl:   1.25rem;     /* 20 */
    --text-2xl:  1.5rem;      /* 24 */
    --text-3xl:  1.875rem;    /* 30 */
    --text-4xl:  2.25rem;     /* 36 */
    --text-5xl:  3rem;        /* 48 */
    --text-6xl:  3.75rem;     /* 60 */
    --text-7xl:  4.5rem;      /* 72 */

    /* ====== 字重 ====== */
    --font-regular:  400;
    --font-medium:   500;
    --font-semibold: 600;
    --font-bold:     700;
    --font-black:    900;

    /* ====== 行高 ====== */
    --leading-none:    1;
    --leading-tight:   1.15;
    --leading-snug:    1.3;
    --leading-normal:  1.5;
    --leading-relaxed: 1.625;
    --leading-loose:   2;

    /* ====== 字间距 ====== */
    --tracking-tighter: -0.04em;
    --tracking-tight:   -0.02em;
    --tracking-normal:  0;
    --tracking-wide:    0.02em;
    --tracking-wider:   0.04em;
    --tracking-widest:  0.1em;

    /* ====== 模糊 (Glassmorphism) ====== */
    --blur-sm:  blur(4px);
    --blur-md:  blur(12px);
    --blur-lg:  blur(24px);
    --blur-xl:  blur(40px);

    /* ====== 渐变 (Hero / 装饰) ====== */
    --gradient-hero-night:
        radial-gradient(ellipse at top, var(--space-night) 0%, var(--space-deep) 60%, #000 100%);
    --gradient-aurora:
        linear-gradient(135deg, rgba(20, 128, 225, 0.4) 0%, rgba(192, 132, 252, 0.2) 50%, rgba(56, 189, 248, 0.3) 100%);
    --gradient-brand-deep:
        linear-gradient(135deg, var(--brand-700) 0%, var(--brand-900) 100%);
    --gradient-text-shine:
        linear-gradient(120deg, var(--brand-100) 0%, #ffffff 50%, var(--brand-100) 100%);
}

/* ============================================================
   全局基础重置 (轻量，不影响现有样式)
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

/* 选择文本时的高亮颜色 */
::selection {
    background-color: var(--brand-500);
    color: #fff;
}

/* 暗色滚动条 (可选，仅装饰) */
html {
    scrollbar-color: var(--space-400) transparent;
}
