/* ─────────────────────────────────────────────────────────
   星屑手帐 · design tokens
   一个页面只从这里取颜色、字号、间距和圆角。
   ───────────────────────────────────────────────────────── */

@font-face {
  font-family: "Hoshikuzu Serif";
  src: url("/assets/fonts/lxgw-wenkai-subset.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  /* 纸与墨 */
  --c-paper: #f5f0e6;
  --c-paper-deep: #eee6d8;
  --c-paper-soft: #faf6ee;
  --c-surface: #fffaf2;
  --c-ink: #1d1b2c;
  --c-ink-soft: #3a3549;
  --c-muted: #686173;
  --c-faint: #8b8494;
  --c-line: #d8cfbf;
  --c-line-strong: #b9ad9a;

  /* 夜 */
  --c-night: #17162b;
  --c-night-2: #211f3a;
  --c-night-3: #302d51;
  --c-cream: #f5efe3;
  --c-muted-night: #b8b1c7;

  /* 强调 */
  --c-accent: #c84c3a;
  --c-accent-deep: #9f3426;
  --c-accent-soft: #f3ded8;
  --c-sakura: #e8b9c3;
  --c-gold: #d8b36a;
  --c-sage: #8b9b89;

  /* 语义 */
  --c-success: #3c7257;
  --c-success-soft: #e4eee7;
  --c-warning: #91611d;
  --c-warning-soft: #f5ead4;
  --c-danger: #ad372f;
  --c-danger-soft: #f6e3df;
  --c-focus: #315d8a;
  --c-focus-on-dark: #e6c886;

  /* 类型 */
  --font-display: "Hoshikuzu Serif", "Songti SC", "Noto Serif SC", "STSong", "SimSun", serif;
  --font-sans: "Inter", "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", "JetBrains Mono", Consolas, monospace;

  --text-2xs: 0.75rem;    /* 12：小标签也保持可读 */
  --text-xs: 0.75rem;     /* 12 */
  --text-sm: 0.875rem;    /* 14 */
  --text-base: 1rem;      /* 16 */
  --text-lg: 1.125rem;    /* 18 */
  --text-xl: 1.5rem;      /* 24 */
  --text-2xl: 2rem;       /* 32 */
  --text-3xl: clamp(2.25rem, 4vw, 3.25rem);
  --text-4xl: clamp(3rem, 6vw, 5rem);
  --text-5xl: clamp(3.5rem, 8vw, 7.25rem);

  /* 间距：4 / 8 的倍数 */
  --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;

  /* 形状 */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* 层次 */
  --shadow-1: 0 1px 0 rgba(29, 27, 44, 0.04), 0 14px 36px rgba(29, 27, 44, 0.07);
  --shadow-2: 0 28px 80px rgba(20, 18, 38, 0.18);
  --shadow-paper: 5px 6px 0 rgba(29, 27, 44, 0.07);

  /* 版心 */
  --container: 1200px;
  --container-narrow: 760px;
  --gutter: clamp(20px, 5vw, 64px);
  --header-h: 78px;

  /* 动效 */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --dur-fast: 160ms;
  --dur-mid: 240ms;
  --dur-slow: 600ms;

  /* 背景纹理 */
  --noise: url("/assets/noise.svg");
}

@media (max-width: 760px) {
  :root {
    --header-h: 64px;
    --gutter: 20px;
  }
}
