/* ==========================================================================
   星澜 AI 官网 · 设计令牌（tokens.css）
   品牌：深空底色 + 紫(#6c5ce7)→青(#22d3ee) 渐变；玻璃拟态；大留白。
   约定：颜色/字号/间距/圆角/阴影/动效曲线一律走变量；组件只消费变量，
        不改语义。站点零第三方依赖、零外链字体。
   ========================================================================== */

:root {
  color-scheme: dark;

  /* ---------- 品牌色 ---------- */
  --c-purple: #6c5ce7;
  --c-purple-2: #8b5cf6;
  --c-blue: #4f7cff;
  --c-cyan: #22d3ee;
  --c-mint: #34e3c0;
  --c-pink: #f472b6;

  --grad-brand: linear-gradient(120deg, #6c5ce7 0%, #4f7cff 46%, #22d3ee 100%);
  --grad-brand-strong: linear-gradient(120deg, #7c6cff 0%, #5b8bff 45%, #34e0f2 100%);
  --grad-soft: linear-gradient(120deg, rgba(108, 92, 231, 0.24), rgba(34, 211, 238, 0.18));
  --grad-text: linear-gradient(96deg, #c4b5fd 0%, #a5b4fc 26%, #8b9bff 46%, #67e8f9 74%, #c4b5fd 100%);
  --grad-line: linear-gradient(90deg, rgba(108, 92, 231, 0), rgba(108, 92, 231, 0.65) 32%, rgba(34, 211, 238, 0.65) 68%, rgba(34, 211, 238, 0));
  --grad-stroke: linear-gradient(135deg, rgba(139, 92, 246, 0.9), rgba(79, 124, 255, 0.75) 48%, rgba(34, 211, 238, 0.9));

  /* 语义色 */
  --c-success: #34d399;
  --c-warning: #fbbf24;
  --c-danger: #f87171;
  --c-info: #60a5fa;

  /* ---------- 背景层级 ---------- */
  --bg-0: #07070e;
  --bg-1: #0b0b16;
  --bg-2: #12131f;
  --bg-3: #171927;
  --bg-4: #1d1f30;

  /* ---------- 表面 / 玻璃 ---------- */
  --surface-1: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --surface-3: rgba(255, 255, 255, 0.105);
  --surface-hover: rgba(255, 255, 255, 0.085);

  --line-soft: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.16);

  --glass-bg: rgba(16, 17, 28, 0.55);
  --glass-bg-strong: rgba(20, 22, 36, 0.78);
  --glass-border: rgba(255, 255, 255, 0.105);
  --glass-highlight: rgba(255, 255, 255, 0.16);
  --glass-blur: 18px;
  --glass-saturate: 150%;

  /* ---------- 文字 ---------- */
  --text-1: #f3f4fb;
  --text-2: #b3b7cc;
  --text-3: #82879f;
  --text-4: #5f6379;
  --text-on-brand: #ffffff;

  /* ---------- 字体 ---------- */
  --font-sans: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei UI",
    "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", "Segoe UI", system-ui,
    -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "SFMono-Regular", Consolas,
    "Liberation Mono", Menlo, monospace;

  /* 流体字号（390 → 1440 平滑） */
  --fs-display: clamp(2.5rem, 1.32rem + 4.9vw, 5.1rem);
  --fs-h1: clamp(2.1rem, 1.35rem + 3.2vw, 3.9rem);
  --fs-h2: clamp(1.72rem, 1.28rem + 1.95vw, 2.9rem);
  --fs-h3: clamp(1.24rem, 1.08rem + 0.72vw, 1.6rem);
  --fs-h4: clamp(1.06rem, 1rem + 0.32vw, 1.22rem);
  --fs-lead: clamp(1.02rem, 0.95rem + 0.34vw, 1.2rem);
  --fs-body: clamp(0.95rem, 0.92rem + 0.14vw, 1.02rem);
  --fs-sm: 0.875rem;
  --fs-xs: 0.781rem;
  --fs-2xs: 0.7rem;
  --fs-mono: 0.8125rem;

  --lh-tight: 1.08;
  --lh-snug: 1.24;
  --lh-normal: 1.62;
  --lh-loose: 1.8;

  --tracking-tight: -0.022em;
  --tracking-snug: -0.012em;
  --tracking-wide: 0.08em;
  --tracking-wider: 0.16em;

  /* ---------- 间距（4px 基准） ---------- */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;
  --sp-32: 8rem;

  --gutter: clamp(1.15rem, 4.2vw, 2.5rem);
  --container: 1200px;
  --container-wide: 1320px;
  --container-narrow: 860px;
  --section-y: clamp(3.75rem, 7.4vw, 7.5rem);
  --section-y-sm: clamp(2.6rem, 4.8vw, 4.5rem);

  /* ---------- 圆角 ---------- */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-2xl: 40px;
  --r-pill: 999px;

  /* ---------- 阴影 / 光晕 ---------- */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 14px 38px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 28px 70px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 44px 120px rgba(0, 0, 0, 0.62);
  --shadow-inset: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --glow-purple: 0 0 0 1px rgba(139, 92, 246, 0.28), 0 18px 60px -18px rgba(108, 92, 231, 0.62);
  --glow-cyan: 0 0 0 1px rgba(34, 211, 238, 0.24), 0 18px 60px -18px rgba(34, 211, 238, 0.5);
  --glow-soft: 0 0 80px -20px rgba(108, 92, 231, 0.55);

  /* ---------- 动效 ---------- */
  --dur-1: 120ms;
  --dur-2: 220ms;
  --dur-3: 380ms;
  --dur-4: 620ms;
  --dur-5: 900ms;
  --dur-6: 1400ms;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);

  /* ---------- 层级 ---------- */
  --z-bg: 0;
  --z-base: 1;
  --z-raised: 10;
  --z-sticky: 60;
  --z-header: 100;
  --z-drawer: 200;
  --z-cursor: 9999;

  /* 头部高度（JS 会同步真实值） */
  --header-h: 72px;
}

/* 尊重「减少动态效果」：统一压缩动效时长（组件仍可用） */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-1: 1ms;
    --dur-2: 1ms;
    --dur-3: 1ms;
    --dur-4: 1ms;
    --dur-5: 1ms;
    --dur-6: 1ms;
  }
}
