/* ==========================================================================
   鸣雀 ID · Design Tokens
   Art Deco / geometric × editorial.  See ../DESIGN.md
   ========================================================================== */

@font-face {
  font-family: 'Cinzel';
  src: url('/assets/fonts/cinzel-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ---- brand primitives (locked) ---- */
  --ink: #0e1a17;
  --paper: #f4efe6;
  --gold: #be9a5e;
  --teal: #2f6f62;

  /* ---- semantic · light ---- */
  --bg: #f4efe6;
  --bg-2: #fbf7f0;
  --bg-3: #ece5d7;
  --bg-inverse: #0e1a17;
  --fg: #17241f;
  --fg-inverse: #f1ece2;
  --fg-muted: #55635c;
  --fg-faint: #6b7870;
  --line: rgba(23, 36, 31, 0.16);
  --line-strong: rgba(23, 36, 31, 0.36);
  --gold-ink: #7c5c29;
  --teal-ink: #245a4f;
  --danger: #9c3b32;
  --danger-bg: rgba(156, 59, 50, 0.08);
  --warn: #8a5a1f;
  --warn-bg: rgba(138, 90, 31, 0.08);
  --ok: #2c6b4f;
  --ok-bg: rgba(44, 107, 79, 0.08);
  --focus: #be9a5e;
  --overlay: rgba(14, 26, 23, 0.55);
  --chrome: rgba(251, 247, 240, 0.86);
  --shadow: 0 24px 60px -38px rgba(14, 26, 23, 0.55);
  --noise-opacity: 0.34;
  --scan-opacity: 0.05;
  --color-scheme: light;

  /* ---- type ---- */
  --font-display: 'Cinzel', 'Songti SC', 'Noto Serif CJK SC', 'Source Han Serif SC',
    STSong, serif;
  --font-serif: 'Songti SC', 'Noto Serif CJK SC', 'Source Han Serif SC', 'SimSun',
    STSong, serif;
  --font-sans: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
    'Noto Sans CJK SC', 'Source Han Sans SC', sans-serif;
  --font-mono: 'Consolas', 'Cascadia Mono', 'SFMono-Regular', 'Menlo', monospace;

  /* ---- space ---- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 88px;
  --s-10: 120px;

  /* ---- shape / motion ---- */
  --r-1: 2px;
  --r-2: 3px;
  --r-pill: 999px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-1: 120ms;
  --dur-2: 240ms;
  --dur-3: 420ms;
  --rail: 248px;
  --rail-admin: 232px;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}

[data-theme='dark'] {
  --bg: #0e1a17;
  --bg-2: #12211c;
  --bg-3: #0a1310;
  --bg-inverse: #f4efe6;
  --fg: #f1ece2;
  --fg-inverse: #17241f;
  --fg-muted: #a2b1a8;
  --fg-faint: #83938a;
  --line: rgba(244, 239, 230, 0.16);
  --line-strong: rgba(244, 239, 230, 0.34);
  --gold-ink: #d8b87d;
  --teal-ink: #86bdb0;
  --danger: #e28c7f;
  --danger-bg: rgba(226, 140, 127, 0.1);
  --warn: #d9a96a;
  --warn-bg: rgba(217, 169, 106, 0.1);
  --ok: #83bfa0;
  --ok-bg: rgba(131, 191, 160, 0.1);
  --focus: #d8b87d;
  --overlay: rgba(4, 9, 7, 0.66);
  --chrome: rgba(18, 33, 28, 0.88);
  --shadow: 0 28px 70px -40px rgba(0, 0, 0, 0.8);
  --noise-opacity: 0.5;
  --scan-opacity: 0.09;
  --color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0e1a17;
    --bg-2: #12211c;
    --bg-3: #0a1310;
    --bg-inverse: #f4efe6;
    --fg: #f1ece2;
    --fg-inverse: #17241f;
    --fg-muted: #a2b1a8;
    --fg-faint: #83938a;
    --line: rgba(244, 239, 230, 0.16);
    --line-strong: rgba(244, 239, 230, 0.34);
    --gold-ink: #d8b87d;
    --teal-ink: #86bdb0;
    --danger: #e28c7f;
    --danger-bg: rgba(226, 140, 127, 0.1);
    --warn: #d9a96a;
    --warn-bg: rgba(217, 169, 106, 0.1);
    --ok: #83bfa0;
    --ok-bg: rgba(131, 191, 160, 0.1);
    --focus: #d8b87d;
    --overlay: rgba(4, 9, 7, 0.66);
    --chrome: rgba(18, 33, 28, 0.88);
    --shadow: 0 28px 70px -40px rgba(0, 0, 0, 0.8);
    --noise-opacity: 0.5;
    --scan-opacity: 0.09;
    --color-scheme: dark;
  }
}

:root[data-theme='light'] {
  color-scheme: light;
}
:root[data-theme='dark'] {
  color-scheme: dark;
}
