/**
 * CSS 變數 - 忠泰大華企業
 * 統一管理設計系統的顏色、字體、間距等
 * 
 * 配色方案：金色主題搭配深色背景
 * RWD 策略：Mobile First
 */

:root {
  /* ===== 顏色系統 ===== */
  
  /* 主要品牌色（金色） */
  --color-primary: #d4af37;
  --color-primary-light: #e5c35a;
  --color-primary-dark: #b8962e;
  --color-primary-rgb: 212, 175, 55;
  
  /* 次要色（深藍） */
  --color-secondary: #1a365d;
  --color-secondary-light: #2c5282;
  --color-secondary-dark: #0d1b2a;
  
  /* 背景色彩 */
  --color-bg-dark: #1a1a2e;
  --color-bg-darker: #16213e;
  --color-bg-darkest: #0f0f1a;
  --color-bg-light: #f9fafb;
  --color-bg-white: #ffffff;
  
  /* 文字色彩 */
  --color-text-light: #ffffff;
  --color-text-muted: #e0e0e0;
  --color-text-dark: #333333;
  --color-text-gray: #666666;
  
  /* 中性色 */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-300: #d1d5db;
  --color-gray-400: #9ca3af;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-800: #1f2937;
  --color-gray-900: #111827;
  
  /* 語意色彩 */
  --color-success: #4caf50;
  --color-success-light: #66bb6a;
  --color-success-dark: #388e3c;
  --color-error: #f44336;
  --color-error-light: #ef5350;
  --color-error-dark: #d32f2f;
  --color-warning: #ff9800;
  --color-warning-light: #ffb74d;
  --color-warning-dark: #f57c00;
  --color-info: #2196f3;
  --color-info-light: #64b5f6;
  --color-info-dark: #1976d2;
  
  /* ===== 字體系統 ===== */
  
  /* 字體家族 */
  --font-primary: "Stevie Sans", "Noto Sans TC", "Microsoft JhengHei", "微軟正黑體", sans-serif;
  --font-heading: "Stevie Sans", "Noto Sans TC", "Microsoft JhengHei", "微軟正黑體", sans-serif;
  --font-secondary: "Stevie Sans", "Noto Sans TC", "Microsoft JhengHei", "微軟正黑體", sans-serif;
  --font-english: "Stevie Sans", "Roboto", "Arial", sans-serif;
  
  /* 字體大小 */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */
  
  /* 字體粗細 */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* 行高 */
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  --line-height-loose: 2;
  
  /* 字距 */
  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;
  --letter-spacing-wider: 0.05em;
  
  /* ===== 間距系統 ===== */
  --spacing-0: 0;
  --spacing-1: 0.25rem;   /* 4px */
  --spacing-2: 0.5rem;    /* 8px */
  --spacing-3: 0.75rem;   /* 12px */
  --spacing-4: 1rem;      /* 16px */
  --spacing-5: 1.25rem;   /* 20px */
  --spacing-6: 1.5rem;    /* 24px */
  --spacing-8: 2rem;      /* 32px */
  --spacing-10: 2.5rem;   /* 40px */
  --spacing-12: 3rem;     /* 48px */
  --spacing-16: 4rem;     /* 64px */
  --spacing-20: 5rem;     /* 80px */
  --spacing-24: 6rem;     /* 96px */
  
  /* ===== 邊框圓角 ===== */
  --radius-none: 0;
  --radius-sm: 0.125rem;  /* 2px */
  --radius-base: 0.25rem; /* 4px */
  --radius-md: 0.375rem;  /* 6px */
  --radius-lg: 0.5rem;    /* 8px */
  --radius-xl: 0.75rem;   /* 12px */
  --radius-2xl: 1rem;     /* 16px */
  --radius-full: 9999px;
  
  /* ===== 陰影 ===== */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-base: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* ===== 過渡動畫 ===== */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  --transition-slower: 500ms ease;
  
  /* ===== 層級 (z-index) ===== */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-popover: 600;
  --z-tooltip: 700;
  
  /* ===== 容器寬度 ===== */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --container-2xl: 1400px;
  
  /* ===== RWD 斷點（供 JS 參考）- Mobile First ===== */
  --breakpoint-xs: 320px;     /* 小型手機 */
  --breakpoint-sm: 375px;     /* 一般手機 */
  --breakpoint-md: 576px;     /* 大型手機/小平板 */
  --breakpoint-lg: 768px;     /* 平板 */
  --breakpoint-xl: 992px;     /* 桌上型電腦 */
  --breakpoint-xxl: 1200px;   /* 大型螢幕 */
  
  /* ===== 表單專用樣式變數 ===== */
  --form-bg: var(--color-bg-dark);
  --form-input-bg: var(--color-white);
  --form-input-border: var(--color-gray-300);
  --form-input-focus: var(--color-primary);
  --form-label-color: var(--color-text-light);
  --form-title-color: var(--color-primary);

  /* ===== 行動版視窗安全區（Chrome / iOS Safari）===== */
  --viewport-bottom-offset: 0px;
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --mobile-bottom-inset: max(var(--viewport-bottom-offset), var(--safe-area-bottom));
}
