/* BookNook · 米纸与书脊 —— 卡尔大叔 */
:root {
  --paper: #f7f2e8;
  --paper-2: #efe7d7;
  --ink: #2a2622;
  --ink-2: #6b6157;
  --accent: #4f46b8;
  --accent-deep: #3a3190;
  --gold: #c99a3c;
  --card: #fffdf8;
  --line: #e2d8c4;
  --serif: Georgia, "Times New Roman", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 85% -5%, rgba(79,70,184,.07), transparent 60%),
    radial-gradient(900px 420px at -10% 30%, rgba(201,154,60,.08), transparent 55%),
    var(--paper);
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }

/* 书脊装饰 */
.spines { position: fixed; left: 0; top: 0; bottom: 0; width: 14px; display: flex; flex-direction: column; z-index: 5; }
.spine { flex: none; width: 14px; }
.s1 { height: 22%; background: var(--accent-deep); }
.s2 { height: 16%; background: var(--gold); }
.s3 { height: 20%; background: #7a4fb8; }
.s4 { height: 14%; background: var(--ink); }
.s5 { flex: 1; background: var(--accent); }
@media (max-width: 720px) { .spines { display: none; } }

/* 导航 */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px clamp(20px, 5vw, 64px);
  background: rgba(247,242,232,.88); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 1.25rem; font-weight: 700; letter-spacing: .5px; }
.brand img { border-radius: 6px; }
.nav nav { display: flex; gap: clamp(12px, 3vw, 30px); align-items: center; }
.nav nav a { text-decoration: none; color: var(--ink-2); font-size: .95rem; }
.nav nav a:hover { color: var(--ink); }
.nav nav .nav-dl { color: #fff; background: var(--accent); padding: 7px 18px; border-radius: 999px; font-weight: 600; }
.nav nav .nav-dl:hover { background: var(--accent-deep); color: #fff; }

main { max-width: 1060px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 48px); }
section { padding: clamp(56px, 9vw, 96px) 0; }

/* Hero */
.hero { padding-top: clamp(64px, 10vw, 110px); position: relative; }
.kicker { font-size: .85rem; letter-spacing: .12em; color: var(--gold); font-weight: 600; margin-bottom: 18px; }
.hero h1 { font-family: var(--serif); font-size: clamp(3.2rem, 9vw, 5.6rem); line-height: 1.05; font-weight: 900; }
.hero h1 em { font-style: normal; color: var(--accent); }
.tagline { margin-top: 22px; font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--ink-2); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }
.hero-meta { margin-top: 26px; font-size: .9rem; color: var(--ink-2); letter-spacing: .04em; }
/* 书签缎带 */
.hero::after {
  content: ""; position: absolute; right: clamp(8px, 4vw, 60px); top: 0;
  width: 46px; height: 120px; background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
  box-shadow: 0 6px 18px rgba(58,49,144,.35);
}
@media (max-width: 720px) { .hero::after { display: none; } }

.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  text-decoration: none; border-radius: 12px; padding: 13px 30px;
  font-weight: 700; font-size: 1rem; transition: transform .15s ease, box-shadow .15s ease;
}
.btn small { font-weight: 400; font-size: .74rem; opacity: .8; margin-top: 1px; }
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(79,70,184,.28); }
.btn.primary:hover { background: var(--accent-deep); }
.btn.ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }

/* 数据条 */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; padding: 0; }
.stats > div { background: var(--card); padding: 26px 12px; text-align: center; }
.stats b { display: block; font-family: var(--serif); font-size: clamp(1.7rem, 4vw, 2.4rem); color: var(--accent-deep); line-height: 1.2; }
.stats b small { font-size: .55em; }
.stats span { font-size: .82rem; color: var(--ink-2); }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* 标题区 */
.section-head { margin-bottom: 40px; }
.section-head h2 { font-family: var(--serif); font-size: clamp(1.8rem, 4.6vw, 2.6rem); line-height: 1.3; font-weight: 900; }
.section-sub { margin-top: 12px; color: var(--ink-2); max-width: 34em; }

/* 功能卡片 */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 26px 24px; position: relative; }
.card::before { content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--gold)); border-radius: 0 0 3px 3px; opacity: 0; transition: opacity .2s; }
.card:hover::before { opacity: 1; }
.card h3 { font-family: var(--serif); font-size: 1.15rem; margin-bottom: 10px; }
.card p { font-size: .93rem; color: var(--ink-2); }

/* 截图 */
.shot { margin-top: 26px; }
.shot-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 860px) { .shot-row { grid-template-columns: 1fr; } }
.window { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 18px 44px rgba(42,38,34,.14); background: var(--ink); position: relative; }
.window::before { content: "● ● ●"; display: block; font-size: 9px; letter-spacing: 4px; color: #9a917f; background: #38322b; padding: 8px 12px 6px; line-height: 1; }
.window img { width: 100%; height: auto; }
figcaption { margin-top: 10px; font-size: .85rem; color: var(--ink-2); text-align: center; }

/* 技术路线 */
.tech { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
@media (max-width: 720px) { .tech { grid-template-columns: 1fr; } }
.tech-item { border-left: 3px solid var(--accent); padding: 6px 0 6px 18px; }
.tech-item b { font-family: var(--serif); font-size: 1.02rem; display: block; margin-bottom: 4px; }
.tech-item span { font-size: .9rem; color: var(--ink-2); }
.aside {
  margin-top: 40px; padding: 22px 26px; background: var(--paper-2);
  border: 1px dashed var(--gold); border-radius: 14px; font-size: .95rem; color: var(--ink-2);
}

/* 下载 */
.download { text-align: center; }
.download .section-head { text-align: center; }
.download .section-sub { margin-left: auto; margin-right: auto; }
.dl-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; text-align: left; }
@media (max-width: 720px) { .dl-cards { grid-template-columns: 1fr; } }
.dl-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 30px 28px; }
.dl-card h3 { font-family: var(--serif); font-size: 1.3rem; }
.dl-size { color: var(--gold); font-weight: 600; font-size: .9rem; margin: 4px 0 8px; }
.dl-card p { font-size: .92rem; color: var(--ink-2); }
.dl-card .btn { margin-top: 18px; align-items: flex-start; width: 100%; flex-direction: row; gap: 8px; }
.hash { margin-top: 12px; font-size: .72rem; color: #a49a8a; font-family: Consolas, monospace; word-break: break-all; }
.note { margin-top: 26px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 22px; }
.note summary { cursor: pointer; font-weight: 600; font-size: .95rem; }
.note p { margin-top: 10px; font-size: .9rem; color: var(--ink-2); }
.release-link { margin-top: 26px; font-size: .95rem; }

/* 页脚 */
footer { border-top: 1px solid var(--line); background: var(--paper-2); margin-top: 40px; }
.foot-inner { max-width: 1060px; margin: 0 auto; padding: 44px clamp(20px, 5vw, 48px); text-align: center; }
.foot-brand { font-family: var(--serif); font-weight: 900; font-size: 1.15rem; display: flex; align-items: center; justify-content: center; gap: 8px; }
.foot-brand img { border-radius: 4px; }
.foot-inner p { margin-top: 8px; font-size: .92rem; }
.foot-mute { color: var(--ink-2); font-size: .84rem !important; }
.foot-inner a { color: var(--accent); }

/* 渐显 */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }
