/* translate.wenworks.app 官网样式：深色底 + 叠加的极光渐变 + 毛玻璃卡片。
   源文件在 site/styles.css，tools/build_site.py 会复制到 public/ */
:root {
  color-scheme: dark;
  --bg: #070912;
  --text: #eef1ff;
  --text-2: rgba(224, 230, 255, 0.72);
  --text-3: rgba(224, 230, 255, 0.56);
  --glass: rgba(255, 255, 255, 0.045);
  --glass-strong: rgba(255, 255, 255, 0.07);
  --edge: rgba(255, 255, 255, 0.1);
  --blue: #5b7cff;
  --cyan-2: #22c3e6;
  --cyan: #4fd1ff;
  --grad: linear-gradient(120deg, #5b7cff 0%, #3fa9ff 55%, #4fe0d0 100%);
  --btn: linear-gradient(120deg, #2f5ce0, #0b78b5);
  --max: 1160px;
  --r-l: 24px;
  --r-m: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: #a8b8ff; text-decoration: none; }
a:hover { color: #c7d2ff; }
:focus-visible { outline: 2px solid #a8b8ff; outline-offset: 3px; border-radius: 6px; }
img { display: block; max-width: 100%; }
.wrap { position: relative; max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 20; padding: 8px 12px; background: #151a33; border-radius: 8px; }

/* ---------- 背景：三层极光 + 网格 + 颗粒 ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.6; }
.aurora i:nth-child(1) { width: 66vw; height: 66vw; left: -20vw; top: -24vw; background: radial-gradient(circle, #3b4fff 0%, transparent 65%); }
.aurora i:nth-child(2) { width: 56vw; height: 56vw; right: -18vw; top: -8vw; background: radial-gradient(circle, #0fb5c9 0%, transparent 65%); opacity: 0.5; }
.aurora i:nth-child(3) { width: 56vw; height: 56vw; left: 22vw; top: 46vh; background: radial-gradient(circle, #1f8fff 0%, transparent 65%); opacity: 0.3; }
.aurora::before { /* 往下渐隐的细网格 */
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.aurora::after { /* 颗粒，压掉渐变的数码感 */
  content: ''; position: absolute; inset: -50%; opacity: 0.08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: no-preference) {
  .aurora i:nth-child(1) { animation: drift1 26s ease-in-out infinite alternate; }
  .aurora i:nth-child(2) { animation: drift2 32s ease-in-out infinite alternate; }
  .aurora i:nth-child(3) { animation: drift1 38s ease-in-out infinite alternate-reverse; }
}
@keyframes drift1 { to { transform: translate(6vw, 4vw) scale(1.08); } }
@keyframes drift2 { to { transform: translate(-5vw, 6vw) scale(0.94); } }

/* ---------- 玻璃与渐变描边 ---------- */
.glass { position: relative; background: var(--glass); border-radius: var(--r-l); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); }
.glass::before { /* 1px 渐变描边：亮的一侧在左上 */
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.05) 38%, rgba(255, 255, 255, 0.03) 62%, rgba(79, 209, 255, 0.35));
  -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 exclude, linear-gradient(#000 0 0);
}
.grad-text { background: linear-gradient(100deg, #ffffff 10%, #c9d3ff 45%, #9fe8ff 75%, #8fe3ff); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- 顶栏 ---------- */
.top { position: sticky; top: 0; z-index: 10; transition: background 0.2s, border-color 0.2s; border-bottom: 1px solid transparent; }
.top.scrolled { background: rgba(7, 9, 18, 0.62); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); border-bottom-color: rgba(255, 255, 255, 0.07); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; font-size: 16px; letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand img { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 6px 18px rgba(47, 92, 224, 0.45); }
.nav { display: flex; gap: 26px; margin-left: auto; font-size: 15px; }
.nav a { color: var(--text-2); }
.nav a:hover { color: var(--text); }
.lang { font-size: 13px; color: var(--text-2); padding: 5px 12px; border-radius: 999px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--edge); }
.lang:hover { color: var(--text); background: var(--glass-strong); }

/* ---------- 按钮 ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 50px; padding: 0 24px; border-radius: 14px; border: 0; font: inherit; font-size: 16px; font-weight: 600; white-space: nowrap; cursor: pointer; color: var(--text); background: var(--glass-strong); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); transition: transform 0.15s, box-shadow 0.15s, background 0.15s; }
.btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.1); transform: translateY(-1px); }
.btn.primary { color: #fff; background: var(--btn); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 30px -6px rgba(40, 110, 230, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08); }
.btn.primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 14px 40px -6px rgba(40, 110, 230, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.12); }
.btn svg { width: 18px; height: 18px; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

/* ---------- 首屏 ---------- */
.hero { padding: 84px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 64px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--glass); box-shadow: inset 0 0 0 1px var(--edge); font-size: 13px; color: var(--text-2); }
.eyebrow b { padding: 2px 8px; border-radius: 999px; background: var(--btn); color: #fff; font-size: 12px; font-weight: 600; }
h1 { margin: 0 0 22px; font-size: clamp(40px, 5.6vw, 68px); line-height: 1.06; letter-spacing: -0.035em; font-weight: 750; }
.lead { margin: 0 0 34px; font-size: 18px; line-height: 1.7; color: var(--text-2); max-width: 31em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.note { margin: 16px 0 0; font-size: 14px; color: var(--text-3); }

/* 首屏右侧：发光的浏览器窗口，周围浮几枚玻璃标签 */
.stage { position: relative; }
.stage::before { /* 窗口背后的光 */
  content: ''; position: absolute; inset: 8% -6% -4% 4%; border-radius: 40px; z-index: -1;
  background: conic-gradient(from 210deg, #2f5ce0, #22c3e6, #4fd1ff, #2f5ce0); filter: blur(60px); opacity: 0.55;
}
.window { border-radius: 18px; overflow: hidden; background: #fbfbfd; color: #1f2328; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 40px 80px -20px rgba(0, 0, 0, 0.7); transform: perspective(1600px) rotateY(-6deg) rotateX(2deg); }
@media (prefers-reduced-motion: reduce) { .window { transform: none; } }
.window-bar { display: flex; align-items: center; gap: 7px; height: 42px; padding: 0 14px; background: #eef0f4; border-bottom: 1px solid #e2e4ea; }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: #d3d6dd; }
.window-bar i:nth-child(1) { background: #ff6159; } .window-bar i:nth-child(2) { background: #ffbd2e; } .window-bar i:nth-child(3) { background: #28c941; }
.window-bar span { margin-left: 10px; flex: 1; height: 26px; line-height: 26px; padding: 0 12px; border-radius: 7px; background: #fff; color: #6b7280; font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.window-body { position: relative; padding: 28px 32px 34px; font-family: Georgia, "Times New Roman", serif; font-size: 16px; line-height: 1.7; }
.window-body h3 { margin: 0 0 4px; font: 700 22px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif; letter-spacing: -0.01em; }
.window-body p { margin: 16px 0 0; }
.window-body a { color: #3b5bdb; }
.window-body code { font: 13px ui-monospace, Menlo, monospace; padding: 1px 5px; border-radius: 4px; background: #eef0f4; }
.tr { display: block; margin-top: 4px; color: #5a6070; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; }
h3 .tr { font-weight: 600; color: #5a6070; }
.fab { position: absolute; right: 0; top: 56%; display: flex; align-items: center; justify-content: center; width: 44px; height: 40px; padding-right: 4px; border-radius: 20px 0 0 20px; background: #3b5bdb; color: #fff; box-shadow: 0 4px 14px rgba(59, 91, 219, 0.45); }
.fab svg { width: 20px; height: 20px; }
.chip { position: absolute; display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 14px; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.6); }
.chip svg { width: 16px; height: 16px; color: #a8b8ff; }
/* 标签只压在地址栏和窗口底部留白上，不挡正文 */
.chip.c1 { left: -26px; top: -20px; }
.chip.c2 { right: -20px; top: -20px; }
.chip.c3 { left: 50%; bottom: -22px; transform: translateX(-50%); }

/* ---------- 区块 ---------- */
section { padding: 96px 0; }
.sec-head { max-width: 680px; margin: 0 auto 52px; text-align: center; }
.kicker { display: inline-block; margin-bottom: 14px; font-size: 13px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
h2 { margin: 0 0 14px; font-size: clamp(30px, 3.8vw, 46px); line-height: 1.12; letter-spacing: -0.03em; font-weight: 720; }
.sec-head p { margin: 0; color: var(--text-2); font-size: 18px; }

/* 功能：便当格，前两项更大 */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.cell { padding: 28px; overflow: hidden; }
/* 6 张交错排：4+2、2+4、3+3 */
.cell { grid-column: span 3; }
.cell:nth-child(1), .cell:nth-child(4) { grid-column: span 4; min-height: 220px; }
.cell:nth-child(2), .cell:nth-child(3) { grid-column: span 2; }
.cell .ico { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-bottom: 18px; border-radius: 12px; background: linear-gradient(140deg, rgba(91, 124, 255, 0.35), rgba(79, 209, 255, 0.25)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
.cell .ico svg { width: 22px; height: 22px; color: #dfe5ff; }
.cell h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -0.01em; }
.cell p { margin: 0; color: var(--text-2); font-size: 15px; }
.cell:nth-child(1)::after, .cell:nth-child(4)::after { /* 大格子角落的光斑 */
  content: ''; position: absolute; width: 260px; height: 260px; right: -80px; bottom: -120px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(91, 124, 255, 0.35), transparent 70%);
}
.cell:nth-child(4)::after { background: radial-gradient(circle, rgba(79, 209, 255, 0.32), transparent 70%); }

/* 翻译服务 */
.engines { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.engine { display: flex; flex-direction: column; padding: 30px; }
.engine .tag { align-self: flex-start; margin-bottom: 18px; padding: 3px 11px; border-radius: 999px; background: var(--glass-strong); box-shadow: inset 0 0 0 1px var(--edge); color: var(--text-2); font-size: 12px; font-weight: 600; }
.engine.rec { background: linear-gradient(160deg, rgba(91, 124, 255, 0.16), rgba(79, 209, 255, 0.08) 60%, rgba(255, 255, 255, 0.03)); }
.engine.rec .tag { background: var(--btn); color: #fff; box-shadow: none; }
.engine h3 { margin: 0 0 10px; font-size: 24px; letter-spacing: -0.02em; }
.engine p { margin: 0 0 20px; color: var(--text-2); font-size: 15px; }
.engine ul { margin: auto 0 0; padding: 18px 0 0; border-top: 1px solid rgba(255, 255, 255, 0.08); list-style: none; font-size: 14px; color: var(--text-2); }
.engine li { position: relative; padding: 4px 0 4px 24px; }
.engine li::before { content: ''; position: absolute; left: 3px; top: 12px; width: 10px; height: 5px; border-left: 2px solid #8fe3ff; border-bottom: 2px solid #8fe3ff; transform: rotate(-45deg); }

/* 隐私 */
.privacy { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.privacy .sec-head { margin: 0; text-align: left; }
.shield { position: relative; width: 120px; height: 120px; margin-bottom: 28px; border-radius: 32px; display: flex; align-items: center; justify-content: center; background: linear-gradient(140deg, rgba(91, 124, 255, 0.4), rgba(79, 209, 255, 0.18)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 20px 60px -10px rgba(79, 140, 255, 0.55); }
.shield svg { width: 56px; height: 56px; color: #fff; }
.facts { margin: 0; padding: 8px; list-style: none; }
.facts li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; padding: 18px 20px; }
.facts li + li { border-top: 1px solid rgba(255, 255, 255, 0.07); }
.facts svg { width: 22px; height: 22px; color: #8fe3ff; margin-top: 2px; }
.facts b { display: block; font-size: 16px; }
.facts span { color: var(--text-2); font-size: 15px; }
.more-link { display: inline-flex; margin-top: 22px; font-weight: 600; }

/* 安装 */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.step { padding: 28px; counter-increment: step; }
.step::after { content: counter(step, decimal-leading-zero); position: absolute; right: 22px; top: 14px; font-size: 52px; font-weight: 800; letter-spacing: -0.04em; background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.step h3 { margin: 0 0 8px; font-size: 18px; }
.step p { margin: 0; color: var(--text-2); font-size: 15px; }
.step code, .faq code { font: 13px ui-monospace, Menlo, monospace; padding: 2px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); color: var(--text); }
.install-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px; margin-top: 36px; }
.install-cta p { margin: 0; color: var(--text-3); font-size: 14px; }

/* 常见问题 */
.faq { max-width: 780px; margin: 0 auto; padding: 8px 28px; }
.faq details + details { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; font-size: 17px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg); transition: transform 0.15s; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { margin: 0 0 20px; color: var(--text-2); }

/* 收尾号召 */
.final { padding: 64px 40px; text-align: center; overflow: hidden; background: linear-gradient(135deg, rgba(47, 92, 224, 0.32), rgba(30, 130, 220, 0.22) 50%, rgba(79, 209, 255, 0.14)); }
.final::after { content: ''; position: absolute; inset: auto -10% -60% -10%; height: 120%; background: radial-gradient(ellipse at 50% 100%, rgba(79, 209, 255, 0.45), transparent 60%); pointer-events: none; }
.final h2 { position: relative; z-index: 1; margin-bottom: 12px; }
.final p { position: relative; z-index: 1; margin: 0 auto 30px; max-width: 34em; color: var(--text-2); font-size: 18px; }
.final .cta { position: relative; z-index: 1; justify-content: center; }

footer { padding: 36px 0 56px; color: var(--text-3); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; border-top: 1px solid rgba(255, 255, 255, 0.07); padding-top: 28px; }
footer nav { display: flex; gap: 22px; margin-left: auto; }
footer a { color: var(--text-2); }

/* 文档页（隐私政策、404） */
.doc { max-width: 780px; margin: 0 auto; padding: 56px 28px 96px; }
.doc .paper { padding: 44px 48px; }
.doc h1 { font-size: 36px; margin-bottom: 8px; }
.doc h2 { margin: 44px 0 10px; font-size: 24px; scroll-margin-top: 90px; }
.doc h3 { margin: 28px 0 8px; font-size: 18px; }
.doc p, .doc li { color: var(--text-2); }
.doc b { color: var(--text); }
.doc table { width: 100%; margin: 10px 0; border-collapse: collapse; font-size: 15px; border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.doc th, .doc td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.doc th { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.doc td { color: var(--text-2); }
.doc code { font: 13px ui-monospace, Menlo, monospace; padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); color: var(--text); }
.doc hr { margin: 52px 0; border: 0; border-top: 1px solid rgba(255, 255, 255, 0.08); }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .hero .wrap, .privacy { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .window { transform: none; }
  .chip.c1 { left: -6px; } .chip.c2 { right: -6px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell:nth-child(n) { grid-column: span 1; min-height: 0; }
  .engines, .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .nav { display: none; }
  .lang { margin-left: auto; }
  .hero { padding: 44px 0 40px; }
  section { padding: 64px 0; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .window-body { padding: 22px 20px 26px; font-size: 15px; }
  .chip { display: none; }
  .final { padding: 48px 22px; }
  .faq { padding: 4px 18px; }
  .doc .paper { padding: 28px 20px; }
  footer nav { margin-left: 0; }
}
