/* 企微桥 WeComBridge —— 全站品牌规范
   主色 #07c160（企微绿）；暗色默认，亮色经 [data-theme="light"] 切换
   （JS：localStorage 优先，无则跟随 prefers-color-scheme） */
:root {
  --green: #07c160;
  --green-dim: #05a34f;
  --bg: #10141a;
  --card: #181d25;
  --card2: #1e242e;
  --border: #262d38;
  --text: #e6e9ee;
  --text-dim: #9aa5b1;
  --text-faint: #6b7684;
  --nav-bg: rgba(16, 20, 26, .92);
  --radius: 10px;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f5f7fa;
  --card: #ffffff;
  --card2: #eef1f5;
  --border: #dfe4ea;
  --text: #1f2430;
  --text-dim: #5a6572;
  --text-faint: #8a95a3;
  --nav-bg: rgba(255, 255, 255, .92);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f5f7fa;
    --card: #ffffff;
    --card2: #eef1f5;
    --border: #dfe4ea;
    --text: #1f2430;
    --text-dim: #5a6572;
    --text-faint: #8a95a3;
    --nav-bg: rgba(255, 255, 255, .92);
    color-scheme: light;
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 导航 */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 28px;
  position: relative;
}
.nav .logo { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: .5px; }
.nav .logo .dot { color: var(--green); }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--text-dim); font-size: 15px; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.btn { color: #fff; }

/* 按钮 */
.btn {
  display: inline-block; padding: 10px 22px; border-radius: 8px;
  background: var(--green); color: #fff !important; font-weight: 600;
  border: none; cursor: pointer; font-size: 15px; transition: background .15s;
}
.btn:hover { background: var(--green-dim); text-decoration: none; }
.btn-outline {
  background: transparent; color: var(--text) !important;
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--green); color: var(--green) !important; }
.btn-lg { padding: 14px 34px; font-size: 17px; }

/* 区块 */
section { padding: 72px 24px; }
.sec-inner { max-width: 1100px; margin: 0 auto; }
.sec-title { font-size: 30px; font-weight: 700; margin-bottom: 10px; text-align: center; }
.sec-sub { color: var(--text-dim); text-align: center; max-width: 640px; margin: 0 auto 44px; }

/* 卡片网格 */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: transform .15s, border-color .15s;
}
.card:hover { transform: translateY(-3px); border-color: var(--green); }
.card .ico { font-size: 26px; margin-bottom: 12px; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: 14.5px; }

/* hero */
.hero { text-align: center; padding: 100px 24px 80px; }
.hero h1 { font-size: 44px; font-weight: 800; line-height: 1.2; margin-bottom: 18px; }
.hero h1 .accent { color: var(--green); }
.hero p { font-size: 18px; color: var(--text-dim); max-width: 640px; margin: 0 auto 34px; }
.hero .btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .trust { margin-top: 34px; color: var(--text-faint); font-size: 13.5px; }

/* 数字横幅 */
.stats { display: flex; justify-content: center; gap: 60px; flex-wrap: wrap; margin-top: 56px; }
.stats .stat { text-align: center; }
.stats .num { font-size: 36px; font-weight: 800; color: var(--green); }
.stats .lbl { color: var(--text-faint); font-size: 13.5px; margin-top: 2px; }

/* 对照表 */
table.compare { width: 100%; border-collapse: collapse; margin-top: 24px; }
table.compare th, table.compare td {
  padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border);
  font-size: 14.5px;
}
table.compare th { color: var(--text-dim); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
table.compare td:first-child { font-weight: 600; white-space: nowrap; }

/* FAQ */
.faq details {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 12px;
}
.faq summary { font-weight: 600; cursor: pointer; font-size: 16px; }
.faq details p { color: var(--text-dim); margin-top: 10px; font-size: 14.5px; }

/* 联系 / 申请 */
.apply { text-align: center; }
.apply form { max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.apply input, .apply textarea, .apply select {
  padding: 12px 16px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-size: 15px; font-family: inherit;
}
.apply input:focus, .apply textarea:focus, .apply select:focus { outline: none; border-color: var(--green); }
.apply textarea { min-height: 90px; resize: vertical; }
.apply .hint { color: var(--text-faint); font-size: 12.5px; }
.apply .msg { margin-top: 12px; font-size: 14.5px; }

/* footer */
.footer { border-top: 1px solid var(--border); padding: 44px 24px; margin-top: 40px; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer .col h4 { font-size: 15px; margin-bottom: 12px; color: var(--text); }
.footer .col a, .footer .col p { display: block; color: var(--text-dim); font-size: 14px; margin-bottom: 7px; }
.footer .copy { margin-top: 30px; text-align: center; color: var(--text-faint); font-size: 13px; }

/* 汉堡按钮（桌面隐藏；需在媒体查询前定义，避免被 display:none 覆盖） */
.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; margin-left: auto; cursor: pointer;
  background: none; border: none; padding: 0;
}
.nav-toggle span {
  display: block; height: 2px; width: 22px; background: var(--text);
  border-radius: 2px; transition: transform .25s, opacity .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 主题切换按钮（太阳/月亮，按当前主题显隐） */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; cursor: pointer;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: 0; font-size: 16px; transition: border-color .15s;
}
.theme-toggle:hover { border-color: var(--green); }
.theme-toggle .icon-moon { display: inline; }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: inline; }
/* 移动端：主题按钮靠 logo，汉堡按钮推最右 */
@media (max-width: 720px) {
  .theme-toggle { margin-left: 0; }
  .nav-toggle { margin-left: auto; }
}

/* 简单响应式 */
@media (max-width: 720px) {
  .hero { padding: 64px 20px 56px; }
  .hero h1 { font-size: 28px; }
  .hero p { font-size: 16px; }
  section { padding: 48px 16px; }
  .sec-title { font-size: 24px; }
  .stats { gap: 22px; }
  .stats .num { font-size: 28px; }
  .grid { grid-template-columns: 1fr; }
  .card { padding: 20px; }
  .nav-inner { padding: 12px 16px; }
  /* 汉堡菜单 */
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--nav-bg);
    flex-direction: column; gap: 0; margin-left: 0;
    border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .nav-links.open { max-height: 360px; }
  .nav-links a { padding: 14px 20px; border-top: 1px solid var(--border); }
  .nav-links a.btn { margin: 10px 16px; border-radius: 8px; text-align: center; }
  /* 表格移动端横向滚动 */
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.compare, table { min-width: 640px; }
  /* 演示截图自适应 */
  #demo .card img { max-height: 320px; object-fit: cover; object-position: top; }
  .faq details { padding: 14px 16px; }
  .footer { padding: 32px 16px; }
  .footer-inner { flex-direction: column; gap: 20px; }
  .apply form { max-width: 100%; }
}

/* 桌面端 nav-links 保持正常定位 */
@media (min-width: 721px) {
  .nav-links { position: static; background: none; flex-direction: row; max-height: none; overflow: visible; }
  .nav-links a { padding: 0; border: none; }
  .nav-links a.btn { margin: 0; }
}
