/* ============================================================
   书阁落地页样式：单文件、无外部依赖
   设计基调：纸感米白底 + 赭石主色 + 宋体标题
   ============================================================ */

:root {
  --paper: #fbf6ef;
  --paper-2: #f4ebe0;
  --paper-3: #eee2d3;
  --ink: #1d1712;
  --ink-2: #3d3229;
  --muted: #7c6b5d;
  --line: rgba(29, 23, 18, 0.1);
  --accent: #c05a2b;
  --accent-deep: #9a431b;
  --accent-soft: rgba(192, 90, 43, 0.1);
  --shadow-sm: 0 2px 8px rgba(60, 40, 25, 0.06);
  --shadow-md: 0 18px 40px -24px rgba(60, 40, 25, 0.35);
  --shadow-lg: 0 40px 80px -40px rgba(60, 40, 25, 0.45);
  --radius: 18px;
  --wrap: 1120px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; letter-spacing: 0.01em; }

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
  background: var(--accent-soft);
  color: var(--accent-deep);
  padding: 0.12em 0.42em;
  border-radius: 5px;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------------- 导航 ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(12px);
  background: rgba(251, 246, 239, 0.82);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.nav.is-stuck { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }

.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { border-radius: 9px; }
.brand__text { font-family: var(--font-serif); font-size: 19px; font-weight: 700; }
.brand__text em {
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-left: 8px;
  text-transform: uppercase;
}

.nav__links { display: flex; align-items: center; gap: 26px; font-size: 14.5px; }
.nav__links a { color: var(--ink-2); transition: color 0.2s ease; }
.nav__links a:hover { color: var(--accent); }
.nav__cta {
  padding: 8px 16px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent) !important;
  font-weight: 600;
}
.nav__cta:hover { background: var(--accent); color: #fff !important; }

.nav__toggle { display: none; background: none; border: 0; padding: 6px; cursor: pointer; }
.nav__toggle span {
  display: block;
  width: 20px; height: 2px;
  margin: 4px 0;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------------- 首屏 ---------------- */
.hero { padding: 64px 0 88px; position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto auto;
  width: 620px; height: 620px;
  background: radial-gradient(circle at 50% 50%, rgba(192, 90, 43, 0.14), transparent 62%);
  pointer-events: none;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.tag {
  display: inline-block;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border: 1px solid rgba(192, 90, 43, 0.18);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(38px, 5.2vw, 60px);
  line-height: 1.16;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}
.hero .lead { font-size: 16.5px; color: var(--ink-2); max-width: 33em; margin: 0 0 30px; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.22s ease, background 0.2s ease, color 0.2s ease;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 26px -14px rgba(192, 90, 43, 0.9);
}
.btn--primary:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn--ghost { border-color: var(--line); color: var(--ink-2); background: rgba(255, 255, 255, 0.6); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--lg { padding: 14px 26px; font-size: 16px; }
.btn:active { transform: translateY(0); }

.hero__meta {
  display: flex; flex-wrap: wrap; gap: 20px;
  list-style: none; margin: 0; padding: 0;
  font-size: 13.5px; color: var(--muted);
}
.hero__meta b { color: var(--ink); font-weight: 600; }

/* 手机模型 */
.hero__art { position: relative; display: flex; justify-content: center; }

.phone {
  width: 292px;
  padding: 10px;
  border-radius: 42px;
  background: linear-gradient(160deg, #2c2420, #14100e);
  box-shadow: var(--shadow-lg);
  transform: rotate(-2.5deg);
}
.phone__screen {
  background: var(--paper);
  border-radius: 33px;
  overflow: hidden;
  padding: 14px 14px 0;
}

.app-bar {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: var(--muted); padding: 4px 2px 12px;
}
.app-bar__title { font-family: var(--font-serif); font-size: 17px; font-weight: 600; color: var(--ink); }
.app-bar__dots { display: inline-flex; gap: 3px; }
.app-bar__dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); opacity: 0.6; }

.shelf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.shelf__item { margin: 0; }
.shelf__item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 7px;
  box-shadow: var(--shadow-sm);
  background: var(--paper-3);
}
.shelf__item figcaption {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabbar {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--muted);
  margin-top: 16px; padding: 10px 6px;
  border-top: 1px solid var(--line);
}
.tabbar .is-on { color: var(--accent); font-weight: 600; }

.hero__badge {
  position: absolute;
  font-size: 12.5px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
}
.hero__badge--a { top: 24px; left: 4%; }
.hero__badge--b { bottom: 40px; right: 2%; }

/* ---------------- 章节公共 ---------------- */
.section { padding: 84px 0; }
.section--tint { background: linear-gradient(180deg, var(--paper-2), var(--paper)); }
.section__head { max-width: 620px; margin: 0 auto 46px; text-align: center; }
.section__head h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 12px 0 12px; }
.section__head p { color: var(--muted); margin: 0; }

.eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.22em;
  color: var(--accent);
  font-weight: 700;
}

/* ---------------- 功能卡片 ---------------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.card {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.22s ease, box-shadow 0.28s ease, border-color 0.22s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(192, 90, 43, 0.28);
}
.card__icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 16px;
}
.card h3 { font-size: 19px; margin: 0 0 8px; }
.card p { margin: 0; font-size: 14.5px; color: var(--muted); }

/* ---------------- 界面预览 ---------------- */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.shot { margin: 0; text-align: center; }
.shot__frame {
  background: linear-gradient(165deg, #2c2420, #171210);
  border-radius: 30px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
}
.shot figcaption { margin-top: 14px; font-size: 13px; color: var(--muted); }

.mock {
  background: var(--paper);
  border-radius: 23px;
  padding: 16px 14px;
  text-align: left;
  font-size: 11px;
  color: var(--ink-2);
  min-height: 396px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mock__bar {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.mock__bar i { width: 12px; height: 2px; background: var(--muted); opacity: 0.5; border-radius: 2px; }

.mock__hero { display: flex; gap: 10px; }
.mock__hero img { width: 62px; height: 84px; object-fit: cover; border-radius: 6px; }
.mock__hero-copy { display: flex; flex-direction: column; gap: 3px; }
.mock__hero-copy b { font-family: var(--font-serif); font-size: 13.5px; color: var(--ink); }
.mock__hero-copy span { color: var(--muted); }
.mock__hero-copy em { font-style: normal; color: var(--ink-2); font-size: 10.5px; line-height: 1.5; }

.mock__row { display: flex; gap: 6px; }
.mock__row span { flex: 1; height: 8px; border-radius: 4px; background: var(--paper-3); }

.mock__list { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.mock__list i { width: 3px; height: 12px; border-radius: 2px; background: var(--accent); }
.mock__list b { font-size: 11.5px; color: var(--ink); }

.mock__cards { display: flex; gap: 8px; }
.mock__cards img { width: 33.33%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 5px; }

.mock__detail { display: flex; gap: 12px; align-items: center; }
.mock__detail img { width: 66px; height: 88px; object-fit: cover; border-radius: 6px; box-shadow: var(--shadow-sm); }
.mock__detail b { font-family: var(--font-serif); font-size: 14px; display: block; color: var(--ink); }
.mock__detail span { color: var(--muted); }
.mock__stats { display: flex; align-items: baseline; gap: 4px; margin-top: 6px; }
.mock__stats em { font-style: normal; font-weight: 700; color: var(--accent-deep); font-size: 13px; }
.mock__stats small { color: var(--muted); margin-right: 8px; }

.mock__tags { display: flex; gap: 6px; }
.mock__tags span {
  font-size: 10px; padding: 2px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-deep);
}
.mock__intro { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.65; }
.mock__btns { display: flex; gap: 8px; }
.mock__btns span {
  flex: 1; text-align: center; padding: 7px 0; border-radius: 999px;
  border: 1px solid var(--line); font-size: 11px; color: var(--ink-2);
}
.mock__btns .is-solid { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.mock__chapters { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.mock__chapters li {
  font-size: 10.5px; color: var(--ink-2);
  padding-bottom: 6px; border-bottom: 1px dashed var(--line);
}

.mock--reader { gap: 0; }
.mock__text { flex: 1; font-family: var(--font-serif); font-size: 12px; line-height: 2; color: var(--ink-2); }
.mock__text p { margin: 0 0 10px; }
.mock__readerbar {
  display: flex; justify-content: space-around;
  border-top: 1px solid var(--line);
  padding-top: 10px; font-size: 10.5px; color: var(--muted);
}

/* ---------------- 技术栈 ---------------- */
.stack { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.stack__copy h2 { font-size: clamp(26px, 3.2vw, 34px); margin: 12px 0 14px; }
.stack__copy p { color: var(--muted); margin: 0 0 20px; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.ticks li { position: relative; padding-left: 24px; }
.ticks li::before {
  content: "";
  position: absolute; left: 4px; top: 9px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.stack__diagram {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  display: grid;
  gap: 8px;
  justify-items: center;
}
.node {
  width: 100%;
  text-align: center;
  padding: 13px 10px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: #fff;
}
.node small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.node--app { background: rgba(192, 90, 43, 0.06); border-color: rgba(192, 90, 43, 0.25); color: var(--accent-deep); }
.node--db { background: var(--paper-2); }
.arrow { font-size: 11px; letter-spacing: 0.06em; color: var(--muted); }

/* ---------------- 下载 ---------------- */
.download {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 42px 44px;
  box-shadow: var(--shadow-md);
}
.download h2 { font-size: clamp(26px, 3.4vw, 34px); margin: 12px 0 14px; }
.download__meta { display: flex; flex-wrap: wrap; gap: 22px; margin: 0 0 24px; font-size: 13.5px; color: var(--muted); }
.download__meta b { color: var(--ink); }
.download__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }

.install { margin: 0 0 14px; padding-left: 20px; color: var(--muted); font-size: 14px; display: grid; gap: 6px; }
.sha { margin: 0; font-size: 12px; color: var(--muted); word-break: break-all; }
.sha code { background: transparent; color: var(--muted); padding: 0; }

.download__qr {
  display: grid; justify-items: center; gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}
.download__qr img { border-radius: 8px; background: #fff; }
.download__qr span { font-size: 12px; color: var(--muted); }

.entries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
.entry {
  display: grid; gap: 4px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.entry:hover { border-color: var(--accent); transform: translateY(-2px); }
.entry b { font-size: 14.5px; }
.entry span { font-size: 12.5px; color: var(--muted); }

/* ---------------- 页脚 ---------------- */
.foot { padding: 40px 0 46px; border-top: 1px solid var(--line); }
.foot__inner { display: grid; gap: 10px; text-align: center; justify-items: center; }
.foot__brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-serif); font-weight: 600; }
.foot__brand img { border-radius: 7px; }
.foot__note { margin: 0; max-width: 46em; font-size: 12.5px; color: var(--muted); }
.foot__copy { margin: 0; font-size: 12px; color: var(--muted); }

/* ---------------- 动效 ---------------- */
/* 默认可见：只有 JS 正常运行（html.js-reveal）时才做入场隐藏，避免脚本失效时整页空白 */
.js-reveal .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js-reveal .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 44px; }
  .hero__art { order: -1; }
  .phone { transform: rotate(-1.5deg) scale(0.94); }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .stack { grid-template-columns: 1fr; gap: 36px; }
  .download { grid-template-columns: 1fr; padding: 32px 26px; }
  .download__qr { justify-self: start; }
}

@media (max-width: 760px) {
  .section { padding: 62px 0; }
  .shots { grid-template-columns: 1fr; gap: 34px; }
  .shot__frame { max-width: 340px; margin: 0 auto; }
  .entries { grid-template-columns: 1fr; }

  .nav__links {
    position: absolute;
    top: 66px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 16px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav__links a:last-child { border-bottom: 0; }
  .nav__cta { text-align: center; margin-top: 12px; border-radius: 999px; }
  .nav__toggle { display: block; }

  .grid { grid-template-columns: 1fr; }
  .hero { padding: 42px 0 64px; }
  .hero__badge { font-size: 11.5px; padding: 6px 11px; }
  .hero__badge--a { top: 10px; left: 0; }
  .hero__badge--b { bottom: 18px; right: 0; }
}

@media (max-width: 380px) {
  .phone { width: 260px; }
}
