/* 设计变量：颜色、字号阶梯、间距、圆角、缓动。
   深浅两套主题只改颜色，尺寸与节奏共用，避免两套样式各写一遍。 */

:root {
  /* 字体：Inter Tight 走标题与正文，JetBrains Mono 走标签、代码、数字 */
  --font-sans: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  /* 字号阶梯 */
  --text-xs: 0.6875rem;
  --text-sm: 0.8125rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: clamp(1.25rem, 1.05rem + 0.7vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.15rem + 1.4vw, 2rem);
  --text-3xl: clamp(2rem, 1.5rem + 2.2vw, 3rem);
  --text-4xl: clamp(2.5rem, 1.6rem + 4.2vw, 4.75rem);

  /* 间距（4px 基准） */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;

  /* 圆角 */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* 动效：统一用这两条曲线，别在组件里另造 */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0.05, 0.36, 1);
  --dur-1: 140ms;
  --dur-2: 240ms;
  --dur-3: 480ms;
  --dur-4: 800ms;

  /* 布局 */
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --header-h: 68px;
  --sec-y: clamp(64px, 9vw, 128px);

  --z-header: 100;
  --z-drawer: 200;
}

/* 深色：品牌底，接近纯黑，靠 1px 描边和亮度分层 */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #060708;
  --bg-soft: #0a0b0d;
  --surface: #0e1014;
  --surface-2: #14171c;
  --surface-3: #1b1f25;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.22);
  --text: #f4f5f7;
  --text-2: #a7adb7;
  --text-3: #7c838e;
  --accent: #86e8ff;
  --accent-ink: #04161c;
  --accent-soft: rgba(134, 232, 255, 0.12);
  --accent-line: rgba(134, 232, 255, 0.42);
  --glow: rgba(134, 232, 255, 0.16);
  --glow-2: rgba(80, 96, 255, 0.14);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.55);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.35);
  --header-bg: rgba(6, 7, 8, 0.72);
  --btn-primary-bg: #f4f5f7;
  --btn-primary-ink: #08090b;
  --btn-primary-bg-hover: #ffffff;
}

/* 浅色：暖白底 + 深墨字，强调色压暗到 AA 以上 */
[data-theme="light"] {
  color-scheme: light;
  --bg: #f7f7f5;
  --bg-soft: #f1f1ee;
  --surface: #ffffff;
  --surface-2: #fbfbf9;
  --surface-3: #f2f2ef;
  --line: rgba(10, 11, 13, 0.14);
  --line-soft: rgba(10, 11, 13, 0.08);
  --line-strong: rgba(10, 11, 13, 0.28);
  --text: #0a0b0d;
  --text-2: #52575e;
  --text-3: #646a72;
  --accent: #0a6e82;
  --accent-ink: #ffffff;
  --accent-soft: rgba(10, 110, 130, 0.08);
  --accent-line: rgba(10, 110, 130, 0.35);
  --glow: rgba(10, 110, 130, 0.1);
  --glow-2: rgba(60, 80, 200, 0.08);
  --shadow-lg: 0 24px 60px rgba(12, 14, 18, 0.1);
  --shadow-sm: 0 6px 18px rgba(12, 14, 18, 0.07);
  --header-bg: rgba(247, 247, 245, 0.78);
  --btn-primary-bg: #0a0b0d;
  --btn-primary-ink: #f7f7f5;
  --btn-primary-bg-hover: #22262c;
}
