/* ==========================================================================
   NexusDesk 官网样式
   设计令牌与产品控制台保持一致，取自：
     frontend/src/styles/theme.ts
     frontend/src/styles/design-system.css
   修改配色请只改下面这一段，不要散落到各处。
   ========================================================================== */

:root {
  /* 主色与文字 */
  --ui-accent: #6562ff;
  --ui-accent-hover: #514ecf;
  --ui-accent-soft: #efefff;
  --ui-ink: #252936;
  --ui-muted: #747b8d;
  --ui-faint: #9aa0ae;

  /* 线与面 */
  --ui-line: #e7e9f1;
  --ui-line-soft: #eef0f5;
  --ui-surface: #f8f9fc;
  --ui-white: #ffffff;

  /* 状态色（与产品一致：正常绿、处理中紫、待处理黄、失败红） */
  --ui-ok: #1f9d63;
  --ui-warn: #d99a1a;
  --ui-fail: #dc4b4b;

  /* 形状 */
  --ui-radius: 8px;
  --ui-control-radius: 6px;
  --ui-shadow: 0 8px 28px rgba(35, 40, 70, .08);
  --ui-shadow-sm: 0 1px 2px rgba(35, 40, 70, .04);

  /* 排版 */
  --font-sans: Inter, "Microsoft YaHei", "Nirmala UI", "Noto Sans Devanagari", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", monospace;

  /* 布局 */
  --wrap: 1140px;
  --wrap-wide: 1280px;
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  color: var(--ui-ink);
  background: var(--ui-white);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--ui-accent); text-decoration: none; }
a:hover { color: var(--ui-accent-hover); }

h1, h2, h3 { line-height: 1.3; margin: 0; letter-spacing: -.02em; }
h1 { font-size: 40px; font-weight: 700; }
h2 { font-size: 26px; font-weight: 650; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0 0 1em; }

code, pre { font-family: var(--font-mono); font-size: 13px; }

:focus-visible {
  outline: 3px solid rgba(101, 98, 255, .35);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 布局容器 ---------- */

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: var(--wrap-wide); }

section { padding: 72px 0; }
section.tight { padding: 48px 0; }
section.surface { background: var(--ui-surface); border-top: 1px solid var(--ui-line-soft); border-bottom: 1px solid var(--ui-line-soft); }

.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head p { color: var(--ui-muted); font-size: 16px; margin: 12px 0 0; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ui-accent); margin-bottom: 12px;
}

/* ---------- 顶部导航 ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--ui-line-soft);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--ui-ink); }
.brand:hover { color: var(--ui-ink); }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: var(--ui-accent); color: #fff;
  display: grid; place-items: center; font-size: 15px; font-weight: 700;
}
.nav-links { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.nav-links a { color: var(--ui-muted); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--ui-ink); }
.nav-links a.active { color: var(--ui-accent); }
.nav-cta { display: flex; align-items: center; gap: 10px; }

/* 语言切换：原生 select，避免自己实现下拉菜单的无障碍语义。
   用文字而非旗帜图标，旗帜对国家/地区有歧义。 */
.lang-select { display: inline-flex; align-items: center; }
.lang-select select {
  font: inherit; font-size: 13.5px; font-weight: 500; color: var(--ui-ink);
  height: 32px; padding: 0 26px 0 10px; cursor: pointer;
  background-color: #fff; border: 1px solid var(--ui-line);
  border-radius: var(--ui-control-radius);
  /* 自绘箭头，避免各浏览器原生箭头样式不一致 */
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23747b8d' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
.lang-select select:hover { border-color: #cfd3e0; }
.lang-select select:focus { border-color: #8086fb; box-shadow: 0 0 0 2px rgba(101, 98, 255, .08); outline: none; }
.lang-fallback { font-size: 13.5px; font-weight: 500; }

/* 仅供读屏软件使用的文本 */
.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;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 18px; border-radius: var(--ui-control-radius);
  font-size: 14px; font-weight: 500; font-family: inherit;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--ui-accent); color: #fff; }
.btn-primary:hover { background: var(--ui-accent-hover); color: #fff; }
.btn-ghost { background: #fff; color: var(--ui-ink); border-color: var(--ui-line); }
.btn-ghost:hover { border-color: #cfd3e0; color: var(--ui-ink); }
.btn-lg { height: 44px; padding: 0 24px; font-size: 15px; }
.btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* ---------- Hero ---------- */

.hero { padding: 80px 0 64px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--ui-accent-soft); color: var(--ui-accent);
  font-size: 12.5px; font-weight: 600; margin-bottom: 22px;
}
.hero h1 { max-width: 820px; }
.hero .lede { max-width: 780px; font-size: 17px; color: var(--ui-muted); margin: 20px 0 0; }
.hero .lede strong { color: var(--ui-ink); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-meta { margin-top: 18px; font-size: 13px; color: var(--ui-faint); }
.hero-meta code { color: var(--ui-muted); }

/* 演示位：没有真实截图的页面绝不伪造，用明确的占位提示 */
.media-slot {
  margin-top: 48px; border: 1px dashed #cfd3e0; border-radius: var(--ui-radius);
  background: var(--ui-surface);
  padding: 56px 24px; text-align: center; color: var(--ui-muted); font-size: 14px;
}
.media-slot strong { display: block; color: var(--ui-ink); font-size: 15px; margin-bottom: 6px; }

/* ---------- 卡片网格 ---------- */

.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: #fff; border: 1px solid var(--ui-line); border-radius: var(--ui-radius);
  padding: 24px;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ui-muted); font-size: 14px; margin: 0; }
.card .num { color: var(--ui-accent); font-weight: 700; font-size: 13px; margin-bottom: 10px; display: block; }

/* ---------- 命令块 ---------- */

.cmd {
  position: relative; background: #1e2130; color: #e6e8f0;
  border-radius: var(--ui-radius); padding: 18px 20px; overflow-x: auto;
}
.cmd code { color: inherit; white-space: pre; }
.cmd .cmt { color: #8b93a7; }
.cmd-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--ui-muted); margin-bottom: 8px;
}
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tab {
  font-family: inherit; font-size: 13px; padding: 5px 12px; cursor: pointer;
  background: #fff; border: 1px solid var(--ui-line); border-radius: 999px; color: var(--ui-muted);
}
.tab[aria-selected="true"] { background: var(--ui-accent-soft); border-color: transparent; color: var(--ui-accent); font-weight: 600; }

/* ---------- 表格 ---------- */

.table-scroll { overflow-x: auto; border: 1px solid var(--ui-line); border-radius: var(--ui-radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
thead th {
  background: var(--ui-surface); color: #656d7b; font-weight: 600; font-size: 13px;
  text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--ui-line);
  white-space: nowrap;
}
tbody td { padding: 14px 16px; border-bottom: 1px solid var(--ui-line-soft); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody th { padding: 14px 16px; border-bottom: 1px solid var(--ui-line-soft); text-align: left; font-weight: 500; }
.yes { color: var(--ui-ok); font-weight: 600; }
.no { color: var(--ui-faint); }
.ours { background: var(--ui-accent-soft); }

/* ---------- 列表 ---------- */

.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 26px; margin-bottom: 12px; color: var(--ui-muted); font-size: 14px; }
.checks li::before {
  content: ""; position: absolute; left: 6px; top: 10px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--ui-accent);
}
.checks strong { color: var(--ui-ink); font-weight: 600; }

/* 「不需要什么」区块 */
.noneed { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.noneed div {
  display: flex; align-items: baseline; gap: 10px;
  padding: 14px 16px; background: #fff; border: 1px solid var(--ui-line); border-radius: var(--ui-radius);
  font-size: 14px;
}
.noneed b { color: var(--ui-ok); font-weight: 700; flex: none; }
.noneed span { color: var(--ui-muted); }

/* ---------- 提示块 ---------- */

.note {
  border-left: 3px solid var(--ui-accent); background: var(--ui-accent-soft);
  padding: 14px 18px; border-radius: 0 var(--ui-radius) var(--ui-radius) 0;
  font-size: 14px; color: var(--ui-ink); margin: 20px 0;
}
.note.warn { border-color: var(--ui-warn); background: #fdf7e8; }
.note.danger { border-color: var(--ui-fail); background: #fdeeee; }
.note p:last-child { margin-bottom: 0; }
.note strong { font-weight: 650; }

/* ---------- FAQ ---------- */

.faq details {
  border-bottom: 1px solid var(--ui-line-soft); padding: 18px 0;
}
.faq details:first-of-type { border-top: 1px solid var(--ui-line-soft); }
.faq summary {
  cursor: pointer; font-weight: 600; font-size: 15px; list-style: none;
  display: flex; justify-content: space-between; gap: 16px; align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ui-faint); font-weight: 400; font-size: 18px; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 12px 0 0; color: var(--ui-muted); font-size: 14px; }

/* ---------- 步骤 ---------- */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps > li {
  position: relative; padding: 0 0 28px 44px; border-left: 1px solid var(--ui-line);
  margin-left: 13px;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: -13px; top: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--ui-accent); color: #fff; font-size: 13px; font-weight: 600;
  display: grid; place-items: center;
}
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--ui-muted); font-size: 14px; margin: 0 0 12px; }

/* ---------- 页脚 ---------- */

.footer {
  border-top: 1px solid var(--ui-line-soft); background: var(--ui-surface);
  padding: 48px 0 40px; font-size: 14px;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer h4 { font-size: 13px; font-weight: 650; margin: 0 0 14px; color: var(--ui-ink); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 9px; }
.footer a { color: var(--ui-muted); }
.footer a:hover { color: var(--ui-accent); }
.footer-bottom {
  margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--ui-line);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  color: var(--ui-faint); font-size: 13px;
}

/* ---------- 定价 ---------- */

.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.plan {
  border: 1px solid var(--ui-line); border-radius: var(--ui-radius);
  padding: 26px 22px; background: #fff; display: flex; flex-direction: column;
}
.plan.featured { border-color: var(--ui-accent); box-shadow: var(--ui-shadow); }
.plan .tier { font-size: 15px; font-weight: 650; }
.plan .price { font-size: 26px; font-weight: 700; margin: 14px 0 4px; letter-spacing: -.02em; }
.plan .price small { font-size: 13px; font-weight: 500; color: var(--ui-muted); }
.plan .tagline { color: var(--ui-muted); font-size: 13.5px; min-height: 42px; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 24px; flex: 1; }
.plan li { font-size: 13.5px; color: var(--ui-muted); padding: 6px 0 6px 20px; position: relative; }
.plan li::before { content: "·"; position: absolute; left: 6px; color: var(--ui-accent); font-weight: 700; }
.plan .btn { width: 100%; }

/* ---------- 表单 ---------- */

.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13.5px; font-weight: 600; }
.field .hint { font-size: 12.5px; color: var(--ui-faint); font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 14px; color: var(--ui-ink);
  padding: 9px 12px; border: 1px solid var(--ui-line); border-radius: var(--ui-control-radius);
  background: #fff; width: 100%;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: #8086fb; box-shadow: 0 0 0 2px rgba(101, 98, 255, .08);
}
.required { color: var(--ui-fail); }

/* 蜜罐字段：对真人不可见（也不进入 Tab 顺序与读屏），
   但自动填充的机器人会填它。填了就在函数端静默丢弃。
   刻意用「移出视口」而非 display:none —— 后者会被一部分爬虫识别并跳过。 */
.hp {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

/* 表单提交状态：成功/失败就地反馈，不跳页 */
.form-status {
  font-size: 13px; margin: 12px 0 0; padding: 10px 14px;
  border-radius: var(--ui-control-radius); border: 1px solid var(--ui-line);
  background: var(--ui-surface); color: var(--ui-muted);
}
.form-status.is-ok { border-color: #bfe3ce; background: #f1faf4; color: #1f7a4d; }
.form-status.is-error { border-color: #f0c9c9; background: #fdf2f2; color: #b93b3b; }

/* 联系方式：这是静态站，没有后端，表单无法真正提交。
   与其放一个提交后报错的表单，不如把"写邮件"这件事做顺。 */
.contact-mail {
  border: 1px solid var(--ui-line); border-radius: var(--ui-radius);
  background: var(--ui-surface); padding: 22px 24px;
}
.contact-mail-label {
  font-size: 13px; font-weight: 600; color: var(--ui-muted);
  margin: 0 0 10px;
}
.contact-mail-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.contact-mail-addr {
  font-family: var(--font-mono); font-size: 16px; font-weight: 600;
  color: var(--ui-ink); overflow-wrap: anywhere;
}
.contact-mail-addr:hover { color: var(--ui-accent); }

/* ---------- 响应式 ---------- */

@media (max-width: 1000px) {
  h1 { font-size: 32px; }
  h2 { font-size: 23px; }
  .grid-4, .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
}

@media (max-width: 680px) {
  section { padding: 52px 0; }
  .hero { padding: 52px 0 40px; }
  h1 { font-size: 27px; }
  .grid-2, .grid-3, .grid-4, .plans, .form-grid, .noneed { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
}

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

/* 打印：把导航与页脚去掉，方便存档或转 PDF */
@media print {
  .nav, .footer, .hero-actions { display: none; }
  section { padding: 20px 0; }
}
