/* ============================================================
   鬼谷子 · 现代图解教学  |  style.css
   设计：宣纸墨色 + 青黛 + 赭金，现代国风
   ============================================================ */

:root {
  --bg: #f3ecdc;          /* 宣纸底色 */
  --bg2: #faf5e8;         /* 卡片表面 */
  --bg3: #ece2cb;         /* 深一档表面 */
  --ink: #2b2721;         /* 墨色正文 */
  --ink-soft: #46403a;
  --muted: #7c7264;       /* 弱化文字 */
  --rule: #d9ccb0;        /* 分隔线 */
  --accent: #31524c;      /* 青黛（主色） */
  --accent-deep: #233d39;
  --accent2: #a87f3c;     /* 赭金（辅色） */
  --accent2-soft: #c7a86a;
  --seal: #9c3f32;        /* 印泥红，少量点缀 */
  --shadow: 0 10px 30px rgba(58, 48, 32, .10);
  --shadow-lg: 0 24px 60px rgba(58, 48, 32, .16);
  --radius: 14px;
  --serif: "STKaiti", "KaiTi", "楷体", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "微软雅黑", "Hiragino Sans GB", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* 宣纸纹理层 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(168, 127, 60, .05), transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(49, 82, 76, .05), transparent 45%);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ---------------- 顶部进度条 + 导航 ---------------- */

.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  z-index: 100; transition: width .12s linear;
}

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  background: rgba(243, 236, 220, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; gap: 26px;
}
.brand {
  font-family: var(--serif);
  font-size: 1.22rem; font-weight: 700; color: var(--accent-deep);
  letter-spacing: .12em; white-space: nowrap; display: flex; align-items: center; gap: 10px;
}
.brand .seal-dot {
  width: 26px; height: 26px; border-radius: 6px;
  background: var(--seal); color: #fff7ec;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .85rem; letter-spacing: 0;
}
.nav-links { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav-links a {
  color: var(--ink-soft); font-size: .9rem; padding: 6px 12px;
  border-radius: 999px; transition: all .2s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: #fff; background: var(--accent); }
.nav-toggle { display: none; }

/* ---------------- Hero ---------------- */

.hero {
  position: relative; min-height: 92vh;
  display: flex; align-items: center;
  color: #fdf8ec; overflow: hidden;
}
.hero-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.04);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(20, 33, 30, .72) 0%, rgba(20, 33, 30, .38) 55%, rgba(20, 33, 30, .12) 100%);
}
.hero-inner { position: relative; z-index: 2; max-width: 1080px; margin: 0 auto; padding: 120px 24px 90px; width: 100%; }
.hero-kicker {
  display: inline-block; font-size: .92rem; letter-spacing: .42em;
  color: var(--accent2-soft); border: 1px solid rgba(199, 168, 106, .55);
  padding: 6px 18px; border-radius: 999px; margin-bottom: 26px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.25; font-weight: 700;
  text-shadow: 0 4px 26px rgba(0,0,0,.35);
  margin-bottom: 22px;
}
.hero h1 small {
  display: block; font-size: .42em; letter-spacing: .3em;
  font-weight: 400; color: rgba(253, 248, 236, .82); margin-top: 14px;
}
.hero p.lead {
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  max-width: 560px; color: rgba(253, 248, 236, .92);
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.hero-actions { margin-top: 38px; display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 30px; border-radius: 999px;
  font-size: .98rem; letter-spacing: .08em; transition: all .25s;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent2); color: #fff; }
.btn-primary:hover { background: #936d31; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost { border-color: rgba(253,248,236,.6); color: #fdf8ec; }
.btn-ghost:hover { background: rgba(253,248,236,.14); transform: translateY(-2px); }
.hero-scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 2; color: rgba(253,248,236,.75); font-size: .8rem; letter-spacing: .3em;
}
.hero-scroll::after {
  content: ""; display: block; width: 1px; height: 42px; margin: 8px auto 0;
  background: linear-gradient(rgba(253,248,236,.7), transparent);
  animation: drop 1.8s ease-in-out infinite;
}
@keyframes drop { 0% { transform: scaleY(0); transform-origin: top; } 55% { transform: scaleY(1); transform-origin: top; } 56% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------------- 通用区块 ---------------- */

section { padding: 88px 0; position: relative; z-index: 1; scroll-margin-top: 64px; }
.sec-head { margin-bottom: 48px; }
.sec-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .86rem; letter-spacing: .32em; color: var(--accent2);
  margin-bottom: 14px;
}
.sec-label::before, .sec-label::after { content: ""; width: 26px; height: 1px; background: var(--accent2-soft); }
.sec-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  color: var(--accent-deep); font-weight: 700; line-height: 1.35;
}
.sec-sub { color: var(--muted); margin-top: 12px; max-width: 720px; }

.bg-alt { background: var(--bg2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

mark.key { background: none; color: var(--accent); font-weight: 600; }

/* ---------------- 人物档案 ---------------- */

.profile {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center;
}
.profile-card {
  background: var(--bg2); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 36px 34px; box-shadow: var(--shadow);
}
.profile-card h3 {
  font-family: var(--serif); font-size: 1.5rem; color: var(--accent-deep); margin-bottom: 4px;
}
.profile-card .alias { color: var(--muted); font-size: .92rem; margin-bottom: 22px; }
.fact-list { list-style: none; }
.fact-list li {
  display: grid; grid-template-columns: 76px 1fr; gap: 14px;
  padding: 13px 0; border-bottom: 1px dashed var(--rule); font-size: .96rem;
}
.fact-list li:last-child { border-bottom: 0; }
.fact-list .k {
  color: var(--accent2); font-weight: 600;
}
.profile-note {
  margin-top: 24px; padding: 16px 18px; border-left: 3px solid var(--accent2);
  background: var(--bg3); border-radius: 0 8px 8px 0; font-size: .92rem; color: var(--ink-soft);
}
.profile-visual { position: relative; }
.profile-visual img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.profile-visual .seal {
  position: absolute; right: -14px; bottom: -18px;
  width: 74px; height: 74px; border-radius: 10px; background: var(--seal);
  color: #fff7ec; font-family: var(--serif); font-size: 1.55rem;
  display: flex; align-items: center; justify-content: center;
  line-height: 1.1; text-align: center; letter-spacing: .05em;
  box-shadow: var(--shadow); transform: rotate(-6deg);
}

/* ---------------- 全书地图 / 学习路径 ---------------- */

.book-map { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.juan {
  background: var(--bg2); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 24px 20px; transition: transform .25s, box-shadow .25s;
}
.juan:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.juan-tag {
  display: inline-block; font-size: .8rem; letter-spacing: .2em;
  color: #fff; background: var(--accent); padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
}
.juan:nth-child(2) .juan-tag { background: var(--accent2); }
.juan:nth-child(3) .juan-tag { background: var(--accent-deep); }
.juan:nth-child(4) .juan-tag { background: var(--seal); }
.juan h4 { font-family: var(--serif); font-size: 1.15rem; margin-bottom: 12px; color: var(--accent-deep); }
.juan ul { list-style: none; font-size: .92rem; color: var(--ink-soft); }
.juan ul li { padding: 4px 0; }
.juan ul li .num { color: var(--accent2); font-family: var(--serif); margin-right: 8px; }
.juan ul li.lost { color: var(--muted); text-decoration: line-through; }

/* ---------------- 总纲 ---------------- */

.core {
  display: grid; grid-template-columns: 1fr 1fr; gap: 30px;
}
.core-card {
  border-radius: var(--radius); padding: 40px 36px; color: #fdf8ec;
  position: relative; overflow: hidden;
}
.core-card.bai { background: linear-gradient(135deg, #31524c, #233d39); }
.core-card.he { background: linear-gradient(135deg, #a87f3c, #83612a); }
.core-card .big {
  font-family: var(--serif); font-size: 4.4rem; line-height: 1; opacity: .92; margin-bottom: 10px;
}
.core-card h3 { font-family: var(--serif); font-size: 1.5rem; margin-bottom: 12px; }
.core-card p { font-size: .96rem; color: rgba(253,248,236,.9); }
.core-flow {
  margin-top: 30px; text-align: center; color: var(--muted); font-size: .95rem;
}
.core-flow .chain {
  font-family: var(--serif); font-size: 1.35rem; color: var(--accent-deep); letter-spacing: .18em; margin-top: 8px;
}
.core-flow .chain span { color: var(--accent2); margin: 0 10px; }

/* ---------------- 十二篇 ---------------- */

.chapter {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  padding: 56px 0; border-bottom: 1px solid var(--rule);
}
.chapter:last-child { border-bottom: 0; }
.chapter.flip .ch-img { order: 2; }
.ch-num {
  font-family: var(--serif); font-size: .95rem; letter-spacing: .3em; color: var(--accent2);
}
.ch-name {
  font-family: var(--serif); font-size: clamp(1.9rem, 3vw, 2.4rem);
  color: var(--accent-deep); margin: 6px 0 4px; display: flex; align-items: baseline; gap: 14px;
}
.ch-name .pinyin { font-size: .82rem; color: var(--muted); letter-spacing: .14em; font-family: var(--sans); }
.ch-oneline {
  font-size: 1.06rem; color: var(--accent); font-weight: 600; margin-bottom: 22px;
  padding-left: 14px; border-left: 3px solid var(--accent2);
}
.ch-block { margin-bottom: 18px; }
.ch-block h5 {
  font-size: .92rem; letter-spacing: .14em; color: var(--seal); margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.ch-block h5::before { content: "◆"; font-size: .6rem; }
.ch-block p { font-size: .97rem; color: var(--ink-soft); }
.ch-block ul { list-style: none; margin-top: 4px; }
.ch-block ul li {
  position: relative; padding-left: 22px; font-size: .95rem; color: var(--ink-soft); margin: 6px 0;
}
.ch-block ul li::before {
  content: ""; position: absolute; left: 4px; top: .75em; width: 7px; height: 7px;
  background: var(--accent2-soft); border-radius: 2px; transform: rotate(45deg);
}
.ch-quote {
  margin-top: 8px; background: var(--bg3); border-radius: 10px; padding: 18px 22px;
}
.ch-quote .old { font-family: var(--serif); font-size: 1.08rem; color: var(--accent-deep); line-height: 1.7; }
.ch-quote .new { display: block; margin-top: 6px; font-size: .88rem; color: var(--muted); }
.ch-img img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.ch-img figcaption { text-align: center; font-size: .82rem; color: var(--muted); margin-top: 10px; }

/* 佚篇 */
.lost-chapters { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; }
.lost-card {
  border: 1px dashed var(--rule); border-radius: var(--radius); padding: 28px;
  background: repeating-linear-gradient(45deg, transparent, transparent 14px, rgba(217,204,176,.18) 14px, rgba(217,204,176,.18) 28px);
}
.lost-card h4 { font-family: var(--serif); font-size: 1.3rem; color: var(--muted); margin-bottom: 8px; }
.lost-card p { font-size: .92rem; color: var(--muted); }
.lost-tag { font-size: .78rem; letter-spacing: .2em; color: var(--seal); }

/* ---------------- 阴符七术 ---------------- */

.yinfu-banner {
  position: relative; border-radius: var(--radius); overflow: hidden;
  margin-bottom: 44px; box-shadow: var(--shadow-lg);
}
.yinfu-banner img { width: 100%; }
.yinfu-banner .cap {
  position: absolute; inset: auto 0 0 0; padding: 60px 34px 26px;
  background: linear-gradient(transparent, rgba(20,33,30,.82));
  color: #fdf8ec;
}
.yinfu-banner .cap h3 { font-family: var(--serif); font-size: 1.6rem; margin-bottom: 6px; }
.yinfu-banner .cap p { font-size: .94rem; color: rgba(253,248,236,.88); max-width: 660px; }

.qishu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.shu {
  background: var(--bg2); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 26px 20px; transition: all .25s;
}
.shu:hover { border-color: var(--accent2-soft); transform: translateY(-4px); box-shadow: var(--shadow); }
.shu .glyph {
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fdf8ec; font-family: var(--serif); font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.shu h4 { font-family: var(--serif); font-size: 1.18rem; color: var(--accent-deep); }
.shu .fa { font-size: .82rem; color: var(--accent2); letter-spacing: .1em; margin: 2px 0 10px; }
.shu p { font-size: .9rem; color: var(--ink-soft); }
.shu .modern { margin-top: 10px; font-size: .84rem; color: var(--muted); padding-top: 10px; border-top: 1px dashed var(--rule); }

/* ---------------- 现代应用 ---------------- */

.apply-banner {
  position: relative; border-radius: var(--radius); overflow: hidden; margin-bottom: 40px;
  box-shadow: var(--shadow-lg);
}
.apply-banner img { width: 100%; }
.apply-banner .cap {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  padding: 0 7%; background: linear-gradient(90deg, rgba(20,33,30,.72), rgba(20,33,30,.15));
  color: #fdf8ec; max-width: 620px;
}
.apply-banner .cap h3 { font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 10px; }
.apply-banner .cap p { color: rgba(253,248,236,.9); font-size: .96rem; }

.scenes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.scene {
  background: var(--bg2); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 24px 18px; text-align: center; transition: all .25s;
}
.scene:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--accent2-soft); }
.scene .icon {
  font-family: var(--serif); font-size: 2rem; color: var(--accent); width: 60px; height: 60px;
  margin: 0 auto 12px; border-radius: 50%; background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
}
.scene h4 { font-size: 1.02rem; color: var(--accent-deep); margin-bottom: 8px; }
.scene p { font-size: .86rem; color: var(--ink-soft); text-align: left; }
.scene p b { color: var(--accent2); font-weight: 600; }

/* 三步行动框 */
.action {
  margin-top: 40px; background: var(--accent-deep); color: #fdf8ec;
  border-radius: var(--radius); padding: 38px 36px;
  display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 28px; align-items: center;
}
.action .step .n {
  font-family: var(--serif); font-size: 2.2rem; color: var(--accent2-soft); line-height: 1;
}
.action .step h5 { font-size: 1.05rem; margin: 8px 0 6px; font-family: var(--serif); }
.action .step p { font-size: .88rem; color: rgba(253,248,236,.78); }
.action .arrow { font-size: 1.6rem; color: var(--accent2-soft); }

/* ---------------- 理性看待 ---------------- */

.warn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.warn-card {
  background: var(--bg2); border: 1px solid var(--rule); border-top: 4px solid var(--seal);
  border-radius: var(--radius); padding: 28px 26px;
}
.warn-card h4 { font-family: var(--serif); font-size: 1.22rem; color: var(--accent-deep); margin-bottom: 10px; }
.warn-card p { font-size: .93rem; color: var(--ink-soft); }
.trust-note {
  margin-top: 30px; padding: 26px 30px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(49,82,76,.08), rgba(168,127,60,.08));
  border: 1px solid var(--rule); font-size: .98rem; color: var(--ink-soft);
}
.trust-note b { color: var(--accent-deep); }

/* ---------------- 学习路径 ---------------- */

.path-table { width: 100%; border-collapse: collapse; background: var(--bg2); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.path-table th, .path-table td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--rule); font-size: .95rem; }
.path-table th { background: var(--accent); color: #fdf8ec; font-weight: 600; letter-spacing: .08em; }
.path-table tr:last-child td { border-bottom: 0; }
.path-table td.week { font-family: var(--serif); color: var(--accent2); font-size: 1.1rem; white-space: nowrap; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }

/* ---------------- 页脚 ---------------- */

footer {
  background: var(--accent-deep); color: rgba(253,248,236,.75);
  padding: 56px 0 40px; margin-top: 40px; position: relative; z-index: 1;
}
footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; }
footer h4 { font-family: var(--serif); color: #fdf8ec; font-size: 1.25rem; margin-bottom: 12px; }
footer p { font-size: .9rem; }
footer .meta { font-size: .84rem; line-height: 2; }
footer .meta b { color: var(--accent2-soft); font-weight: 600; }
.footer-bottom {
  max-width: 1080px; margin: 36px auto 0; padding: 20px 24px 0;
  border-top: 1px solid rgba(253,248,236,.15);
  font-size: .82rem; color: rgba(253,248,236,.5);
}

/* 回到顶部 */
.to-top {
  position: fixed; right: 26px; bottom: 30px; z-index: 80;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: #fdf8ec; border: 0; cursor: pointer;
  font-size: 1.2rem; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: all .3s;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--accent-deep); transform: translateY(-3px); }

/* 滚动淡入 */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------------- 响应式 ---------------- */

@media (max-width: 920px) {
  .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; background: var(--bg2); padding: 12px 20px 18px;
    border-bottom: 1px solid var(--rule); gap: 2px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 14px; }
  .nav-toggle {
    display: inline-flex; margin-left: auto; background: none; border: 0;
    font-size: 1.5rem; color: var(--accent-deep); cursor: pointer;
  }
  .profile, .core, .chapter, .chapter.flip .ch-img { grid-template-columns: 1fr; order: 0; }
  .chapter { gap: 26px; }
  .book-map, .qishu { grid-template-columns: repeat(2, 1fr); }
  .scenes { grid-template-columns: repeat(2, 1fr); }
  .warn-grid { grid-template-columns: 1fr; }
  .action { grid-template-columns: 1fr; gap: 18px; text-align: center; }
  .action .arrow { transform: rotate(90deg); }
  footer .wrap { grid-template-columns: 1fr; }
  .lost-chapters { grid-template-columns: 1fr; }
  .apply-banner .cap { max-width: 100%; padding: 0 24px; background: linear-gradient(transparent 30%, rgba(20,33,30,.8)); justify-content: flex-end; padding-bottom: 24px; }
}
@media (max-width: 560px) {
  section { padding: 60px 0; }
  .book-map, .qishu, .scenes { grid-template-columns: 1fr; }
  .hero { min-height: 86vh; }
}
