/* ============================================================
   Foldex 官网样式 — shadcn/ui 风格（零依赖，纯 CSS）
   设计语言：zinc 中性色 · 大留白 · 圆角 · 柔和阴影
   ============================================================ */

/* ---------- 设计变量 ---------- */
:root {
  --bg: #ffffff;
  --bg-muted: #fafafa;
  --bg-subtle: #f4f4f5;
  --card: #ffffff;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #18181b;
  --text-muted: #52525b;
  --text-faint: #a1a1aa;
  --accent: #18181b;
  --accent-fg: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 12px -2px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.04);
  --shadow-lg: 0 12px 32px -8px rgb(0 0 0 / 0.15);
  --header-h: 60px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #09090b;
    --bg-muted: #0c0c0e;
    --bg-subtle: #18181b;
    --card: #101012;
    --border: #27272a;
    --border-strong: #3f3f46;
    --text: #fafafa;
    --text-muted: #a1a1aa;
    --text-faint: #71717a;
    --accent: #fafafa;
    --accent-fg: #09090b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.4);
    --shadow-md: 0 4px 12px -2px rgb(0 0 0 / 0.5);
  }
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
code {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 0.9em;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.4em;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 760px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  user-select: none;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { opacity: 0.88; }

.btn-secondary {
  background: var(--card);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { background: var(--bg-subtle); }

.btn-lg { padding: 12px 26px; font-size: 15px; }
.btn-lg svg { width: 18px; height: 18px; }

/* ---------- 导航栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}
.brand-mark { width: 22px; height: 22px; color: var(--accent); }
.brand-name { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 4px; margin-left: auto; margin-right: 8px; }
.nav-links a {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-links a:hover { background: var(--bg-subtle); color: var(--text); }
.nav-download { padding: 7px 16px; }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 0; }
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-copy { max-width: 720px; }

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}
.badge-invert { color: var(--text); border-color: var(--border-strong); }

.hero-title {
  font-size: clamp(38px, 5vw, 60px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin-bottom: 24px;
}
.text-accent { color: var(--accent); }

.hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}
.hero-meta { font-size: 13px; color: var(--text-faint); }

.hero-shot {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin-top: 72px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  background: var(--bg-subtle);
}
.hero-shot img { width: 100%; height: auto; }

.hero-stats {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 12px;
  justify-content: center;
}
.stat {
  flex: 1;
  max-width: 160px;
  padding: 12px 8px;
  text-align: center;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
}
.stat strong { display: block; font-size: 19px; letter-spacing: -0.02em; }
.stat span { font-size: 12px; color: var(--text-muted); }

/* ---------- 通用 section ---------- */
.section { padding: 96px 0; }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-title {
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}
.section-desc { font-size: 16px; color: var(--text-muted); }

/* ---------- 功能卡片 ---------- */
.grid-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 26px;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.feature-icon { font-size: 26px; margin-bottom: 14px; }
.feature h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.01em; }
.feature p { font-size: 14.5px; color: var(--text-muted); }

/* ---------- 性能（深色区块） ---------- */
.section-dark {
  background: var(--bg-muted);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.grid-performance {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.perf-item {
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
}
.perf-num {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-faint);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}
.perf-item h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.perf-item p { font-size: 14px; color: var(--text-muted); }

/* ---------- 下载 ---------- */
.download-card {
  text-align: center;
  padding: 64px 32px;
}
.download-card .section-title { margin-bottom: 8px; }
.download-card .btn { margin-top: 28px; }
.download-note { margin-top: 16px; font-size: 13px; color: var(--text-faint); }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.faq-item[open] { border-color: var(--border-strong); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-size: 15.5px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 18px;
  font-weight: 400;
  color: var(--text-faint);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-body { padding: 0 22px 18px; }
.faq-body p { font-size: 14.5px; color: var(--text-muted); }

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  background: var(--bg-muted);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.footer-desc { font-size: 13.5px; color: var(--text-muted); margin-top: 6px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 14px; color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 13px; color: var(--text-faint); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .hero { padding-top: 64px; }
  .hero-shot { margin-top: 56px; }
  .grid-features { grid-template-columns: repeat(2, 1fr); }
  .grid-performance { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-features { grid-template-columns: 1fr; }
  .grid-performance { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .section { padding: 64px 0; }
  .hero-stats { position: static; margin-top: -8px; padding: 16px; }
}
