/* BookSpark 官网样式
   约定和客户端界面 2.0 一致：只有一个主题色（橙）、方角、细线；颜色全部走变量，浅色 / 深色各一套。
   不引用任何外部字体和脚本（国内访问 Google Fonts 不稳定），字体用系统自带。 */

:root {
  --orange: #f37021;
  --orange-ink: #b24a08;
  --orange-wash: #fcebdf;
  --on-orange: #1b1815;

  --paper: #f2efe9;
  --sheet: #fffdf9;
  --sheet-2: #f7f4ee;
  --ink: #1b1815;
  --ink-2: #524c45;
  --ink-3: #6f685f;
  --rule: #ddd6c9;
  --rule-strong: #c4bcad;

  --night: #1b1815;
  --night-2: #2a2622;
  --night-ink: #efe9df;
  --night-ink-2: #b5ad9f;
  --night-rule: rgba(255, 255, 255, .14);

  --r: 3px;
  --wrap: 1120px;
  --f-ui: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Segoe UI", system-ui, sans-serif;
  --f-num: "Bahnschrift", "DIN Alternate", "Segoe UI", "Microsoft YaHei UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --orange-ink: #ff9a57;
    --orange-wash: rgba(243, 112, 33, .16);
    --paper: #141210;
    --sheet: #1d1a17;
    --sheet-2: #24201c;
    --ink: #efe9df;
    --ink-2: #c0b8ab;
    --ink-3: #9d958a;
    --rule: #35302a;
    --rule-strong: #4a443c;
    --night: #0c0b0a;
    --night-2: #1d1a17;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.75 var(--f-ui);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 700; letter-spacing: .01em; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.num { font-family: var(--f-num); font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 99; background: var(--orange); color: var(--on-orange); padding: 6px 12px; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px;
  border: 1px solid transparent; border-radius: var(--r);
  font: 600 15px/1 var(--f-ui); text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn-main { background: var(--orange); color: var(--on-orange); }
.btn-main:hover { background: #ff8a3d; }
.btn-line { border-color: var(--night-rule); color: var(--night-ink); background: transparent; }
.btn-line:hover { border-color: var(--night-ink-2); }
.btn-plain { border-color: var(--rule-strong); color: var(--ink); background: var(--sheet); }
.btn-plain:hover { border-color: var(--ink-3); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- 顶栏 ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--night); color: var(--night-ink);
  border-bottom: 1px solid var(--night-rule);
}
.top .wrap { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: .02em; }
.brand img { width: 30px; height: 30px; border-radius: var(--r); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 12px; color: var(--night-ink-2); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--night-ink); }
.top .btn { min-height: 38px; padding: 0 16px; font-size: 14px; }
.menu-btn { display: none; margin-left: auto; width: 40px; height: 40px; border: 1px solid var(--night-rule); border-radius: var(--r); background: none; color: var(--night-ink); cursor: pointer; }
.menu-btn svg { width: 20px; height: 20px; margin: auto; display: block; }

/* ---------- 首屏 ---------- */
.hero { background: var(--night); color: var(--night-ink); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-top: 72px; padding-bottom: 80px; }
.kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--orange); font-size: 14px; font-weight: 600; letter-spacing: .08em; }
.kicker::before { content: ""; width: 24px; height: 2px; background: var(--orange); }
.hero h1 { margin-top: 18px; font-size: clamp(34px, 5.2vw, 56px); font-weight: 800; letter-spacing: .02em; }
.hero h1 em { font-style: normal; color: var(--orange); }
.nw { white-space: nowrap; }
.hero .lead { margin-top: 20px; max-width: 34em; color: var(--night-ink-2); font-size: 17px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .fine { margin-top: 18px; color: var(--night-ink-2); font-size: 13px; opacity: .85; }

.stack { position: relative; height: 520px; }
.stack figure { position: absolute; top: 0; margin: 0; width: 46%; aspect-ratio: 9 / 16; border: 1px solid var(--night-rule); border-radius: var(--r); overflow: hidden; background: var(--night-2); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.stack figure img { width: 100%; height: 100%; object-fit: cover; }
.stack figure:nth-child(1) { left: 2%; top: 46px; transform: rotate(-6deg); }
.stack figure:nth-child(2) { left: 27%; z-index: 2; }
.stack figure:nth-child(3) { left: 52%; top: 46px; transform: rotate(6deg); }
.stack .tag { position: absolute; z-index: 3; left: 50%; bottom: -6px; transform: translateX(-50%); white-space: nowrap; background: var(--orange); color: var(--on-orange); font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: var(--r); }

/* ---------- 九步流水线 ---------- */
.flow { background: var(--night-2); color: var(--night-ink); border-top: 1px solid var(--night-rule); }
.flow ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(9, 1fr); }
.flow li { padding: 18px 10px; border-left: 1px solid var(--night-rule); text-align: center; }
.flow li:first-child { border-left: 0; }
.flow b { display: block; color: var(--orange); font: 600 13px/1 var(--f-num); letter-spacing: .06em; }
.flow span { display: block; margin-top: 8px; font-size: 14px; color: var(--night-ink); }

/* ---------- 通用区块 ---------- */
.sec { padding: 96px 0; border-bottom: 1px solid var(--rule); }
.sec-alt { background: var(--sheet-2); }
.sec-head { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; margin-bottom: 48px; }
.sec-head .idx { color: var(--orange-ink); font: 600 14px/1.9 var(--f-num); letter-spacing: .1em; border-top: 2px solid var(--orange); padding-top: 10px; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 36px); }
.sec-head p { margin-top: 12px; color: var(--ink-2); max-width: 40em; }

/* 样例 */
.samples { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.sample { margin: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.sample img, .sample video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; background: #000; }
.sample figcaption { padding: 14px 16px 16px; border-top: 1px solid var(--rule); }
.sample figcaption b { display: block; font-size: 15px; }
.sample figcaption span { display: block; margin-top: 2px; color: var(--ink-3); font-size: 13px; }
.note { margin-top: 24px; color: var(--ink-3); font-size: 14px; }

/* 功能 */
.features { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.feature { padding: 28px 26px 30px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--sheet); }
.feature .ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r); background: var(--orange-wash); color: var(--orange-ink); }
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { margin-top: 18px; font-size: 18px; }
.feature p { margin-top: 8px; color: var(--ink-2); font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chips span { padding: 2px 8px; border: 1px solid var(--rule); border-radius: var(--r); font-size: 12px; color: var(--ink-2); background: var(--sheet-2); }

/* 画风 */
.styles { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
.style { margin: 0; }
.style img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border: 1px solid var(--rule); border-radius: var(--r); }
.style figcaption { margin-top: 8px; font-size: 13px; color: var(--ink-2); text-align: center; }

/* 价格 */
.trial { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; margin-bottom: 24px; border: 1px solid var(--orange); border-radius: var(--r); background: var(--orange-wash); }
.trial b { font-size: 18px; }
.trial p { color: var(--ink-2); font-size: 15px; }
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.plan { position: relative; display: flex; flex-direction: column; padding: 28px 24px 24px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); }
.plan.hot { border-color: var(--orange); box-shadow: inset 0 3px 0 var(--orange); }
.plan .badge { position: absolute; top: -12px; left: 24px; background: var(--orange); color: var(--on-orange); font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: var(--r); }
.plan h3 { font-size: 18px; }
.plan .price { margin-top: 14px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.plan .price strong { font: 700 40px/1 var(--f-num); }
.plan .price strong small { font-size: 20px; margin-right: 2px; }
.plan .price s { color: var(--ink-3); font: 15px var(--f-num); }
.plan .per { margin-top: 6px; color: var(--ink-3); font-size: 13px; min-height: 1.6em; }
.plan ul { list-style: none; margin: 20px 0 24px; padding: 16px 0 0; border-top: 1px solid var(--rule); font-size: 15px; flex: 1; }
.plan li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; }
.plan li span { color: var(--ink-3); }
.plan .btn { width: 100%; }
.price-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.price-notes div { padding: 18px 22px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--sheet); font-size: 14px; color: var(--ink-2); }
.price-notes b { color: var(--ink); }

/* 下载 */
.dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
.dl-card { padding: 32px; background: var(--night); color: var(--night-ink); border-radius: var(--r); }
.dl-card .ver { color: var(--night-ink-2); font-size: 14px; }
.dl-card .ver b { color: var(--orange); font-family: var(--f-num); }
.dl-card h3 { margin-top: 8px; font-size: 24px; }
.dl-card .btn { width: 100%; margin-top: 24px; }
.dl-card .soon { margin-top: 12px; color: var(--night-ink-2); font-size: 13px; }
.dl-card dl { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--night-rule); display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: 14px; }
.dl-card dt { color: var(--night-ink-2); }
.dl-card dd { margin: 0; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 0 26px 56px; }
.steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 0; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--rule-strong); border-radius: var(--r); font: 600 14px/1 var(--f-num); color: var(--orange-ink); background: var(--sheet); }
.steps li::after { content: ""; position: absolute; left: 19px; top: 44px; bottom: 6px; width: 1px; background: var(--rule); }
.steps li:last-child::after { display: none; }
.steps b { display: block; font-size: 17px; padding-top: 5px; }
.steps p { margin-top: 4px; color: var(--ink-2); font-size: 15px; }

/* 常见问题 */
.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 20px 4px; font-size: 17px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 24px; text-align: center; color: var(--orange-ink); font: 400 24px/1 var(--f-num); }
.faq details[open] summary::after { content: "−"; }
.faq .a { padding: 0 4px 22px; color: var(--ink-2); max-width: 48em; }
.faq .a p + p { margin-top: 8px; }

/* 联系 */
.contact { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; align-items: center; padding: 32px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r); }
.contact img { width: 220px; border: 1px solid var(--rule); border-radius: var(--r); background: #fff; }
.contact h3 { font-size: 22px; }
.contact p { margin-top: 10px; color: var(--ink-2); }
.contact dl { margin: 20px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; }
.contact dt { color: var(--ink-3); }
.contact dd { margin: 0; font-weight: 600; word-break: break-all; }
.copy { margin-left: 8px; padding: 2px 8px; border: 1px solid var(--rule-strong); border-radius: var(--r); background: none; color: var(--ink-2); font: 12px var(--f-ui); cursor: pointer; vertical-align: 1px; }
.copy:hover { border-color: var(--orange); color: var(--orange-ink); }

/* 页脚 */
.foot { background: var(--night); color: var(--night-ink-2); font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-top: 28px; padding-bottom: 28px; }
.foot .brand { color: var(--night-ink); font-size: 16px; }
.foot .brand img { width: 24px; height: 24px; }
.foot nav { display: flex; gap: 20px; margin-left: auto; }
.foot a { color: var(--night-ink-2); text-decoration: none; }
.foot a:hover { color: var(--night-ink); }
.foot .small { flex-basis: 100%; font-size: 12px; opacity: .8; }

/* 协议页 */
.doc { max-width: 820px; margin: 0 auto; padding: 56px 24px 96px; }
.doc h1 { font-size: 32px; }
.doc .legal-meta { margin: 12px 0 28px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); color: var(--ink-3); font-size: 14px; }
.doc h3 { margin: 32px 0 10px; font-size: 19px; }
.doc p, .doc li { color: var(--ink-2); }
.doc ol, .doc ul { padding-left: 1.4em; }
.doc li { margin: 6px 0; }
.doc b { color: var(--ink); }
.doc .back { display: inline-block; margin-bottom: 24px; color: var(--orange-ink); text-decoration: none; font-size: 14px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .styles { grid-template-columns: repeat(4, 1fr); }
  .plans { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .flow ol { grid-template-columns: repeat(5, 1fr); }
  .flow li:nth-child(6) { border-left: 0; }
  .flow li:nth-child(n+6) { border-top: 1px solid var(--night-rule); }
}

@media (max-width: 860px) {
  .nav, .top .btn { display: none; }
  .menu-btn { display: block; }
  .top.open .nav { display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 60px; padding: 8px 16px 16px; background: var(--night); border-bottom: 1px solid var(--night-rule); }
  .top.open .nav a { padding: 12px 4px; border-bottom: 1px solid var(--night-rule); }
  .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 56px; }
  .stack { height: auto; aspect-ratio: 1 / .92; max-width: 520px; width: 100%; margin: 8px auto 0; }
  .sec { padding: 72px 0; }
  .sec-head { grid-template-columns: 1fr; gap: 14px; margin-bottom: 32px; }
  .sec-head .idx { width: 120px; }
  .features { grid-template-columns: 1fr 1fr; }
  .dl { grid-template-columns: 1fr; gap: 40px; }
  .contact { grid-template-columns: 1fr; justify-items: start; }
  .price-notes { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .hero .actions .btn { flex: 1 1 100%; }
  /* 手机上样例横向滑动，一屏一条多一点，提示还能往右滑 */
  .samples { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 8px; scrollbar-width: none; }
  .samples::-webkit-scrollbar { display: none; }
  .samples .sample { flex: 0 0 78%; scroll-snap-align: center; }
  .sample figcaption { padding: 10px 12px 12px; }
  .features { grid-template-columns: 1fr; }
  .styles { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: 1fr; }
  .flow ol { grid-template-columns: repeat(3, 1fr); }
  .flow li:nth-child(n) { border-left: 1px solid var(--night-rule); }
  .flow li:nth-child(3n+1) { border-left: 0; }
  .flow li:nth-child(n+4) { border-top: 1px solid var(--night-rule); }
  .flow li { padding: 14px 6px; }
  .dl-card { padding: 24px 20px; }
  .contact { padding: 22px 18px; }
  .contact img { width: 180px; }
  .foot nav { margin-left: 0; }
  .trial { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
