/* dsh-wordloop 落地页 — 手写 CSS，零依赖、零外部请求
   设计取向：深色、克制、信息密度高但不拥挤；品牌色只用在行动点与关键数字上。 */

:root {
  --bg: #0a0b10;
  --bg-2: #0d0f16;
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .06);
  --border: rgba(255, 255, 255, .09);
  --border-2: rgba(255, 255, 255, .16);
  --text: #eef1f7;
  --text-2: #a8b0c0;
  --text-3: #6f7889;
  --brand: #6d84f0;
  --brand-2: #9d7bf0;
  --brand-soft: rgba(109, 132, 240, .14);
  --ok: #46d39a;
  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: .875em; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: min(1120px, 100% - 32px); } }

/* ── 导航 ─────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(160%);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.nav.scrolled { border-bottom-color: var(--border); background: color-mix(in srgb, var(--bg) 92%, transparent); }
.nav-inner { display: flex; align-items: center; gap: 22px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 9px; flex: none;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 14px rgba(109, 132, 240, .35);
}
.brand-mark svg { width: 16px; height: 16px; }
.brand-name { font-size: 15.5px; }
.nav-links { display: flex; gap: 20px; margin-left: auto; font-size: 14px; color: var(--text-2); }
.nav-links a { transition: color .15s ease; }
.nav-links a:hover { color: var(--text); }
@media (max-width: 860px) { .nav-links { display: none; } .nav-cta { margin-left: auto; } }

/* ── 按钮 ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 11px;
  font-size: 14.5px; font-weight: 600; letter-spacing: .01em;
  border: 1px solid var(--border-2); color: var(--text); background: var(--surface);
  cursor: pointer; transition: transform .12s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); border-color: rgba(255,255,255,.26); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  border: none; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 10px 26px rgba(109, 132, 240, .34);
}
.btn-primary:hover { filter: brightness(1.07); box-shadow: 0 14px 32px rgba(109, 132, 240, .42); }
.btn-ghost { background: transparent; }
.btn:focus-visible, .copy:focus-visible, .tablist button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 3px;
}

/* ── 首屏 ─────────────────────────────────────────────────────────────── */
/* 版式：居中标题 + 通栏大图。截图按容器宽度 1:1 出图（1120px），
   卡片文字在页面里就是可读的 —— 侧栏式小图会把卡片缩到读不清。 */
.hero { position: relative; padding: 76px 0 44px; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -30% -10% auto -10%; height: 720px; pointer-events: none;
  background:
    radial-gradient(58% 52% at 22% 30%, rgba(109,132,240,.20), transparent 62%),
    radial-gradient(48% 46% at 78% 18%, rgba(157,123,240,.16), transparent 66%);
  filter: blur(6px);
}
.hero-copy { position: relative; text-align: center; max-width: 780px; margin: 0 auto 48px; }
.hero-copy .lede { margin-inline: auto; }
.hero-copy .hero-cta, .hero-copy .chips { justify-content: center; }
.hero-copy .cmd { max-width: 620px; margin-inline: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .04em; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
  padding: 5px 13px; border-radius: 999px; margin: 0 0 22px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(70,211,154,.18); }

h1 {
  font-size: clamp(40px, 6.4vw, 72px); line-height: 1.04; letter-spacing: -.04em;
  font-weight: 800; margin: 0 0 22px;
}
.lede { font-size: 17.5px; color: var(--text-2); max-width: 58ch; margin: 0 0 30px; }
.lede strong { color: var(--text); font-weight: 600; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-cta.center { justify-content: center; }

/* 命令块 */
.cmd {
  display: flex; align-items: center; gap: 10px; margin-top: 22px;
  background: #07080c; border: 1px solid var(--border); border-radius: var(--radius-s);
  padding: 10px 10px 10px 14px; font-family: var(--mono); font-size: 13px; color: #cfd6e6;
  overflow-x: auto;
}
.cmd code { white-space: nowrap; }
.copy {
  margin-left: auto; flex: none; cursor: pointer;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text-2);
  border-radius: 7px; padding: 5px 11px; font-size: 12px; font-family: var(--font);
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.copy:hover { color: var(--text); border-color: rgba(255,255,255,.3); }
.copy.done { color: var(--ok); border-color: rgba(70,211,154,.5); background: rgba(70,211,154,.1); }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 22px 0 0; }
.chips li {
  font-size: 12.5px; color: var(--text-2);
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 999px; padding: 4px 12px;
}

/* 浏览器窗口外框（用 CSS 画，图片保持干净） */
.hero-shot { margin: 0; }
.browser {
  border: 1px solid var(--border-2); border-radius: 14px; overflow: hidden;
  background: #0e1017;
  box-shadow: 0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.02) inset;
}
.browser-bar {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: #12141c; border-bottom: 1px solid var(--border);
}
.lights { display: flex; gap: 6px; }
.lights i { width: 10px; height: 10px; border-radius: 50%; background: #2f3444; display: block; }
.lights i:first-child { background: #3a3f52; }
.browser-bar .url {
  font-size: 11.5px; color: var(--text-3); font-family: var(--mono);
  background: #0b0d13; border: 1px solid var(--border); border-radius: 6px;
  padding: 3px 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.shot-caption { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--text-3); }
.shot-caption b { color: var(--text-2); font-weight: 600; font-family: var(--mono); }
/* 窄屏：图片换成卡片特写，宽高比也跟着换，避免布局跳动 */
.browser picture { display: block; }
.browser img { aspect-ratio: 1120 / 760; object-fit: cover; }
@media (max-width: 700px) {
  .browser img { aspect-ratio: 436 / 431; }
  /* 命令块在窄屏折行：否则复制按钮会被挤出屏幕（手机上点不到） */
  .hero-copy .cmd { flex-wrap: wrap; overflow: visible; }
  .hero-copy .cmd code { white-space: normal; overflow-wrap: normal; word-break: normal; line-height: 1.55; }
  .hero-copy .cmd .copy { margin-left: 0; }
}

/* ── 通用段落 ─────────────────────────────────────────────────────────── */
.section { padding: 88px 0; }
@media (max-width: 640px) { .section { padding: 60px 0; } }
.h2 { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.2; letter-spacing: -.025em; font-weight: 750; margin: 0 0 14px; }
.sub { color: var(--text-2); max-width: 62ch; margin: 0 0 40px; font-size: 16.5px; }

/* ── 宣传片 ───────────────────────────────────────────────────────────── */
.promo-section { padding-top: 8px; }
.promo {
  margin: 0; border: 1px solid var(--border-2); border-radius: var(--radius);
  overflow: hidden; background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}
.promo video { display: block; width: 100%; height: auto; }
.promo-section .caption { text-align: center; margin-top: 16px; padding: 0; border: none; }

/* ── 三步 ─────────────────────────────────────────────────────────────── */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.steps li {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 22px 22px;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.steps li:hover { border-color: var(--border-2); transform: translateY(-3px); background: var(--surface-2); }
.step-n {
  position: absolute; top: -14px; left: 22px;
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  font-size: 14px; font-weight: 700; color: #fff;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 18px rgba(109,132,240,.32);
}
.steps h3 { margin: 8px 0 8px; font-size: 18px; letter-spacing: -.01em; }
.steps p { margin: 0; color: var(--text-2); font-size: 14.5px; }

/* ── 图文交替 ─────────────────────────────────────────────────────────── */
.feature { display: grid; grid-template-columns: 1fr 1.02fr; gap: 56px; align-items: center; }
@media (max-width: 980px) { .feature { grid-template-columns: 1fr; gap: 34px; } }
.shot { margin: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; }
.ticks li { position: relative; padding-left: 26px; color: var(--text-2); font-size: 15px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .55em; width: 14px; height: 8px;
  border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg); border-radius: 1px;
}
.ticks b { color: var(--text); font-weight: 600; }
kbd {
  font-family: var(--mono); font-size: 11.5px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border-2); border-bottom-width: 2px;
  border-radius: 5px; padding: 1px 6px; margin: 0 2px;
}

/* ── 可切换面板 ───────────────────────────────────────────────────────── */
.tabs { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.tablist { display: flex; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); }
.tablist button {
  cursor: pointer; border: none; background: transparent; color: var(--text-2);
  font-family: var(--font); font-size: 14px; font-weight: 600;
  padding: 8px 16px; border-radius: 9px; transition: color .15s ease, background .15s ease;
}
.tablist button:hover { color: var(--text); background: var(--surface); }
.tablist button.on { color: var(--text); background: var(--surface-2); }
.tabpanels { position: relative; }
.tabpanel { display: none; }
.tabpanel.on { display: block; animation: fadeUp .26s ease-out; }
.tabpanel img { width: 100%; background: #fff; }
.caption { margin: 0; padding: 14px 18px; color: var(--text-2); font-size: 13.5px; border-top: 1px solid var(--border); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── 同步示意图 ───────────────────────────────────────────────────────── */
.flow {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px;
  margin: 0 0 34px; padding: 26px 22px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
@media (max-width: 720px) { .flow { grid-template-columns: 1fr; } .flow .link { transform: rotate(90deg); } }
.node { text-align: center; }
.node b { display: block; font-size: 15.5px; }
.node span { font-size: 13px; color: var(--text-2); }
.link { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 120px; }
.link i {
  width: 100%; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  position: relative;
}
.link i::after {
  content: ""; position: absolute; top: -3px; left: 50%; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); transform: translateX(-50%);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
.link em { font-style: normal; font-size: 11.5px; font-family: var(--mono); color: var(--text-3); }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .grid3 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 20px; transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.card h3 { margin: 0 0 8px; font-size: 16px; }
.card p { margin: 0; color: var(--text-2); font-size: 14.5px; }
.card code, .note code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; }

/* ── 安装 ─────────────────────────────────────────────────────────────── */
.install-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .install-grid { grid-template-columns: 1fr; } }
.install { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 22px; }
.install-step { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--brand); text-transform: uppercase; }
.install h3 { margin: 8px 0 12px; font-size: 18px; }
.install p { margin: 0 0 10px; color: var(--text-2); font-size: 14.5px; }
/* 安装命令必须**完整可见**：三栏卡片很窄，早先用横向滚动导致命令被截断
   （用户看不到也复制不全）。改成允许折行，折点由 HTML 里的 <wbr> 控制，
   这样只会断在参数之间，不会把 dsh-wordloop 从中间劈开。 */
.install .cmd { margin: 0 0 12px; flex-wrap: wrap; overflow: visible; }
.install .cmd code { white-space: normal; overflow-wrap: normal; word-break: normal; line-height: 1.55; }
.install .cmd .copy { margin-left: auto; }
.note { font-size: 13px !important; color: var(--text-3) !important; }
.note b { color: var(--text-2); }

.popup-note {
  display: grid; grid-template-columns: 220px 1fr; gap: 30px; align-items: center;
  margin-top: 20px; padding: 26px 24px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
@media (max-width: 720px) { .popup-note { grid-template-columns: 1fr; } }
.popup-note img { border-radius: 12px; border: 1px solid var(--border-2); box-shadow: var(--shadow); }
.popup-note h3 { margin: 0 0 10px; font-size: 19px; letter-spacing: -.01em; }
.popup-note p { margin: 0 0 10px; color: var(--text-2); }

/* ── FAQ ──────────────────────────────────────────────────────────────── */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details {
  border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface);
  padding: 0 18px; transition: border-color .18s ease, background .18s ease;
}
.faq details[open] { border-color: var(--border-2); background: var(--surface-2); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 0; font-weight: 600; font-size: 15.5px;
  display: flex; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; margin-left: auto; width: 9px; height: 9px; flex: none;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq p { margin: 0; padding: 0 0 18px; color: var(--text-2); font-size: 14.5px; }

/* ── 结尾 ─────────────────────────────────────────────────────────────── */
.cta-band { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background:
  radial-gradient(60% 120% at 50% 0%, rgba(109,132,240,.13), transparent 70%), var(--bg-2); }
.cta-inner { text-align: center; }
.cta-inner h2 { font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -.025em; margin: 0 0 26px; font-weight: 750; }

/* ── 页脚 ─────────────────────────────────────────────────────────────── */
.footer { padding: 46px 0 60px; }
.footer-inner { display: grid; gap: 16px; }
.footer-brand { margin: 0; font-weight: 700; letter-spacing: -.01em; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; color: var(--text-2); }
.footer-links a:hover { color: var(--text); }
.tiny { font-size: 12.5px; color: var(--text-3); margin: 0; }
.footer-license { border-top: 1px solid var(--border); padding-top: 16px; }

/* ── 滚动揭示（渐进增强） ─────────────────────────────────────────────── */
/* 默认**完全可见**；只有 JS 确实跑起来（<html class="js">）才隐藏等待揭示。
   这样脚本失败 / 被拦 / 禁用 JS 时页面不会留一片白。 */
.reveal { opacity: 1; transform: none; }
.js .reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity .5s ease, transform .5s cubic-bezier(.22,.9,.32,1);
}
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

::selection { background: rgba(109,132,240,.32); }
