/* ==========================================================================
   鸣雀 LARKMUSE · 设计令牌 tokens.css
   宣纸 · 墨 · 金 · 赤陶 —— 东方纸感编辑体
   自托管字体，无外部请求；所有色值取自 SITE-PROJECT.md §4。
   ========================================================================== */

/* ---------- 字体：自托管 + 子集化 + font-display: swap ---------- */
@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/noto-serif-sc-600.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Serif SC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/noto-serif-sc-700.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/assets/fonts/noto-sans-sc-300.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/noto-sans-sc-400.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/noto-sans-sc-500.woff2") format("woff2");
}
@font-face {
  font-family: "LXGW WenKai";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/lxgw-wenkai-400.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-400.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/cormorant-garamond-400-italic.woff2") format("woff2");
}

/* ---------- 色板与令牌 ---------- */
:root {
  color-scheme: light;

  /* 纸 */
  --paper: #faf6ec;
  --paper-deep: #f1e7d3;
  --paper-card: #fdfaf2;
  --paper-white: #fffdf6;

  /* 墨 */
  --ink: #17131f;
  --ink-soft: #2c2533;
  --ink-muted: #6e6058;
  --ink-faint: #978b80;

  /* 金 */
  --gold: #d9a441;
  --gold-deep: #b8862f;
  --gold-soft: #ebd3a0;

  /* 赤陶 */
  --terracotta: #c8553d;

  /* 线（细金线 / 细墨线） */
  --line: rgba(23, 19, 31, 0.12);
  --line-soft: rgba(23, 19, 31, 0.07);
  --line-strong: rgba(23, 19, 31, 0.24);
  --line-gold: rgba(217, 164, 65, 0.42);
  --line-gold-soft: rgba(217, 164, 65, 0.22);

  /* 深色区块 */
  --ink-block: #17131f;
  --on-dark: #f6f1e7;
  --on-dark-muted: rgba(246, 241, 231, 0.66);
  --on-dark-line: rgba(246, 241, 231, 0.16);
  --on-dark-gold: #e7c07a;

  /* 产品强调色（DESIGN.md §1.3：--c-* 为准，旧名保留兼容） */
  --c-studio: #d9a441;
  --c-gateway: #2f4b57;
  --c-tavern: #8c2f39;
  --c-work: #4a6b52;
  --c-account: #a86b3c;
  --c-market: #7a5c3e;

  --studio: var(--c-studio);
  --studio-soft: rgba(217, 164, 65, 0.14);
  --gateway: var(--c-gateway);
  --gateway-soft: rgba(47, 75, 87, 0.1);
  --tavern: var(--c-tavern);
  --tavern-soft: rgba(140, 47, 57, 0.1);
  --work: var(--c-work);
  --work-soft: rgba(74, 107, 82, 0.12);
  --account: var(--c-account);
  --account-soft: rgba(168, 107, 60, 0.12);
  --market: var(--c-market);
  --market-soft: rgba(122, 92, 62, 0.12);

  /* 字族（DESIGN.md §1.4） */
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  --font-kai: "LXGW WenKai", "Kaiti SC", "KaiTi", serif;
  --font-latin: "Cormorant Garamond", "Cinzel", "Georgia", serif;
  --font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", monospace;

  /* 字号阶梯（DESIGN.md §1.4，原样落地） */
  --t-display: clamp(40px, 6.2vw, 76px);
  --t-d1: clamp(34px, 4.6vw, 56px);
  --t-h2: clamp(26px, 3vw, 38px);
  --t-h3: clamp(21px, 2.1vw, 26px);
  --t-h4: 19px;
  --t-lead: clamp(17px, 1.5vw, 20px);
  --t-body: 16px;
  --t-small: 14px;
  --t-caption: 12.5px;
  --t-label: 11.5px;

  --fs-display: var(--t-display);
  --fs-h1: var(--t-d1);
  --fs-h2: var(--t-h2);
  --fs-h3: var(--t-h3);
  --fs-h4: var(--t-h4);
  --fs-lede: var(--t-lead);
  --fs-body: var(--t-body);
  --fs-sm: var(--t-small);
  --fs-xs: var(--t-caption);
  --fs-label: var(--t-label);

  /* 字距 / 行高 */
  --tracking-label: 0.2em;
  --tracking-wide: 0.12em;
  --tracking-title: 0.01em;
  --lh-tight: 1.18;
  --lh-snug: 1.45;
  --lh-body: 1.78;

  /* 间距 */
  --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;
  --section-y: clamp(72px, 9vw, 128px);
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --shell: 1240px;

  /* 圆角（DESIGN.md §3） */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-2xl: 28px;
  --r-pill: 999px;

  /* 纸面阴影：默认无阴影，hover 才有一次上浮（DESIGN.md §3） */
  --shadow-paper: none;
  --shadow-frame: none;
  --shadow-lift: 0 14px 30px -22px rgba(23, 19, 31, 0.38);
  --shadow-inset-gold: inset 0 0 0 1px rgba(217, 164, 65, 0.35);
  --glow-gold: inset 0 0 0 1px rgba(217, 164, 65, 0.35);

  /* 动效 */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.28, 0.64, 1);
  --dur-1: 0.16s;
  --dur-2: 0.28s;
  --dur-3: 0.5s;
  --dur-4: 0.9s;

  /* 层级 */
  --z-grain: 1;
  --z-header: 50;
  --z-drawer: 60;
  --z-skip: 100;
}

/* 深色区块内令牌重映射 */
.is-ink-block {
  color-scheme: dark;
  --paper: #17131f;
  --paper-card: #1f1928;
  --paper-deep: #211a2b;
  --ink: #f6f1e7;
  --ink-soft: #efe8da;
  --ink-muted: rgba(246, 241, 231, 0.62);
  --ink-faint: rgba(246, 241, 231, 0.4);
  --line: rgba(246, 241, 231, 0.16);
  --line-soft: rgba(246, 241, 231, 0.09);
  --line-strong: rgba(246, 241, 231, 0.3);
  --line-gold: rgba(231, 192, 122, 0.5);
}
