/* ============================================================
   泥人张彩塑 · 非遗数字展馆 — 全局样式
   配色：宣纸米白 / 墨色 / 朱砂红 / 描金
   ============================================================ */

:root {
  --bg: #faf6ee;            /* 宣纸米白 */
  --bg-card: #fffdf8;       /* 卡片底色 */
  --ink: #2f2a25;           /* 墨色 */
  --ink-soft: #6b6159;      /* 次级文字 */
  --cinnabar: #a63c33;      /* 朱砂红 */
  --cinnabar-dark: #8a2f28;
  --gold: #b08d57;          /* 描金 */
  --gold-light: #e3d5b5;
  --line: #e7dcc6;          /* 分隔线 */
  --shadow: 0 2px 14px rgba(60, 45, 20, 0.08);

  --font-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               "Source Han Sans SC", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at top, rgba(176, 141, 87, 0.06), transparent 55%);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* ---------- 页头导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-seal {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--cinnabar);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 22px;
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.brand-text {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 15px;
  color: var(--ink-soft);
  transition: color .15s, background .15s;
  white-space: nowrap;
}

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

.site-nav a.active {
  color: var(--cinnabar);
  background: rgba(166, 60, 51, 0.08);
  font-weight: 600;
}

/* 移动端汉堡按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.nav-toggle span {
  height: 2px;
  width: 100%;
  background: var(--ink);
  transition: transform .2s, opacity .2s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 首页 Hero ---------- */
.hero {
  padding: 96px 0 72px;
  text-align: center;
}

.hero-kicker {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 4px;
  color: var(--gold);
  border: 1px solid var(--gold-light);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 28px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(48px, 8vw, 84px);
  font-weight: 900;
  letter-spacing: 6px;
  color: var(--cinnabar);
  line-height: 1.2;
}

.hero-sub {
  margin: 20px auto 0;
  max-width: 640px;
  font-size: 17px;
  color: var(--ink-soft);
}

.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s, background .15s, color .15s, border-color .15s;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--cinnabar);
  color: #fff;
}
.btn-primary:hover { background: var(--cinnabar-dark); }

.btn-ghost {
  background: transparent;
  color: var(--cinnabar);
  border-color: var(--cinnabar);
}
.btn-ghost:hover { background: rgba(166, 60, 51, 0.06); }

.btn-sm { padding: 8px 20px; font-size: 14px; }

/* ---------- 章节标题 ---------- */
.section { padding: 72px 0; }

.section-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 3px;
}

.section-lead {
  text-align: center;
  color: var(--ink-soft);
  margin-top: 10px;
  margin-bottom: 44px;
}

/* ---------- 首页模块卡片 ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px 26px;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--gold-light);
  box-shadow: 0 10px 26px rgba(60, 45, 20, 0.12);
}

.card-num {
  position: absolute;
  top: 12px;
  right: 20px;
  font-family: var(--font-serif);
  font-size: 44px;
  color: rgba(166, 60, 51, 0.12);
  line-height: 1;
}

.card h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--cinnabar);
}

.card p {
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------- 内容页头部 ---------- */
.page {
  padding: 56px 0 80px;
}

.page-head {
  text-align: center;
  margin-bottom: 48px;
}

.page-kicker {
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--gold);
  text-transform: uppercase;
}

.page-title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 6vw, 52px);
  letter-spacing: 4px;
  color: var(--cinnabar);
  margin-top: 10px;
}

.page-sub {
  color: var(--ink-soft);
  margin-top: 10px;
}

/* ---------- 正文排版 ---------- */
.article {
  max-width: 760px;
  margin: 0 auto;
  font-size: 16.5px;
  color: #3a342d;
}

.article h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--cinnabar);
  margin: 40px 0 14px;
  padding-left: 14px;
  border-left: 4px solid var(--cinnabar);
}

.article h3 {
  font-family: var(--font-serif);
  font-size: 19px;
  margin: 28px 0 10px;
}

.article p { margin: 12px 0; text-align: justify; }

.article blockquote {
  margin: 16px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--gold);
  background: var(--bg-card);
  border-radius: 0 8px 8px 0;
  color: var(--ink-soft);
  font-family: var(--font-serif);
}

/* 生平时间线（如「早年经历」的年龄节点） */
.article .timeline { margin: 16px 0; }

.article .timeline li {
  position: relative;
  padding: 0 0 0 22px;
  margin: 12px 0;
}

.article .timeline li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cinnabar);
}

.article .timeline li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 20px;
  bottom: -6px;
  width: 2px;
  background: var(--gold-light);
}

.article .timeline .age {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--cinnabar);
  margin-right: 8px;
}

/* 传承谱系 · 代际卡片（垂直时间轴） */
.pedigree {
  max-width: 680px;
  margin: 24px auto;
  position: relative;
  padding-left: 22px;
}

.pedigree::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--gold-light);
}

.gen {
  position: relative;
  margin: 0 0 24px;
  padding: 22px 24px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.gen::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 30px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cinnabar);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--cinnabar);
}

.gen-badge {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 3px;
  color: #fff;
  background: var(--cinnabar);
  padding: 3px 14px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.gen h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--ink);
  margin: 0 0 6px;
}

.gen h3 small {
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 400;
}

.gen p {
  margin: 8px 0;
  font-size: 15px;
  color: #3a342d;
  text-align: left;
}

/* 技艺流程 · 编号步骤 */
.article ol.steps {
  counter-reset: step;
  list-style: none;
  margin: 16px 0;
}

.article ol.steps li {
  counter-increment: step;
  position: relative;
  padding: 14px 16px 14px 58px;
  margin: 10px 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.article ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--cinnabar);
  color: #fff;
  font-family: var(--font-serif);
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* 题材标签 */
.article .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.article .tags li {
  padding: 6px 16px;
  background: var(--bg-card);
  border: 1px solid var(--gold-light);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 14px;
}

/* 代表作品 · 画廊 */
.article.article-wide { max-width: 980px; }

.works-group { margin-top: 8px; }

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 20px;
  margin: 0 0 8px;
}

.work {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}

.work:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(60, 45, 20, 0.12);
}

.work-media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #f3ead9, #e9ddc6);
  display: grid;
  place-items: center;
}

.work-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.work-media .work-ph {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 40px;
  color: rgba(166, 60, 51, 0.3);
  border: 2px solid rgba(166, 60, 51, 0.25);
  border-radius: 10px;
}

.work-media .work-empty {
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--ink-soft);
  opacity: 0.75;
}

.work figcaption { padding: 16px 18px; }

.work figcaption h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--cinnabar);
  margin: 0 0 6px;
}

.work figcaption p {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.7;
  text-align: left;
  margin: 0;
}

.article .works-more {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
  text-align: left;
}

/* 关联列表（非遗项目 / 文学记载） */
.article .assoc { margin: 16px 0; }

.article .assoc li {
  position: relative;
  padding: 10px 0 10px 20px;
  border-bottom: 1px dashed var(--line);
}

.article .assoc li:last-child { border-bottom: none; }

.article .assoc li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 20px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.article .assoc strong {
  color: var(--cinnabar);
  font-family: var(--font-serif);
  font-weight: 700;
}

/* 合规提示 */
.article .note {
  margin: 32px 0 8px;
  padding: 16px 20px;
  border: 1px solid var(--gold-light);
  border-left: 4px solid var(--gold);
  background: var(--bg-card);
  border-radius: 0 10px 10px 0;
}

.article .note-label {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 6px;
}

.article .note p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  text-align: left;
}

.article-placeholder {
  text-align: center;
  color: var(--ink-soft);
  padding: 60px 20px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: var(--bg-card);
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
}

.footer-note { margin-top: 6px; font-size: 13px; color: var(--gold); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px 4%;
    display: none;
  }

  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 8px; border-bottom: 1px solid var(--line); }
  .site-nav a:last-child { border-bottom: none; }

  .cards { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 64px 0 48px; }
}

@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .brand-text { font-size: 17px; }
}
