/**
 * 全域AI运营智能体 · 全局样式系统
 * ================================================
 * 全站唯一公共样式源。所有页面必须引用此文件。
 * 修改公共样式只改这里，不要在页面内联重复定义。
 *
 * 目录：
 *   1. 设计 Token（颜色/字体/间距/圆角/阴影）
 *   2. 基础重置与排版
 *   3. 布局容器
 *   4. 导航栏
 *   5. 按钮
 *   6. 面包屑
 *   7. 卡片
 *   8. 表单元素
 *   9. 标签与徽章
 *  10. 页脚
 *  11. 工具类
 *  12. 响应式断点
 */

/* ============================================================
   1. 设计 Token
   ============================================================ */
:root {
  /* 主色 */
  --p: #6366f1;
  --p2: #8b5cf6;
  --accent: #4f46e5;
  --p-light: #eef2ff;
  --p-light-2: #e0e7ff;
  --p-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);

  /* 功能色 */
  --ok: #10b981;
  --ok-light: #ecfdf5;
  --ok-border: #a7f3d0;
  --ok-text: #047857;
  --warn: #f59e0b;
  --warn-light: #fffbeb;
  --warn-border: #fde68a;
  --warn-text: #b45309;
  --err: #ef4444;
  --err-light: #fef2f2;
  --err-border: #fecaca;
  --err-text: #b91c1c;

  /* 中性色 */
  --ink: #0b1220;
  --ink-2: #1e293b;
  --text: #334155;
  --text-2: #64748b;
  --text-3: #94a3b8;
  --line: #e8ecf2;
  --line-2: #f1f5f9;
  --bg: #f8fafc;
  --bg-2: #f6f8fc;
  --white: #fff;

  /* 深色区块 */
  --dark-bg: #0b1220;
  --dark-bg-2: #1e1b4b;
  --dark-text: #a5b4fc;
  --dark-text-2: #c7d2fe;

  /* 圆角 */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* 阴影 */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .04);
  --shadow: 0 4px 16px rgba(15, 23, 42, .06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .09);
  --shadow-xl: 0 18px 44px rgba(30, 41, 59, .1);
  --shadow-primary: 0 8px 20px rgba(99, 102, 241, .3);

  /* 间距 */
  --sp-xs: 8px;
  --sp-sm: 12px;
  --sp: 16px;
  --sp-md: 24px;
  --sp-lg: 32px;
  --sp-xl: 48px;
  --sp-2xl: 64px;

  /* 字号 */
  --fs-xs: 12px;
  --fs-sm: 13.5px;
  --fs-base: 15px;
  --fs-md: 16px;
  --fs-lg: 19px;
  --fs-xl: 24px;
  --fs-2xl: 30px;
  --fs-3xl: 40px;

  /* 字体 */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;

  /* 容器宽度 */
  --container: 1180px;
  --container-narrow: 900px;
  --container-doc: 820px;

  /* 导航高度 */
  --nav-h: 64px;
}

/* ============================================================
   2. 基础重置与排版
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  color: var(--ink-2);
  background: var(--bg);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--p); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; }

h1, h2, h3, h4, h5, h6 { color: var(--ink); line-height: 1.35; font-weight: 700; }

p { line-height: 1.85; }

ul, ol { margin-left: 22px; }

code {
  background: var(--p-light);
  color: var(--accent);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 13px;
  font-family: Consolas, Monaco, monospace;
}

pre {
  background: var(--dark-bg);
  color: #e2e8f0;
  padding: 16px 18px;
  border-radius: var(--r);
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
  margin: 12px 0 16px;
}
pre code { background: none; color: inherit; padding: 0; }

/* ============================================================
   3. 布局容器
   ============================================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 24px; }
.container-doc { max-width: var(--container-doc); margin: 0 auto; padding: 0 24px; }

/* ============================================================
   4. 导航栏（全站统一，任何页面不得覆盖）
   ============================================================ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: 0 1px 0 var(--line);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  flex: 0 0 auto;
  text-decoration: none;
}
.nav-logo:hover { text-decoration: none; }

.nav-logo .mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--p-gradient);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex: 0 0 auto;
}

.nav-menu {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 3px;
}

.nav-menu a {
  position: relative;
  display: block;
  padding: 8px 13px;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: #475569;
  white-space: nowrap;
  flex: 0 0 auto;
  text-decoration: none;
  transition:
    color .28s cubic-bezier(.4,0,.2,1),
    background .28s cubic-bezier(.4,0,.2,1),
    transform .28s cubic-bezier(.4,0,.2,1);
}
.nav-menu a::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--p-gradient);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .32s cubic-bezier(.4,0,.2,1), opacity .32s;
  opacity: 0;
}
.nav-menu a:hover {
  color: var(--p);
  background: #f2f5ff;
  transform: translateY(-1px);
  text-decoration: none;
}
.nav-menu a:hover::after {
  transform: scaleX(1);
  opacity: 1;
}
.nav-menu a.on {
  color: var(--p);
  font-weight: 700;
  background: var(--p-light);
}
.nav-menu a.on::after {
  transform: scaleX(1);
  opacity: 1;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 14px;
  flex: 0 0 auto;
}

.btn-nav-ghost {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  background: var(--white);
  border: 1px solid #e2e8f0;
  white-space: nowrap;
  text-decoration: none;
  transition: all .18s;
}
.btn-nav-ghost:hover { border-color: var(--p); color: var(--p); background: #f8faff; text-decoration: none; }

.btn-nav-primary {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  background: var(--p-gradient);
  border: none;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(99, 102, 241, .3);
  transition: all .18s;
}
.btn-nav-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(99,102,241,.45); text-decoration: none; }

/* 兼容旧类名 */
.btn-nav { display: none !important; }

/* ============================================================
   5. 按钮
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all .2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--p-gradient);
  color: var(--white);
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(99, 102, 241, .45); text-decoration: none; }

.btn-ghost {
  background: var(--white);
  color: var(--p);
  border: 1px solid rgba(99, 102, 241, .3);
}
.btn-ghost:hover { background: #f5f6ff; border-color: var(--p); text-decoration: none; }

.btn-outline-light {
  background: rgba(255, 255, 255, .08);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .45);
}
.btn-outline-light:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .7); text-decoration: none; }

/* ============================================================
   6. 面包屑（二级页面返回导航）
   ============================================================ */
.breadcrumb {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 24px 0;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: var(--fs-sm);
  color: var(--text-2);
}
.breadcrumb a { color: var(--p); font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .bc-sep { color: #cbd5e1; font-size: 14px; }
.breadcrumb .bc-cur { color: var(--text-2); font-weight: 600; }

/* ============================================================
   7. 卡片
   ============================================================ */
.card-base {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 24px;
}

.card-hover { transition: all .25s; }
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--p-light-2);
}

/* ============================================================
   8. 表单元素
   ============================================================ */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink-2);
  background: var(--white);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--p);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}
textarea { resize: vertical; min-height: 80px; }

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.field-label .req { color: var(--err); margin-left: 2px; }

.choice-group { display: flex; gap: 9px; flex-wrap: wrap; }
.choice {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-size: var(--fs-sm);
  transition: all .15s;
  user-select: none;
}
.choice:hover { border-color: var(--p-light-2); background: #f8faff; }
.choice input { margin: 0; accent-color: var(--p); }
.choice.on { border-color: var(--p); background: var(--p-light); color: var(--p); font-weight: 600; }

/* ============================================================
   9. 标签与徽章
   ============================================================ */
.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 700;
}
.tag-p { background: var(--p-light); color: var(--accent); }
.tag-ok { background: var(--ok-light); color: var(--ok-text); }
.tag-warn { background: var(--warn-light); color: var(--warn-text); }
.tag-err { background: var(--err-light); color: var(--err-text); }

/* 状态提示条 */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: var(--fs-sm);
  line-height: 1.7;
  margin-bottom: 16px;
}
.alert-ok { background: var(--ok-light); color: var(--ok-text); border: 1px solid var(--ok-border); }
.alert-err { background: var(--err-light); color: var(--err-text); border: 1px solid var(--err-border); }
.alert-warn { background: var(--warn-light); color: var(--warn-text); border: 1px solid var(--warn-border); }
.alert-info { background: var(--p-light); color: var(--accent); border: 1px solid var(--p-light-2); }

/* ============================================================
   10. 页脚（全站统一结构）
   ============================================================ */
footer {
  background: var(--dark-bg);
  color: #8b94a7;
  padding: 40px 24px 34px;
  font-size: 13px;
  line-height: 1.9;
  text-align: center;
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
}

.footer-brand {
  color: #cbd5e1;
  font-weight: 600;
  font-size: 13.5px;
  margin-bottom: 12px;
}

.footer-info {
  font-size: 12.5px;
  color: #6b7280;
  line-height: 1.9;
}
.footer-info a { color: var(--dark-text); }
.footer-info a:hover { color: var(--white); text-decoration: none; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.footer-links a {
  color: #8b94a7;
  font-size: 12.5px;
  white-space: nowrap;
}
.footer-links a:hover { color: var(--white); text-decoration: none; }

/* ============================================================
   11. 工具类
   ============================================================ */
.text-muted { color: var(--text-2); }
.text-light { color: var(--text-2); }
.text-p { color: var(--p); }
.text-center { text-align: center; }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--sp-sm); }
.mt { margin-top: var(--sp); }
.mt-md { margin-top: var(--sp-md); }
.mt-lg { margin-top: var(--sp-lg); }
.mb-0 { margin-bottom: 0; }
.mb { margin-bottom: var(--sp); }
.mb-md { margin-bottom: var(--sp-md); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-xs { gap: var(--sp-xs); }
.gap-sm { gap: var(--sp-sm); }
.gap { gap: var(--sp); }
.wrap { flex-wrap: wrap; }

/* ============================================================
   12. 响应式断点（统一标准）
   ============================================================ */

/* 大屏：隐藏部分菜单 */
@media (max-width: 1080px) {
  .nav-menu a { padding: 8px 10px; font-size: 13px; }
}

/* 中屏：隐藏菜单，只留 Logo + 按钮 */
@media (max-width: 900px) {
  .nav-menu { display: none; }
  .nav-cta { margin-left: auto; }
}

/* 小屏：精简容器内边距 */
@media (max-width: 760px) {
  .container, .container-narrow, .container-doc { padding: 0 18px; }
  .breadcrumb { padding: 14px 18px 0; font-size: 13px; }
  footer { padding: 28px 18px; }
}

/* 极窄屏：只留注册按钮 */
@media (max-width: 520px) {
  .btn-nav-ghost { display: none; }
}


/* ============================================================
   13. 滚动驱动动画（纯 CSS，零 JS 依赖）
   ------------------------------------------------------------
   用 CSS Scroll-Driven Animations（Chrome/Edge 115+）。
   不支持的浏览器：@supports 判断为 false，元素完全不受影响，
   默认可见 —— 没有任何内容隐藏风险。
   ============================================================ */
@supports (animation-timeline: view()) {
  @keyframes anim-rise {
    from {
      opacity: 0;
      transform: translateY(26px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* 区块标题 */
  .sec-head,
  .sec-head h2,
  .sec-head .kicker {
    animation: anim-rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 55%;
  }

  /* 首屏 Hero：用页面加载动画（不依赖滚动） */
  .hero h1,
  .hero p.sub,
  .hero-cta,
  .hero-stats,
  .hero-badge {
    animation: anim-rise .8s cubic-bezier(.22,.61,.36,1) both;
  }
  .hero p.sub { animation-delay: .1s; }
  .hero-cta { animation-delay: .2s; }
  .hero-stats { animation-delay: .3s; }

  /* 卡片类：滚动进入时淡入上移 */
  .feat-card,
  .st-card,
  .case-card,
  .price-card,
  .review-card,
  .pain-item,
  .svc,
  .form-card,
  .show-item,
  .compare-card,
  .faq-item,
  .contact-item,
  .agent-card,
  .stage,
  .flow-item,
  .ver-item,
  .case-tile {
    animation: anim-rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 60%;
  }
}

/* 用户要求减少动效时彻底关闭 */
@media (prefers-reduced-motion: reduce) {
  .hero h1, .hero p.sub, .hero-cta, .hero-stats, .hero-badge,
  .sec-head, .sec-head h2, .sec-head .kicker,
  .feat-card, .st-card, .case-card, .price-card, .review-card,
  .pain-item, .svc, .form-card, .show-item, .compare-card,
  .faq-item, .contact-item, .agent-card, .stage, .flow-item,
  .ver-item, .case-tile {
    animation: none !important;
  }
}


/* ============================================================
   14. 深色区块文字颜色强制
   ------------------------------------------------------------
   global.css 的 h1-h6 基础规则是深色 var(--ink)。
   任何深色背景区块内的标题都必须显式设白色，
   否则会变成「深色字 + 深色底」完全看不清。
   此规则覆盖全站所有深色容器。
   ============================================================ */
.hero, .showcase, .custom, .contact, .cta, .dark-sec { color: #fff; }

.hero h1, .hero h2, .hero h3, .hero h4, .hero h5, .hero h6,
.showcase h1, .showcase h2, .showcase h3, .showcase h4, .showcase h5, .showcase h6,
.custom h1, .custom h2, .custom h3, .custom h4,
.contact h1, .contact h2, .contact h3, .contact h4,
.cta h1, .cta h2, .cta h3, .cta h4,
.dark-sec h1, .dark-sec h2, .dark-sec h3, .dark-sec h4 {
  color: #fff;
}

/* 深色区块内的小标题、说明文字统一用浅紫 */
.hero .hero-badge, .hero .hero-badge span,
.showcase .kicker, .custom .custom-kicker, .contact .kicker {
  color: #c7d2fe;
}
.showcase p, .contact p {
  color: #a5b4fc;
}
.showcase .sec-head p, .contact .sec-head p {
  color: #a5b4fc;
}
