@import url('https://fonts.googleapis.com/css2?family=Cormorant+Infant:wght@300;400;500;600;700&family=Great+Vibes&display=swap');

/* ===== 变量 ===== */
:root {
  --c-primary: #6B1A2A;
  --c-accent: #B8973A;
  --c-dark: #3A0D14;
  --c-gold-light: #d4b86a;
  --c-bg: #1a0508;
  --c-bg2: #220810;
  --c-bg3: #2e0d17;
  --c-text: #f0e6d3;
  --c-text-muted: #b89a8a;
  --c-border: #4a1520;
  --font-display: 'Great Vibes', cursive;
  --font-body: 'Cormorant Infant', Georgia, 'Times New Roman', serif;
  --nav-h: 64px;
  --anchors-h: 44px;
  --radius-card: 28px;
  --transition: 0.3s ease;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 18px;
  background: var(--c-bg);
  color: var(--c-text);
  scroll-padding-top: calc(var(--nav-h) + var(--anchors-h));
}
body {
  font-family: var(--font-body);
  line-height: 1.75;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--c-bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-gold-light); }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===== 站点容器 ===== */
.site-wrapper { position: relative; overflow-x: hidden; }

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  background: rgba(26,5,8,0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
  transition: background var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
  background: rgba(26,5,8,0.97);
  box-shadow: 0 2px 24px rgba(107,26,42,0.3);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  height: var(--nav-h);
}
.brand-link { display: flex; align-items: center; gap: 0.5rem; }
.brand-logo { height: 40px; width: auto; }
.brand-text {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--c-accent);
  white-space: nowrap;
  line-height: 1;
}

/* header nav（结构抽签：header > nav > p > a） */
.header-nav {
  flex: 1;
  display: flex;
  align-items: center;
}
.header-nav p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.2rem;
  align-items: center;
}
.header-nav .nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--c-text);
  padding: 0.5rem 0.25rem;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.header-nav .nav-link:hover {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

/* CTA 按钮 */
.cta-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.4rem;
  background: linear-gradient(135deg, var(--c-primary), var(--c-dark));
  border: 1px solid var(--c-accent);
  color: var(--c-gold-light);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 4px;
  min-height: 40px;
  transition: background var(--transition), transform 0.15s;
  white-space: nowrap;
}
.cta-btn:hover {
  background: linear-gradient(135deg, var(--c-accent), var(--c-primary));
  color: var(--c-dark);
  transform: translateY(-1px);
}

/* 汉堡按钮 */
.hamburger {
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 8px;
  min-height: 40px;
  border-radius: 4px;
  transition: background var(--transition);
}
.hamburger:hover { background: rgba(184,151,58,0.15); }
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-accent);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ===== 粘性锚点条 ===== */
.sticky-anchors {
  background: rgba(58,13,20,0.95);
  border-top: 1px solid var(--c-border);
  overflow-x: auto;
  scrollbar-width: none;
}
.sticky-anchors::-webkit-scrollbar { display: none; }
.anchors-inner {
  display: flex;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  height: var(--anchors-h);
  gap: 0.5rem;
}
.anchor-link {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--c-text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: 2px;
  white-space: nowrap;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
.anchor-link:hover {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent);
}

/* ===== 全屏遮罩菜单 ===== */
.fullscreen-menu {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(26,5,8,0.98);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.fullscreen-menu.is-open {
  opacity: 1;
  pointer-events: all;
}
.menu-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 2rem;
  color: var(--c-accent);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  min-height: 40px;
  transition: background var(--transition);
}
.menu-close:hover { background: rgba(184,151,58,0.15); }
.fullscreen-nav p {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.fullscreen-nav .nav-link {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--c-text);
  letter-spacing: 0.04em;
  padding: 0.5rem 1rem;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  transition: color var(--transition);
  border-bottom: none;
}
.fullscreen-nav .nav-link:hover { color: var(--c-accent); }

/* ===== Hero ===== */
.hero-section {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--nav-h) + var(--anchors-h));
  background: linear-gradient(160deg, var(--c-dark) 0%, var(--c-bg) 60%, var(--c-bg2) 100%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: calc(70vh - var(--nav-h) - var(--anchors-h));
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  gap: 3rem;
  position: relative;
  z-index: 2;
}
.hero-figure {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  will-change: transform;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.hero-figure .hero-img { width: 100%; height: auto; border-radius: 12px; }
.hero-placeholder {
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-dark));
  border-radius: 12px;
}
.hero-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 1.25rem;
}
.hero-eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  color: var(--c-accent);
  text-transform: uppercase;
  display: block;
}
.hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--c-text);
  letter-spacing: 0.02em;
}
.hero-desc {
  font-size: 1.05rem;
  color: var(--c-text-muted);
  max-width: 420px;
  line-height: 1.8;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 2rem;
  background: linear-gradient(135deg, var(--c-accent), var(--c-primary));
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: 4px;
  min-height: 48px;
  box-shadow: 0 4px 20px rgba(184,151,58,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}
.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(184,151,58,0.45);
  color: #fff;
}

/* 斜切色带分割 */
.slash-divider {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--c-bg);
  clip-path: polygon(0 60%, 100% 0, 100% 100%, 0 100%);
  z-index: 3;
}

/* ===== 主内容区 ===== */
.site-main {
  padding-top: 0;
}

/* 章节容器：main > div > aside（结构抽签） */
.content-chapters {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 5rem 2rem 4rem;
  align-items: start;
  position: relative;
}
.chapter-aside {
  position: sticky;
  top: calc(var(--nav-h) + var(--anchors-h) + 2rem);
  background: linear-gradient(180deg, var(--c-bg2), var(--c-bg3));
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 1.75rem 1.25rem;
  border-bottom: 4px solid var(--c-accent);
}
.aside-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--c-accent);
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.chapter-index {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.chapter-index li a {
  font-size: 0.88rem;
  color: var(--c-text-muted);
  display: block;
  padding: 0.4rem 0.5rem;
  border-left: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  border-radius: 2px;
  line-height: 1.5;
}
.chapter-index li a:hover {
  color: var(--c-accent);
  border-left-color: var(--c-accent);
}
.chapter-body {
  min-width: 0;
}

/* page.content 里的 div 样式 */
.chapter-body > div {
  position: relative;
  padding: 4rem 0 4rem;
  border-bottom: 1px solid var(--c-border);
}
.chapter-body > div:last-child { border-bottom: none; }

/* 斜切章节分隔 */
.chapter-body > div::before {
  content: '';
  position: absolute;
  left: -2rem;
  right: -2rem;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-primary), transparent);
  opacity: 0.5;
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .parallax-bg { transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ===== 正文排版 ===== */
.chapter-body h1,
.chapter-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.25;
  margin-bottom: 1.25rem;
  letter-spacing: 0.02em;
}
.chapter-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--c-gold-light);
  margin: 2rem 0 0.75rem;
}
.chapter-body p {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--c-text-muted);
  margin-bottom: 1.25rem;
  max-width: 72ch;
}
.chapter-body strong { color: var(--c-text); font-weight: 600; }
.chapter-body em { color: var(--c-accent); font-style: italic; }
.chapter-body ul,
.chapter-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
  list-style: disc;
}
.chapter-body ol { list-style: decimal; }
.chapter-body li {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-text-muted);
  margin-bottom: 0.4rem;
}
.chapter-body a { color: var(--c-accent); border-bottom: 1px solid rgba(184,151,58,0.3); }
.chapter-body a:hover { color: var(--c-gold-light); border-bottom-color: var(--c-gold-light); }
.chapter-body blockquote {
  border-left: 4px solid var(--c-accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(184,151,58,0.06);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--c-text);
}
.chapter-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.chapter-body th {
  background: var(--c-primary);
  color: var(--c-gold-light);
  padding: 0.6rem 1rem;
  text-align: left;
  font-weight: 600;
}
.chapter-body td {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text-muted);
}
.chapter-body tr:last-child td { border-bottom: none; }

/* small 眉题（结构抽签） */
.chapter-body small,
small.hero-eyebrow,
small.aside-label,
small.footer-col-label {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  display: block;
}
.chapter-body small {
  color: var(--c-accent);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

/* ===== 页脚 ===== */
.site-footer {
  background: linear-gradient(180deg, var(--c-bg2) 0%, var(--c-dark) 100%);
  border-top: 1px solid var(--c-border);
  padding-top: 4rem;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
  border-bottom: 1px solid var(--c-border);
}
.footer-brand-col {}
.footer-brand { margin-bottom: 1rem; }
.footer-logo { height: 48px; width: auto; margin-bottom: 0.75rem; }
.brand-text-footer {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--c-accent);
  display: block;
  margin-bottom: 0.5rem;
}
.footer-tagline {
  font-size: 0.9rem;
  color: var(--c-text-muted);
  line-height: 1.65;
  max-width: 260px;
}
.footer-col-label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--c-accent);
  display: block;
  margin-bottom: 1rem;
  text-transform: uppercase;
}
/* footer ul > li > a（结构抽签） */
.footer-nav-col ul,
.footer-info-col ul,
.footer-info-col address ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-nav-col ul li a,
.footer-info-col address ul li a {
  font-size: 0.92rem;
  color: var(--c-text-muted);
  padding: 0.35rem 0;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  transition: color var(--transition);
}
.footer-nav-col ul li a:hover,
.footer-info-col address ul li a:hover { color: var(--c-accent); }
address { font-style: normal; }

/* 联系表单 */
.footer-form-block { }
.form-note {
  font-size: 0.88rem;
  color: var(--c-text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.form-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  padding: 0.65rem 1rem;
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition);
}
.form-input:focus { border-color: var(--c-accent); }
.form-input::placeholder { color: var(--c-text-muted); }
.form-submit {
  background: linear-gradient(135deg, var(--c-primary), var(--c-dark));
  border: 1px solid var(--c-accent);
  color: var(--c-gold-light);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.65rem 1.5rem;
  border-radius: 6px;
  min-height: 42px;
  transition: background var(--transition), transform 0.15s;
}
.form-submit:hover {
  background: linear-gradient(135deg, var(--c-accent), var(--c-primary));
  color: var(--c-dark);
  transform: translateY(-1px);
}

/* 版权底栏 */
.footer-bottom {
  text-align: center;
  padding: 1.5rem 2rem;
}
.copyright {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  line-height: 1.6;
}

/* ===== 卡片通用（如 page.content 内有卡片） ===== */
.card {
  background: linear-gradient(160deg, var(--c-bg2), var(--c-bg3));
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  border-bottom: 4px solid var(--c-accent);
  padding: 2rem;
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(107,26,42,0.3);
}

/* ===== div scroll-margin-top ===== */
div[id] {
  scroll-margin-top: calc(var(--nav-h) + var(--anchors-h) + 16px);
}

/* ===== 响应式 ===== */
@media (max-width: 1100px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .content-chapters {
    grid-template-columns: 180px 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  html { font-size: 16px; }
  :root { --nav-h: 56px; --anchors-h: 40px; }

  .header-inner { padding: 0 1rem; gap: 0.75rem; }
  .header-nav { display: none; }
  .anchors-inner { padding: 0 1rem; gap: 0.25rem; }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 2rem 1rem 4rem;
    gap: 2rem;
  }
  .hero-figure { order: 1; }
  .hero-aside {
    order: 2;
    align-items: flex-start;
    text-align: left;
  }

  .content-chapters {
    grid-template-columns: 1fr;
    padding: 3rem 1rem;
    gap: 2rem;
  }
  .chapter-aside {
    position: static;
    border-radius: 16px;
  }
  .chapter-index { flex-direction: row; flex-wrap: wrap; gap: 0.4rem; }
  .chapter-index li a { border-left: none; border-bottom: 2px solid transparent; }
  .chapter-index li a:hover { border-left: none; border-bottom-color: var(--c-accent); }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1rem 2rem;
  }
  .footer-bottom { padding: 1.25rem 1rem; }

  .fullscreen-nav .nav-link { font-size: 1.8rem; }

  .hero-section { min-height: 60vh; }
}

@media (max-width: 480px) {
  .brand-text { font-size: 1.4rem; }
  .hero-h1 { font-size: 1.8rem; }
  .chapter-body h2 { font-size: 1.5rem; }
  .cta-btn { font-size: 0.8rem; padding: 0.5rem 1rem; }
}

/* ===== 视差层深度 ===== */
.parallax-layer {
  perspective: 1px;
  transform-style: preserve-3d;
}
.parallax-bg {
  will-change: transform;
}

/* ===== Hover micro-interaction ===== */
.hero-figure:hover .hero-img {
  transform: scale(1.02);
  transition: transform 0.5s ease;
}
.chapter-body > div:hover::before {
  opacity: 1;
  background: linear-gradient(90deg, var(--c-accent), transparent);
  transition: background 0.4s;
}

button[aria-expanded]{min-width:44px;min-height:44px}
