:root {
  color-scheme: dark;
  --bg: #12100c;
  --bg-alt: #181410;
  --panel: #1f1a12;
  --line: #3a2f1c;
  --gold: #d4af37;
  --gold-bright: #f0c75e;
  --text: #efe6cf;
  --muted: #b3a582;
  --red: #a63a2e;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.85;
}
h1, h2, h3, .brand, .hero-kicker {
  font-family: "Songti SC", "STSong", "Noto Serif SC", "Noto Serif CJK SC", SimSun, serif;
}
a { color: var(--gold-bright); }

/* 顶部导航 */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: .65rem 1.4rem;
  background: rgba(18, 16, 12, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { color: var(--text); text-decoration: none; font-size: 1.25rem; letter-spacing: .35em; }
.brand span { color: var(--gold); font-size: .72rem; letter-spacing: .18em; }
.topbar nav { display: flex; gap: 1.3rem; }
.topbar nav a { color: var(--muted); text-decoration: none; font-size: .95rem; letter-spacing: .2em; }
.topbar nav a:hover { color: var(--gold-bright); }

/* 主图区 */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,16,12,.34) 0%, rgba(18,16,12,0) 34%, rgba(18,16,12,.18) 62%, var(--bg) 100%); }
.hero-text { position: relative; z-index: 2; width: min(1080px, 92vw); margin: 0 auto; padding: 7rem 0 4.2rem; text-align: center; }
.hero-kicker { color: var(--gold-bright); letter-spacing: .55em; font-size: .95rem; margin: 0 0 .6rem; text-shadow: 0 2px 14px rgba(0,0,0,.6); }
.hero h1 { font-size: clamp(3.4rem, 11vw, 7rem); margin: 0; letter-spacing: .14em; font-weight: 700; color: #fdf6dd; text-shadow: 0 4px 34px rgba(0,0,0,.65); }
.hero-quote { font-family: "Songti SC", "STSong", "Noto Serif SC", SimSun, serif; font-size: clamp(1rem, 2.4vw, 1.25rem); color: #f4ead0; text-shadow: 0 2px 12px rgba(0,0,0,.75); margin: 1.1rem 0 1.8rem; }
.hero-quote span { color: var(--gold-bright); font-size: .85em; }
.hero-btn {
  display: inline-block; padding: .62rem 2.1rem; border: 1px solid var(--gold);
  color: var(--gold-bright); text-decoration: none; letter-spacing: .3em; border-radius: 2px;
  background: rgba(18,16,12,.45);
}
.hero-btn:hover { background: rgba(212,175,55,.16); }
.seal {
  position: absolute; right: 3.2vw; bottom: 15vh; z-index: 2;
  width: 64px; height: 64px; display: grid; place-items: center;
  background: var(--red); color: #fff; border-radius: 6px;
  font-family: "Songti SC", "STSong", serif; font-size: 2rem;
  box-shadow: 0 6px 24px rgba(0,0,0,.5); transform: rotate(4deg);
}

/* 章节 */
.section { padding: 4.6rem 0 3.6rem; }
.section.alt { background: var(--bg-alt); }
.wrap { width: min(1080px, 92vw); margin: 0 auto; }
.section h2 { font-size: clamp(1.7rem, 4.4vw, 2.4rem); letter-spacing: .08em; margin: 0 0 1.2rem; display: flex; align-items: baseline; gap: .9rem; }
.section h2 .num {
  color: var(--gold); border: 1px solid var(--gold); border-radius: 50%;
  width: 2.5rem; height: 2.5rem; flex: 0 0 auto; display: inline-grid; place-items: center;
  font-size: 1.15rem; transform: translateY(.35rem);
}
.section p { color: #ddd2b4; }
.lead { font-size: 1.06rem; }
.sub { font-size: 1.3rem; margin: 2.2rem 0 .8rem; color: var(--gold-bright); letter-spacing: .06em; }
.closing { margin-top: 2.4rem; font-family: "Songti SC", "STSong", "Noto Serif SC", SimSun, serif; font-size: 1.08rem; color: var(--text); border-left: 3px solid var(--gold); padding-left: 1.1rem; }

/* 卡片 */
.cards { display: grid; gap: 1rem; margin-top: 1.6rem; }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.nine { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 1.2rem 1.3rem; }
.card h3 { margin: 0 0 .5rem; color: var(--gold-bright); font-size: 1.12rem; letter-spacing: .05em; }
.card p { margin: 0; color: #cfc3a2; font-size: .955rem; }
.card.mini { text-align: center; padding: 1rem .7rem; }
.card.mini img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); margin-bottom: .55rem; background: #2a2115; }
.card.mini h3 { font-size: 1.2rem; }

/* 时间线 */
.timeline { list-style: none; margin: 1.8rem 0 .4rem; padding: 0 0 0 1.2rem; border-left: 2px solid var(--line); }
.timeline li { position: relative; display: grid; grid-template-columns: 8.2rem 1fr; gap: 1.1rem; padding: .85rem 0 .85rem .6rem; }
.timeline li::before { content: ""; position: absolute; left: -1.2rem; top: 1.5rem; width: .62rem; height: .62rem; margin-left: -.36rem; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--bg); }
.section.alt .timeline li::before { box-shadow: 0 0 0 4px var(--bg-alt); }
.timeline time { color: var(--gold-bright); font-family: "Songti SC", "STSong", serif; font-size: 1.02rem; }
.timeline h3 { margin: 0 0 .3rem; font-size: 1.05rem; color: var(--text); }
.timeline p { margin: 0; color: #cfc3a2; font-size: .955rem; }

/* 龙生九子：逐位单独排版 */
.sons { display: grid; gap: 1.1rem; margin-top: 1.6rem; }
.son { display: grid; grid-template-columns: 290px 1fr; gap: 1.4rem; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 1.1rem 1.25rem; }
.son:nth-child(even) { direction: rtl; }
.son:nth-child(even) > * { direction: ltr; }
.son img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #2a2115; }
.son h3 { margin: 0 0 .15rem; color: var(--gold-bright); font-size: 1.5rem; letter-spacing: .12em; }
.son h3 span { font-size: .78rem; color: var(--muted); letter-spacing: .04em; }
.son .trait { margin: 0 0 .5rem; color: var(--gold); font-family: "Songti SC", "STSong", "Noto Serif SC", SimSun, serif; }
.son p { margin: 0; color: #cfc3a2; }

/* 特性框 */
.feature-box { margin-top: 1.8rem; border: 1px solid var(--gold); border-radius: 8px; padding: 1.3rem 1.5rem; background: linear-gradient(180deg, rgba(212,175,55,.07), rgba(212,175,55,.02)); }
.feature-box h3 { margin: 0 0 .6rem; color: var(--gold-bright); }
.feature-box p { margin: 0; }
.feature-box ul { margin: 0; padding-left: 1.2rem; color: #ddd2b4; }
.feature-box li { margin: .35rem 0; }
.feature-box strong { color: var(--gold-bright); font-weight: 600; }

/* 页脚 */
footer { border-top: 1px solid var(--line); padding: 2.2rem 1rem 2.6rem; text-align: center; color: var(--muted); }
footer p { margin: .3rem 0; }
footer .fine { font-size: .82rem; color: #8d8065; max-width: 760px; margin-left: auto; margin-right: auto; }

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

/* 移动端 */
@media (max-width: 760px) {
  .topbar nav { display: none; }
  .cards.two, .cards.three, .cards.nine { grid-template-columns: 1fr; }
  .cards.nine { grid-template-columns: repeat(3, 1fr); }
  .card.mini h3 { font-size: 1rem; }
  .card.mini p { font-size: .8rem; }
  .timeline li { grid-template-columns: 1fr; gap: .15rem; }
  .son { grid-template-columns: 1fr; }
  .seal { display: none; }
  .hero-text { padding-bottom: 3rem; }
}
