/**
 * 工业外贸通用 Typography System - 基于字体方案.md规范
 * 零依赖系统字体方案，适用于水泵、机械、配件等工业B端网站
 * @package Kadence_Child
 */

/* ==========================================================================
   1. 全局字体变量（零依赖系统字体）
   ========================================================================== */
:root {
  /* 核心字体变量 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;
  
  /* 字体大小变量 */
  --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-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  
  /* 行高变量 */
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.65;
  --line-height-loose: 1.75;
}

/* ==========================================================================
   2. 基础排版系统
   ========================================================================== */
html {
  font-size: 100%;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  font-family: var(--font-sans);
  font-size: clamp(15px, 0.3vw + 14px, 16px);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-relaxed);
  color: #333333;
  margin: 0;
  padding: 0;
  
  /* 字体渲染优化 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ==========================================================================
   3. 标题系统（SEO + 结构核心）
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  margin-top: 0;
  margin-bottom: 0.6em;
  color: #1a1a1a;
}

/* 页面主标题（产品名 / 页面核心关键词） */
h1 {
  font-size: clamp(28px, 2.2vw, 36px);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
}

/* 模块标题（Overview / Specifications） */
h2 {
  font-size: clamp(22px, 1.8vw, 28px);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em;
}

/* 子模块标题 */
h3 {
  font-size: clamp(18px, 1.4vw, 22px);
  font-weight: var(--font-weight-semibold);
}

/* 辅助标题 */
h4 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
}

/* 小标题 */
h5 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
}

/* 微型标题 */
h6 {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   4. 正文系统
   ========================================================================== */
p {
  margin: 0 0 1em 0;
  font-size: inherit;
  line-height: var(--line-height-relaxed);
}

/* 长文本容器（介绍/说明） */
.content-text {
  max-width: 720px;
  line-height: var(--line-height-loose);
  font-size: var(--font-size-base);
}

/* 强调文本 */
strong, b {
  font-weight: var(--font-weight-semibold);
}

/* 斜体 */
em, i {
  font-style: italic;
}

/* 小文本 */
small {
  font-size: var(--font-size-sm);
}

/* ==========================================================================
   5. 列表系统（应用/优势）
   ========================================================================== */
ul, ol {
  padding-left: 1.2em;
  margin-bottom: 1em;
}

li {
  margin-bottom: 0.4em;
  line-height: var(--line-height-relaxed);
}

/* 无序列表样式 */
ul {
  list-style-type: disc;
}

/* 有序列表样式 */
ol {
  list-style-type: decimal;
}

/* ==========================================================================
   6. 链接系统
   ========================================================================== */
a {
  color: #c8181e;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: #a01015;
  text-decoration: underline;
}

/* ==========================================================================
   7. 参数/规格系统（工业站核心）
   ========================================================================== */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.spec-table th {
  text-align: left;
  font-weight: var(--font-weight-semibold);
  padding: 0.6em 0;
  border-bottom: 1px solid #e0e0e0;
  color: #1a1a1a;
}

.spec-table td {
  padding: 0.6em 0;
  border-bottom: 1px solid #f0f0f0;
}

.spec-table tr:last-child th,
.spec-table tr:last-child td {
  border-bottom: none;
}

/* ==========================================================================
   8. 标签/字段系统（通用工业信息）
   ========================================================================== */
.meta-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #666666;
  display: block;
  margin-bottom: 0.25em;
}

.meta-value {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: #1a1a1a;
}

/* 适用于：Model, Material, Flow Rate, Power, Voltage 等 */
.param-label {
  composes: meta-label;
}

.param-value {
  composes: meta-value;
}

/* ==========================================================================
   9. 按钮/交互元素
   ========================================================================== */
button,
input,
select,
textarea {
  font-family: inherit;
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
}

/* 按钮样式 */
.btn {
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em 1.5em;
  border: none;
  border-radius: 0.25em;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* ==========================================================================
   10. 小文本系统（辅助信息）
   ========================================================================== */
.small-text {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

.caption {
  font-size: var(--font-size-xs);
  color: #666666;
  line-height: var(--line-height-normal);
}

/* ==========================================================================
   11. 代码/技术参数系统
   ========================================================================== */
code, pre {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
}

code {
  background-color: #f5f5f5;
  padding: 0.125em 0.25em;
  border-radius: 0.125em;
}

pre {
  background-color: #f8f8f8;
  padding: 1em;
  border-radius: 0.25em;
  overflow-x: auto;
}

/* ==========================================================================
   12. 响应式调整
   ========================================================================== */
@media (max-width: 768px) {
  body {
    font-size: 15px;
    line-height: var(--line-height-loose);
  }
  
  h1 {
    font-size: clamp(24px, 8vw, 28px);
  }
  
  h2 {
    font-size: clamp(20px, 6vw, 22px);
  }
  
  h3 {
    font-size: clamp(18px, 5vw, 20px);
  }
  
  .content-text {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }
  
  h1 {
    font-size: 22px;
  }
  
  h2 {
    font-size: 20px;
  }
  
  h3 {
    font-size: 18px;
  }
}

/* ==========================================================================
   13. 实用类（Utility Classes）
   ========================================================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-light { font-weight: var(--font-weight-light); }
.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }
.font-extrabold { font-weight: var(--font-weight-extrabold); }

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

.leading-tight { line-height: var(--line-height-tight); }
.leading-normal { line-height: var(--line-height-normal); }
.leading-relaxed { line-height: var(--line-height-relaxed); }
.leading-loose { line-height: var(--line-height-loose); }

/* ==========================================================================
   14. 工业专用类
   ========================================================================== */
.industrial-title {
  font-family: var(--font-sans);
  font-weight: var(--font-weight-bold);
  font-size: clamp(24px, 2vw, 32px);
  line-height: var(--line-height-tight);
  letter-spacing: -0.02em;
}

.industrial-subtitle {
  font-family: var(--font-sans);
  font-weight: var(--font-weight-semibold);
  font-size: clamp(18px, 1.5vw, 24px);
  line-height: var(--line-height-normal);
}

.technical-spec {
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-normal);
  color: #444444;
}

.parameter-display {
  font-family: var(--font-mono);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: #1a1a1a;
  background: #f8f8f8;
  padding: 0.25em 0.5em;
  border-radius: 0.125em;
}