/* ============================================================
   智达恒通 — 网站全面优化样式
   设计对标：Google Gemini / OpenAI / Anthropic
   原则：不丢弃任何已有设计，只增强
   ============================================================ */

/* ==================== 全局变量升级 ==================== */
:root[data-theme="dark"] {
  /* 主色调 — 科技蓝 + 深空背景 */
  --bg: #0a0e1a;
  --surface: #111827;
  --surface-2: #1a2236;
  --border: #1e293b;
  --text: #f1f5f9;
  --text-dim: #94a3b8;
  --blue: #3b82f6;
  --blue-glow: rgba(59, 130, 246, 0.3);
  --emerald: #10b981;
  --amber: #f59e0b;
  --purple: #8b5cf6;
  --gradient-hero: linear-gradient(135deg, #0a0e1a 0%, #111827 40%, #0f172a 100%);
  --gradient-card: linear-gradient(145deg, #111827 0%, #1a2236 100%);
  --gradient-glow: radial-gradient(ellipse at 50% 0%, rgba(59,130,246,0.15) 0%, transparent 60%);
}

:root[data-theme="light"] {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-dim: #64748b;
  --blue: #2563eb;
  --blue-glow: rgba(37, 99, 235, 0.2);
  --emerald: #059669;
  --amber: #d97706;
  --purple: #7c3aed;
  --gradient-hero: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 40%, #f1f5f9 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  --gradient-glow: radial-gradient(ellipse at 50% 0%, rgba(37,99,235,0.08) 0%, transparent 60%);
}

/* ==================== Hero 区块升级 ==================== */
.hero-section {
  position: relative;
  overflow: hidden;
  background: var(--gradient-hero) !important;
  padding: 120px 2rem 80px !important;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 网格背景动画（Google Gemini 风格） */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.15;
  animation: grid-move 20s linear infinite;
  pointer-events: none;
}

@keyframes grid-move {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

/* 光晕效果（Anthropic 风格） */
.hero-section::after {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: var(--gradient-glow);
  border-radius: 50%;
  pointer-events: none;
  animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.8; transform: translateX(-50%) scale(1.05); }
}

.hero-section .hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  text-align: center;
}

/* 主标题 — 大字体 + 渐变色（Google AI 风格） */
.hero-section h1,
.hero-section .hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem) !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem !important;
  background: linear-gradient(135deg, var(--text) 0%, var(--blue) 50%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: title-fade-in 1s ease-out;
}

@keyframes title-fade-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 副标题 */
.hero-section .hero-subtitle,
.hero-section p {
  font-size: clamp(1rem, 2vw, 1.25rem) !important;
  color: var(--text-dim) !important;
  line-height: 1.7 !important;
  max-width: 640px;
  margin: 0 auto 2.5rem !important;
  animation: subtitle-fade-in 1s ease-out 0.2s both;
}

@keyframes subtitle-fade-in {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* CTA 按钮升级（OpenAI 风格） */
.hero-section .btn-primary,
.hero-section a.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px !important;
  font-size: 1.05rem !important;
  font-weight: 600 !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, var(--blue) 0%, var(--purple) 100%) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 4px 20px var(--blue-glow) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  animation: cta-fade-in 1s ease-out 0.4s both;
}

.hero-section .btn-primary:hover,
.hero-section a.btn-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 30px var(--blue-glow), 0 0 40px rgba(139, 92, 246, 0.2) !important;
}

@keyframes cta-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== 功能卡片升级 ==================== */
.feature-card,
.solution-card,
.case-card {
  background: var(--gradient-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 16px !important;
  padding: 2rem !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative;
  overflow: hidden;
}

.feature-card::before,
.solution-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--purple), var(--emerald));
  opacity: 0;
  transition: opacity 0.3s;
}

.feature-card:hover::before,
.solution-card:hover::before {
  opacity: 1;
}

.feature-card:hover,
.solution-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 0 30px var(--blue-glow) !important;
  border-color: var(--blue) !important;
}

/* 卡片图标动画 */
.feature-card .icon,
.solution-card .icon {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover .icon,
.solution-card:hover .icon {
  transform: scale(1.15) rotate(5deg);
}

/* ==================== 区块标题升级 ==================== */
section h2,
.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem) !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em;
  margin-bottom: 1rem !important;
  position: relative;
  display: inline-block;
}

/* 标题下装饰线 */
section h2::after,
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  border-radius: 2px;
  margin: 12px auto 0;
}

/* ==================== 客户案例升级 ==================== */
.case-card {
  border-left: 4px solid var(--blue) !important;
  transition: all 0.3s !important;
}

.case-card:hover {
  border-left-color: var(--emerald) !important;
  transform: translateX(4px) !important;
}

.case-card .case-results {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.case-card .result-item {
  text-align: center;
  flex: 1;
}

.case-card .result-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--emerald);
}

.case-card .result-label {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ==================== 定价卡片升级 ==================== */
.price-card {
  background: var(--gradient-card) !important;
  border: 2px solid var(--border) !important;
  border-radius: 20px !important;
  padding: 2.5rem 2rem !important;
  position: relative;
  transition: all 0.4s !important;
}

.price-card.featured {
  border-color: var(--blue) !important;
  box-shadow: 0 0 40px var(--blue-glow) !important;
  transform: scale(1.02);
}

.price-card.featured::before {
  content: '推荐';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff;
  padding: 4px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ==================== 导航栏升级 ==================== */
.main-nav,
nav[role="navigation"] {
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  background: rgba(10, 14, 26, 0.8) !important;
  border-bottom: 1px solid rgba(30, 41, 59, 0.5) !important;
  transition: all 0.3s !important;
}

.main-nav.scrolled,
nav[role="navigation"].scrolled {
  background: rgba(10, 14, 26, 0.95) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

/* ==================== 页脚升级 ==================== */
.main-footer,
footer {
  background: var(--surface) !important;
  border-top: 1px solid var(--border) !important;
  padding: 4rem 2rem 2rem !important;
}

/* ==================== 全局动画 ==================== */
/* 滚动触发动画（已存在于 shared.js，这里增强） */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* 数字递增动画 */
@keyframes count-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== 响应式微调 ==================== */
@media (max-width: 768px) {
  .hero-section {
    padding: 100px 1.5rem 60px !important;
    min-height: auto !important;
  }
  
  .hero-section h1,
  .hero-section .hero-title {
    font-size: 2rem !important;
  }
  
  .feature-card,
  .solution-card {
    padding: 1.5rem !important;
  }
}

/* ==================== 平滑滚动 ==================== */
html {
  scroll-behavior: smooth;
}

/* ==================== 选择文本颜色 ==================== */
::selection {
  background: var(--blue);
  color: #fff;
}
