/* Inflow Digital ／ 映流數位 — 品牌 token（松綠 Pine · 淺色底）
   狀態：final｜版本：1.0.0｜定案：2026-07-12
   ⚠️ 本檔為衍生物，請勿手改。改 src/brand/brand.source.json 後跑：
      python3 scripts/build_brand_tokens.py && python3 scripts/ci_contrast_check.py
*/
:root {
  /* ── 色彩 */
  --brand-primary: #007A46;
  --brand-primary-deep: #00532C;
  --brand-secondary: #5B7A69;
  --brand-signal: #8F5900;
  --brand-tint: #FAE4C7;
  --bg-base: #F5FAF7;
  --bg-raised: #FFFFFF;
  --bg-overlay: #DBF2E4;
  --border: #C6D5CC;
  --bg-inverse: #0A140F;
  --text-hi: #17221C;
  --text-mid: #4A5A50;
  --text-lo: #76847C;
  --text-inverse-hi: #E7F6ED;
  --text-inverse-mid: #AABDB2;
  --fn-success-inverse: #74C878;
  --fn-warning-inverse: #E4A339;
  --fn-danger-inverse: #FE8C80;
  --fn-info-inverse: #66B6FF;
  --text-on-brand: #FFFFFF;
  --text-on-signal: #FFFFFF;
  --fn-success: #1E7729;
  --fn-success-tint: #D6F0D6;
  --fn-warning: #8C5600;
  --fn-warning-tint: #FAE4C7;
  --fn-danger: #A43B35;
  --fn-danger-tint: #FFDDD8;
  --fn-info: #0465AF;
  --fn-info-tint: #D2EBFF;

  /* ── 字型 */
  --font-cjk-body: "Taipei Sans TC Beta", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-cjk-display: "Taipei Sans TC Beta", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-latin: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  --font-numeric: "tnum" 1, "lnum" 1;  /* 等寬數字：表格與價格必開 */

  /* ── 間距 */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* ── 版面 */
  --layout-container-max: 1200px;
  --layout-container-narrow: 760px;
  --layout-container-wide: 1440px;
  --layout-gutter: 24px;
  --layout-gutter-mobile: 16px;
  --layout-grid-cols: 12;
  --layout-section-y: 96px;
  --layout-section-y-mobile: 56px;

  /* ── 圓角 */
  --radius-none: 0;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 999px;

  /* ── 邊框 */
  --border-hairline: 1px;
  --border-strong: 2px;
  --border-focus: 2px;

  /* ── 陰影／層級 */
  --shadow-none: none;
  --shadow-sm: 0 1px 2px rgba(10, 20, 15, 0.06);
  --shadow-md: 0 2px 8px rgba(10, 20, 15, 0.08);
  --shadow-lg: 0 8px 24px rgba(10, 20, 15, 0.10);
  --shadow-overlay: 0 16px 48px rgba(10, 20, 15, 0.18);

  /* ── 尺寸 */
  --size-icon-sm: 16px;
  --size-icon-md: 20px;
  --size-icon-lg: 24px;
  --size-control-sm: 32px;
  --size-control-md: 40px;
  --size-control-lg: 48px;
  --size-icon-stroke: 1.75px;
  --size-tap-target-min: 44px;
  --size-logo-min: 24px;

  /* ── 透明度 */
  --opacity-disabled: 0.45;
  --opacity-hover-veil: 0.06;
  --opacity-scrim: 0.55;

  /* ── 動態 */
  --motion-instant: 80ms;
  --motion-fast: 140ms;
  --motion-base: 200ms;
  --motion-slow: 320ms;
  --motion-ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --motion-ease-enter: cubic-bezier(0, 0, 0, 1);
  --motion-ease-exit: cubic-bezier(0.3, 0, 1, 1);

  /* ── 層序 */
  --z-base: 0;
  --z-sticky: 100;
  --z-dropdown: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;

  /* ── 資料視覺化 */
  --viz-1: #006943;
  --viz-2: #734C00;
  --viz-3: #0060A6;
  --viz-4: #903D8B;
  --viz-5: #A83630;
  --viz-6: #00686C;
  --viz-7: #4E5D00;
  --viz-8: #5D53AE;
}

/* 全域：等寬數字。表格、價格、KPI、log 的數字必須垂直對齊。 */
body { font-feature-settings: var(--font-numeric); }

/* 尊重使用者的減少動態偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
