/* ==========================================================================
   B2B Factory OnePage - 核心工业视觉与布局样式表
   配色基调：工业深空蓝灰 (#090E17 / #131B2E) + 精密科技青 (#0EA5E9) + 旗舰香槟金 (#F59E0B)
   ========================================================================== */

:root {
  /* 基础颜色变量 (深色工业模式默认) */
  --bg-body: #090e17;
  --bg-surface: #0f172a;
  --bg-card: #152238;
  --bg-card-hover: #1c2e4c;
  --bg-glass: rgba(15, 23, 42, 0.85);
  --border-subtle: #1e293b;
  --border-active: #334155;
  --border-highlight: #0ea5e9;

  /* 文字颜色 */
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-white: #ffffff;

  /* 品牌与强调色 */
  --cyan-primary: #0ea5e9;
  --cyan-glow: rgba(14, 165, 233, 0.35);
  --cyan-hover: #38bdf8;
  --gold-primary: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.3);
  --green-status: #10b981;
  --green-glow: rgba(16, 185, 129, 0.4);

  /* 空间与圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --container-max: 1240px;
  --header-height: 72px;

  /* 字体系统 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", Consolas, Monaco, monospace;
}

/* 车间强光浅色模式 (High-Contrast Workshop Mode) - Accent加深满足WCAG AA 4.5:1 */
body.theme-light {
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #f1f5f9;
  --bg-card-hover: #e2e8f0;
  --bg-glass: rgba(255, 255, 255, 0.94);
  --border-subtle: #cbd5e1;
  --border-active: #64748b;
  --border-highlight: #0369a1;

  --text-main: #0f172a;
  --text-muted: #334155;
  --text-dim: #475569;
  --text-white: #0f172a;

  /* Accent 统一加深，提高辨识度与文字对比度 (> 5.6:1) */
  --cyan-primary: #0369a1;
  --cyan-glow: rgba(3, 105, 161, 0.2);
  --cyan-hover: #075985;
  --gold-primary: #b45309;
}

/* 全局重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* 顶部演示版本悬浮胶囊控制条 (仅供销售/开发演示切换) */
.demo-switcher-capsule {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-full);
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.demo-switcher-capsule .badge-tag {
  font-size: 11px;
  color: var(--gold-primary);
  font-weight: 700;
  padding: 2px 8px;
  letter-spacing: 0.5px;
}

.edition-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.edition-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.edition-btn.active {
  background: var(--cyan-primary);
  color: #ffffff;
  box-shadow: 0 0 12px var(--cyan-glow);
}

.edition-btn.active.gold {
  background: var(--gold-primary);
  box-shadow: 0 0 12px var(--gold-glow);
}

/* 页面顶部导航栏 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
}

.header-container {
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 品牌 Logo 与企业名称 */
.brand-box {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--cyan-primary), #1e40af);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 0 16px var(--cyan-glow);
}

.brand-info h1 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.demo-chip {
  font-size: 10px;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.2);
  color: var(--gold-primary);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 1px 6px;
  border-radius: 4px;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-dim);
}

/* 顶部导航菜单 */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
  padding: 6px 2px;
}

.nav-link:hover, .nav-link.active {
  color: var(--cyan-hover);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--cyan-primary);
  border-radius: 2px;
}

/* 顶部操作工具组 (语言/主题/产线状态) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 产线排期状态指示呼吸灯 */
.pulse-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--green-status);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pulse-status-badge:hover {
  background: rgba(16, 185, 129, 0.22);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-status);
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  background: var(--green-status);
  opacity: 0.75;
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* 四国语言切换器 (V3.0 Flagship 专享) */
.lang-selector {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--cyan-primary);
  color: #fff;
}

/* 主题模式切换按钮 */
.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
}

/* 导出 PDF 审厂档案按钮 (V3.0 专享) */
.btn-export-pdf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.25));
  border: 1px solid var(--gold-primary);
  color: var(--gold-primary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-export-pdf:hover {
  background: var(--gold-primary);
  color: #000;
  box-shadow: 0 0 16px var(--gold-glow);
}

/* 通用容器与栅格 */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section-block {
  padding: 80px 0;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan-primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  padding: 2px 10px;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: var(--radius-full);
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
}

/* 按钮基础类 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--cyan-primary);
  color: #ffffff;
  box-shadow: 0 4px 16px var(--cyan-glow);
}

.btn-primary:hover {
  background: var(--cyan-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  border-color: var(--border-active);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--cyan-primary);
}

.btn-gold {
  background: var(--gold-primary);
  color: #000;
  font-weight: 700;
}

/* 工业卡片基础样式 */
.industry-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.industry-card:hover {
  border-color: var(--cyan-primary);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

/* 移动端底部毛玻璃悬浮舱 (微信端常驻) */
.mobile-dock-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-active);
  padding: 8px 12px 14px;
}

.dock-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.dock-item-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  text-decoration: none;
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  min-height: 48px;
}

.dock-item-btn.highlight {
  background: var(--cyan-primary);
  color: #ffffff;
  border-color: var(--cyan-primary);
}

.dock-icon {
  font-size: 16px;
}

/* ==========================================================================
   三级商业版本控制开关 (Edition Switch Matrix)
   .edition-basic: 1000 元标准版 (隐藏高阶估价、3D检视器多模式、2.5D沙盘、多语言)
   .edition-pro: 1800 元审厂互动版 (激活呼吸灯、公差匹配、滑动对比、工序抽屉)
   .edition-flagship: 3000 元旗舰展厅版 (全开)
   ========================================================================== */

/* 1000元基础版 (basic)：隐藏进阶交互 */
body.edition-basic .pro-feature,
body.edition-basic .flagship-feature {
  display: none !important;
}

/* 1800元Pro版 (pro)：隐藏旗舰版专属交互 */
body.edition-pro .flagship-feature {
  display: none !important;
}

/* 响应式断点适配 */
@media (max-width: 1024px) {
  .nav-menu {
    display: none;
  }
  .section-block {
    padding: 60px 0;
  }
}

@media (max-width: 768px) {
  .demo-switcher-capsule {
    top: auto;
    bottom: 74px;
    right: 12px;
    padding: 2px 4px;
    font-size: 11px;
  }
  .edition-btn {
    padding: 4px 8px;
    font-size: 11px;
  }
  .mobile-dock-bar {
    display: block;
  }
  body {
    padding-bottom: 76px;
  }
  .section-title {
    font-size: 24px;
  }
  .section-block {
    padding: 48px 0;
  }
}
