/* ============================================================
   tokens.css — 设计令牌（规范 6.1 / 6.2 / 6.3）
   全站唯一色值与字体栈来源；style.css 禁止硬编码色值/字体栈
   ============================================================ */

/* ---------- 字体（本地 woff2，OFL，font-display: swap） ---------- */
@font-face {
  font-family: "Source Han Sans SC";
  src: url("../fonts/SourceHanSansSC-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Han Sans SC";
  src: url("../fonts/SourceHanSansSC-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Han Sans SC";
  src: url("../fonts/SourceHanSansSC-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Han Sans SC";
  src: url("../fonts/SourceHanSansSC-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---------- 6.1 色彩：微软 Office 默认标准色·蓝色体系 ---------- */
  --c-primary:          #4472C4;  /* 主色：按钮/链接/导航高亮/横幅底色 */
  --c-primary-dark:     #2F528F;  /* hover / 按下态 */
  --c-primary-darkest:  #1F3864;  /* 标题、页脚底色 */
  --c-primary-light:    #8FAADC;  /* 辅助图形、分隔强调 */
  --c-primary-lighter:  #B4C7E7;  /* 卡片描边、标签底 */
  --c-primary-lightest: #D9E2F3;  /* 区块浅底、横幅浅色变体 */
  --c-accent-blue:      #5B9BD5;  /* 强调点缀（Office 标准色·蓝） */
  --c-ink:              #000000;  /* 正文黑 */
  --c-ink-soft:         #44546A;  /* 主题深灰蓝（次级文字） */
  --c-bg:               #FFFFFF;  /* 页面底 */
  --c-bg-alt:           #F2F2F2;  /* 分区底 */

  /* 派生语义别名（值仍全部来自上方色板） */
  --c-on-primary: var(--c-bg);          /* 主色底上的白字 */
  --c-border: var(--c-primary-lighter); /* 中性描边（6.1：卡片描边） */
  --c-scrim-base: var(--c-primary-darkest);

  /* 遮罩与阴影（rgba 仅在此集中出现） */
  --overlay-white-08: rgba(255, 255, 255, 0.08);
  --overlay-white-12: rgba(255, 255, 255, 0.12);
  --overlay-white-14: rgba(255, 255, 255, 0.14);
  --overlay-white-35: rgba(255, 255, 255, 0.35);
  --overlay-white-60: rgba(255, 255, 255, 0.60);
  --overlay-white-96: rgba(255, 255, 255, 0.96);
  --overlay-scrim:    rgba(31, 56, 100, 0.45);
  --shadow-1: 0 6px 18px rgba(31, 56, 100, 0.12);
  --shadow-2: 0 10px 26px rgba(31, 56, 100, 0.30);
  --shadow-3: 0 10px 28px rgba(31, 56, 100, 0.16);

  /* ---------- 6.2 字体栈 ---------- */
  --font-sans: "Source Han Sans SC", "思源黑体", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;

  /* 字号 */
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-hero: clamp(1.75rem, 4vw, 2.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: 4px; --r-md: 8px; --r-lg: 16px; --r-full: 999px;

  /* ---------- 6.3 动效时长 ---------- */
  --t-fast: 150ms;         /* 卡片 hover：抬升 2px + 描边加深 */
  --t-med: 300ms;
  --t-banner-in: 420ms;    /* 横幅滑入：420ms ease-out（唯一必选动效） */
  --t-banner-delay: 300ms; /* DOMContentLoaded 后 300ms 触发滑入 */
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* 布局 */
  --rail-w: 208px;
  --header-h: 76px;
  --content-max: 1040px;
}
