/* Luna 官网 v3："清爽科技风" + 一点 App 的暖色
   主体干净的浅色；只在开场区和下载区铺一层很淡的晨光渐变（App 侧栏同款：薰衣草紫 → 淡珊瑚），
   截图后面放一团很淡的珊瑚和紫色光晕。珊瑚色只用在按钮、步骤编号、"内测"标签。
   深色主题用偏紫的深灰，不用纯黑。颜色取自 luna-publisher 的 src/shared/ui/theme/luna-tokens.css。 */

:root {
  --bg: #ffffff;
  --bg-2: #f7f6fa;
  --bg-3: #efedf3;
  --line: #e8e5ee;
  --line-strong: #d4d0dc;
  --ink: #1f1d2b;
  --ink-2: #5a5668;
  --ink-3: #8b8798;
  --coral: #e8592a;
  --coral-ink: #c2471c;
  --coral-soft: #ffe6dc;
  --on-coral: #ffffff;
  --dawn-from: #f4efff;
  --dawn-to: #fde9e2;
  --halo-coral: rgba(255, 170, 138, .55);
  --halo-violet: rgba(196, 178, 255, .55);
  --invert-bg: #1f1d2b;
  --invert-ink: #f6f4fa;
  --invert-ink-2: #a9a4b8;
  --shot-line: rgba(31, 29, 43, .10);
  --shot-shadow: 0 30px 80px -30px rgba(31, 29, 43, .30);
  --header-bg: rgba(255, 255, 255, .72);

  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans CJK SC", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15131c;
    --bg-2: #1b1924;
    --bg-3: #24212f;
    --line: #2b2837;
    --line-strong: #3b3749;
    --ink: #f3f1f7;
    --ink-2: #b1acbf;
    --ink-3: #7d788c;
    --coral: #ff6b3d;
    --coral-ink: #ff8f6a;
    --coral-soft: rgba(255, 107, 61, .16);
    --on-coral: #ffffff;
    --dawn-from: #221d33;
    --dawn-to: #2a1d22;
    --halo-coral: rgba(255, 120, 80, .22);
    --halo-violet: rgba(150, 120, 255, .22);
    --invert-bg: #1e1b29;
    --invert-ink: #f3f1f7;
    --invert-ink-2: #9d98ad;
    --shot-line: rgba(255, 255, 255, .10);
    --shot-shadow: 0 30px 90px -30px rgba(0, 0, 0, .7);
    --header-bg: rgba(21, 19, 28, .72);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15131c;
  --bg-2: #1b1924;
  --bg-3: #24212f;
  --line: #2b2837;
  --line-strong: #3b3749;
  --ink: #f3f1f7;
  --ink-2: #b1acbf;
  --ink-3: #7d788c;
  --coral: #ff6b3d;
  --coral-ink: #ff8f6a;
  --coral-soft: rgba(255, 107, 61, .16);
  --on-coral: #ffffff;
  --dawn-from: #221d33;
  --dawn-to: #2a1d22;
  --halo-coral: rgba(255, 120, 80, .22);
  --halo-violet: rgba(150, 120, 255, .22);
  --invert-bg: #1e1b29;
  --invert-ink: #f3f1f7;
  --invert-ink-2: #9d98ad;
  --shot-line: rgba(255, 255, 255, .10);
  --shot-shadow: 0 30px 90px -30px rgba(0, 0, 0, .7);
  --header-bg: rgba(21, 19, 28, .72);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.7 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

.proto-bar {
  font-size: 12px;
  text-align: center;
  padding: 6px 16px;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
}

/* ---------- 页头 ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; line-height: 0; }
.brand img { height: 24px; width: auto; }
.brand .on-dark { display: none; }
:root[data-theme="dark"] .brand .on-light { display: none; }
:root[data-theme="dark"] .brand .on-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .on-light { display: none; }
  :root:not([data-theme="light"]) .brand .on-dark { display: block; }
}
.links { display: flex; gap: 24px; font-size: 14px; }
.links a { color: var(--ink-2); text-decoration: none; }
.links a:hover, .links a[aria-current="page"] { color: var(--ink); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  padding: 0;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn .sun { display: none; }
:root[data-theme="dark"] .icon-btn .sun { display: block; }
:root[data-theme="dark"] .icon-btn .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .sun { display: block; }
  :root:not([data-theme="light"]) .icon-btn .moon { display: none; }
}
@media (max-width: 640px) { .links { display: none; } }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  background: var(--coral);
  color: var(--on-coral);
  transition: opacity .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { opacity: .86; }
.btn.small { height: 34px; padding: 0 14px; font-size: 14px; border-radius: 8px; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { opacity: 1; border-color: var(--ink-3); }
.btn svg { width: 16px; height: 16px; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 6px; }

/* ---------- 通用排版 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
  letter-spacing: .02em;
}
.eyebrow { background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid var(--line); padding: 4px 12px; border-radius: 999px; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--coral-ink); text-transform: uppercase; }
.section { padding: 128px 0; }
.section-head { max-width: 640px; margin-bottom: 64px; }
.section-head h2 {
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.18;
  letter-spacing: -.01em;
  margin: 14px 0 16px;
}
.section-head p { color: var(--ink-2); font-size: 17px; max-width: 32em; }
@media (max-width: 640px) {
  .section { padding: 80px 0; }
  .section-head { margin-bottom: 40px; }
}
.muted { color: var(--ink-3); }
.todo { color: var(--coral-ink); font-size: .92em; }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  padding: 112px 0 0;
  text-align: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, transparent 0%, transparent 55%, var(--bg) 100%),
    linear-gradient(160deg, var(--dawn-from) 0%, var(--dawn-to) 100%);
}
.hero h1 {
  font-size: clamp(44px, 8.4vw, 92px);
  line-height: 1.06;
  letter-spacing: -.02em;
  font-weight: 700;
  margin: 22px auto 22px;
}
.hero .steps-line {
  font-size: clamp(16px, 2.2vw, 21px);
  color: var(--ink-2);
  letter-spacing: .14em;
}
.hero .steps-line i { font-style: normal; color: var(--ink-3); margin: 0 .2em; letter-spacing: 0; }
.hero .cta-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.hero .fine { margin-top: 16px; font-size: 13px; color: var(--ink-3); }
.stage { position: relative; margin-top: 80px; perspective: 2400px; }
.stage::before, .stage::after {
  content: "";
  position: absolute;
  top: -6%;
  width: 52%;
  height: 72%;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}
.stage::before { left: 2%; background: var(--halo-violet); }
.stage::after { right: 2%; top: 4%; background: var(--halo-coral); }
.stage .shot { z-index: 1; }
.shot {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--shot-line);
  background: #fff;
}
.stage .shot {
  transform: rotateX(10deg) scale(.98);
  transform-origin: 50% 0;
  box-shadow: var(--shot-shadow);
  -webkit-mask-image: linear-gradient(#000 62%, transparent 100%);
  mask-image: linear-gradient(#000 62%, transparent 100%);
}
.shot img { width: 100%; height: auto; }
@media (max-width: 640px) {
  .hero { padding-top: 64px; }
  .stage { margin-top: 48px; }
  .stage .shot { transform: none; border-radius: 10px; }
}

/* ---------- 五步闭环 ---------- */
.loop-rows { display: grid; gap: 120px; }
.loop-row { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
.loop-row:nth-child(even) { grid-template-columns: 7fr 5fr; }
.loop-row:nth-child(even) .loop-text { order: 2; }
.loop-text h3 { font-size: clamp(24px, 3vw, 32px); line-height: 1.25; letter-spacing: -.005em; margin: 12px 0 14px; }
.loop-text p { color: var(--ink-2); font-size: 17px; max-width: 24em; }
.loop-text .tag { display: inline-block; margin-top: 18px; font-size: 13px; color: var(--ink-3); }
.loop-text .tag b { display: inline-block; color: var(--coral-ink); background: var(--coral-soft); font-weight: 600; font-size: 12px; padding: 2px 8px; border-radius: 999px; margin-right: 4px; }
.loop-text .kicker .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--coral); color: var(--on-coral); font-size: 11px; letter-spacing: 0; margin-right: 8px; }
.loop-row .shot { box-shadow: 0 1px 0 var(--line); }
.crop img { width: 100%; height: auto; }
@media (max-width: 860px) {
  .loop-rows { gap: 72px; }
  .loop-row, .loop-row:nth-child(even) { grid-template-columns: 1fr; gap: 24px; }
  .loop-row:nth-child(even) .loop-text { order: 0; }
}

/* ---------- 五个平台 ---------- */
.platforms { background: var(--invert-bg); color: var(--invert-ink); padding: 128px 0; overflow: hidden; }
.platforms .kicker { color: var(--coral); }
.platforms h2 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.18; letter-spacing: -.01em; margin: 14px 0 0; max-width: 14em; }
.names {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 0;
  margin: 64px 0 56px;
  font-size: clamp(44px, 9vw, 112px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
}
.names span::after { content: "/"; font-weight: 300; color: var(--invert-ink-2); margin: 0 .22em; opacity: .5; }
.names span:last-child::after { content: none; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; border-top: 1px solid color-mix(in srgb, var(--invert-ink) 16%, transparent); padding-top: 28px; }
.facts b { display: block; font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.facts p { color: var(--invert-ink-2); font-size: 15px; }
@media (max-width: 760px) {
  .platforms { padding: 80px 0; }
  .facts { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------- 原则 ---------- */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.principles div { border-top: 1px solid var(--line-strong); padding-top: 22px; }
.principles b { display: block; font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.principles p { color: var(--ink-2); font-size: 15px; }
@media (max-width: 760px) { .principles { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- 结尾下载条 ---------- */
.end {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 136px 0 144px;
  background:
    linear-gradient(180deg, var(--bg) 0%, transparent 40%),
    linear-gradient(200deg, var(--dawn-from) 0%, var(--dawn-to) 100%);
}
.end::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -40%;
  width: 60%;
  height: 80%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--halo-coral), transparent);
  filter: blur(40px);
  pointer-events: none;
}
.end .wrap { position: relative; }
.end h2 { font-size: clamp(34px, 5.4vw, 60px); letter-spacing: -.015em; line-height: 1.12; }
.end p { color: var(--ink-2); margin-top: 16px; font-size: 17px; }
.end .cta-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
@media (max-width: 640px) { .end { padding: 88px 0 96px; } }

/* ---------- 下载页 ---------- */
.dl-hero { padding: 104px 0 56px; }
.dl-band {
  position: relative;
  overflow: hidden;
  padding-bottom: 72px;
  background:
    linear-gradient(180deg, transparent 0%, transparent 70%, var(--bg) 100%),
    linear-gradient(160deg, var(--dawn-from) 0%, var(--dawn-to) 100%);
}
.dl-band::before {
  content: "";
  position: absolute;
  right: -10%;
  top: -20%;
  width: 50%;
  height: 80%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--halo-coral), transparent);
  filter: blur(50px);
  pointer-events: none;
}
.dl-band > * { position: relative; }
.tiles { background: var(--bg); }
.dl-hero h1 { font-size: clamp(40px, 6.4vw, 72px); line-height: 1.08; letter-spacing: -.02em; font-weight: 700; margin-top: 20px; }
.dl-hero p { color: var(--ink-2); font-size: 18px; margin-top: 18px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tile { position: relative; padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 6px; min-height: 236px; }
.tile + .tile { border-left: 1px solid var(--line); }
.tile .os { font-size: 13px; color: var(--ink-3); letter-spacing: .02em; }
.tile h3 { font-size: 22px; letter-spacing: -.005em; }
.tile .meta { font-size: 13px; color: var(--ink-3); font-family: var(--mono); margin-top: 2px; }
.tile .btn { margin-top: auto; align-self: flex-start; }
.tile .rec { display: none; position: absolute; top: 24px; right: 24px; font-size: 12px; font-weight: 600; color: var(--coral-ink); background: var(--coral-soft); padding: 2px 8px; border-radius: 999px; }
.tile.recommended { background: var(--bg-2); box-shadow: inset 0 2px 0 var(--coral); }
.tile.recommended .rec { display: block; }
.tile:not(.recommended) .btn { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.chip-tip { font-size: 13px; color: var(--ink-3); margin-top: 14px; }
@media (max-width: 860px) {
  .tiles { grid-template-columns: 1fr; }
  .tile + .tile { border-left: 0; border-top: 1px solid var(--line); }
  .tile { min-height: 0; }
  .tile .btn { margin-top: 14px; }
}
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.pair h3 { font-size: 20px; margin: 10px 0 10px; }
.pair p { color: var(--ink-2); }
.pair p + p { margin-top: 10px; }
.pair .link { display: inline-flex; gap: 6px; margin-top: 16px; font-weight: 600; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; }
.pair .link:hover { border-color: var(--ink); }
@media (max-width: 760px) { .pair { grid-template-columns: 1fr; gap: 40px; } }

.fold { border-top: 1px solid var(--line); }
.fold:last-of-type { border-bottom: 1px solid var(--line); }
.fold summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; font-size: 17px; font-weight: 600; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: "+"; font-weight: 300; font-size: 24px; color: var(--ink-3); line-height: 1; }
.fold[open] summary::after { content: "–"; }
.fold .body { padding: 0 0 28px; color: var(--ink-2); max-width: 44em; }
.fold .body p + p, .fold .body ol, .fold .body p + ol { margin-top: 10px; }
.fold ol { padding-left: 1.3em; margin: 0; }
.fold li + li { margin-top: 6px; }
.fold code, .help code { font-family: var(--mono); font-size: .9em; background: var(--bg-3); padding: 1px 6px; border-radius: 5px; }

.release { display: grid; grid-template-columns: 200px 1fr; gap: 32px; padding: 28px 0; border-top: 1px solid var(--line); }
.release:last-child { border-bottom: 1px solid var(--line); }
.release .v { font-family: var(--mono); font-size: 15px; }
.release .v small { display: block; color: var(--ink-3); font-family: var(--font); font-size: 13px; margin-top: 4px; }
.release ul { margin: 0; padding-left: 1.2em; color: var(--ink-2); }
.release h4 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.release h4 + ul { margin-bottom: 14px; }
.release table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 12px; }
.release th, .release td { text-align: left; padding: 8px 10px 8px 0; border-top: 1px solid var(--line); color: var(--ink-2); }
.release th { color: var(--ink-3); font-weight: 500; }
.table-scroll { overflow-x: auto; }
@media (max-width: 640px) { .release { grid-template-columns: 1fr; gap: 12px; } }

/* ---------- 帮助页 ---------- */
.help { max-width: 760px; }
.help h2 { font-size: 26px; margin: 72px 0 16px; letter-spacing: -.005em; }
.help h3 { font-size: 18px; margin: 36px 0 10px; }
.help p, .help li { color: var(--ink-2); }
.help ol { padding-left: 1.3em; }
.help li + li { margin-top: 6px; }
.help pre { font-family: var(--mono); font-size: 13px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; overflow-x: auto; }
.figure { margin: 18px 0 8px; }
.figure img { border: 1px solid var(--line); border-radius: 12px; background: #fff; width: 100%; height: auto; }
.figure figcaption { margin-top: 10px; color: var(--ink-2); }
.figure figcaption b { color: var(--ink); }
.figure .n { font-family: var(--mono); color: var(--coral-ink); margin-right: 8px; }
.note { border-left: 2px solid var(--coral); padding: 4px 0 4px 16px; margin: 20px 0; color: var(--ink-2); }
.note b { color: var(--ink); }

/* ---------- 页脚 ---------- */
.foot { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 13px; color: var(--ink-3); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); }

dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  max-width: min(420px, calc(100vw - 32px));
  background: var(--bg);
  color: var(--ink);
}
dialog::backdrop { background: rgba(0, 0, 0, .45); }
dialog h3 { font-size: 18px; margin-bottom: 8px; }
dialog p { color: var(--ink-2); margin-bottom: 20px; }
