/* ===== 设计令牌 ===== */
:root {
  /* 色板:明亮清新 + 紫色品牌色 */
  --bg: #ffffff;
  --bg-soft: #f7f8fc;
  --bg-alt: #fafbff;
  --surface: #ffffff;
  --border: #ebecf3;
  --border-strong: #d8dae8;

  --text: #1a1d29;
  --text-soft: #4a4e69;
  --text-muted: #8a8fa3;

  --primary: #0EA5E9;     /* 亮青蓝 — sky-500 */
  --primary-hover: #0284C7; /* 深一档青蓝 — sky-600 */
  --primary-soft: #E0F2FE; /* 浅蓝底 — sky-100 */
  --accent: #5ed4c1;     /* 薄荷点缀 */
  --accent-soft: #e6f8f4;
  --warning: #ff8a4c;

  --shadow-sm: 0 1px 2px rgba(20, 22, 38, 0.04), 0 2px 8px rgba(20, 22, 38, 0.04);
  --shadow-md: 0 4px 12px rgba(20, 22, 38, 0.06), 0 8px 32px rgba(20, 22, 38, 0.05);
  --shadow-lg: 0 12px 40px rgba(14, 165, 233, 0.18);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --container: 1120px;
  --container-narrow: 760px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
}

/* ===== 基础重置 ===== */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont,
    'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  margin: 0 0 var(--space-4) 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.6rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

p { margin: 0 0 var(--space-4) 0; }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--primary-hover); }

img, svg { max-width: 100%; display: block; }

code {
  font-family: 'SF Mono', 'JetBrains Mono', Consolas, Monaco, monospace;
  background: var(--primary-soft);
  color: var(--primary-hover);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
}

.highlight {
  background: linear-gradient(120deg, transparent 0%, transparent 40%, var(--accent-soft) 40%, var(--accent-soft) 90%, transparent 90%);
  padding: 0 4px;
}

.muted { color: var(--text-muted); }

/* ===== 容器 ===== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-5);
}
.container-narrow { max-width: var(--container-narrow); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.32);
}
.btn-primary:hover {
  background: var(--primary-hover);
  color: white;
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.42);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.btn-small { padding: 8px 16px; font-size: 0.9rem; }
.btn-large { padding: 16px 28px; font-size: 1.05rem; border-radius: var(--radius-lg); }

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: contain;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.site-footer .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.nav-links a {
  color: var(--text-soft);
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 36px;
  height: 36px;
  padding: 8px;
  background: transparent;
  border: 0;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.mobile-menu a { color: var(--text); font-weight: 500; }
.mobile-menu .btn { text-align: center; justify-content: center; }

/* ===== Hero ===== */
.hero {
  padding: var(--space-9) 0 var(--space-8);
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(14, 165, 233, 0.14), transparent 60%),
    var(--bg);
  overflow: hidden;
}

.hero-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  align-items: center;
  justify-content: space-between;
}

.hero-copy {
  flex: 1 1 480px;
  min-width: 0;
}

.eyebrow {
  display: inline-block;
  padding: 6px 12px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--space-5);
}

.hero-copy .lede {
  font-size: 1.1rem;
  color: var(--text-soft);
  max-width: 540px;
  margin-bottom: var(--space-6);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}
.hero-points li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-points span { color: var(--accent); font-weight: 700; }

/* Hero 视觉 — flex 列布局,无绝对定位 */
.hero-visual {
  flex: 0 1 460px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.visual-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  box-shadow: var(--shadow-md);
  font-size: 0.9rem;
  width: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.visual-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(20, 22, 38, 0.10);
}

/* 三张卡错位 + 微旋转,只在 hover 时归正 */
.card-1 {
  align-self: flex-start;
  width: 88%;
  transform: rotate(-1.5deg);
}
.card-2 {
  align-self: flex-end;
  width: 84%;
  transform: rotate(1.5deg);
}
.card-3 {
  align-self: flex-start;
  width: 92%;
  transform: rotate(-1deg);
}
.visual-card:hover {
  transform: rotate(0deg) translateY(-3px);
}

.card-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: var(--space-2);
}

.visual-card p { margin: 0; color: var(--text); }
.visual-card .muted { font-size: 0.85em; }

.backlinks {
  list-style: none;
  padding: 0;
  margin: 0;
}
.backlinks li {
  padding: 2px 0;
  color: var(--text-soft);
  font-size: 0.85rem;
}

/* 大纲树(模拟 RoamEdit / Workflowy 的块级缩进) */
.tree {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.7;
}
.tree ul {
  list-style: none;
  margin: 4px 0 4px 14px;
  padding: 0 0 0 12px;
  border-left: 2px solid var(--border-strong);
}
.tree > li {
  position: relative;
  padding: 3px 0 3px 16px;
  color: var(--text);
  font-weight: 600;
}
.tree > li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 3px;
  color: var(--text-muted);
  font-size: 0.75rem;
}
.tree ul > li {
  position: relative;
  padding: 2px 0 2px 14px;
  color: var(--text-soft);
  font-weight: 400;
  font-size: 0.85rem;
}
.tree ul > li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--surface);
}
.tree em {
  font-style: normal;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-left: 4px;
}

.visual-lines { display: none; }
@keyframes dash { to { stroke-dashoffset: -200; } }

/* ===== 信任带 ===== */
.trust {
  padding: var(--space-7) 0;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.trust-label {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-5);
}
.trust-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-5);
  font-size: 0.95rem;
  color: var(--text-soft);
}

/* ===== 通用 Section ===== */
.section { padding: var(--space-9) 0; }
.section-alt { background: var(--bg-soft); }

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--space-8);
}
.section-header .section-sub {
  color: var(--text-soft);
  font-size: 1.05rem;
  margin: 0;
}

/* ===== 特性网格 ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-soft);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  border-radius: var(--radius);
  font-size: 1.5rem;
  margin-bottom: var(--space-4);
}

.feature-card h3 { margin-bottom: var(--space-3); }
.feature-card p { color: var(--text-soft); margin: 0; }

/* ===== 步骤 ===== */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  counter-reset: step;
}
.steps li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  position: relative;
}
.step-num {
  display: inline-block;
  font-family: 'SF Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: var(--space-4);
}
.steps h3 { margin-bottom: var(--space-3); }
.steps p { color: var(--text-soft); margin: 0; }

/* ===== 评价 ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
}

.testimonial {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.testimonial:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.testimonial blockquote {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--text);
}
.testimonial blockquote::before {
  content: '"';
  display: block;
  font-size: 3rem;
  line-height: 0.5;
  color: var(--primary);
  margin-bottom: var(--space-2);
}
.testimonial figcaption {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.9rem;
}
.testimonial .role {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-weight: 600;
  flex-shrink: 0;
}

/* ===== FAQ ===== */
.faq-list { display: flex; flex-direction: column; gap: var(--space-3); }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  transition: border-color 0.15s ease;
}
.faq-item[open] { border-color: var(--primary-soft); }
.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  cursor: pointer;
  font-weight: 600;
  font-size: 1.02rem;
  list-style: none;
  color: var(--text);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon {
  width: 18px;
  height: 18px;
  position: relative;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--text-soft);
  border-radius: 1px;
}
.faq-icon::before {
  width: 14px;
  height: 2px;
  transform: translate(-50%, -50%);
}
.faq-icon::after {
  width: 2px;
  height: 14px;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
}
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-body {
  margin-top: var(--space-4);
  color: var(--text-soft);
  line-height: 1.7;
}
.faq-body p { margin: 0; }

/* ===== CTA 区块 ===== */
.cta-section { padding: var(--space-9) 0; }
.cta-card {
  background:
    radial-gradient(ellipse 60% 80% at 50% 50%, rgba(255, 255, 255, 0.08), transparent),
    linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  border-radius: var(--radius-xl);
  padding: var(--space-9) var(--space-7);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.cta-card h2 { color: white; }
.cta-card p { color: rgba(255, 255, 255, 0.85); font-size: 1.1rem; margin-bottom: var(--space-6); }
.cta-card .btn-primary {
  background: white;
  color: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
}
.cta-card .btn-primary:hover { background: var(--bg-soft); color: var(--primary-hover); }
.cta-card .btn-ghost {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.4);
}
.cta-card .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}
.cta-meta {
  margin-top: var(--space-5);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7) !important;
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: var(--space-8) 0 var(--space-5);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: var(--space-7);
  margin-bottom: var(--space-7);
}
.footer-brand p { color: var(--text-soft); margin-top: var(--space-3); }
.footer-col h4 {
  margin-bottom: var(--space-3);
  font-size: 0.9rem;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer-col { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-col a {
  color: var(--text-soft);
  font-size: 0.95rem;
}
.footer-col a:hover { color: var(--primary); }

.footer-bottom {
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-bottom p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .hero-grid { flex-direction: column; align-items: stretch; gap: var(--space-7); }
  .hero-copy, .hero-visual { flex: 1 1 auto; max-width: 100%; min-width: 0; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu[data-open="true"] { display: flex; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: var(--space-7) 0; }
  .section { padding: var(--space-7) 0; }
  .cta-card { padding: var(--space-7) var(--space-5); }
  .cta-row .btn { width: 100%; justify-content: center; }
}

/* 外链图标(↗) — 视觉上提示"新标签页打开" */
.btn-external .external-icon {
  display: inline-block;
  font-size: 0.85em;
  opacity: 0.7;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn-external:hover .external-icon {
  opacity: 1;
  transform: translate(2px, -2px);
}

/* 屏幕阅读器专用 — 视觉隐藏但可被读屏 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== 无障碍 ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* 焦点可见性 */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}