/* LanSend 官网样式表。
   版式参照 electerm.org：白底、窄内容栏、分区交替底色、圆角描边卡片、实心主按钮；
   颜色取应用自己的品牌色（深靛蓝 + 薄荷绿，见 apps/app/src/styles/tokens.css）。
   不引用任何 CDN、外部字体或统计脚本，断网也能正常显示。 */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --bg-alt: #f7f8fc;
  --fg: #101124;
  --fg-soft: #3b3f57;
  --muted: #6b7091;
  --line: #e4e6f0;
  --line-soft: #eef0f7;
  --tint: #f1f1fb;

  --accent: #3f3fb0;
  --accent-ink: #2b2b86;
  --btn-bg: #3f3fb0;
  --btn-bg-hover: #34348f;
  --btn-fg: #ffffff;
  --mint: #12c463;
  --mint-soft: #e7f8ef;
  --mint-ink: #0a7a3d;

  --shadow-sm: 0 1px 2px rgba(16, 17, 36, 0.05);
  --shadow: 0 16px 40px rgba(20, 20, 74, 0.1);
  --shadow-lg: 0 36px 80px rgba(20, 20, 74, 0.18);

  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1120px;
  --gutter: max(24px, calc((100vw - 1072px) / 2));
  --header-h: 64px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a1c;
    --bg-alt: #0f1030;
    --fg: #edeef8;
    --fg-soft: #c7c9e0;
    --muted: #9a9dc2;
    --line: #262747;
    --line-soft: #1b1c3b;
    --tint: #191a3d;

    --accent: #a6a6f6;
    --accent-ink: #c2c2fb;
    --btn-bg: #5555d8;
    --btn-bg-hover: #6a6ae6;
    --mint: #1bee79;
    --mint-soft: #10301f;
    --mint-ink: #58f2a0;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 36px 80px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.7 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
svg { width: 20px; height: 20px; flex: 0 0 auto; }
code { font-family: var(--mono); font-size: 0.9em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--bg); padding: 8px 14px; border-radius: 8px; box-shadow: var(--shadow); }

/* ---------- 顶栏 ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav { display: flex; gap: 22px; margin-left: 8px; }
.nav a { color: var(--muted); font-size: 14.5px; font-weight: 500; }
.nav a:hover { color: var(--accent); text-decoration: none; }
.header-side { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.lang-switch, .header-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--line); color: var(--fg-soft);
  font-size: 13.5px; font-weight: 600; background: var(--bg);
}
.lang-switch:hover, .header-ghost:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.header-ghost svg { width: 16px; height: 16px; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; gap: 0; margin: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px; box-shadow: var(--shadow);
  }
  .nav[hidden] { display: none; }
  .nav a { padding: 12px 0; font-size: 16px; border-bottom: 1px solid var(--line-soft); }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 34px; padding: 0; background: var(--bg);
    border: 1px solid var(--line); border-radius: 8px; color: var(--fg-soft); cursor: pointer;
  }
  .nav-toggle svg { width: 18px; height: 18px; }
  .header-ghost span { display: none; }
}

/* ---------- 通用分区 ---------- */

section { padding: 88px 0; }
section.alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin: 0 auto 44px; text-align: center; }
.eyebrow {
  display: inline-block; margin-bottom: 12px; padding: 5px 12px;
  border-radius: 100px; background: var(--tint); color: var(--accent);
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.section-head h2 { margin: 0; font-size: clamp(27px, 3.6vw, 34px); font-weight: 750; letter-spacing: -0.02em; line-height: 1.25; }
.section-head p { margin: 12px 0 0; color: var(--muted); font-size: 16.5px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--fg); font-size: 15.5px; font-weight: 650;
  font-family: inherit; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.btn:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--btn-bg); border-color: transparent; color: var(--btn-fg); box-shadow: 0 4px 14px color-mix(in srgb, var(--btn-bg) 32%, transparent); }
.btn-primary:hover { background: var(--btn-bg-hover); color: var(--btn-fg); border-color: transparent; }

/* ---------- 首屏 ---------- */

.hero { position: relative; padding: 76px 0 0; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% 0 auto; height: 620px; pointer-events: none;
  background: radial-gradient(60% 60% at 50% 40%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
}
.hero-net { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-inner { position: relative; text-align: center; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 100px;
  background: var(--tint); color: var(--muted); font-size: 13.5px; font-weight: 600;
}
.chip:hover { text-decoration: none; color: var(--accent); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mint) 22%, transparent); }
.chip .sep { color: var(--line); }

.wordmark { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 26px 0 0; }
.wordmark img { width: clamp(56px, 9vw, 84px); height: auto; border-radius: 20px; box-shadow: var(--shadow); }
.wordmark span { font-size: clamp(48px, 9.5vw, 86px); font-weight: 800; letter-spacing: -0.045em; line-height: 1; }

.hero-lead { margin: 26px auto 0; max-width: 760px; font-size: clamp(19px, 2.6vw, 25px); font-weight: 600; letter-spacing: -0.015em; line-height: 1.4; }
.hero-sub { margin: 16px auto 0; max-width: 680px; color: var(--muted); font-size: 16.5px; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.hero-meta { margin: 20px 0 0; color: var(--muted); font-size: 13.5px; letter-spacing: 0.01em; }

/* 首屏配图：桌面窗口 + 悬在右下角的手机 */
.hero-shot { position: relative; margin-top: 56px; padding-bottom: 88px; }
.hero-shot .frame-desktop { max-width: 940px; margin: 0 auto; }
.hero-shot .frame-phone {
  position: absolute; right: max(24px, 4%); bottom: 34px; width: 210px;
}

/* ---------- 设备外框 ---------- */

.frame { margin: 0; }
.frame-desktop {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: var(--bg); box-shadow: var(--shadow-lg);
}
.frame-bar {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px;
  background: var(--bg-alt); border-bottom: 1px solid var(--line);
}
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.frame-bar i:nth-child(1) { background: #ff5f57; }
.frame-bar i:nth-child(2) { background: #febc2e; }
.frame-bar i:nth-child(3) { background: #28c840; }
.frame-bar span { margin: 0 auto; padding-right: 42px; color: var(--muted); font-size: 12.5px; }
.frame-phone {
  padding: 7px; border-radius: 34px; background: #14142e;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.frame-phone img { border-radius: 27px; }
.frame-tablet {
  padding: 10px; border-radius: 24px; background: #14142e;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.frame-tablet img { border-radius: 15px; }

/* ---------- 特性 ---------- */

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.feature {
  padding: 26px 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg); transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.feature:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); box-shadow: var(--shadow); }
.feature .ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-bottom: 16px; border-radius: 11px;
  background: var(--tint); color: var(--accent);
}
.feature .ico svg { width: 21px; height: 21px; }
.feature h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 14.8px; line-height: 1.65; }
.feature code { background: var(--tint); color: var(--accent-ink); padding: 1px 5px; border-radius: 5px; }

/* ---------- 标签页（截图 / 下载） ---------- */

.tabs {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px;
  margin: 0 auto 32px; padding: 4px; width: max-content; max-width: 100%;
  background: var(--tint); border-radius: 12px;
}
.tabs button {
  padding: 9px 20px; border: 0; border-radius: 9px; background: transparent;
  color: var(--muted); font: inherit; font-size: 14.5px; font-weight: 650; cursor: pointer;
}
.tabs button:hover { color: var(--fg); }
.tabs button[aria-selected="true"] { background: var(--bg); color: var(--fg); box-shadow: var(--shadow-sm); }

.panel[hidden] { display: none; }

/* ---------- 截图画廊 ---------- */

.strip {
  display: flex; gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory;
  /* 通栏：左右拉到视口边，再用与内容栏同宽的内边距把第一张对齐到正文左边。
     padding 的百分比按包含块算、scroll-padding 按滚动容器自己算，两边会对不上，
     所以这里统一用绝对长度（1072px = 内容栏 1120 减去两侧 24 的留白）。 */
  margin-inline: calc(50% - 50vw); padding: 6px var(--gutter) 22px;
  scroll-padding-inline: var(--gutter); scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip > figure { flex: 0 0 auto; scroll-snap-align: start; }
.strip figcaption { margin-top: 16px; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.strip figcaption b { display: block; margin-bottom: 3px; color: var(--fg); font-size: 15.5px; font-weight: 700; }
.panel-desktop .shot { width: min(86vw, 900px); }
.panel-iphone .shot { width: min(62vw, 250px); }
.panel-ipad .shot { width: min(76vw, 380px); }
.strip .frame-desktop, .strip .frame-phone, .strip .frame-tablet { box-shadow: var(--shadow); }

/* ---------- 工作原理 ---------- */

.diagram { max-width: 880px; margin: 0 auto 48px; }
.diagram svg { width: 100%; height: auto; overflow: visible; }
.diagram text { font-family: var(--font); }
.d-label { fill: var(--muted); font-size: 14px; text-anchor: middle; }
.d-start { text-anchor: start; }
.d-name { fill: var(--fg-soft); font-size: 14.5px; font-weight: 650; text-anchor: middle; }
.d-body { fill: var(--tint); stroke: var(--line); stroke-width: 1.5; }
.d-screen { fill: url(#lansend-screen); }
.d-screen-line { fill: none; stroke: rgba(255, 255, 255, 0.4); stroke-width: 3; stroke-linecap: round; }
.d-wire { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; opacity: 0.7; }
.d-wifi { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; opacity: 0.55; }
.d-led { fill: var(--mint); }
.d-cloud { fill: none; stroke: var(--line); stroke-width: 2; }
.d-slash { stroke: var(--muted); stroke-width: 2; stroke-linecap: round; opacity: 0.8; }
.d-hop { fill: none; stroke: var(--line); stroke-width: 2; stroke-dasharray: 3 7; stroke-linecap: round; }
.d-flow {
  fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round;
  stroke-dasharray: 9 9; animation: flow 1.1s linear infinite;
}
@keyframes flow { to { stroke-dashoffset: -18; } }
.d-pill rect { fill: var(--bg); stroke: var(--accent); stroke-width: 1.5; }
.d-pill text { fill: var(--accent); font-size: 14px; font-weight: 650; text-anchor: middle; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.step { padding: 26px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.step .n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; margin-bottom: 14px; border-radius: 50%;
  background: var(--btn-bg); color: var(--btn-fg); font-size: 14px; font-weight: 700;
}
.step h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.step p { margin: 0; color: var(--muted); font-size: 14.8px; line-height: 1.65; }
.note { margin: 28px auto 0; max-width: 720px; text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- 下载 ---------- */

.files { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; max-width: 900px; margin: 0 auto; }
.file {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
  color: var(--fg); transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.file:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.file .ico { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: 0 0 auto; border-radius: 11px; background: var(--tint); color: var(--accent); }
.file .ico svg { width: 20px; height: 20px; }
.file b { display: block; font-size: 15.5px; font-weight: 650; }
.file small { color: var(--muted); font-size: 13px; }
.file .tag { margin-left: auto; padding: 3px 9px; border-radius: 100px; background: var(--mint-soft); color: var(--mint-ink); font-size: 12px; font-weight: 700; white-space: nowrap; }
.dl-note { max-width: 900px; margin: 22px auto 0; color: var(--muted); font-size: 14px; text-align: center; }
.dl-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 18px; font-size: 14px; }
.dl-links a { display: inline-flex; align-items: center; gap: 5px; }
.dl-links svg { width: 15px; height: 15px; }
.appstore .fine { margin: 14px 0 0; font-size: 13.5px; color: var(--muted); }

.appstore {
  display: flex; flex-wrap: wrap; align-items: center; gap: 28px;
  max-width: 900px; margin: 0 auto; padding: 30px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
}
.appstore img { width: 96px; height: 96px; border-radius: 22px; box-shadow: var(--shadow); }
.appstore .body { flex: 1 1 320px; }
.appstore h3 { margin: 0 0 8px; font-size: 19px; font-weight: 700; }
.appstore p { margin: 0 0 18px; color: var(--muted); font-size: 15px; }

/* ---------- 命令行 ---------- */

.terminal {
  max-width: 820px; margin: 0 auto; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: #0d0d24; box-shadow: var(--shadow-lg);
}
.terminal .frame-bar { background: #15153a; border-bottom-color: #26264f; }
.terminal .frame-bar span { color: #8a8cb8; }
.terminal ol { margin: 0; padding: 20px 22px; list-style: none; }
.terminal li { display: flex; align-items: flex-start; gap: 12px; padding: 9px 0; }
.terminal li + li { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.terminal .cmd { flex: 1 1 auto; min-width: 0; font-family: var(--mono); font-size: 13.5px; line-height: 1.6; color: #e8e9ff; overflow-wrap: anywhere; }
.terminal .cmd::before { content: "$ "; color: var(--mint); }
.terminal .what { display: block; margin-top: 2px; font-family: var(--font); font-size: 13px; color: #9a9dc2; }
.copy {
  flex: 0 0 auto; padding: 5px 11px; border-radius: 7px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.16); background: transparent;
  color: #b9bbdd; font: inherit; font-size: 12.5px; font-weight: 600;
}
.copy:hover { border-color: var(--mint); color: var(--mint); }
.copy[data-done="1"] { border-color: var(--mint); color: var(--mint); }
.cli-more { margin: 22px auto 0; max-width: 820px; text-align: center; color: var(--muted); font-size: 14px; }
.cli-more code { background: var(--tint); color: var(--accent-ink); padding: 2px 6px; border-radius: 5px; }

/* ---------- 常见问题 ---------- */

.faq { max-width: 820px; margin: 0 auto; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); margin-bottom: 12px; }
.faq details[open] { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.faq summary {
  display: flex; align-items: center; gap: 12px; padding: 18px 22px; cursor: pointer;
  font-size: 16px; font-weight: 650; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; margin-left: auto; width: 9px; height: 9px; flex: 0 0 auto;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq p { margin: 0; padding: 0 22px 20px; color: var(--muted); font-size: 15px; }

/* ---------- 资源链接 ---------- */

.link-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; max-width: 900px; margin: 0 auto; }
.link-cols h3 { margin: 0 0 14px; font-size: 13px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.link-cols ul { margin: 0; padding: 0; list-style: none; }
.link-cols li { margin-bottom: 10px; }
.link-cols a { color: var(--fg-soft); font-size: 15px; }
.link-cols a:hover { color: var(--accent); }

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

.site-footer { border-top: 1px solid var(--line); background: var(--bg-alt); padding: 44px 0 40px; }
.footer-top { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--fg); }
.footer-brand img { width: 26px; height: 26px; border-radius: 7px; }
.footer-top p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-left: auto; font-size: 14px; }
.footer-links a { color: var(--muted); }
.footer-bottom { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-bottom p { margin: 4px 0; }
.footer-bottom a { color: var(--muted); }

/* ---------- 内容页（隐私政策 / 支持） ---------- */

.doc { max-width: 760px; margin: 0 auto; padding: 48px 0 72px; }
.doc h1 { font-size: clamp(28px, 4vw, 36px); font-weight: 750; letter-spacing: -0.02em; margin: 40px 0 16px; }
.doc h1:first-child { margin-top: 0; }
.doc h2 { font-size: 21px; font-weight: 700; margin: 34px 0 12px; }
.doc h3 { font-size: 17px; font-weight: 700; margin: 26px 0 10px; }
.doc p, .doc ul { margin: 14px 0; color: var(--fg-soft); }
.doc ul { padding-left: 22px; }
.doc li { margin: 8px 0; }
.doc code { background: var(--tint); padding: 2px 6px; border-radius: 5px; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 44px 0; }
.doc img { border-radius: 10px; }

@media (max-width: 860px) {
  section { padding: 64px 0; }
  .hero { padding-top: 52px; }
  .hero-shot { margin-top: 40px; padding-bottom: 0; }
  .hero-shot .frame-phone { position: static; width: 190px; margin: -26px auto 0; }
  .section-head { margin-bottom: 34px; }
  .appstore { padding: 24px; }
  .footer-links { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
