/* ============================================================
 * FA Technology — 官网首页样式
 * 设计基调：极简 / 白底黑字 / 大留白 / 柔和光晕点睛
 *
 * 关键动画参数（统一在此说明）：
 *  - Hero 入场：fadeUp 700ms，元素间 stagger 100ms（见 .hero-anim）
 *  - 滚动进入视口：600ms，ease-out，上移 24px（见 .reveal）
 *  - 光晕呼吸：9s / 11s 交替循环，仅 transform + opacity
 *  - 卡片悬浮：450ms ease-out，translateY(-4px) + 阴影加深
 *  - 定价卡渐变描边：hover 时 conic-gradient 流动（3s/圈）
 *  - 统一缓动：cubic-bezier(.22, 1, .36, 1)（ease-out，舒缓无弹跳）
 *  - prefers-reduced-motion：全部动画降级，页面完整可用
 * ============================================================ */

/* ---------- 设计变量（浅色为默认，深色见 html[data-theme="dark"]） ---------- */
:root {
  color-scheme: light;

  --bg:            #ffffff;
  --bg-soft:       #fafafa;
  --fg:            #0b0b0c;
  --fg-2:          #3f3f46;
  --muted:         #71717a;
  --border:        rgba(11, 11, 12, .09);
  --border-strong: rgba(11, 11, 12, .16);
  --card:          #ffffff;

  /* 语义色：随主题切换 */
  --header-bg:  rgba(255, 255, 255, .72);
  --hover-bg:   rgba(11, 11, 12, .05);
  --badge-bg:   rgba(255, 255, 255, .6);
  --code-bg:    #0f0f11;
  --code-border: transparent;
  --stroke:      rgba(11, 11, 12, .45);   /* 定价卡渐变描边 */
  --stroke-soft: rgba(11, 11, 12, .28);

  --shadow-sm: 0 1px 2px rgba(11, 11, 12, .04);
  --shadow-md: 0 4px 16px rgba(11, 11, 12, .05), 0 1px 3px rgba(11, 11, 12, .04);
  --shadow-lg: 0 16px 48px rgba(11, 11, 12, .09), 0 2px 8px rgba(11, 11, 12, .05);

  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --ease-out: cubic-bezier(.22, 1, .36, 1);

  --header-h: 68px;
  --container: 1120px;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               "Noto Sans SC", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
}

/* ---------- 深色主题：同等克制，近黑底 + 细边框 + 低饱和光晕 ---------- */
html[data-theme="dark"] {
  color-scheme: dark;

  --bg:            #0a0a0b;
  --bg-soft:       #0e0e10;
  --fg:            #f4f4f5;
  --fg-2:          #c6c6cc;
  --muted:         #8b8b92;
  --border:        rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .17);
  --card:          #121214;

  --header-bg:  rgba(10, 10, 11, .7);
  --hover-bg:   rgba(255, 255, 255, .07);
  --badge-bg:   rgba(18, 18, 20, .65);
  --code-bg:    #151517;
  --code-border: rgba(255, 255, 255, .07);
  --stroke:      rgba(255, 255, 255, .5);
  --stroke-soft: rgba(255, 255, 255, .3);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .45), 0 1px 3px rgba(0, 0, 0, .4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .55), 0 2px 8px rgba(0, 0, 0, .4);
}

/* 深色下的光晕：降低亮度，保留一点冷色微光 */
html[data-theme="dark"] .glow-a {
  background: radial-gradient(circle, rgba(96, 165, 250, .16), transparent 70%);
}
html[data-theme="dark"] .glow-b {
  background: radial-gradient(circle, rgba(167, 139, 250, .15), transparent 70%);
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out);
}

h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a {
  color: inherit;
  text-decoration: none;
}

img, svg { display: block; }

::selection { background: var(--fg); color: var(--bg); }

/* 可访问性：键盘焦点可见 */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

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

/* 锚点偏移，避免被固定导航遮挡 */
section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .3s var(--ease-out),
              background-color .3s var(--ease-out),
              border-color .3s var(--ease-out),
              opacity .3s var(--ease-out);
}

.btn:active { transform: scale(.98); }

.btn-primary {
  background: var(--fg);
  color: var(--bg);
}
.btn-primary:hover { opacity: .82; }

.btn-outline {
  background: var(--bg);
  border-color: var(--border-strong);
  color: var(--fg);
}
.btn-outline:hover { border-color: var(--fg); }

.btn-ghost { color: var(--fg-2); }
.btn-ghost:hover { color: var(--fg); }

.btn-lg {
  padding: 13px 30px;
  font-size: 15px;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease-out), background-color .3s var(--ease-out);
}

.site-header.scrolled { border-bottom-color: var(--border); }

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;  /* 移动端隐藏中部导航后，菜单按钮仍靠右 */
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -.01em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--fg);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.site-nav { flex: 1; }

.site-nav ul {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.site-nav a {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--fg-2);
  transition: color .25s var(--ease-out), background-color .25s var(--ease-out);
}

.site-nav a:hover {
  color: var(--fg);
  background: var(--hover-bg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 深色模式切换：圆形幽灵按钮，只保留图标 */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: none;
  color: var(--fg-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out);
}

/* 语言切换：文字胶囊按钮，显示目标语言 */
.lang-toggle {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: none;
  color: var(--fg-2);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out);
}

.lang-toggle:hover {
  background: var(--hover-bg);
  color: var(--fg);
}

.theme-toggle:hover {
  background: var(--hover-bg);
  color: var(--fg);
}

.theme-toggle svg { width: 17px; height: 17px; }

/* 浅色显示月亮（切到深色），深色显示太阳（切到浅色） */
.theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* 移动端菜单按钮（桌面端隐藏） */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav-toggle span {
  width: 20px;
  height: 1.5px;
  background: var(--fg);
  transition: transform .3s var(--ease-out);
}

.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child  { transform: translateY(-3.75px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 99;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px 24px;
  /* 极矮视口下可滚动，避免菜单被裁切 */
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
}

.mobile-menu nav a {
  display: block;
  padding: 12px 0;
  font-size: 16px;
  border-bottom: 1px solid var(--border);
}

.mobile-menu-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.mobile-menu-actions .btn { flex: 1; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  /* 上多下少的留白，让首屏内容整体略低于视觉中线 */
  padding: calc(var(--header-h) + 120px) 0 96px;
  text-align: center;
}

/* 柔和光晕：唯一的一处色彩点睛，低饱和蓝 + 紫 */
.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform, opacity;
}

.glow-a {
  width: 560px;
  height: 560px;
  left: 50%;
  top: -180px;
  margin-left: -560px;
  background: radial-gradient(circle, rgba(191, 219, 254, .55), transparent 70%);
  /* 呼吸动画：9s 交替，仅缩放与透明度 */
  animation: breathe 9s ease-in-out infinite alternate;
}

.glow-b {
  width: 520px;
  height: 520px;
  left: 50%;
  top: -120px;
  background: radial-gradient(circle, rgba(221, 214, 254, .5), transparent 70%);
  /* 与 glow-a 错相位，11s 交替 */
  animation: breathe 11s ease-in-out -4s infinite alternate;
}

@keyframes breathe {
  from { transform: scale(1);    opacity: .75; }
  to   { transform: scale(1.12); opacity: 1; }
}

.hero-inner { position: relative; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--badge-bg);
  font-size: 13px;
  color: var(--fg-2);
  transition: border-color .3s var(--ease-out);
}

.hero-badge:hover { border-color: var(--border-strong); }

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
}

.hero-title {
  margin-top: 28px;
  font-size: clamp(56px, 9vw, 104px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.05;
}

/* 首页无徽标时，标题作为首元素不再需要顶部间距 */
.hero-inner > .hero-title:first-child {
  margin-top: 0;
}

.hero-claim {
  margin-top: 20px;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--fg);
}

.hero-sub {
  margin: 18px auto 0;
  max-width: 600px;
  font-size: 16px;
  font-weight: 400;
  color: var(--muted);
  text-wrap: pretty;   /* 避免中文孤字 / 断词跨行的观感问题，不支持时自动回退 */
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* 产品页紧凑 Hero：为下方内容让出首屏空间 */
.hero.is-compact {
  padding: calc(var(--header-h) + 88px) 0 72px;
}

/* 工作室品牌名作为主标题时略降字号，避免长串溢出 */
.hero-title.is-brand {
  font-size: clamp(42px, 6.4vw, 84px);
  letter-spacing: -.045em;
  max-width: 900px;
  margin-inline: auto;
}

/* 产品页展示区：内容收窄、与 Hero 衔接 */
.showcase { padding-top: 0; }

.showcase-visual { margin-top: 8px; }

/* 术语防断行：避免「控制流平坦化」等专业词在一行末尾被拆开 */
.nw { white-space: nowrap; }

/* Hero 入场动画：700ms fadeUp，stagger 由 --d 控制（0/100/200/300/400ms） */
html.anim .hero-anim {
  opacity: 0;
  animation: fadeUp .7s var(--ease-out) forwards;
  animation-delay: var(--d, 0ms);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 通用区块 ---------- */
.section { padding: 112px 0; }

.section-soft { background: var(--bg-soft); }

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--muted);
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: clamp(30px, 4.5vw, 44px);
  font-weight: 700;
  letter-spacing: -.03em;
}

.section-sub {
  margin-top: 16px;
  font-size: 16px;
  color: var(--muted);
  text-wrap: pretty;
}

/* 产品免责声明（FALauncher 页）：细线分隔、弱化层级 */
.product-disclaimer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  max-width: 560px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  text-wrap: pretty;
}

/* ---------- 滚动进入动画（IntersectionObserver 添加 .in） ----------
 * 仅当 JS 确认未开启 reduced-motion 时，<html> 才有 .anim 类，
 * 因此关闭动效 / 禁用 JS 时内容始终可见。 */
html.anim .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}

html.anim .reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 产品展示 ---------- */
.product-list {
  display: grid;
  gap: 24px;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
}

/* 卡片悬浮：轻微抬升 + 阴影加深 */
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-card-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 48px;
  align-items: center;
}

.product-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.product-category {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .08em;
}

/* 即将推出状态标签 */
.product-status {
  padding: 2px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--muted);
}

.product-name {
  margin-top: 10px;
  font-size: clamp(28px, 3.5vw, 36px);
  font-weight: 700;
  letter-spacing: -.02em;
}

.product-tagline {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  max-width: 380px;
}

.product-tags {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-tags li {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--fg-2);
  background: var(--bg-soft);
}

.product-cta {
  margin-top: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
}

.product-cta .arrow { transition: transform .3s var(--ease-out); }
.product-cta:hover .arrow { transform: translateX(4px); }

/* 代码混淆可视化：左右两个版本缓慢交叉淡入淡出（7s 循环） */
.code-window {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px 20px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.code-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.code-dots { display: flex; gap: 6px; }
.code-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
}

.code-label {
  position: relative;
  height: 16px;
  min-width: 64px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: rgba(255, 255, 255, .45);
  text-align: right;
}

.code-label span {
  position: absolute;
  right: 0;
  top: 0;
  transition: opacity .8s var(--ease-out);
}

.code-body {
  position: relative;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.75;
  white-space: pre;
  /* 两个代码版本网格堆叠在同一格，容器高度取两者较大值，无滚动条 */
  display: grid;
  overflow: hidden;
}

.code-body pre {
  margin: 0;
  grid-area: 1 / 1;
  overflow: hidden;
}

/* 静态基态：仅显示「混淆前」，避免无动画时两个版本叠在一起 */
.code-before { color: rgba(255, 255, 255, .82); }

.code-after {
  color: rgba(255, 255, 255, .5);
  opacity: 0;
}

/* 串行切换：A 淡出 → 短暂留白 → B 淡入，避免两版文字重叠 */
html.anim .code-before,
html.anim .code-label .label-before {
  animation: codeSwapA 7s ease-in-out infinite;
}
html.anim .code-after,
html.anim .code-label .label-after {
  animation: codeSwapB 7s ease-in-out infinite;
}

@keyframes codeSwapA {
  0%, 44%  { opacity: 1; }
  48%, 94% { opacity: 0; }
  100%     { opacity: 1; }
}

@keyframes codeSwapB {
  0%, 51%   { opacity: 0; }
  55%, 89%  { opacity: 1; }
  93%, 100% { opacity: 0; }
}

.code-label .label-after { opacity: 0; }

/* ---------- 启动器骨架预览（即将推出的产品占位视觉） ----------
 * 与代码窗同一深色语言；骨架条 + 虚线表示「开发中」，不虚构真实界面 */
.app-preview {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-lg);
  padding: 18px 20px 20px;
  box-shadow: var(--shadow-md);
}

.app-preview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.app-preview-tag {
  padding: 2px 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255, 255, 255, .48);
}

.app-preview-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-account {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.app-avatar {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}

/* 骨架条 */
.sk {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .1);
}

.sk-dim { background: rgba(255, 255, 255, .055); }
.sk-w55 { width: 55%; }
.sk-w45 { width: 45%; }
.sk-w40 { width: 40%; }
.sk-w25 { width: 25%; }

.app-versions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-version {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
}

.app-version.is-active {
  border-color: rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .04);
}

.app-version-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
}

.app-version.is-active .app-version-dot {
  background: rgba(255, 255, 255, .8);
}

.app-launch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 36px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .03);
}

.app-play {
  width: 0;
  height: 0;
  border-left: 6px solid rgba(255, 255, 255, .35);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}

/* 次级产品卡网格：开发中产品与未来产品预留位同列排布 */
.product-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

/* 次级产品卡：更紧凑的排版，与主推大卡形成明确层级 */
.product-card.compact {
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.product-card.compact .product-name {
  margin-top: 10px;
  font-size: 24px;
}

.product-card.compact .product-tagline {
  margin-top: 8px;
  font-size: 14px;
  max-width: none;
}

.product-card.compact .product-cta {
  margin-top: auto;
  padding-top: 22px;
}

/* 未来产品预留位：虚线骨架卡 */
.product-skeleton {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  min-height: 160px;
  text-align: center;
}

.product-skeleton .plus {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 300;
}

.product-skeleton p { font-size: 13px; }

/* ---------- 功能亮点 ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* 首页原则卡：三列自适应 */
.feature-grid.cols-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform .45s var(--ease-out),
              box-shadow .45s var(--ease-out),
              border-color .45s var(--ease-out);
}

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

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  display: grid;
  place-items: center;
  color: var(--fg);
  /* 图标微动：悬浮时轻微上移 */
  transition: transform .4s var(--ease-out);
}

.feature-card:hover .feature-icon { transform: translateY(-3px); }

.feature-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  margin-top: 18px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.feature-card p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

/* ---------- 定价 ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 880px;
  margin-inline: auto;
}

.plan-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  display: flex;
  flex-direction: column;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* 渐变描边：默认透明，hover 时淡入并缓慢流动（3s/圈）
 * 使用 mask 合成实现 1px 描边；@property 不支持时退化为静态渐变 */
@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.plan-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--angle),
              transparent 0%, var(--stroke) 12%,
              transparent 30%, transparent 55%,
              var(--stroke-soft) 67%, transparent 85%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .4s var(--ease-out);
  pointer-events: none;
}

.plan-card:hover::before {
  opacity: 1;
  animation: spinAngle 3s linear infinite;
}

@keyframes spinAngle { to { --angle: 360deg; } }

.plan-badge {
  position: absolute;
  top: -13px;
  left: 36px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
}

.plan-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.plan-audience {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

.plan-price {
  margin-top: 28px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.plan-price .amount {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
}

.plan-price .unit {
  font-size: 15px;
  color: var(--muted);
}

.plan-note {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.plan-benefits {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.plan-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--fg-2);
}

.plan-benefits .check {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  color: var(--fg);
}

.plan-card .btn {
  margin-top: 32px;
  width: 100%;
}

/* 推荐方案：黑色主按钮 + 卡片微调 */
.plan-card.featured {
  border-color: var(--border-strong);
}

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

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color .3s var(--ease-out);
}

.faq-item[open] { border-color: var(--border-strong); }

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

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

.faq-item .chev {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: transform .35s var(--ease-out);
}

.faq-item[open] .chev { transform: rotate(180deg); }

.faq-answer {
  padding: 0 22px 20px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.8;
}

/* ---------- 文档中心 ---------- */
.doc-group { margin-bottom: 48px; }
.doc-group:last-child { margin-bottom: 0; }

.doc-group-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.doc-items {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 4px;
  border-bottom: 1px solid var(--border);
  transition: background-color .3s var(--ease-out);
}

a.doc-item {
  color: inherit;
  text-decoration: none;
}

a.doc-item:hover { background: var(--hover-bg); }

.doc-item-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.doc-item-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.doc-item-desc {
  font-size: 14px;
  color: var(--muted);
}

.doc-item-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}

.doc-badge {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.doc-badge.is-available {
  border-color: var(--border-strong);
  color: var(--fg-2);
}

.doc-arrow {
  color: var(--muted);
  transition: transform .3s var(--ease-out), color .3s var(--ease-out);
}

a.doc-item:hover .doc-arrow {
  transform: translateX(4px);
  color: var(--fg);
}

.doc-item.is-disabled { opacity: .55; }

/* ---------- 免责声明页 ---------- */
.legal-body { padding-bottom: 112px; }

.legal-section {
  padding: 28px 0;
  border-top: 1px solid var(--border);
}

.legal-section h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.legal-section p {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--muted);
  text-wrap: pretty;
}

.legal-updated {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .doc-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .doc-item-meta { align-self: flex-start; }
}

/* ---------- 结尾 CTA ---------- */
.cta-band { text-align: center; }

.cta-inner h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -.03em;
}

.cta-inner p {
  margin: 16px auto 32px;
  color: var(--muted);
  max-width: 440px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 64px;
  background: var(--bg);
}

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

.footer-tagline {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}

.footer-col h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 14px;
  color: var(--muted);
  transition: color .25s var(--ease-out);
}

.footer-col a:hover { color: var(--fg); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  padding-bottom: 32px;
}

.footer-bottom p {
  font-size: 13px;
  color: var(--muted);
}

/* 法律管辖声明：弱化层级，置于版权下方 */
.footer-legal {
  margin-top: 6px;
  font-size: 12px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .product-card-inner {
    grid-template-columns: 1fr;
    padding: 36px;
    gap: 36px;
  }

  .feature-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 720px) {
  .site-nav, .header-actions { display: none; }
  .nav-toggle { display: flex; }

  .header-inner { gap: 16px; }

  /* 品牌名较长时在窄屏紧凑换行，保持与图标垂直居中 */
  .brand-name {
    max-width: 118px;
    line-height: 1.3;
    font-size: 14px;
  }

  /* 语言按钮收紧，避免「中文」被拆成两行 */
  .lang-toggle {
    padding: 0 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  .hero { padding: calc(var(--header-h) + 64px) 0 88px; }

  .section { padding: 80px 0; }

  .pricing-grid { grid-template-columns: 1fr; }

  .feature-grid { grid-template-columns: 1fr; }

  .plan-badge { left: 28px; }
  .plan-card { padding: 28px; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- 减少动态效果：关闭所有动画，内容立即可见 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  /* 代码窗降级为上下并列静态展示，两个版本均可见 */
  .code-body { display: block; }
  .code-body .code-after { opacity: 1; margin-top: 12px; }
  .code-label .label-after { position: static; opacity: 1; }
}
