/* ===== 主题变量 ===== */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --primary: #0284c7;
  --primary-soft: #e0f2fe;
  --accent: #06b6d4;
  --border: #e2e8f0;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --radius: 16px;
  --nav-bg: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] {
  --bg: #0f172a;
  --surface: #1e293b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --primary: #38bdf8;
  --primary-soft: #0c3350;
  --accent: #22d3ee;
  --border: #334155;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --nav-bg: rgba(15, 23, 42, 0.85);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

.container { width: min(1080px, 92vw); margin: 0 auto; }

/* ===== 桌面端分页 ===== */
.page { display: none; }
.page.active { display: block; animation: pageFade 0.3s ease; }
@keyframes pageFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
/* 短页面也把页脚推到视口下方，避免大片空白 */
.page { min-height: calc(100vh - 62px - 82px); } /* 62px 导航 + 约 82px 页脚 */
/* 分页后不需要 section-alt 的上下边框，避免导航下方出现多余横线 */
.page .section-alt { border-top: none; border-bottom: none; }

@media (prefers-reduced-motion: reduce) {
  .page.active { animation: none; }
}

/* ===== 导航 ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  width: min(1080px, 92vw); margin: 0 auto;
  height: 62px; display: flex; align-items: center; gap: 16px;
}
.brand { font-weight: 800; font-size: 1.35rem; color: var(--text); text-decoration: none; letter-spacing: -0.5px; display: flex; align-items: center; gap: 11px; }
.brand-logo { width: 42px; height: 42px; object-fit: contain; border-radius: 11px; background: linear-gradient(135deg, #0b2437, #0e3350); padding: 4px; flex: 0 0 auto; }
.brand-dot { color: var(--primary); }
.nav-links { display: flex; gap: 22px; margin-left: 12px; }
.nav-links a {
  color: var(--text-muted); text-decoration: none; font-size: 0.95rem; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a { position: relative; }
.nav-links a.active { color: var(--primary); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -7px;
  height: 2px; border-radius: 2px; background: var(--primary);
}
.nav-tools { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.lang-switch { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.lang-btn {
  border: none; background: transparent; color: var(--text-muted);
  font-size: 0.8rem; font-weight: 600; padding: 5px 11px; border-radius: 999px;
  cursor: pointer; transition: all 0.2s;
}
.lang-btn.active { background: var(--primary); color: #fff; }

.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; font-size: 1rem; display: grid; place-items: center;
  transition: all 0.2s;
}
.theme-toggle:hover { border-color: var(--primary); }

/* ===== Hero ===== */
.hero { padding: 90px 0 70px; text-align: center; }
.hero-eyebrow { color: var(--primary); font-weight: 700; letter-spacing: 2px; font-size: 0.8rem; margin-bottom: 16px; }
.hero-title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; letter-spacing: -1px; line-height: 1.15; }
.hero-subtitle { margin-top: 18px; font-size: clamp(1rem, 2.4vw, 1.3rem); color: var(--text); font-weight: 600; }
.hero-intro { margin-top: 12px; color: var(--text-muted); font-size: 1rem; max-width: 640px; margin-left: auto; margin-right: auto; }
.btn-primary {
  display: inline-block; margin-top: 30px; padding: 13px 30px;
  background: var(--primary); color: #fff; text-decoration: none;
  border-radius: 999px; font-weight: 700; font-size: 1rem;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3); transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(37, 99, 235, 0.4); }

/* ===== 通用 section ===== */
.section { padding: 64px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 28px; position: relative; padding-left: 14px; }
.section-title::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 5px; border-radius: 3px; background: var(--primary); }

/* ===== 关于我 ===== */
.about-text { font-size: 1.05rem; color: var(--text-muted); max-width: 760px; }
.caps { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.cap {
  background: var(--primary-soft); color: var(--primary);
  padding: 8px 16px; border-radius: 999px; font-size: 0.9rem; font-weight: 600;
  border: 1px solid transparent;
}
[data-theme="dark"] .cap { background: var(--primary-soft); color: #93c5fd; }

/* ===== 案例 ===== */
.cases { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 380px)); gap: 28px; justify-content: center; }
.case-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform 0.25s, box-shadow 0.25s;
  display: flex; flex-direction: column;
}
.case-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14); }

.case-shot { padding: 18px 18px 0; }
.browser { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow-sm); }
.browser-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #f1f5f9; border-bottom: 1px solid #e2e8f0; }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.browser-url { margin-left: 10px; font-size: 0.78rem; color: #64748b; font-family: ui-monospace, monospace; }
.browser-body { padding: 40px 20px; background: linear-gradient(135deg, #e0f2fe, #ecfeff); display: grid; place-items: center; min-height: 150px; }
.shot-title { font-size: 1.7rem; font-weight: 800; color: #1e293b; letter-spacing: -0.5px; }
.shot-sub { font-size: 0.9rem; color: #475569; margin-top: 6px; }
.shot-title.glow { color: #8CFC52; text-shadow: 0 0 18px rgba(140, 252, 82, 0.5); }
.browser-dark .browser-bar { background: #111; border-bottom-color: #222; }
.browser-dark .browser-url { color: #9ca3af; }
.browser-dark .browser-body { background: linear-gradient(135deg, #0a0a0a, #111); }
.browser-dark .shot-sub { color: #cbd5e1; }

.case-body { padding: 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.case-name { font-size: 1.2rem; font-weight: 800; }
.case-cn { font-weight: 500; color: var(--text-muted); font-size: 0.95rem; }
.case-desc { color: var(--text-muted); font-size: 0.95rem; }
.case-features { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.case-features li { position: relative; padding-left: 22px; font-size: 0.92rem; color: var(--text); }
.case-features li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }

.case-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.case-tags span { font-size: 0.75rem; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); padding: 4px 10px; border-radius: 8px; }
.section-alt .case-tags span { background: var(--bg); }

.case-notes { display: flex; flex-direction: column; gap: 6px; margin-top: 2px; }
.note-brazil { font-size: 0.85rem; color: var(--primary); font-weight: 600; }
.note-backend { font-size: 0.85rem; color: var(--text-muted); }
.note-pay { font-size: 0.8rem; color: var(--text-muted); padding-left: 10px; border-left: 3px solid var(--accent); margin-top: 2px; line-height: 1.45; }

.btn-outline {
  margin-top: auto; text-align: center; text-decoration: none; font-weight: 700;
  padding: 11px 18px; border-radius: 10px; border: 1.5px solid var(--primary); color: var(--primary);
  transition: all 0.2s; font-size: 0.95rem;
}
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ===== 案例子区标题 ===== */
.group-title {
  font-size: 1.05rem; font-weight: 800; color: var(--text);
  margin: 32px 0 16px; padding-left: 14px; position: relative;
}
.group-title::before {
  content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 5px;
  border-radius: 3px; background: var(--accent);
}
.group-title:first-of-type { margin-top: 6px; }

/* 本地演示角标 */
.demo-badge {
  margin-top: 12px; font-size: 0.76rem; font-weight: 700; color: #fff;
  background: var(--accent); padding: 4px 12px; border-radius: 999px;
}

/* 本地数据说明 */
.note-local { font-size: 0.85rem; color: var(--text-muted); }

/* 更多模板占位 */
.more-template {
  border: 1.5px dashed var(--border); border-radius: var(--radius);
  display: grid; place-items: center; min-height: 200px; text-align: center;
  color: var(--text-muted); font-size: 0.95rem; padding: 24px; background: var(--surface);
}

/* ===== 联系我 ===== */
.contact-box { text-align: center; }
.contact-text { color: var(--text-muted); font-size: 1.05rem; max-width: 620px; margin: 0 auto 32px; }
.wechat-card {
  display: inline-flex; align-items: center; gap: 22px; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 28px; box-shadow: var(--shadow-sm);
}
.wechat-qr {
  width: 150px; height: 150px; border-radius: 12px; background: #fff; border: 1px solid var(--border);
  padding: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.wechat-qr img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 6px; }
.wechat-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
.wechat-id { font-size: 1.3rem; font-weight: 800; color: var(--text); letter-spacing: 0.5px; font-family: ui-monospace, monospace; }
.wechat-cta { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }

/* ===== 复制微信号按钮 ===== */
.copy-btn {
  margin-top: 10px; font-family: inherit; cursor: pointer;
  border: 1.5px solid var(--primary); background: var(--primary); color: #fff;
  font-weight: 700; font-size: 0.85rem; padding: 9px 18px; border-radius: 8px;
  transition: all 0.2s;
}
.copy-btn:hover { background: transparent; color: var(--primary); }
.copy-btn.done, .copy-btn.done:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ===== 服务流程 ===== */
.process-sub { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 22px; }
.process-list {
  list-style: none; counter-reset: step;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px;
}
.process-list li {
  position: relative; counter-increment: step;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 20px 20px 66px; box-shadow: var(--shadow-sm);
}
.process-list li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 20px; top: 20px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-weight: 800; font-size: 0.78rem; letter-spacing: -0.3px;
  display: grid; place-items: center;
}
.step-t { display: block; font-weight: 800; font-size: 1rem; margin-bottom: 5px; }
.step-d { display: block; color: var(--text-muted); font-size: 0.9rem; line-height: 1.55; }
.process-time {
  margin-top: 24px; display: inline-block;
  background: var(--primary-soft); color: var(--primary);
  border-left: 4px solid var(--primary); border-radius: 0 10px 10px 0;
  font-weight: 700; font-size: 0.95rem; padding: 13px 20px;
}
[data-theme="dark"] .process-time { color: #93c5fd; }

/* ===== 联系我·工期提示 ===== */
.contact-time { color: var(--primary); font-weight: 600; font-size: 0.95rem; margin: -18px auto 26px; }

/* ===== 页脚 ===== */
.footer { text-align: center; padding: 30px 0; color: var(--text-muted); font-size: 0.85rem; border-top: 1px solid var(--border); }

/* ===== 响应式 ===== */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: 60px 0 50px; }
  .wechat-card { flex-direction: column; text-align: center; }
  .wechat-qr { margin: 0 auto; }
  .case-name { font-size: 1.1rem; }
  .process-list { grid-template-columns: 1fr; }
  .process-list li { padding: 16px 16px 16px 58px; }
  .process-list li::before { left: 16px; top: 16px; width: 28px; height: 28px; font-size: 0.72rem; }
}
