:root {
  --bg: #060a14;
  --bg-elev: #0c1324;
  --bg-card: rgba(15, 23, 42, 0.72);
  --border: rgba(148, 163, 184, 0.16);
  --border-hi: rgba(56, 189, 248, 0.45);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --cyan: #38bdf8;
  --emerald: #10b981;
  --amber: #f59e0b;
  --rose: #fb7185;
  --radius: 16px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    radial-gradient(ellipse 70% 45% at 50% -10%, rgba(56, 189, 248, 0.16), transparent 65%),
    radial-gradient(ellipse 45% 40% at 90% 25%, rgba(16, 185, 129, 0.11), transparent 60%),
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 44px 44px, 44px 44px;
}

a { color: inherit; text-decoration: none; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(6, 10, 20, 0.82);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.brand img { width: 32px; height: 32px; }
.brand-sub {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(56, 189, 248, 0.28);
  font-weight: 600;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--text-muted);
}
.nav-links a:hover { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn:hover { border-color: var(--border-hi); color: #fff; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, #0284c7, #059669);
  border-color: rgba(56, 189, 248, 0.5);
  color: #fff;
  box-shadow: 0 8px 28px rgba(2, 132, 199, 0.28);
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 8px; }
.lang-toggle {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  padding: 6px 11px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--cyan);
}

/* Hero */
.hero { padding: 86px 0 64px; text-align: center; }
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 12px var(--emerald);
}
.hero h1 {
  margin: 0 auto 20px;
  max-width: 920px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.18;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 30%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-lead {
  margin: 0 auto 34px;
  max-width: 760px;
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-muted);
}
.hero-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin-bottom: 52px; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: left;
}
.metric-card {
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.metric-val {
  font-size: 28px;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: linear-gradient(135deg, var(--cyan), var(--emerald));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
  margin-bottom: 6px;
}
.metric-label { font-size: 13px; color: var(--text-muted); }

/* Sections */
section { padding: 68px 0; }
.section-head { margin-bottom: 36px; }
.eyebrow {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 8px;
}
.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3.2vw, 34px);
  letter-spacing: -0.02em;
}
.section-head p { margin: 0; color: var(--text-muted); max-width: 720px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.card {
  padding: 26px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.card-featured {
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(180deg, rgba(14, 116, 144, 0.16), rgba(15, 23, 42, 0.85));
}
.card-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--cyan);
  margin-bottom: 10px;
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.1);
}
.card h3 { margin: 0 0 10px; font-size: 20px; color: #f8fafc; }
.card p { margin: 0 0 16px; color: var(--text-muted); font-size: 14px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tag-list li {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 7px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}

/* Interactive Product Console Showcase */
.console-shell {
  border-radius: 18px;
  background: #0a1020;
  border: 1px solid rgba(56, 189, 248, 0.28);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.console-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid var(--border);
}
.console-dots { display: flex; align-items: center; gap: 7px; }
.console-dots span { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.console-dots span:nth-child(1) { background: #ef4444; }
.console-dots span:nth-child(2) { background: #f59e0b; }
.console-dots span:nth-child(3) { background: #10b981; }
.console-title {
  margin-left: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--text-muted);
}
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab-btn {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  cursor: pointer;
}
.tab-btn.active {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.35);
  color: #fff;
}
.tab-panel { display: none; padding: 26px; }
.tab-panel.active { display: block; }

.compare-box {
  padding: 20px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border);
}
.compare-box.danger { border-color: rgba(251, 113, 133, 0.35); }
.compare-box.safe { border-color: rgba(16, 185, 129, 0.4); }
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.badge-danger { background: rgba(251, 113, 133, 0.16); color: #fda4af; }
.badge-safe { background: rgba(16, 185, 129, 0.16); color: #6ee7b7; }
.badge-warn { background: rgba(245, 158, 11, 0.16); color: #fcd34d; }

.code-block {
  margin: 0;
  padding: 14px;
  border-radius: 10px;
  background: #050811;
  border: 1px solid rgba(148, 163, 184, 0.12);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  color: #cbd5e1;
  overflow-x: auto;
}

.risk-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.risk-table th, .risk-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.risk-table th { color: var(--text-dim); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.pipeline-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.step-item {
  padding: 18px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
}
.step-item strong { display: block; margin: 6px 0; font-size: 15px; }
.step-item span { font-size: 13px; color: var(--text-muted); }

/* Pricing / Engagement */
.price-tag {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 10px 0 14px;
}
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: 13.5px; color: #cbd5e1; }
.check-list li::before { content: "✓ "; color: var(--emerald); font-weight: 700; }

/* Halo Dynamic Posts */
.post-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.post-card:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.post-meta { font-size: 12px; color: var(--text-dim); margin-bottom: 8px; }
.post-title { font-size: 17px; font-weight: 700; color: #f8fafc; margin: 0 0 10px; }
.post-excerpt { font-size: 13.5px; color: var(--text-muted); margin: 0 0 14px; }
.post-more { font-size: 13px; color: var(--cyan); font-weight: 600; }

/* Contact CTA */
.cta-box {
  padding: 42px 34px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.22), rgba(6, 95, 70, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cta-box h2 { margin: 0 0 8px; font-size: clamp(22px, 3vw, 30px); }
.cta-box p { margin: 0; color: #cbd5e1; max-width: 640px; font-size: 15px; }
.email-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(6, 10, 20, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  color: #fff;
}

/* Article / SinglePage prose */
.article-wrap { max-width: 860px; margin: 48px auto 80px; }
.article-header { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.article-header h1 { margin: 0 0 12px; font-size: clamp(26px, 4vw, 38px); line-height: 1.25; }
.prose { font-size: 16px; color: #dbe4f0; line-height: 1.8; }
.prose h2, .prose h3 { color: #fff; margin-top: 28px; }
.prose pre {
  padding: 16px; border-radius: 10px; background: #0a1020; border: 1px solid var(--border); overflow-x: auto;
}
.prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; color: #7dd3fc; }
.prose blockquote {
  margin: 18px 0; padding: 12px 18px; border-left: 3px solid var(--cyan); background: rgba(56,189,248,0.06); color: #cbd5e1;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 34px 0 46px;
  color: var(--text-dim);
  font-size: 13px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--text); }

/* Language switching */
html[data-lang="zh"] [data-i18n-en] { display: none !important; }
html[data-lang="en"] [data-i18n-zh] { display: none !important; }

@media (max-width: 960px) {
  .metrics-grid, .grid-3, .pipeline-steps { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .metrics-grid, .grid-3, .grid-2, .pipeline-steps { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 42px; }
  .cta-box { padding: 28px 20px; }
}
