/* ============================================================
   智算星球 · 门户站点设计系统
   视觉基调：浅色企业风正文 + 深空渐变 Hero（呼应"星球"品牌）
   主色：靛蓝 #4f46e5 → 紫 #7c3aed，点缀青 #22d3ee
   ============================================================ */

:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --ink: #10162f;
  --muted: #5b6478;
  --line: #e6e8f2;
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --accent: #22d3ee;
  --ok: #16a34a;
  --warn: #d97706;
  --hero-a: #0b1024;
  --hero-b: #191a4d;
  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 8px 30px rgba(23, 25, 60, 0.08);
  --shadow-l: 0 18px 50px rgba(23, 25, 60, 0.14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "HarmonyOS Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
code, pre { font-family: var(--mono); }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }

/* ---------------- 按钮 / 徽标 ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 600; border: 1px solid transparent;
  cursor: pointer; transition: all 0.2s ease; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
}
.btn-primary:hover { box-shadow: 0 10px 24px rgba(79, 70, 229, 0.45); color: #fff; }
.btn-ghost { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-hero {
  background: #fff; color: #171a4d; border: none;
}
.btn-hero:hover { color: var(--brand); }
.btn-hero-ghost { border-color: rgba(255, 255, 255, 0.35); color: #fff; background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(6px); }
.btn-hero-ghost:hover { border-color: #fff; color: #fff; }
.btn-lg { padding: 14px 30px; font-size: 16px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--brand);
  background: rgba(79, 70, 229, 0.09); border: 1px solid rgba(79, 70, 229, 0.22);
  padding: 4px 14px; border-radius: 999px;
}
.tag {
  font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px;
  background: #eef0ff; color: var(--brand);
}
.tag-image { background: #ecfdf5; color: #059669; }
.tag-video { background: #fff7ed; color: #c2410c; }
.tag-audio { background: #fdf2f8; color: #be185d; }
.tag-embedding { background: #f0f9ff; color: #0369a1; }

/* ---------------- 页眉 ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; gap: 32px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-flex; }
.brand-name { font-size: 18px; letter-spacing: 0.5px; }
.main-nav { display: flex; gap: 6px; flex: 1; }
.main-nav a {
  color: var(--muted); font-size: 15px; font-weight: 500;
  padding: 8px 14px; border-radius: 8px;
}
.main-nav a:hover { color: var(--brand); background: rgba(79, 70, 229, 0.06); text-decoration: none; }
.main-nav a.active { color: var(--brand); background: rgba(79, 70, 229, 0.09); font-weight: 600; }
.header-actions { display: flex; gap: 10px; align-items: center; }
.header-actions .btn { padding: 8px 18px; font-size: 14px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(124, 58, 237, 0.45), transparent 60%),
    radial-gradient(900px 420px at 12% 110%, rgba(34, 211, 238, 0.22), transparent 60%),
    linear-gradient(160deg, var(--hero-a), var(--hero-b));
  padding: 96px 0 84px;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 22%, rgba(255,255,255,.75), transparent 55%),
    radial-gradient(1.2px 1.2px at 32% 68%, rgba(255,255,255,.5), transparent 55%),
    radial-gradient(1.6px 1.6px at 55% 18%, rgba(255,255,255,.65), transparent 55%),
    radial-gradient(1.1px 1.1px at 71% 52%, rgba(255,255,255,.45), transparent 55%),
    radial-gradient(1.5px 1.5px at 86% 30%, rgba(255,255,255,.6), transparent 55%),
    radial-gradient(1px 1px at 44% 84%, rgba(255,255,255,.4), transparent 55%),
    radial-gradient(1.3px 1.3px at 93% 76%, rgba(255,255,255,.5), transparent 55%);
}
.hero .wrap { position: relative; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: #c7d2fe;
  border: 1px solid rgba(199, 210, 254, 0.35); border-radius: 999px;
  padding: 5px 16px; margin-bottom: 26px; background: rgba(255, 255, 255, 0.06);
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.hero h1 {
  font-size: clamp(34px, 5vw, 56px); line-height: 1.22;
  font-weight: 800; letter-spacing: 0.5px; max-width: 760px;
}
.hero h1 .grad {
  background: linear-gradient(90deg, #a5b4fc, #e879f9, #67e8f9);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub {
  margin-top: 20px; font-size: 17.5px; color: rgba(226, 232, 255, 0.85);
  max-width: 640px;
}
.hero-cta { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-code {
  margin-top: 40px; display: inline-flex; align-items: center; gap: 14px;
  flex-wrap: wrap; justify-content: center; max-width: 100%;
  background: rgba(10, 14, 35, 0.65); border: 1px solid rgba(148, 163, 255, 0.25);
  border-radius: 12px; padding: 12px 18px; font-family: var(--mono); font-size: 13.5px;
  color: #cbd5ff; backdrop-filter: blur(6px);
}
.hero-code b { color: #67e8f9; font-weight: 600; }
.hero-stats {
  margin-top: 64px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.stat {
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius); padding: 22px 24px; backdrop-filter: blur(8px);
}
.stat b { font-size: 30px; font-weight: 800; display: block; color: #fff; }
.stat b i { font-style: normal; font-size: 17px; margin-left: 2px; color: #a5b4fc; }
.stat span { font-size: 13.5px; color: rgba(203, 213, 255, 0.75); }

/* ---------------- 区块标题 ---------------- */
.sec-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.sec-head .kicker {
  font-size: 13.5px; font-weight: 700; letter-spacing: 2px;
  color: var(--brand); text-transform: uppercase;
}
.sec-head h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; margin: 10px 0 12px; }
.sec-head p { color: var(--muted); font-size: 16.5px; }

/* ---------------- 卡片网格 ---------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-l); }
.card .icon {
  width: 46px; height: 46px; border-radius: 12px; display: flex;
  align-items: center; justify-content: center; font-size: 22px; margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(124, 58, 237, 0.12));
}
.card h3 { font-size: 17.5px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; }
.card a { font-weight: 600; }

/* 客户端兼容条 */
.clients { border-block: 1px solid var(--line); background: var(--surface); }
.clients .row {
  display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; justify-content: center;
  padding: 22px 0;
}
.clients .label { font-size: 14px; color: var(--muted); margin-right: 8px; }
.chip {
  font-size: 14px; font-weight: 600; color: var(--ink);
  border: 1px solid var(--line); background: var(--bg);
  padding: 6px 18px; border-radius: 999px;
}

/* ---------------- 步骤 ---------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px; box-shadow: var(--shadow); }
.step .num {
  counter-increment: step; width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 16px;
}
.step .num::before { content: counter(step); }
.step h3 { font-size: 17px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14.5px; }
.step .code-chip {
  margin-top: 14px; display: inline-block; font-family: var(--mono); font-size: 12.5px;
  background: #0f172a; color: #a5f3fc; padding: 7px 12px; border-radius: 8px;
}

/* ---------------- 模型广场 ---------------- */
.model-tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.model-tabs button {
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  padding: 8px 22px; border-radius: 999px; font-size: 14.5px; font-weight: 600; cursor: pointer;
  transition: all 0.15s ease;
}
.model-tabs button:hover { color: var(--brand); border-color: var(--brand); }
.model-tabs button.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent;
}
.model-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow); transition: transform 0.2s ease;
}
.model-card:hover { transform: translateY(-3px); }
.model-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.model-name { font-family: var(--mono); font-weight: 700; font-size: 15.5px; }
.model-vendor { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.model-desc { font-size: 14px; color: var(--muted); min-height: 44px; }
.model-price {
  margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line);
  display: flex; justify-content: space-between; font-size: 13px; color: var(--ink); font-weight: 600;
}
.notice {
  margin-top: 26px; text-align: center; font-size: 14px; color: var(--muted);
  background: rgba(79, 70, 229, 0.05); border: 1px dashed rgba(79, 70, 229, 0.25);
  border-radius: var(--radius-s); padding: 12px 20px;
}

/* ---------------- 定价 ---------------- */
.price-hero-note { text-align: center; color: var(--muted); max-width: 560px; margin: 0 auto 44px; }
.plan-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 56px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); text-align: center; }
.plan.featured { border: 2px solid var(--brand); position: relative; }
.plan.featured::after {
  content: "推荐"; position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
  font-size: 12.5px; font-weight: 700; padding: 3px 16px; border-radius: 999px;
}
.plan h3 { font-size: 18px; }
.plan .amount { font-size: 34px; font-weight: 800; margin: 14px 0 4px; }
.plan .amount i { font-style: normal; font-size: 15px; color: var(--muted); font-weight: 500; }
.plan p.desc { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.plan ul { list-style: none; text-align: left; margin-bottom: 24px; }
.plan ul li { padding: 7px 0; font-size: 14.5px; color: var(--ink); border-bottom: 1px dashed var(--line); }
.plan ul li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 10px; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table.price-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.price-table th, .price-table td { padding: 13px 20px; text-align: left; font-size: 14.5px; border-bottom: 1px solid var(--line); }
.price-table thead th { background: #f1f2fa; font-weight: 700; color: var(--ink); }
.price-table tbody tr:last-child td { border-bottom: none; }
.price-table td.mono { font-family: var(--mono); font-size: 13.5px; }
.price-table td.dim { color: var(--muted); }

/* ---------------- FAQ ---------------- */
.faq { max-width: 780px; margin: 0 auto; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s);
  margin-bottom: 12px; overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 17px 22px; font-weight: 600; font-size: 15.5px;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 20px; color: var(--brand); font-weight: 500; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 22px 18px; color: var(--muted); font-size: 14.5px; }

/* ---------------- CTA 横幅 ---------------- */
.cta-band {
  background:
    radial-gradient(700px 300px at 85% 0%, rgba(124, 58, 237, 0.5), transparent 60%),
    linear-gradient(150deg, var(--hero-a), var(--hero-b));
  border-radius: 24px; color: #fff; text-align: center; padding: 64px 32px;
}
.cta-band h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
.cta-band p { color: rgba(203, 213, 255, 0.8); margin: 12px 0 30px; }

/* ---------------- 页脚 ---------------- */
.site-footer { background: #0d1230; color: #b6bfe3; margin-top: 90px; }
.footer-inner {
  max-width: 1160px; margin: 0 auto; padding: 56px 24px 36px;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px;
}
.footer-brand p { font-size: 14px; margin-top: 12px; max-width: 320px; }
.footer-contact { margin-top: 14px; }
.footer-contact a { color: #a5b4fc; }
.footer-brand .brand-name { color: #fff; font-size: 19px; }
.footer-col h4 { color: #fff; font-size: 14.5px; margin-bottom: 16px; letter-spacing: 1px; }
.footer-col a { display: block; color: #b6bfe3; font-size: 14px; padding: 5px 0; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 1160px; margin: 0 auto; padding: 20px 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-size: 13px; color: #8b93c4;
}
.footer-bottom a { color: #8b93c4; }

/* ---------------- 文档中心布局 ---------------- */
.docs-shell { display: grid; grid-template-columns: 240px 1fr; gap: 40px; padding: 40px 24px 72px; }
.docs-side { position: sticky; top: 88px; align-self: start; }
.docs-side h4 { font-size: 13px; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; margin: 22px 0 10px; }
.docs-side h4:first-child { margin-top: 0; }
.docs-side a { display: block; padding: 7px 12px; border-radius: 8px; color: var(--muted); font-size: 14.5px; }
.docs-side a:hover { background: rgba(79, 70, 229, 0.06); color: var(--brand); text-decoration: none; }
.docs-side a.active { background: rgba(79, 70, 229, 0.1); color: var(--brand); font-weight: 600; }
.docs-main { min-width: 0; }
.docs-main h1 { font-size: 32px; margin-bottom: 8px; }
.docs-main .lead { color: var(--muted); font-size: 16px; margin-bottom: 30px; }
.docs-main h2 { font-size: 22px; margin: 40px 0 14px; padding-top: 10px; }
.docs-main h3 { font-size: 17px; margin: 26px 0 10px; }
.docs-main p { margin-bottom: 12px; color: #2c3550; }
.docs-main ul, .docs-main ol { margin: 0 0 14px 22px; }
.docs-main li { margin-bottom: 6px; }
.docs-main table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; margin: 14px 0 22px; background: var(--surface); }
.docs-main th, .docs-main td { border: none; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 9px 14px; font-size: 14px; text-align: left; }
.docs-main tr:first-child th, .docs-main tr:first-child td { border-top: 1px solid var(--line); }
.docs-main th:first-child, .docs-main td:first-child { border-left: 1px solid var(--line); }
.docs-main th { background: #f1f2fa; }

.code-block { position: relative; margin: 14px 0 24px; }
.code-block pre {
  background: #0f172a; color: #dbe6ff; border-radius: var(--radius-s);
  padding: 18px 20px; overflow-x: auto; font-size: 13.2px; line-height: 1.65;
}
.copy-btn {
  position: absolute; top: 10px; right: 10px; font-size: 12px;
  background: rgba(255, 255, 255, 0.12); color: #cbd5ff; border: none;
  padding: 4px 12px; border-radius: 6px; cursor: pointer;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.22); }
.inline-code, .docs-main code:not(pre code) {
  background: #eef0ff; color: #4338ca; padding: 2px 7px; border-radius: 5px; font-size: 13.2px;
}
.callout {
  border-left: 3px solid var(--brand); background: rgba(79, 70, 229, 0.06);
  border-radius: 0 var(--radius-s) var(--radius-s) 0; padding: 12px 18px; margin: 16px 0 22px;
  font-size: 14.5px; color: #3b4262;
}
.callout.warn { border-color: var(--warn); background: rgba(217, 119, 6, 0.07); }

/* 文档首页卡片 */
.doc-cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.doc-cat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); display: block; color: var(--ink); }
.doc-cat:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-l); transition: all .2s; }
.doc-cat h3 { font-size: 17px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.doc-cat p { color: var(--muted); font-size: 14px; }

/* ---------------- 法务页面 ---------------- */
.legal { max-width: 820px; margin: 0 auto; padding: 56px 24px 40px; }
.legal h1 { font-size: 30px; margin-bottom: 6px; }
.legal .meta { color: var(--muted); font-size: 14px; margin-bottom: 34px; }
.legal h2 { font-size: 20px; margin: 36px 0 12px; }
.legal h3 { font-size: 16px; margin: 22px 0 8px; }
.legal p, .legal li { color: #2c3550; font-size: 15px; margin-bottom: 10px; }
.legal ul, .legal ol { margin-left: 22px; }
.legal .toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 18px 24px; margin-bottom: 30px; }
.legal .toc a { display: inline-block; margin: 3px 18px 3px 0; font-size: 14px; }

/* ---------------- 页内面包屑 ---------------- */
.crumb { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--brand); }

/* ---------------- 嵌入态（iframe 内） ---------------- */
html.embedded .site-header { display: none; }
html.embedded .site-footer { display: none; }
html.embedded .hero { padding-top: 48px; }
html.embedded body { background: var(--bg); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 960px) {
  .grid-3, .grid-4, .plan-cards, .steps { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .docs-shell { grid-template-columns: 1fr; }
  .docs-side { position: static; display: flex; flex-wrap: wrap; gap: 4px 10px; }
  .doc-cats { grid-template-columns: 1fr; }
  .main-nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 12px 20px; box-shadow: var(--shadow-l);
  }
  .site-header.nav-open .main-nav { display: flex; }
  .nav-toggle { display: block; }
  .header-actions .btn-ghost { display: none; }
}
@media (max-width: 620px) {
  .grid-3, .grid-4, .grid-2, .plan-cards, .steps { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .hero { padding: 68px 0 60px; }
}
