/* 设计系统 - 对齐 Next.js 原版 */
:root {
  --primary: #006EFF;
  --primary-50: #e6f2ff;
  --primary-100: #cce5ff;
  --surface-50: #fafbfc;
  --surface-100: #f5f7fa;
  --surface-200: #e8ecf1;
  --surface-300: #d9e0e8;
  --gray-900: #0f172a;
  --gray-700: #334155;
  --gray-600: #475569;
  --gray-500: #64748b;
  --gray-400: #94a3b8;
  --max-w: 72rem;
  --section-pad: 3.5rem 1rem;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; }
body {
  margin: 0;
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--surface-50);
  color: var(--gray-700);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}

/* 布局工具类 - 替代 Tailwind */
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.top-20 { top: 5rem; }
.left-10 { left: 2.5rem; }
.bottom-32 { bottom: 8rem; }
.right-10 { right: 2.5rem; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.min-h-screen { min-height: 100vh; }
.w-full { width: 100%; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }

/* 间距 */
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.pt-20 { padding-top: 5rem; }
.pb-16 { padding-bottom: 4rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* 尺寸 */
.w-64 { width: 16rem; }
.h-64 { height: 16rem; }
.w-48 { width: 12rem; }
.h-48 { height: 12rem; }
.rounded-full { border-radius: 9999px; }

/* 背景图案 */
.bg-pattern-dots {
  background-image: radial-gradient(rgba(0, 110, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}
.bg-pattern-grid {
  background-image:
    linear-gradient(rgba(0, 110, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 110, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* 图标 - 无背景，大尺寸 */
.icon-lg { font-size: 2rem; line-height: 1; }
.icon-xl { font-size: 2.5rem; line-height: 1; }
.icon-2xl { font-size: 3rem; line-height: 1; }

/* 主色 */
.primary { color: var(--primary); }
.bg-primary { background: var(--primary); }
.bg-primary-50 { background: var(--primary-50); }
.bg-primary-100 { background: var(--primary-100); }

/* 按钮 - 移动端最小 44px 触控区域 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  min-height: 44px;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
}
.btn:hover { transform: scale(1.02); }
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover { background: #1890FF; }
.btn-cta {
  padding: 1rem 2rem;
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(0, 110, 255, 0.4);
}
.btn-cta:hover {
  box-shadow: 0 6px 20px rgba(0, 110, 255, 0.5);
}
.btn-secondary {
  background: white;
  color: var(--gray-700);
  border: 1px solid var(--surface-300);
}
.btn-secondary:hover { background: var(--surface-100); }

/* 输入框 - 16px 防止 iOS 聚焦时自动放大 */
.input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--surface-200);
  border-radius: 0.5rem;
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 110, 255, 0.2);
}

/* 卡片 */
.card {
  border: 1px solid var(--surface-200);
  border-radius: 1rem;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  border-color: rgba(0, 110, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.shadow-card { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); }

/* Section 通用 - 移动端减少上下留白 */
.section {
  position: relative;
  padding: 2.5rem 1rem;
}
.section-inner {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
.section-narrow { max-width: 40rem; }
.section-medium { max-width: 56rem; }
.section-alt { border-top: 1px solid var(--surface-200); }

/* 区块标题 */
.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  line-height: 1;
  flex-shrink: 0;
}
.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
}
.section-subtitle {
  font-size: 0.875rem;
  color: var(--gray-500);
  margin: 0.25rem 0 0;
}

/* 正文可读性 */
.text-body { font-size: 1rem; line-height: 1.7; }
.text-body-sm { font-size: 0.9375rem; line-height: 1.65; }

/* 效率鸿沟表格 - 桌面端 */
.compare-table-wrap { overflow: visible; }
@media (min-width: 640px) {
  .compare-table-wrap { overflow-x: auto; }
}

/* 效率鸿沟 - 移动端卡片（紧凑一屏） */
.compare-cards { display: none; flex-direction: column; gap: 0; }
.compare-table-m {
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  border: 1px solid var(--surface-200);
}
.compare-header-m {
  width: 100%;
}
.compare-header-m .compare-split-m {
  width: 100%;
  box-sizing: border-box;
}
.compare-header-old-m,
.compare-header-new-m {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.compare-header-old-m {
  background: #fecaca;
  color: #b91c1c;
  border-right: 1px solid var(--surface-200);
}
.compare-header-new-m {
  background: var(--primary);
  color: white;
}
.compare-card-m {
  background: white;
  overflow: hidden;
  border-top: 1px solid var(--surface-200);
}
.compare-dim-m {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--gray-900);
  padding: 0.5rem 1rem 0.375rem;
  background: var(--surface-50);
  letter-spacing: 0.02em;
}
.compare-split-m {
  display: flex;
  flex-direction: row;
  gap: 0;
  width: 100%;
  box-sizing: border-box;
}
.compare-old-m,
.compare-new-m {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1.4;
  min-width: 0;
  word-break: break-word;
}
.compare-old-m {
  background: rgba(254,226,226,0.3);
  color: var(--gray-700);
  border-right: 1px solid var(--surface-200);
}
.compare-new-m {
  background: rgba(230,242,255,0.5);
  color: var(--gray-900);
  font-weight: 500;
}
.compare-tag-m {
  flex-shrink: 0;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 0.2rem;
  letter-spacing: 0.05em;
}
.compare-tag-old {
  background: #fecaca;
  color: #b91c1c;
}
.compare-tag-new {
  background: var(--primary);
  color: white;
}
@media (max-width: 639px) {
  .compare-table-wrap .compare-table { display: none !important; }
  .compare-table-wrap .compare-cards { display: flex !important; }
  .compare-table-wrap { padding: 0.5rem !important; }
  .compare-section-header { margin-bottom: 1rem !important; }
  .compare-section-header h2 { font-size: 1.25rem !important; }
  .compare-section-header p { font-size: 0.8125rem !important; }
  .section-alt .section-inner > p { margin-top: 1rem !important; font-size: 0.8125rem !important; }
}

/* AI 落地五步法 - 步骤编号渐变 */
.step-num {
  width: 3rem; height: 3rem;
  border-radius: 0.75rem;
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.step-num-1 { background: linear-gradient(135deg, #006EFF, #1890FF); }
.step-num-2 { background: linear-gradient(135deg, #1890FF, #40A9FF); }
.step-num-3 { background: linear-gradient(135deg, #006EFF, #40A9FF); }
.step-num-4 { background: linear-gradient(135deg, #1890FF, #69C0FF); }
.step-num-5 { background: linear-gradient(135deg, #0050D0, #006EFF); }

/* AIX 的 X 旋转动画：每 5 秒转 2 圈 */
.aix-x {
  display: inline-block;
  color: var(--primary);
  font-weight: 700;
  animation: aix-x-spin 5s ease-in-out infinite;
}
@keyframes aix-x-spin {
  0% { transform: rotate(0deg); }
  6% { transform: rotate(720deg); }
  100% { transform: rotate(720deg); }
}

/* 龙虾 AI 军团实战案例 */
.lobster-case-layout { align-items: stretch; }
.timeline-item:hover { background: rgba(0,110,255,0.06) !important; }
@media (max-width: 639px) {
  .lobster-contrast-card { max-width: none !important; }
  .lobster-case-layout { flex-direction: column; }
}

/* Modal 关闭按钮 */
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem;
  min-width: 2.25rem;
  min-height: 2.25rem;
  border: none;
  background: var(--surface-100);
  color: var(--gray-500);
  cursor: pointer;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: background 0.2s, color 0.2s;
}
.modal-close:hover {
  background: var(--surface-200);
  color: var(--gray-700);
}

/* 预约弹窗 - 单选/多选样式 */
.radio-opt {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--surface-200);
  cursor: pointer;
  font-size: 0.875rem;
}
.radio-opt:hover { border-color: rgba(0, 110, 255, 0.3); }
.radio-opt input { accent-color: var(--primary); }
.radio-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--surface-200);
  cursor: pointer;
  font-size: 0.8125rem;
}
.radio-chip:hover { border-color: rgba(0, 110, 255, 0.3); }
.radio-chip input { accent-color: var(--primary); }

/* Modal 居中 - 移动端全屏 */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  padding-bottom: env(safe-area-inset-bottom);
}

/* 顶部导航 - 100% 横向铺满，安全区 */
#header {
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
.header-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.75rem 1rem;
  box-sizing: border-box;
}
@media (min-width: 1280px) {
  .header-inner { padding-left: 2rem; padding-right: 2rem; }
}

/* ========== 移动端优先 (默认) ========== */
/* Hero 横向标签 */
.hero-stats-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.5rem;
  max-width: 36rem;
  margin: 0 auto;
  font-size: 0.875rem;
}
.hero-tag {
  font-weight: 500;
  color: var(--gray-700);
}
.hero-tag-sep {
  color: var(--gray-400);
  font-weight: 300;
}
@media (min-width: 768px) {
  .hero-section { padding: 5rem 1rem 4rem !important; }
}
/* 四大增长引擎 - 移动端单列 */
@media (max-width: 639px) {
  .section-inner { padding-left: 0.75rem; padding-right: 0.75rem; }
  .section { padding: 2rem 0.75rem; }
}
/* 预约弹窗 - 移动端单选/多选增大触控区 */
@media (max-width: 639px) {
  .radio-opt { padding: 0.75rem 1rem; min-height: 44px; }
  .radio-chip { padding: 0.5rem 1rem; min-height: 40px; }
  #modalContent { max-width: 100%; max-height: 95vh; margin: 0.5rem; }
}

/* ========== 平板及以上 ========== */
@media (min-width: 640px) { .sm-block { display: block !important; } }
@media (min-width: 768px) {
  .section { padding: 4rem 1rem; }
}
@media (min-width: 1024px) {
  .section { padding: 5rem 1rem; }
  .cta-section { padding: 5rem 1rem !important; }
  .hero-wrap { flex-direction: row !important; align-items: center; gap: 4rem; }
  .hero-text { text-align: left !important; }
  .hero-stats { justify-content: flex-start; margin-left: 0 !important; }
  .hero-cta { justify-content: flex-start !important; }
  .section-header { margin-bottom: 3rem; }
}
