/* ============================================================
   tokens.css — 唯一真相來源：所有設計變數
   創巢數位 Nest Digital | 版本 redesign-v1
   ============================================================ */

/* @font-face：cwTeX Q Fangsong（繁體仿宋體，單一 Medium 字重，OFL 1.1 授權）
   來源：l10n-tw/cwtex-q-fonts-TTFs v0.42（Tsong-Min Wu / Tsong-Huey Wu / Edward G.J. Lee 原作，
        Chen-Pan Liao 修正版本；ZH 版僅含中文字符與標點，OFL 而非 GPL）
   用途：副標題等 display 場景，與 Chiron Sung 主標形成編輯感對位 */
@font-face {
    font-family: 'cwTeX Q Fangsong';
    src: url('https://cdn.jsdelivr.net/gh/l10n-tw/cwtex-q-fonts-TTFs@v0.42/ttf/cwTeXQFangsongZH-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

:root {
    /* ─── Colors ─── */
    --c-blue:    #1736F5;
    --c-navy:    #0b1a7a;
    --c-black:   #050d2e;
    --c-yellow:  #FFC709;
    --c-white:   #FFFFFF;
    --c-muted:   rgba(255, 255, 255, 0.55);

    /* ─── 強調色票（star-white / cool-cyan / amber-gold，比例 88/8/3/1） ─── */
    --c-stellar: #e8f0ff;   /* 星白：主要文字與星點（8%） */
    --c-cyan:    #00c8ff;   /* 冷電藍：Hover / 連結 / 軌道環（3%） */
    --c-amber:   #f5a623;   /* 琥珀金：全站僅單一位置畫龍點睛（1%） */

    /* ─── RGB Channels（供 rgba() 帶透明度使用，保證跟 Token 顏色同步） ─── */
    /* 若調整上方色碼，必須同步更新下方對應的 RGB 值 */
    --c-black-rgb:   5, 13, 46;      /* #050d2e */
    --c-blue-rgb:    23, 54, 245;    /* #1736F5 */
    --c-navy-rgb:    11, 26, 122;    /* #0b1a7a */
    --c-yellow-rgb:  255, 199, 9;    /* #FFC709 */
    --c-stellar-rgb: 232, 240, 255;  /* #e8f0ff */
    --c-cyan-rgb:    0, 200, 255;    /* #00c8ff */
    --c-amber-rgb:   245, 166, 35;   /* #f5a623 */

    /* ─── Glass / Overlay ─── */
    --glass-bg:       rgba(23, 54, 245, 0.12);
    --glass-border:   rgba(23, 54, 245, 0.4);

    /* ─── Typography（2026-04-19 Q2 決議：B 半替換） ─── */
    --f-sans:  'Noto Sans TC', sans-serif;                              /* 全站中文內文 */
    --f-serif: 'Fraunces', serif;                                       /* 英文大標／副標／引言，opsz+wght+SOFT 三軸 */
    --f-serif-cjk: 'Chiron Sung HK WS', 'Noto Serif TC', 'Songti TC', serif;
                                                                        /* 中文大標／宣言，港產明朝活字；與 Fraunces 英宋對位 */
    --f-fang-cjk:  'cwTeX Q Fangsong', 'STFangsong', '標楷體', 'BiauKai', serif;
                                                                        /* 中文 display 副標／編輯感仿宋；單一 Medium 字重（cwTeX OFL），與 Chiron Sung 主標形成「印刷明朝×編輯仿宋」對話 */
    --f-display-en: 'Italiana', 'Bodoni Moda', 'Didot', serif;
                                                                        /* 英文 display 副標／文藝復興雜誌封面感，hairline 高對比筆畫；單一 weight 400 但骨架自然極細俐落 */
    --f-mono:  'JetBrains Mono', monospace;                             /* 座標文字、技術細節、數據 */

    /* ─── Font Sizes（1.333 Perfect Fourth 階梯，基底 16px） ─── */
    --fs-xs:   0.75rem;     /* 12px */
    --fs-sm:   0.875rem;    /* 14px */
    --fs-base: 1rem;        /* 16px */
    --fs-md:   1.125rem;    /* 18px */
    --fs-lg:   1.3125rem;   /* 21px — 16 × 1.333 */
    --fs-xl:   1.75rem;     /* 28px — 16 × 1.333² */
    --fs-2xl:  2.375rem;    /* 38px — 16 × 1.333³ */
    --fs-3xl:  3.125rem;    /* 50px — 16 × 1.333⁴ */
    --fs-4xl:  4.1875rem;   /* 67px — 16 × 1.333⁵ */
    --fs-5xl:  5.625rem;    /* 90px — 16 × 1.333⁶ */

    /* ─── Spacing（三節奏系統，視覺元素庫 v1.0） ───
       緊（t）：同一語意群之間　中（m）：區塊內分段　寬（w）：區塊之間
       新代碼以 --sp-t/m/w 為準；以下 xs–xl 保留為既有元件相容別名
    */
    --sp-t1:  0.5rem;    /* 8px  */
    --sp-t2:  1rem;      /* 16px */
    --sp-t3:  1.5rem;    /* 24px */
    --sp-m1:  3rem;      /* 48px */
    --sp-m2:  4rem;      /* 64px */
    --sp-m3:  5rem;      /* 80px */
    --sp-w1:  7.5rem;    /* 120px */
    --sp-w2:  10rem;     /* 160px */
    --sp-w3:  12.5rem;   /* 200px */

    /* 舊別名（既有元件相容，新代碼改用 --sp-t/m/w） */
    --sp-xs:  0.5rem;    /* = --sp-t1 */
    --sp-sm:  1rem;      /* = --sp-t2 */
    --sp-md:  2rem;      /* 32px */
    --sp-lg:  4rem;      /* = --sp-m2 */
    --sp-xl:  7rem;      /* ≈ --sp-w1 */

    /* ─── Layout ─── */
    --max-w:       1200px;
    --sec-px:      2.5rem;
    --radius-lg:   16px;
    --radius-pill: 50px;

    /* ─── Transitions ─── */
    --t-fast:   0.2s ease;
    --t-base:   0.3s ease;
    --t-slow:   0.5s ease;

    /* ─── Z-index ─── */
    --z-stars:   0;
    --z-content: 1;
    --z-nav:     100;
    --z-overlay: 999;
}
