/* 字体样式文件 */

/* 本地字体引入 */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  src: url('montserrat/Montserrat-Regular.svg') format('svg');
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  src: url('roboto/Roboto-Regular.svg') format('svg');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  src: url('poppins/Poppins-Regular.svg') format('svg');
}

@font-face {
  font-family: 'Ma Shan Zheng';
  font-style: normal;
  font-weight: 400;
  src: url('mashanzheng/MaShanZheng-Regular.svg') format('svg');
}



/* 自定义字体定义 */
:root {
  --font-primary: 'Montserrat', sans-serif;
  --font-secondary: 'Roboto', sans-serif;
  --font-display: 'Poppins', sans-serif;
  
  /* 字体权重 */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* 字体大小 - 使用rem单位实现响应式 */
  --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-size-6xl: 3.75rem;   /* 60px */
  --font-size-7xl: 4.5rem;    /* 72px */
  
  /* 行高 */
  --line-height-tight: 1.2;
  --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;
  --letter-spacing-widest: 0.1em;
}

/* 字体通用类 */
.font-primary {
  font-family: var(--font-primary);
}

.font-secondary {
  font-family: var(--font-secondary);
}

.font-display {
  font-family: var(--font-display);
}

/* 字体粗细类 */
.font-light {
  font-weight: var(--font-light);
}

.font-regular {
  font-weight: var(--font-regular);
}

.font-medium {
  font-weight: var(--font-medium);
}

.font-semibold {
  font-weight: var(--font-semibold);
}

.font-bold {
  font-weight: var(--font-bold);
}

.font-extrabold {
  font-weight: var(--font-extrabold);
}

/* 字体大小类 */
.text-xs {
  font-size: var(--font-size-xs);
}

.text-sm {
  font-size: var(--font-size-sm);
}

.text-base {
  font-size: var(--font-size-base);
}

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

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

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

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

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

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

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

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

/* 行高类 */
.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);
}

/* 字间距类 */
.tracking-tight {
  letter-spacing: var(--letter-spacing-tight);
}

.tracking-normal {
  letter-spacing: var(--letter-spacing-normal);
}

.tracking-wide {
  letter-spacing: var(--letter-spacing-wide);
}

.tracking-wider {
  letter-spacing: var(--letter-spacing-wider);
}

.tracking-widest {
  letter-spacing: var(--letter-spacing-widest);
}

/* 文本转换类 */
.uppercase {
  text-transform: uppercase;
}

.lowercase {
  text-transform: lowercase;
}

.capitalize {
  text-transform: capitalize;
}

.normal-case {
  text-transform: none;
}

/* 文本装饰类 */
.underline {
  text-decoration: underline;
}

.no-underline {
  text-decoration: none;
}

.line-through {
  text-decoration: line-through;
}

.overline {
  text-decoration: overline;
}

/* 文本对齐类 */
.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-justify {
  text-align: justify;
}

/* 文本溢出处理 */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 字体样式类 */
.italic {
  font-style: italic;
}

.not-italic {
  font-style: normal;
}

/* 文本阴影效果 */
.text-shadow {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-shadow-md {
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.text-shadow-lg {
  text-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.text-shadow-primary {
  text-shadow: 0 0 10px rgba(0, 188, 212, 0.5);
}

/* 响应式字体大小 - 媒体查询 */
@media (max-width: 1200px) {
  :root {
    --font-size-7xl: 4rem;     /* 64px */
    --font-size-6xl: 3.5rem;   /* 56px */
    --font-size-5xl: 2.75rem;  /* 44px */
  }
}

@media (max-width: 992px) {
  :root {
    --font-size-7xl: 3.5rem;   /* 56px */
    --font-size-6xl: 3rem;     /* 48px */
    --font-size-5xl: 2.5rem;   /* 40px */
    --font-size-4xl: 2rem;     /* 32px */
  }
}

@media (max-width: 768px) {
  :root {
    --font-size-7xl: 3rem;     /* 48px */
    --font-size-6xl: 2.5rem;   /* 40px */
    --font-size-5xl: 2.25rem;  /* 36px */
    --font-size-4xl: 1.75rem;  /* 28px */
    --font-size-3xl: 1.5rem;   /* 24px */
  }
}

@media (max-width: 576px) {
  :root {
    --font-size-7xl: 2.5rem;   /* 40px */
    --font-size-6xl: 2rem;     /* 32px */
    --font-size-5xl: 1.75rem;  /* 28px */
    --font-size-4xl: 1.5rem;   /* 24px */
    --font-size-3xl: 1.25rem;  /* 20px */
    --font-size-2xl: 1.125rem; /* 18px */
  }
}

/* 无障碍字体设置 */
@media (prefers-reduced-motion: reduce) {
  /* 保留关键字体样式，但移除可能导致不适的动画效果 */
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  :root {
    --text-color: #ffffff;
    --text-secondary: #cccccc;
  }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 打印样式 */
@media print {
  :root {
    --font-primary: 'Times New Roman', serif;
    --font-secondary: 'Times New Roman', serif;
    --font-display: 'Times New Roman', serif;
  }
  
  .text-shadow,
  .text-shadow-md,
  .text-shadow-lg,
  .text-shadow-primary {
    text-shadow: none !important;
  }
}