/* 魔方星轨门户 · 纸面图鉴样式。
   色系=品牌定案：纸 #f7f3ea + 墨 #1c2547 + 产品六色点缀（不新造色）。
   纯静态无 JS；动效仅 CSS 且尊重 prefers-reduced-motion。 */

:root {
  color-scheme: light;
  --paper: #f7f3ea;
  --card: rgba(255, 255, 255, 0.55);
  --ink: #1c2547;
  --ink-soft: rgba(28, 37, 71, 0.68);
  --ink-mute: rgba(28, 37, 71, 0.46);
  --line: rgba(28, 37, 71, 0.14);
  --line-strong: rgba(28, 37, 71, 0.32);
  --sticker-u: #f4f6fb;
  --sticker-d: #ffd76a;
  --sticker-f: #6bcb77;
  --sticker-b: #4d96ff;
  --sticker-r: #ff6b6b;
  --sticker-l: #ff9f2e;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
}

/* 纸张颗粒（4% 墨噪，叠全页） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.04' fill='%231c2547'/%3E%3C/svg%3E");
}

/* 远景弧线（星空长曝的极淡底纹） */
.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.arc { position: absolute; width: 900px; height: 900px; }
.arc-a { top: -300px; right: -280px; }
.arc-b { bottom: -360px; left: -320px; }

main { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 0 28px; }

/* —— 品牌区：书名页式品牌区 —— */
.hero {
  padding: clamp(88px, 16vh, 140px) 0 clamp(56px, 10vh, 88px);
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.hero-eyebrow {
  font-size: 12px; letter-spacing: 0.35em; text-transform: lowercase;
  color: var(--ink-mute); margin-bottom: clamp(28px, 5vh, 44px);
}
.hero-mark { position: relative; width: 300px; height: 300px; margin-bottom: 40px; }
.hero-logo {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  border-radius: 50%;
}
/* 双轨道环：缓转、反向、各驮一颗色珠 */
.orbit {
  position: absolute; border: 1.5px dashed var(--line-strong);
  border-radius: 50%;
}
.orbit-a { inset: 0; animation: spin 130s linear infinite; }
.orbit-b { inset: -36px; animation: spin-rev 210s linear infinite; }
.orbit-a::before {
  content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%;
  background: var(--sticker-d); left: 50%; top: -5px; transform: translateX(-50%);
}
.orbit-b::after {
  content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%;
  background: var(--sticker-f); right: 12px; bottom: 30px;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-rev { to { transform: rotate(-360deg); } }
@media (prefers-reduced-motion: reduce) {
  .orbit-a, .orbit-b { animation: none; }
}

/* —— 标题字：衬线大字（图鉴/典籍语域） —— */
.brand {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  font-weight: 700;
  font-size: clamp(52px, 9vw, 72px);
  letter-spacing: 0.1em;
  margin-right: -0.1em;
  margin-bottom: 18px;
}
.tagline {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  font-weight: 600;
  font-size: clamp(17px, 3vw, 20px);
  color: var(--ink-soft);
  letter-spacing: 0.22em;
  margin-right: -0.23em;
}

/* —— 章节图鉴版式 —— */
.plate { border-top: 1px solid var(--line); padding: clamp(44px, 8vh, 64px) 0; }
.eyebrow {
  font-size: 13px; letter-spacing: 0.3em; color: var(--ink-soft);
  display: flex; align-items: center; gap: 12px; margin-bottom: 26px;
}
.eye-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot-u { background: var(--sticker-u); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.dot-d { background: var(--sticker-d); }
.dot-f { background: var(--sticker-f); }
.dot-b { background: var(--sticker-b); }
.dot-r { background: var(--sticker-r); }
.dot-l { background: var(--sticker-l); }
.lead { font-size: 17.5px; line-height: 2.05; color: var(--ink-soft); max-width: 34em; }

.abilities { margin-top: 10px; }
.ability {
  display: grid; grid-template-columns: 128px 1fr; gap: 18px; align-items: baseline;
  padding: 18px 0; border-top: 1px dashed var(--line);
}
.ability:first-child { border-top: none; }
.ability dt {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  font-weight: 700; font-size: 19px; letter-spacing: 0.06em;
  display: flex; align-items: center; gap: 10px;
}
.ability dd { font-size: 15.5px; line-height: 1.95; color: var(--ink-soft); }

/* —— 微信小程序入口 —— */
.search-pill {
  display: inline-flex; align-items: center; gap: 14px;
  border: 2px solid var(--ink); border-radius: 999px;
  background: var(--card);
  padding: 16px 26px;
}
.pill-icon { width: 22px; height: 22px; color: var(--ink); flex: none; }
.pill-text {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  font-weight: 700; font-size: 24px; letter-spacing: 0.12em;
}
.pill-tag {
  font-size: 12px; letter-spacing: 0.18em; color: var(--ink-soft);
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 4px 12px;
}
.pill-hint { margin-top: 16px; font-size: 14px; color: var(--ink-mute); }

/* —— 联系我们 —— */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-card {
  border: 1px solid var(--line-strong); border-radius: 14px;
  background: var(--card);
  padding: 22px 26px;
}
.contact-role {
  display: block; font-size: 13px; letter-spacing: 0.22em;
  color: var(--ink-soft); margin-bottom: 10px;
}
.contact-mail {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 16px; color: var(--ink); text-decoration: none;
}
.contact-mail:hover { text-decoration: underline; }

/* —— 页脚：法定信息 —— */
.colophon { border-top: 1px solid var(--line); padding: 36px 0 60px; }
.law { font-size: 13px; color: var(--ink-mute); display: flex; flex-wrap: wrap; align-items: center; }
.law > * + *::before { content: "·"; margin: 0 12px; color: var(--line-strong); }
.law a { color: var(--ink-mute); text-decoration: none; }
.law a:hover { text-decoration: underline; color: var(--ink-soft); }

/* —— 响应式 —— */
@media (max-width: 560px) {
  .hero-mark { width: 232px; height: 232px; }
  .orbit-b { inset: -26px; }
  .hero-logo { width: 152px; height: 152px; }
  .ability { grid-template-columns: 1fr; gap: 8px; }
  .contact-grid { grid-template-columns: 1fr; }
  .search-pill { padding: 13px 20px; gap: 12px; }
  .pill-text { font-size: 20px; }
  .law { flex-direction: column; gap: 8px; align-items: flex-start; }
  .law > * + *::before { content: none; }
}

/* —— 看见一次转动 —— */
.reveal-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 44px; align-items: center;
}
.reveal-fig { text-align: center; }
.reveal-fig img { width: 100%; max-width: 460px; height: auto; }
.reveal-fig figcaption {
  font-size: 12.5px; letter-spacing: 0.18em; color: var(--ink-mute); margin-top: 10px;
}
.reveal-quote {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  font-weight: 700; font-size: clamp(19px, 2.6vw, 23px);
  letter-spacing: 0.14em; margin-bottom: 16px;
}
.reveal-text { font-size: 15.5px; line-height: 2; color: var(--ink-soft); max-width: 30em; }
.reveal-text + .reveal-text { margin-top: 10px; }
.axis-map {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start;
  gap: 10px 30px; margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--line);
}
.axis-map dt { font-size: 12.5px; letter-spacing: 0.15em; color: var(--ink-mute); margin-bottom: 7px; }
.axis-map dd { display: flex; gap: 6px; }

/* —— 贴纸色点（六色纪律；白点描墨边） —— */
.st { width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex: none; }
.st-u { background: var(--sticker-u); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.st-d { background: var(--sticker-d); }
.st-f { background: var(--sticker-f); }
.st-b { background: var(--sticker-b); }
.st-r { background: var(--sticker-r); }
.st-l { background: var(--sticker-l); }

/* —— 真实数据行 —— */
.stats { display: flex; gap: 40px; margin-top: 22px; }
.stat b {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  font-weight: 700; font-size: 30px; line-height: 1.25; display: block;
}
.stat i { font-style: normal; font-size: 12.5px; letter-spacing: 0.2em; color: var(--ink-mute); }

/* —— 公式库精选 —— */
.section-note { font-size: 14.5px; color: var(--ink-soft); margin-bottom: 16px; }
.formula-list { border-top: 1px solid var(--line); }
.formula {
  display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 4px 24px;
  padding: 15px 0; border-bottom: 1px dashed var(--line);
}
.formula dt {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  font-weight: 700; font-size: 18px; letter-spacing: 0.04em;
}
.f-notation {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 16px; letter-spacing: 0.04em; align-self: center;
}
.f-effect { grid-column: 2; font-size: 14.5px; line-height: 1.9; color: var(--ink-soft); }

/* —— 术语三条 —— */
.term-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.term-card {
  border: 1px solid var(--line-strong); border-radius: 14px; background: var(--card);
  padding: 20px 22px;
}
.term-card h3 {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.term-tag {
  font-family: -apple-system, "PingFang SC", sans-serif;
  font-size: 11px; font-weight: 400; letter-spacing: 0.12em; color: var(--ink-soft);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 9px;
}
.term-sum { font-size: 13.5px; color: var(--ink-mute); margin-bottom: 9px; }
.term-body { font-size: 14px; line-height: 1.95; color: var(--ink-soft); }

/* —— 称号星轨 —— */
.title-orbit {
  list-style: none; display: flex; justify-content: space-between;
  position: relative; margin-top: 4px;
}
.title-orbit::before {
  content: ""; position: absolute; left: 7px; right: 7px; top: 7px;
  border-top: 1px dashed var(--line-strong);
}
.title-orbit li { position: relative; display: flex; flex-direction: column; gap: 3px; padding-right: 10px; }
.title-orbit li .st { margin-bottom: 5px; }
.title-orbit b {
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "SimSun", serif;
  font-weight: 700; font-size: 17px;
}
.title-orbit span { font-size: 12.5px; color: var(--ink-mute); }

/* —— 响应式（新增板块） —— */
@media (max-width: 560px) {
  .reveal-grid { grid-template-columns: 1fr; gap: 26px; }
  .stats { gap: 26px; }
  .stat b { font-size: 26px; }
  .axis-map { gap: 10px 20px; }
  .formula { grid-template-columns: 1fr; gap: 6px; }
  .f-effect { grid-column: 1; }
  .term-grid { grid-template-columns: 1fr; }
  .title-orbit { flex-wrap: wrap; gap: 16px 26px; }
  .title-orbit::before { display: none; }
}
