/* ═══════════════════════════════════════════════════
   獨立記 · 共享样式
   苹果的骨头，宋朝的心跳
   ═══════════════════════════════════════════════════ */

:root {
  --ink:        #1D1D1F;   /* 主文字 · 苹果墨黑 */
  --ink-soft:   #4A4A4D;
  --gray:       #86868B;   /* 次要文字 */
  --line:       #E5E5E7;   /* 分隔线 */
  --paper:      #FFFFFF;   /* 底色 */
  --paper-warm: #FAF9F5;   /* 二级背景 · 米白 */
  --cinnabar:   #9D2933;   /* 朱砂 · 故宫红 */
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--paper);
}

body {
  font-family: 'Noto Serif SC', 'EB Garamond', 'Songti SC', serif;
  color: var(--ink);
  background: var(--paper);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

::selection {
  background: var(--cinnabar);
  color: #fff;
}

a { color: inherit; }

/* ─────────────────────────────────────
   入口页 · 通用版式
   ───────────────────────────────────── */

.stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 12vh 6vw;
  position: relative;
}

.stage--auto { min-height: auto; padding: 18vh 6vw; }

/* 入口首屏 */

.entrance { text-align: center; }

.title {
  font-size: clamp(72px, 14vw, 180px);
  font-weight: 900;
  letter-spacing: 0.35em;
  text-indent: 0.35em;
  line-height: 1;
  margin-bottom: 7vh;
}

.tagline {
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 300;
  color: var(--ink-soft);
  letter-spacing: 0.15em;
  text-indent: 0.15em;
  margin-bottom: 14vh;
}

.doors {
  display: flex;
  gap: clamp(40px, 8vw, 96px);
  justify-content: center;
}

.door {
  color: var(--ink);
  text-decoration: none;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 400;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.door::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 1px;
  background: var(--cinnabar);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.door:hover { color: var(--cinnabar); }
.door:hover::after { width: 100%; }

/* 卷标题屏 */

.juan-hero { text-align: center; background: var(--paper); }

.juan-hero__num {
  font-size: 14px;
  letter-spacing: 0.6em;
  color: var(--gray);
  margin-bottom: 6vh;
  font-weight: 400;
}

.juan-hero__quote {
  font-size: clamp(36px, 6vw, 80px);
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.5;
  max-width: 18em;
  margin: 0 auto 5vh;
}

.juan-hero__attr {
  font-size: 15px;
  color: var(--gray);
  letter-spacing: 0.2em;
}

/* 条目列表 */

.scroll-list {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

.scroll-list__intro {
  font-size: 15px;
  color: var(--gray);
  text-align: center;
  margin-bottom: 12vh;
  letter-spacing: 0.1em;
  line-height: 2;
}

.entry {
  padding: 6vh 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.4s ease;
  position: relative;
}

.entry:first-of-type { border-top: 1px solid var(--line); }

.entry__meta {
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--gray);
  margin-bottom: 16px;
  font-weight: 400;
}

.entry__title {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 18px;
  transition: color 0.4s ease;
}

.entry__excerpt {
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 38em;
}

a.entry:hover .entry__title { color: var(--cinnabar); }
a.entry:hover .entry__meta::before {
  width: 40px;
  background: var(--cinnabar);
  margin-right: 12px;
}

.entry__meta::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 1px;
  background: var(--gray);
  vertical-align: middle;
  transition: all 0.4s ease;
}

/* 章印 */

.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--cinnabar);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0;
  text-indent: 0;
  transform: rotate(-3deg);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
  user-select: none;
  font-family: 'Noto Serif SC', serif;
}

.seal--small { width: 36px; height: 36px; font-size: 18px; }

.seal-corner { position: absolute; bottom: 6vh; right: 6vw; opacity: 0.85; }

/* 卷间分隔 */

.juan-break { text-align: center; padding: 14vh 0 8vh; background: var(--paper); }
.juan-break__line { display: inline-block; width: 1px; height: 56px; background: var(--line); }

/* 滚动浮现 */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.2s ease, transform 1.2s cubic-bezier(0.2, 0.65, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ─────────────────────────────────────
   文章页 · 阅读专用版式
   ───────────────────────────────────── */

.article-nav {
  padding: 4vh 6vw;
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--gray);
}

.article-nav a {
  text-decoration: none;
  color: var(--gray);
  transition: color 0.3s ease;
}

.article-nav a:hover { color: var(--cinnabar); }

.article-nav__sep { margin: 0 12px; opacity: 0.5; }

.article {
  max-width: 680px;
  margin: 0 auto;
  padding: 6vh 6vw 12vh;
}

.article__header {
  text-align: center;
  margin-bottom: 10vh;
}

.article__num {
  font-size: 13px;
  letter-spacing: 0.6em;
  color: var(--cinnabar);
  margin-bottom: 4vh;
  font-weight: 400;
}

.article__title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
  margin-bottom: 4vh;
}

.article__date {
  font-size: 13px;
  letter-spacing: 0.4em;
  color: var(--gray);
}

.article__rule {
  width: 24px;
  height: 1px;
  background: var(--cinnabar);
  margin: 8vh auto;
  border: 0;
}

.article__body {
  font-size: 18px;
  line-height: 2;
  color: var(--ink);
  font-weight: 300;
}

.article__body p {
  margin-bottom: 1.8em;
}

.article__body h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin: 4em 0 1.5em;
  padding-top: 1em;
  border-top: 1px solid var(--line);
  text-align: center;
}

.article__body h2::before {
  content: '◆';
  display: block;
  color: var(--cinnabar);
  font-size: 10px;
  margin-bottom: 1.2em;
  font-weight: 400;
}

.article__body h3 {
  font-size: 20px;
  font-weight: 500;
  margin: 3em 0 1.2em;
  letter-spacing: 0.03em;
}

.article__body strong {
  font-weight: 700;
  color: var(--ink);
}

.article__body em {
  font-style: italic;
  color: var(--cinnabar);
  font-weight: 400;
}

.article__body blockquote {
  border-left: 2px solid var(--cinnabar);
  padding: 0.5em 0 0.5em 1.6em;
  margin: 2.5em 0;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 17px;
}

.article__body ul,
.article__body ol {
  margin: 1.8em 0;
  padding-left: 1.8em;
}

.article__body li {
  margin-bottom: 0.8em;
}

.article__body hr {
  border: 0;
  text-align: center;
  margin: 3em 0;
}

.article__body hr::before {
  content: '· · ·';
  color: var(--gray);
  letter-spacing: 1em;
  font-size: 14px;
}

/* 文末签名 */

.article__sign {
  text-align: center;
  margin: 10vh 0 6vh;
}

/* 文末 · 想加微信 */

.article__cta {
  text-align: center;
  margin: 4vh auto 8vh;
  font-size: 14px;
  letter-spacing: 0.15em;
  color: var(--gray);
  line-height: 2;
  max-width: 24em;
}

.article__cta a {
  color: var(--cinnabar);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.article__cta a:hover { border-bottom-color: var(--cinnabar); }

/* 上下篇 */

.article__pager {
  border-top: 1px solid var(--line);
  margin-top: 8vh;
  padding-top: 6vh;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 14px;
  letter-spacing: 0.2em;
}

.article__pager a {
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.3s ease;
  flex: 1;
}

.article__pager a:hover { color: var(--cinnabar); }

.article__pager__label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--gray);
  margin-bottom: 8px;
}

.article__pager__title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.05em;
  line-height: 1.5;
}

.article__pager__prev { text-align: left; }
.article__pager__next { text-align: right; }

/* ─────────────────────────────────────
   项目详情页 · 专用增量
   ───────────────────────────────────── */

.project__cat {
  font-size: 13px;
  letter-spacing: 0.6em;
  color: var(--cinnabar);
  margin-bottom: 4vh;
  font-weight: 400;
}

.project__tagline {
  font-size: 17px;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
  line-height: 1.7;
  margin-top: 2vh;
  font-weight: 300;
  font-style: italic;
}

.project__updated {
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--gray);
  margin-top: 8vh;
}

.project__progress {
  background: var(--paper-warm);
  padding: 3em 2.4em;
  margin: 2.5em 0;
  border-left: 2px solid var(--cinnabar);
}

.project__progress h3 {
  font-size: 14px;
  letter-spacing: 0.4em;
  color: var(--cinnabar);
  margin: 0 0 1em;
  font-weight: 500;
  border: none;
  padding: 0;
}

.project__progress h3:not(:first-child) {
  margin-top: 2.2em;
}

.project__progress ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project__progress li {
  padding: 0.3em 0;
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.8;
  position: relative;
  padding-left: 1.4em;
}

.project__progress li::before {
  content: '·';
  position: absolute;
  left: 0.4em;
  color: var(--cinnabar);
  font-weight: 700;
}

/* ─────────────────────────────────────
   卷·法 · 方法论卡片专用
   朱砂底章印 + 大金句 + 案例锚点
   ───────────────────────────────────── */

.fa-card__num {
  font-family: 'Noto Serif SC', 'Songti SC', serif;
  font-size: 16px;
  letter-spacing: 0.6em;
  color: var(--cinnabar);
  text-align: center;
  margin-bottom: 5vh;
  font-weight: 400;
}

.fa-card__quote {
  font-family: 'Noto Serif SC', 'Songti SC', serif;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.5;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  letter-spacing: 0.04em;
  margin: 0 auto;
  max-width: 22ch;
}

.fa-card__case {
  background: var(--paper-warm);
  border-left: 2px solid var(--cinnabar);
  padding: 2.4em 2.4em;
  margin: 3em 0 2em;
  font-style: italic;
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.95;
  letter-spacing: 0.02em;
}

.fa-card__case::before {
  content: '案 例';
  display: block;
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.5em;
  color: var(--cinnabar);
  margin-bottom: 1.2em;
  font-weight: 500;
}

.fa-card__growing {
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--gray);
  margin: 4em 0 2em;
  font-style: italic;
}

.fa-card__growing::before,
.fa-card__growing::after {
  content: '·';
  margin: 0 1em;
  color: var(--cinnabar);
}

/* 卷·法 入口列表 — 卡片摘要式 */
.fa-entry {
  display: block;
  padding: 5vh 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.fa-entry:first-of-type { border-top: 1px solid var(--line); }

.fa-entry:hover { background: var(--paper-warm); padding-left: 2vw; padding-right: 2vw; }

.fa-entry__num {
  font-size: 13px;
  letter-spacing: 0.5em;
  color: var(--cinnabar);
  margin-bottom: 1.5vh;
  font-weight: 400;
}

.fa-entry__quote {
  font-size: clamp(22px, 3.4vw, 30px);
  line-height: 1.55;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.03em;
  margin-bottom: 1.5vh;
}

.fa-entry__hint {
  font-size: 14px;
  color: var(--gray);
  letter-spacing: 0.05em;
  font-style: italic;
}

/* Hero 副标题：指向卷·法 */
.entrance__hint {
  position: absolute;
  bottom: 16vh;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  letter-spacing: 0.25em;
  color: var(--gray);
  font-style: italic;
  text-align: center;
}

.entrance__hint a {
  color: var(--cinnabar);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.entrance__hint a:hover { border-bottom-color: var(--cinnabar); }

@media (max-width: 600px) {
  .entrance__hint { bottom: 12vh; font-size: 12px; }
}

/* ─────────────────────────────────────
   页脚（共享）
   ───────────────────────────────────── */

footer {
  padding: 16vh 6vw 8vh;
  text-align: center;
  background: var(--paper-warm);
  border-top: 1px solid var(--line);
}

.footer__seal { margin-bottom: 6vh; }

.footer__lines {
  color: var(--gray);
  font-size: 14px;
  letter-spacing: 0.3em;
  line-height: 2.4;
}

.footer__lines a {
  color: var(--gray);
  text-decoration: none;
  margin: 0 14px;
  transition: color 0.3s ease;
}

.footer__lines a:hover { color: var(--cinnabar); }

.footer__copyright {
  margin-top: 6vh;
  color: var(--gray);
  font-size: 12px;
  letter-spacing: 0.4em;
}

/* ─────────────────────────────────────
   微信二维码浮层
   ───────────────────────────────────── */

.wx-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 22, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 100;
}

.wx-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.wx-modal__panel {
  background: var(--paper);
  padding: 40px 40px 28px;
  text-align: center;
  max-width: 86vw;
  transform: translateY(12px);
  transition: transform 0.5s cubic-bezier(0.2, 0.65, 0.3, 1);
}

.wx-modal.is-open .wx-modal__panel { transform: translateY(0); }

.wx-modal__qr {
  width: 240px;
  height: 240px;
  display: block;
  margin: 0 auto 24px;
  object-fit: contain;
}

.wx-modal__caption {
  font-size: 15px;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--ink);
  margin-bottom: 8px;
}

.wx-modal__hint {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--gray);
}

/* ─────────────────────────────────────
   PWA 安装条
   ───────────────────────────────────── */

#installBanner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 12px 20px;
  font-size: 13px;
  color: var(--ink-soft);
  display: none;
  align-items: center;
  gap: 16px;
  letter-spacing: 0.1em;
  z-index: 50;
}

#installBanner button {
  background: none;
  border: none;
  color: var(--cinnabar);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.1em;
  padding: 0;
}

/* ─────────────────────────────────────
   移动端
   ───────────────────────────────────── */

@media (max-width: 640px) {
  .doors { flex-direction: column; gap: 28px; align-items: center; }
  .juan-hero__quote { max-width: 14em; }
  .seal-corner { bottom: 4vh; right: 6vw; }
  .stage { padding: 14vh 6vw; }
  .article__body { font-size: 17px; line-height: 1.95; }
  .article__pager { flex-direction: column; gap: 32px; }
  .article__pager__next { text-align: left; }
}
