/* ========== 企业级配色系统和字体规范 ========== */
/* 基于2025年企业级网站设计最佳实践 */
/* 参考律师事务所/调查事务所行业标准 */

/* ========== 1. 统一配色系统 ========== */
:root {
  /* 主色系 - 深蓝灰（专业、稳重、信任） */
  --primary: #1a2332;
  --primary-dark: #0f1520;
  --primary-light: #2a3a4d;
  --primary-lighter: #3d566e;
  
  /* 品牌强调色 - 琥珀金（高价值、专业、权威）*/
  --accent: #c9a227;
  --accent-hover: #b8941f;
  --accent-light: #e6c24a;
  --accent-lighter: #f0d78c;
  
  /* 辅助色 - 现代蓝（科技感、清晰）*/
  --secondary: #2563eb;
  --secondary-hover: #1d4ed8;
  --secondary-light: #60a5fa;
  
  /* 中性色 - 灰阶系统 */
  --dark: #111827;
  --gray-900: #1f2937;
  --gray-800: #374151;
  --gray-700: #4b5563;
  --gray-600: #6b7280;
  --gray-500: #9ca3af;
  --gray-400: #d1d5db;
  --gray-300: #e5e7eb;
  --gray-200: #f3f4f6;
  --gray-100: #f9fafb;
  --white: #ffffff;
  
  /* 功能色 */
  --success: #10b981;
  --success-hover: #059669;
  --warning: #f59e0b;
  --warning-hover: #d97706;
  --error: #ef4444;
  --error-hover: #dc2626;
  --info: #3b82f6;
  --info-hover: #2563eb;
  
  /* 背景色 */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --bg-dark: #1a2332;
  
  /* 文字色 */
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-tertiary: #6b7280;
  --text-disabled: #9ca3af;
  --text-inverse: #ffffff;
  
  /* 边框色 */
  --border-primary: #e5e7eb;
  --border-secondary: #f3f4f6;
  --border-focus: #c9a227;
  
  /* 阴影系统 */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 6px 10px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* 过渡动画 */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slower: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* 圆角系统 */
  --radius-none: 0;
  --radius-sm: 0.25rem;   /* 4px */
  --radius: 0.375rem;     /* 6px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;
}

/* ========== 2. 字体系统 ========== */
:root {
  /* 字体系列 */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, 'Noto Sans', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-serif: 'Source Han Serif', 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', 'Courier New', monospace;
  
  /* 字体大小 - 基于16px基准 */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */
  
  /* 字体粗细 */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* 行高 */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  
  /* 字间距 */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;
}

/* ========== 3. 全局字体应用 ========== */
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 标题字体 */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(var(--text-4xl), 5vw, var(--text-6xl));
  letter-spacing: var(--tracking-tighter);
}

h2 {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
}

h3 {
  font-size: clamp(var(--text-2xl), 3vw, var(--text-4xl));
}

h4 {
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl));
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

/* 段落文本 */
p {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* 小文本 */
small,
.text-sm {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

/* 超大文本 */
.display-1 {
  font-size: clamp(var(--text-5xl), 8vw, var(--text-6xl));
  font-weight: var(--font-extrabold);
  line-height: var(--leading-none);
  letter-spacing: var(--tracking-tighter);
}

.display-2 {
  font-size: clamp(var(--text-4xl), 6vw, var(--text-5xl));
  font-weight: var(--font-extrabold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tighter);
}

/* ========== 4. 颜色应用规范 ========== */
/* 主要文字 */
.text-primary {
  color: var(--text-primary);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-tertiary {
  color: var(--text-tertiary);
}

/* 品牌色文字 */
.text-accent {
  color: var(--accent);
}

.text-accent-hover {
  color: var(--accent-hover);
}

/* 功能色文字 */
.text-success {
  color: var(--success);
}

.text-warning {
  color: var(--warning);
}

.text-error {
  color: var(--error);
}

.text-info {
  color: var(--info);
}

/* 背景色 */
.bg-primary {
  background-color: var(--bg-primary);
}

.bg-secondary {
  background-color: var(--bg-secondary);
}

.bg-tertiary {
  background-color: var(--bg-tertiary);
}

.bg-dark {
  background-color: var(--bg-dark);
}

/* 品牌色背景 */
.bg-accent {
  background-color: var(--accent);
}

.bg-accent-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
}

/* ========== 5. 按钮配色规范 ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  line-height: var(--leading-normal);
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

/* 主按钮 */
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* 次要按钮 */
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-secondary:hover {
  background: var(--accent);
  color: var(--white);
}

/* 深色按钮 */
.btn-dark {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-dark:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ========== 6. 卡片配色规范 ========== */
.card {
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
  transform: translateY(-4px);
}

/* ========== 7. 表单配色规范 ========== */
input,
select,
textarea {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-disabled);
}

/* ========== 8. 链接配色规范 ========== */
a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ========== 9. 响应式字体 ========== */
@media (max-width: 768px) {
  :root {
    --text-6xl: 3rem;
    --text-5xl: 2.5rem;
    --text-4xl: 2rem;
    --text-3xl: 1.75rem;
    --text-2xl: 1.5rem;
  }
  
  body {
    font-size: var(--text-base);
  }
  
  h1 {
    font-size: var(--text-4xl);
  }
  
  h2 {
    font-size: var(--text-3xl);
  }
  
  h3 {
    font-size: var(--text-2xl);
  }
}

/* ========== 10. 打印样式 ========== */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .btn,
  .navbar,
  .footer,
  .floating-phone {
    display: none !important;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
}
