/* ========================================
 * malaji.com 官网全局主样式 main.css
 * V2.0 配色体系：非遗国风·政务简约
 * 暖白底 + 米色交替 + 深墨蓝黑导航 + 中国红强调
 * ======================================== */

/* ===== CSS 变量：全局设计令牌（V2.1 对齐测试报告推荐色值） ===== */
:root {
  /* 官网主色 - 品牌暖红（麻辣鸡的辣·热烈·食欲·非遗温度） */
  --color-red: #C41E3A;          /* 品牌暖红 - CTA按钮/数据高亮/品牌标识 */
  --color-red-dark: #9E1730;     /* 深红 - Hover/Active */
  --color-red-light: #E83550;    /* 亮红 - 辅助 */

  /* 官网辅助色 - 金色（非遗荣耀感·鎏金·传承·品质） */
  --color-gold: #D4A847;         /* 金色 - 非遗标识/数据框线/装饰线 */
  --color-gold-light: #F0DCA0;   /* 浅金 - 背景纹理/渐变 */

  /* 官网背景 - 暖色体系（区别于冷白，适合美食产业） */
  --color-bg-warm: #FFFBF5;      /* 暖白 - 页面主背景 */
  --color-bg-cream: #F5EDE0;     /* 浅米色 - 交替区块背景 */

  /* 导航色 - 深墨蓝（政务权威感·稳重·可信·数字化） */
  --color-nav: #1A2332;          /* 深墨蓝 - 导航栏/Hero区/页脚 */
  --color-nav-dark: #111827;     /* 更深导航 */

  /* 文字色 - 四级字号 32/26/22/18px */
  --color-text: #1F2937;         /* 深灰 - 正文 */
  --color-text-mid: #6B7280;     /* 中灰 - 辅助说明 */
  --color-text-light: #9CA3AF;   /* 浅灰 - 次要信息 */

  /* 功能色 */
  --color-green: #22C55E;        /* 增长绿 - 环比增长箭头（语义化） */
  --color-green-dark: #16A34A;
  --color-gold-tag: #D4A847;     /* 示范企业标签 */
  --color-red-tag: #C41E3A;      /* 龙头企业标签 */
  --color-green-tag: #22C55E;    /* 合规作坊标签 */

  /* 字体 */
  --font-sans: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "STKaiti", "KaiTi", "STSong", "SimSun", serif;

  /* 四级字号规范 */
  --fs-xl: 32px;   /* 一级标题 */
  --fs-lg: 26px;   /* 二级标题 */
  --fs-md: 22px;   /* 三级标题 */
  --fs-base: 18px; /* 正文基准 */
  --fs-sm: 15px;   /* 辅助文字 */
  --fs-xs: 13px;   /* 次要信息 */

  /* 圆角 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);

  /* 间距 */
  --space-section: 60px;
  --container-max: 1200px;
}

/* ===== 基础重置 ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg-warm);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--color-red);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-red-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* ===== 布局容器 ===== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: var(--space-section) 0;
}

.section--cream {
  background-color: var(--color-bg-cream);
}

/* 非遗纹样水印背景（CSS生成，无需图片） */
.section--pattern {
  background-color: var(--color-bg-cream);
  background-image:
    radial-gradient(circle at 20% 50%, rgba(200, 164, 92, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(178, 34, 34, 0.03) 0%, transparent 50%);
}

/* ===== 标题样式 ===== */
.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
  position: relative;
  display: inline-block;
  padding-bottom: 16px;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-gold), var(--color-red), var(--color-gold));
  border-radius: 2px;
}

.section-title p {
  margin-top: 12px;
  color: var(--color-text-mid);
  font-size: 1rem;
}

.section-title--left {
  text-align: left;
}

.section-title--left h2::after {
  left: 0;
  transform: none;
}

/* ===== 工具类 ===== */
.text-red { color: var(--color-red); }
.text-gold { color: var(--color-gold); }
.text-center { text-align: center; }
.text-mid { color: var(--color-text-mid); }

.bg-warm { background-color: var(--color-bg-warm); }
.bg-cream { background-color: var(--color-bg-cream); }

.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

/* ===== 非遗装饰元素 ===== */
.deco-corner {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 2px solid var(--color-gold);
  opacity: 0.5;
}

.deco-corner--tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.deco-corner--tr { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.deco-corner--bl { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.deco-corner--br { bottom: 10px; right: 10px; border-left: none; border-top: none; }

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-cream);
}

::-webkit-scrollbar-thumb {
  background: var(--color-gold);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-red);
}

/* 选中文本 */
::selection {
  background: var(--color-gold-light);
  color: var(--color-red-dark);
}

/* 动画 */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* 打字机光标 */
.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--color-gold);
  margin-left: 4px;
  vertical-align: middle;
  animation: blink 1s infinite;
}
