/* Bridge AI 首页 · bridge-v9 */
:root {
  --bg: #f7f9fc;
  --bg-alt: #eef3fa;
  --surface: #ffffff;
  --surface-2: #f3f6fb;
  --border: #dde4ee;
  --border-strong: #c7d3e3;
  --text: #0f1b2d;
  --text-2: #475569;
  --text-3: #6b7a90;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #e8f0fe;
  --primary-text: #ffffff;
  --accent-claude: #c2410c;
  --accent-claude-soft: #fff1e8;
  --accent-image: #7c3aed;
  --accent-image-soft: #f3edff;
  --ok: #047857;
  --ok-soft: #e6f6ef;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;
  --code-muted: #94a3b8;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, .05);
  --shadow: 0 1px 2px rgba(15, 27, 45, .04), 0 8px 24px rgba(15, 27, 45, .06);
  --shadow-lg: 0 2px 4px rgba(15, 27, 45, .04), 0 18px 40px rgba(37, 99, 235, .12);
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --bg-alt: #0f1829;
    --surface: #121c2e;
    --surface-2: #17233a;
    --border: #22314a;
    --border-strong: #2e4060;
    --text: #e6edf7;
    --text-2: #a7b4c8;
    --text-3: #7f8da3;
    --primary: #5b8cff;
    --primary-hover: #7aa2ff;
    --primary-soft: #182a4d;
    --primary-text: #0b1220;
    --accent-claude: #fb923c;
    --accent-claude-soft: #3a2314;
    --accent-image: #b794f6;
    --accent-image-soft: #2a1f45;
    --ok: #34d399;
    --ok-soft: #12322a;
    --code-bg: #070d18;
    --shadow-sm: none;
    --shadow: 0 1px 0 rgba(255, 255, 255, .02), 0 8px 24px rgba(0, 0, 0, .3);
    --shadow-lg: 0 18px 40px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
html.embed { scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .9em; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }
.narrow { max-width: 800px; }

/* 导航 */
.site-nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
html.embed .site-nav { display: none; }
.nav-inner { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff; font-size: 15px; font-weight: 800;
}
.nav-links { display: none; gap: 4px; margin-left: auto; }
.nav-links a { color: var(--text-2); font-size: 15px; padding: 6px 12px; border-radius: 8px; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-inner > .btn { margin-left: auto; }
@media (min-width: 760px) {
  .nav-links { display: flex; }
  .nav-inner > .btn { margin-left: 8px; }
}

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 46px; padding: 0 22px; border-radius: 11px; border: 1px solid transparent;
  background: var(--primary); color: var(--primary-text); font-weight: 600; font-size: 15px;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .22);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.btn:hover { background: var(--primary-hover); color: var(--primary-text); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 9px; box-shadow: none; }

.copy {
  flex: none; height: 32px; padding: 0 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: 600 13px var(--font); transition: background .15s, color .15s, border-color .15s;
}
.copy:hover { border-color: var(--primary); color: var(--primary); }
.copy.is-done { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }

/* 首屏 */
.hero {
  position: relative; overflow: hidden;
  padding: 56px 0 48px;
  background:
    radial-gradient(900px 420px at 85% -10%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 70%),
    radial-gradient(700px 360px at -10% 10%, color-mix(in srgb, var(--primary) 9%, transparent), transparent 70%);
}
@media (min-width: 760px) { .hero { padding: 88px 0 72px; } }
.hero-inner { text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 600;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hero h1 {
  margin: 18px auto 0; max-width: 820px;
  font-size: clamp(30px, 7.4vw, 56px); font-weight: 800; letter-spacing: -.025em; line-height: 1.18;
}
.hl { color: var(--primary); }
.hl-claude { color: var(--accent-claude); }
.hl-image { color: var(--accent-image); }
.br-wide { display: none; }
@media (min-width: 760px) { .br-wide { display: inline; } }
.lead { margin: 18px auto 0; max-width: 640px; color: var(--text-2); font-size: clamp(16px, 2.2vw, 18px); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.hero-actions .btn { flex: 1 1 160px; max-width: 220px; }

.endpoint {
  display: flex; align-items: center; gap: 10px; margin: 28px auto 0; max-width: 520px;
  padding: 8px 8px 8px 14px; border-radius: 12px; text-align: left;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.endpoint-label {
  flex: none; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--text-3);
}
.endpoint code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 14px; }

.hero-facts {
  list-style: none; margin: 28px auto 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; color: var(--text-3); font-size: 14px;
}
.hero-facts b { color: var(--text); font-weight: 700; margin-right: 4px; }

/* 区块 */
.section { padding: 56px 0; }
@media (min-width: 760px) { .section { padding: 80px 0; } }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { margin-bottom: 28px; max-width: 720px; }
.section-head h2 { font-size: clamp(24px, 4.6vw, 34px); font-weight: 800; }
.section-head p { margin-top: 10px; color: var(--text-2); }
.kicker { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--primary); text-transform: uppercase; }

.upper { text-transform: uppercase; letter-spacing: .01em; }

/* 分组卡片 */
.group-cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .group-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .group-cards { grid-template-columns: repeat(3, 1fr); } }

.gcard {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 22px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--text);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.gcard:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.gcard.is-featured { border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); }
.gcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gtag {
  display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: .06em;
  background: var(--primary-soft); color: var(--primary);
}
.tag-claude { background: var(--accent-claude-soft); color: var(--accent-claude); }
.tag-image { background: var(--accent-image-soft); color: var(--accent-image); }
.rate {
  font: 700 13px var(--mono); color: var(--text-2); padding: 3px 8px; border-radius: 6px; background: var(--surface-2);
}
.gcard h3 { font-size: 19px; font-weight: 800; letter-spacing: .01em; }
.gdesc { color: var(--text-2); font-size: 14px; }
.gprices { display: grid; gap: 8px; padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); }
.gprice { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gprice span { font: 600 12px var(--mono); color: var(--text-3); }
.gprice b { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.gprice b small { font-size: 13px; font-weight: 600; color: var(--text-3); margin-left: 2px; }
.gprice.minor b { font-size: 16px; }
.gpick { font-size: 14px; color: var(--text-2); }
.gpick strong { color: var(--text); font-weight: 600; }
.gmore { margin-top: auto; font-size: 14px; font-weight: 600; color: var(--primary); }

.unit-note { margin-top: 16px; font-size: 13px; color: var(--text-3); }

/* 选择建议 */
.advice {
  margin-top: 32px; padding: 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.advice h3 { font-size: 18px; font-weight: 800; }
.advice ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .advice ul { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .advice ul { grid-template-columns: repeat(3, 1fr); } }
.advice li {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--surface-2); border-left: 3px solid var(--primary);
}
.advice li.is-claude { border-left-color: var(--accent-claude); }
.advice li.is-image { border-left-color: var(--accent-image); }
.advice li b { font-size: 14px; color: var(--text-2); font-weight: 600; }
.advice li span { font-size: 15px; font-weight: 700; }
.advice .note { margin-top: 14px; font-size: 14px; color: var(--text-3); }

/* 价格表 */
.detail { margin-top: 32px; }
.detail-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.detail-head h3 { font-size: 20px; font-weight: 800; }
.detail-head p { font-size: 13px; color: var(--text-3); }
.gtabs {
  display: flex; gap: 6px; padding: 5px; border-radius: 12px; overflow-x: auto; scrollbar-width: none;
  background: var(--surface-2); border: 1px solid var(--border);
}
.gtabs::-webkit-scrollbar { display: none; }
.gtab {
  flex: none; height: 36px; padding: 0 14px; border: 0; border-radius: 8px; cursor: pointer; white-space: nowrap;
  background: transparent; color: var(--text-2); font: 700 13px var(--font); letter-spacing: .02em;
}
.gtab:hover { color: var(--text); }
.gtab[aria-selected="true"] { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }

.panel {
  margin-top: 12px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow: hidden;
}
.panel[hidden] { display: none; }
.panel-title {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 800; letter-spacing: .01em;
}
.panel-title small { font-weight: 500; font-size: 13px; color: var(--text-3); letter-spacing: 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 11px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: 12px; font-weight: 700; color: var(--text-3); background: var(--surface-2); white-space: nowrap; }
td { font-variant-numeric: tabular-nums; white-space: nowrap; }
td:first-child { white-space: normal; min-width: 150px; }
tbody tr:hover td { background: color-mix(in srgb, var(--primary-soft) 45%, transparent); }
.model { font: 600 13px/1.6 var(--mono); color: var(--text); display: block; }
.model + .model { color: var(--text-3); font-weight: 500; }
.only {
  display: inline-block; margin-top: 4px; padding: 1px 7px; border-radius: 5px; font-size: 11px; font-weight: 700;
  background: var(--primary-soft); color: var(--primary);
}
.muted { color: var(--text-3); }
.panel-note { padding: 12px 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-3); background: var(--surface-2); }
.price-foot { margin-top: 16px; font-size: 13px; color: var(--text-3); }
.price-foot code { text-transform: none; }

/* 三步接入 */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: 1fr; counter-reset: s; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.step {
  position: relative; padding: 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.step-no {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--primary); color: var(--primary-text); font-weight: 800; font-size: 15px;
}
.step h3 { margin-top: 14px; font-size: 17px; font-weight: 800; }
.step p { margin-top: 6px; font-size: 14px; color: var(--text-2); }
.step p code { word-break: break-all; color: var(--text); }
.step-link { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; }

.code-block {
  margin-top: 22px; border-radius: var(--radius); overflow: hidden;
  background: var(--code-bg); border: 1px solid color-mix(in srgb, var(--code-bg) 70%, var(--border));
  box-shadow: var(--shadow);
}
.code-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 8px 8px 10px; border-bottom: 1px solid rgba(148, 163, 184, .16);
}
.tabs { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: none; height: 32px; padding: 0 12px; border: 0; border-radius: 7px; cursor: pointer;
  background: transparent; color: var(--code-muted); font: 600 13px var(--font); white-space: nowrap;
}
.tab:hover { color: var(--code-text); }
.tab.is-active { background: rgba(148, 163, 184, .16); color: #fff; }
.code-bar .copy { background: rgba(148, 163, 184, .12); border-color: rgba(148, 163, 184, .28); color: var(--code-text); }
.code-bar .copy:hover { border-color: #93c5fd; color: #fff; }
.code-bar .copy.is-done { background: rgba(52, 211, 153, .16); border-color: #34d399; color: #6ee7b7; }
.code {
  margin: 0; padding: 18px 18px 20px; overflow-x: auto; color: var(--code-text);
  font: 13px/1.7 var(--mono); tab-size: 2;
}
.code[hidden] { display: none; }
.code code { font-size: inherit; }
.code .js-base { color: #93c5fd; }
.code-note { margin-top: 14px; font-size: 14px; color: var(--text-2); }
.code-note code { color: var(--text); }

/* 特点 */
.features { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(4, 1fr); } }
.feature { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.feature-icon {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: var(--primary-soft); color: var(--primary);
}
.feature-icon svg { width: 20px; height: 20px; }
.feature h3 { margin-top: 14px; font-size: 16px; font-weight: 800; }
.feature p { margin-top: 6px; font-size: 14px; color: var(--text-2); }
.feature code { font-size: 12px; word-break: break-all; }

/* 即将上线 */
.soon-list { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .soon-list { grid-template-columns: repeat(2, 1fr); } }
.soon {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 20px 22px; border-radius: var(--radius); background: var(--surface);
  border: 1px dashed var(--border-strong);
}
.soon h3 { font-size: 18px; font-weight: 800; letter-spacing: .02em; }
.soon p { margin-top: 4px; font: 500 13px var(--mono); color: var(--text-3); }
.badge {
  flex: none; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
}
.soon-note { margin-top: 14px; font-size: 14px; color: var(--text-3); }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details {
  border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border);
  transition: border-color .15s;
}
.faq details[open] { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; cursor: pointer; list-style: none; font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 9px; height: 9px; margin-right: 4px;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.faq details p { padding: 0 18px 16px; color: var(--text-2); font-size: 15px; }
.faq code { word-break: break-all; color: var(--text); }

/* CTA */
.cta { padding: 0 0 72px; }
.cta-inner {
  text-align: center; padding: 40px 20px; border-radius: 20px;
  background: linear-gradient(135deg, #2563eb, #1e40af); color: #fff;
  box-shadow: 0 20px 44px rgba(37, 99, 235, .25);
}
.cta-inner h2 { font-size: clamp(22px, 4.4vw, 30px); font-weight: 800; }
.cta-inner p { margin-top: 8px; color: rgba(255, 255, 255, .82); }
.cta .btn { background: #fff; color: #1e40af; box-shadow: none; }
.cta .btn:hover { background: #eef3ff; color: #1e3a8a; }
.cta .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.cta .btn-ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }
@media (min-width: 760px) { .cta-inner { padding: 56px 32px; } }
@media (prefers-color-scheme: dark) {
  .cta-inner { background: linear-gradient(135deg, #1e3a8a, #172554); box-shadow: none; border: 1px solid var(--border-strong); }
}

/* 页脚 */
.footer { border-top: 1px solid var(--border); background: var(--surface); padding: 28px 0 32px; }
.footer-inner { display: flex; flex-direction: column; gap: 14px; }
.footer .brand { font-size: 16px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a { color: var(--text-2); font-size: 14px; }
.footer-links a:hover { color: var(--primary); }
.footer-note { font-size: 13px; color: var(--text-3); }
@media (min-width: 760px) {
  .footer-inner { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .footer-note { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
