/* ============ Vouch 官网样式 ============ */

:root {
  --indigo: #4f46e5;
  --indigo-light: #6366f1;
  --indigo-dark: #4338ca;
  --ink: #0f172a;
  --ink-2: #334155;
  --ink-3: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --code-bg: #0f172a;
  --code-ink: #e2e8f0;
  --ok: #34d399;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 64px rgba(15, 23, 42, .14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow { max-width: 800px; }

/* grid/flex 子元素默认 min-width:auto，会被 pre 长行撑破移动端宽度 —— 允许收缩 */
.hero-inner > *,
.pain-grid > *,
.flow > *,
.sides > *,
.feature-grid > *,
.code-cols > *,
.steps > *,
.footer-inner > * {
  min-width: 0;
}

body { overflow-x: clip; }

code {
  font-family: var(--mono);
  font-size: .9em;
  background: #eef2ff;
  color: var(--indigo-dark);
  padding: .1em .4em;
  border-radius: 6px;
}

/* 深色代码块 / 终端里的 code 还原为透明背景 */
.code-block code,
.terminal-body code {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

/* ============ 导航 ============ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.02em;
}

.brand-logo { width: 28px; height: 28px; }

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}

.nav-links a:hover { color: var(--indigo); background: #eef2ff; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

/* ============ 按钮 ============ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--indigo-light), var(--indigo-dark));
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, .35);
}

.btn-primary:hover { box-shadow: 0 8px 24px rgba(79, 70, 229, .45); transform: translateY(-1px); }

.btn-ghost { color: var(--ink-2); background: transparent; }
.btn-ghost:hover { background: #f1f5f9; color: var(--ink); }

.btn-outline { color: var(--indigo); border-color: #c7d2fe; background: #fff; }
.btn-outline:hover { background: #eef2ff; }

.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, .4); background: transparent; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .1); }

.btn-sm { padding: 8px 16px; font-size: 14px; }

/* ============ Hero ============ */

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 88px;
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(99, 102, 241, .12), transparent 60%),
    radial-gradient(700px 360px at 0% 110%, rgba(99, 102, 241, .08), transparent 60%),
    var(--bg);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}

.badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--indigo);
  background: #eef2ff;
  border: 1px solid #e0e7ff;
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
  letter-spacing: .02em;
}

.hero h1 {
  font-size: 46px;
  line-height: 1.2;
  letter-spacing: -.03em;
  font-weight: 800;
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: normal;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--indigo-light), var(--indigo-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 17px;
  color: var(--ink-3);
  max-width: 520px;
  margin-bottom: 32px;
}

/* 「飞书 / 玻尔」马克笔高亮 */
.hero-sub strong {
  color: var(--ink);
  font-weight: 600;
  background: linear-gradient(transparent 60%, #c7d2fe 60%);
  padding: 0 1px;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* 身份源 chips */
.idp-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.idp-label { font-size: 13px; color: var(--ink-3); }

.idp-chip {
  font-size: 13px;
  font-weight: 600;
  color: var(--indigo-dark);
  background: #eef2ff;
  border: 1px solid #e0e7ff;
  padding: 3px 13px;
  border-radius: 999px;
}

.idp-more { font-size: 12.5px; color: #94a3b8; }

.hero-note {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--ink-3);
  letter-spacing: .01em;
}

/* 终端 mock */

.terminal {
  background: var(--code-bg);
  border-radius: 14px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .06) inset;
  overflow: hidden;
  transform: rotate(.4deg);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, .04);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #f87171; }
.dot-y { background: #fbbf24; }
.dot-g { background: #34d399; }

.terminal-title {
  margin-left: 8px;
  font-size: 12px;
  color: #94a3b8;
  font-family: var(--mono);
}

.terminal-body {
  padding: 20px 22px 24px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--code-ink);
  overflow-x: auto;
}

.t-prompt { color: var(--indigo-light); font-weight: 700; }
.t-dim { color: #94a3b8; }
.t-comment { color: #64748b; }
.t-ok { color: var(--ok); }
.t-str { color: #fbbf24; }

/* ============ 通用 section ============ */

.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-align: center;
  margin-bottom: 14px;
}

.section-sub {
  text-align: center;
  color: var(--ink-3);
  font-size: 16.5px;
  max-width: 720px;
  margin: 0 auto 48px;
}

/* ============ 痛点对比 ============ */

.pain-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  max-width: 920px;
  margin: 0 auto;
}

.pain-card {
  border-radius: var(--radius);
  padding: 28px 30px;
  height: 100%;
}

.pain-card h3 { font-size: 18px; margin-bottom: 14px; }

.pain-card ul { list-style: none; }

.pain-card li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  color: var(--ink-2);
  font-size: 15px;
}

.pain-card li:last-child { margin-bottom: 0; }

.pain-before {
  background: #fff;
  border: 1px solid var(--line);
}

.pain-before li::before {
  content: "✕";
  position: absolute;
  left: 0;
  color: #f87171;
  font-weight: 700;
}

.pain-after {
  background: linear-gradient(160deg, #eef2ff, #fff 70%);
  border: 1px solid #c7d2fe;
  box-shadow: var(--shadow-md);
}

.pain-after li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--indigo);
  font-weight: 700;
}

.pain-arrow {
  font-size: 28px;
  color: var(--indigo-light);
  font-weight: 700;
}

/* ============ 工作原理 ============ */

.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 40px;
}

.flow-step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow-sm);
}

.flow-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--indigo-light), var(--indigo-dark));
  margin-bottom: 14px;
}

.flow-step h3 { font-size: 17px; margin-bottom: 8px; }
.flow-step p { font-size: 14.5px; color: var(--ink-3); }

.flow-arrow {
  align-self: center;
  font-size: 24px;
  color: #a5b4fc;
  font-weight: 700;
}

.sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.side-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--indigo);
  border-radius: var(--radius);
  padding: 26px 28px;
}

.side-card h3 { font-size: 17px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.side-card p { font-size: 15px; color: var(--ink-3); }

.side-tag {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--indigo);
  background: #eef2ff;
  padding: 3px 10px;
  border-radius: 999px;
}

/* ============ 特性 ============ */

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

.feature-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #c7d2fe;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--indigo);
  background: #eef2ff;
  margin-bottom: 16px;
}

.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { font-size: 14.5px; color: var(--ink-3); }

/* ============ SDK tabs ============ */

.tabs {
  max-width: 980px;
  margin: 0 auto;
}

.tab-list {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.tab {
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-3);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 22px;
  cursor: pointer;
  transition: all .15s;
}

.tab:hover { color: var(--indigo); border-color: #c7d2fe; }

.tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--indigo-light), var(--indigo-dark));
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(79, 70, 229, .3);
}

.code-block {
  background: var(--code-bg);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, .05);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: #94a3b8;
  font-size: 12.5px;
  font-family: var(--mono);
}

.copy-btn {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 7px;
  padding: 4px 12px;
  cursor: pointer;
  transition: all .15s;
}

.copy-btn:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.copy-btn.copied { color: var(--ok); border-color: rgba(52, 211, 153, .5); }

.code-block pre {
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--code-ink);
}

.code-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.code-cols .code-block { margin-bottom: 0; }

.panel-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--ink-3);
  text-align: center;
}

/* ============ 接入流程 ============ */

.steps {
  list-style: none;
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.step {
  display: flex;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
}

.step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--indigo-light), var(--indigo-dark));
}

.step h3 { font-size: 16.5px; margin-bottom: 6px; }
.step p { font-size: 15px; color: var(--ink-3); }

/* ============ FAQ ============ */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 24px;
  transition: border-color .15s, box-shadow .15s;
}

.faq-item[open] {
  border-color: #c7d2fe;
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  font-size: 16px;
  font-weight: 600;
  padding: 18px 36px 18px 0;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 400;
  color: var(--indigo-light);
  transition: transform .2s;
}

.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.faq-item p {
  padding: 0 0 20px;
  color: var(--ink-3);
  font-size: 15px;
}

/* ============ CTA ============ */

.cta {
  background:
    radial-gradient(700px 300px at 80% 0%, rgba(255, 255, 255, .12), transparent 60%),
    linear-gradient(135deg, var(--indigo-light), var(--indigo-dark));
  color: #fff;
  padding: 80px 0;
  text-align: center;
}

.cta h2 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 12px; }
.cta p { color: rgba(255, 255, 255, .85); margin-bottom: 30px; font-size: 16.5px; }
.cta .hero-cta { justify-content: center; }
.cta .btn-primary { background: #fff; color: var(--indigo-dark); box-shadow: 0 4px 14px rgba(0, 0, 0, .2); }

/* ============ Footer ============ */

.footer {
  background: var(--ink);
  color: #94a3b8;
  padding: 56px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer .brand { color: #fff; margin-bottom: 14px; }
.footer-brand p { font-size: 14px; }

.footer-col h4 {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: .02em;
}

.footer-col a {
  display: block;
  color: #94a3b8;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 9px;
  transition: color .15s;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-top: 22px;
  padding-bottom: 22px;
  font-size: 13px;
}

.footer-bottom code {
  background: rgba(255, 255, 255, .08);
  color: #c7d2fe;
}

/* ============ 响应式 ============ */

@media (max-width: 900px) {
  .hero { padding: 64px 0; }
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero h1 { font-size: 36px; }
  .hero-visual { max-width: 560px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); justify-self: center; }
  .pain-grid { grid-template-columns: 1fr; }
  .pain-arrow { transform: rotate(90deg); justify-self: center; }
  .code-cols { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 12px 24px 18px;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hero h1 { font-size: 30px; }
  .section { padding: 64px 0; }
  .section-title { font-size: 26px; }
  .feature-grid { grid-template-columns: 1fr; }
  .sides { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}
