/* 联动计划纪念档案馆 —— 沉稳、庄重、联合国蓝与纪念金 */

:root {
  --ink: #1f2a44;
  --ink-soft: #4a5673;
  --paper: #faf7f0;
  --paper-alt: #f1ecdf;
  --gold: #c9a24b;
  --line: #d8d0bd;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Source Han Serif SC", "Noto Serif SC", "Songti SC", SimSun, Georgia, serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.9;
}

/* ---------- 首页 Hero ---------- */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: radial-gradient(ellipse at 50% -20%, #2c3a5e 0%, var(--ink) 60%, #141c30 100%);
  color: var(--paper);
  padding: 4rem 1.5rem;
}
.hero-inner { max-width: 760px; }
.emblem { font-size: 3.2rem; color: var(--gold); margin-bottom: 1rem; opacity: .9; }
.hero-domain { letter-spacing: .35em; font-size: .85rem; color: #9fb0d0; margin-bottom: 1.2rem; }
.hero h1 {
  font-size: clamp(2.6rem, 8vw, 4.5rem);
  font-weight: 700;
  letter-spacing: .25em;
  text-indent: .25em;
}
.hero-sub { margin-top: 1rem; font-size: .8rem; letter-spacing: .3em; color: #b9c4dc; }
.hero-years { margin-top: 1.6rem; font-size: 1.5rem; color: var(--gold); letter-spacing: .2em; font-family: Georgia, serif; }
.hero-epitaph { margin-top: 2rem; font-size: 1.05rem; color: #d7dcea; }
.hero-actions { margin-top: 3rem; display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; }
.hero-cta, .btn-gold, .btn-line {
  display: inline-block;
  color: var(--gold);
  text-decoration: none;
  border: 1px solid var(--gold);
  padding: .6rem 2rem;
  border-radius: 2rem;
  font-size: .95rem;
  letter-spacing: .1em;
  transition: background .3s, color .3s;
  cursor: pointer;
  background: transparent;
  font-family: inherit;
}
.btn-line { color: #d7dcea; border-color: #4a5673; }
.hero-cta:hover, .btn-gold:hover { background: var(--gold); color: #141c30; }
.btn-line:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- 子页页头 ---------- */
.pagehead {
  background: linear-gradient(180deg, #223052 0%, var(--ink) 100%);
  color: var(--paper);
  text-align: center;
  padding: 4rem 1.5rem 3rem;
}
.pagehead h1 { font-size: 2.2rem; letter-spacing: .2em; text-indent: .2em; }
.pagehead p { margin-top: .8rem; color: #b9c4dc; font-size: .95rem; letter-spacing: .1em; }
.crumb { margin-bottom: 1.2rem; font-size: .85rem; letter-spacing: .1em; }
.crumb a { color: #9fb0d0; text-decoration: none; }
.crumb a:hover { color: var(--gold); }

/* ---------- 导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 2.2rem;
  background: rgba(250, 247, 240, .96);
  border-bottom: 1px solid var(--line);
  padding: .9rem 1rem;
  backdrop-filter: blur(6px);
  flex-wrap: wrap;
}
.nav a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; letter-spacing: .15em; padding: .1rem .2rem; }
.nav a:hover { color: var(--gold); }
.nav a.active { color: var(--ink); border-bottom: 2px solid var(--gold); }

/* ---------- 通用区块 ---------- */
.section { max-width: 900px; margin: 0 auto; padding: 4rem 1.5rem; }
.section-alt { max-width: none; background: var(--paper-alt); }
.section-alt > .inner { max-width: 900px; margin: 0 auto; }
.section h2 {
  font-size: 1.9rem; letter-spacing: .15em; margin-bottom: 2.5rem; text-align: center;
}
.section h2::after {
  content: ""; display: block; width: 3rem; height: 3px;
  background: var(--gold); margin: 1rem auto 0;
}
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  padding: 2.2rem 2.5rem; box-shadow: 0 2px 12px rgba(31, 42, 68, .06);
}
.note {
  margin-top: 1.5rem; font-size: .85rem; color: var(--ink-soft);
  border-left: 3px solid var(--gold); padding-left: 1rem;
}

/* ---------- 首页板块卡片 ---------- */
.portal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.4rem;
}
.portal a {
  display: block; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  padding: 1.8rem 1.6rem; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.portal a:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(31, 42, 68, .12);
  border-color: var(--gold);
}
.portal .ico { font-size: 1.8rem; }
.portal h3 { margin: .6rem 0 .4rem; font-size: 1.15rem; letter-spacing: .1em; }
.portal p { font-size: .88rem; color: var(--ink-soft); line-height: 1.7; }
.portal .cnt { display: inline-block; margin-top: .8rem; font-size: .78rem; color: var(--gold); letter-spacing: .1em; }

/* 最近收录 */
.recent-item {
  display: flex; gap: 1rem; align-items: baseline;
  padding: 1rem 0; border-bottom: 1px dashed var(--line);
}
.recent-item:last-child { border-bottom: none; }
.recent-item .tag {
  flex: 0 0 auto; font-size: .75rem; color: var(--gold);
  border: 1px solid var(--gold); border-radius: 1rem; padding: 0 .7rem;
}
.recent-item a { color: var(--ink); text-decoration: none; }
.recent-item a:hover { color: var(--gold); }
.recent-item .yr { margin-left: auto; color: var(--ink-soft); font-size: .85rem; font-family: Georgia, serif; }

/* ---------- 图册列表 ---------- */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}
.album-card {
  display: block; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.album-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(31, 42, 68, .14); }
.album-card .cover { width: 100%; height: 170px; object-fit: cover; display: block; background: var(--ink); }
.album-card .cover.empty { display: flex; align-items: center; justify-content: center; color: #9fb0d0; font-size: .9rem; letter-spacing: .2em; }
.album-card .meta { padding: 1.1rem 1.3rem 1.3rem; }
.album-card h3 { font-size: 1.08rem; letter-spacing: .08em; }
.album-card .yr { color: var(--gold); font-family: Georgia, serif; font-size: .9rem; }
.album-card p { font-size: .85rem; color: var(--ink-soft); margin-top: .4rem; line-height: 1.7; }

/* ---------- 图册内页 ---------- */
.photo-grid {
  columns: 3 240px; column-gap: 1rem;
}
.photo-grid figure {
  break-inside: avoid; margin: 0 0 1rem;
  border: 1px solid var(--line); border-radius: 4px; overflow: hidden;
  background: #fff; cursor: zoom-in;
}
.photo-grid img { width: 100%; display: block; transition: transform .3s; }
.photo-grid figure:hover img { transform: scale(1.02); }
.photo-grid figcaption { font-size: .8rem; color: var(--ink-soft); padding: .5rem .8rem; }
.empty-state {
  text-align: center; padding: 4rem 1rem; color: var(--ink-soft);
  border: 1px dashed var(--line); border-radius: 6px; background: #fff;
}
.empty-state .ico { font-size: 2.4rem; display: block; margin-bottom: 1rem; opacity: .6; }

/* ---------- 灯箱 ---------- */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 14, 24, .94);
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 88vw; max-height: 82vh; border: 1px solid rgba(201, 162, 75, .4); }
.lb-caption {
  position: absolute; bottom: 2.2rem; left: 0; right: 0;
  text-align: center; color: #d7dcea; font-size: .95rem; letter-spacing: .05em; padding: 0 3rem;
}
.lb-count {
  position: absolute; top: 1.4rem; left: 50%; transform: translateX(-50%);
  color: #9fb0d0; font-family: Georgia, serif; letter-spacing: .2em; font-size: .9rem;
}
.lb-btn {
  position: absolute; background: none; border: none; color: #e8dfc8;
  font-size: 2.6rem; cursor: pointer; line-height: 1; padding: 1rem;
  font-family: Georgia, serif; transition: color .2s;
}
.lb-btn:hover { color: var(--gold); }
.lb-prev { left: .5rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .5rem; top: 50%; transform: translateY(-50%); }
.lb-close { right: .5rem; top: .4rem; font-size: 2rem; }

/* ---------- 文件馆 ---------- */
.filter-bar { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 2rem; align-items: center; }
.filter-bar input, .filter-bar select {
  font-family: inherit; font-size: .92rem; color: var(--ink);
  border: 1px solid var(--line); border-radius: 4px; padding: .5rem .9rem;
  background: #fff;
}
.filter-bar input { flex: 1 1 220px; }
.filter-bar select { min-width: 130px; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.4rem; }
.doc-card {
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  padding: 1.5rem 1.6rem; display: flex; flex-direction: column; gap: .6rem;
}
.doc-card .cat {
  align-self: flex-start; font-size: .75rem; color: var(--gold);
  border: 1px solid var(--gold); border-radius: 1rem; padding: 0 .7rem; letter-spacing: .1em;
}
.doc-card h3 { font-size: 1.05rem; letter-spacing: .05em; line-height: 1.6; }
.doc-card .desc { font-size: .85rem; color: var(--ink-soft); line-height: 1.75; flex: 1; }
.doc-card .acts { display: flex; gap: .8rem; margin-top: .4rem; }
.doc-card .acts button, .doc-card .acts a {
  font-family: inherit; font-size: .85rem; text-decoration: none; cursor: pointer;
  border-radius: 2rem; padding: .3rem 1.2rem; letter-spacing: .08em;
  border: 1px solid var(--gold); background: transparent; color: var(--gold);
  transition: background .25s, color .25s;
}
.doc-card .acts button:hover:not(:disabled), .doc-card .acts a:hover { background: var(--gold); color: #fff; }
.doc-card .acts button:disabled { border-color: var(--line); color: #b0a88f; cursor: not-allowed; }

/* PDF 预览弹窗 */
.viewer {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 14, 24, .92);
}
.viewer.open { display: flex; flex-direction: column; }
.viewer-bar {
  display: flex; align-items: center; gap: 1rem;
  padding: .8rem 1.4rem; color: #e8dfc8; background: rgba(20, 28, 48, .9);
}
.viewer-bar .vt { flex: 1; font-size: .95rem; letter-spacing: .05em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.viewer-bar a, .viewer-bar button {
  font-family: inherit; font-size: .85rem; cursor: pointer; text-decoration: none;
  color: var(--gold); border: 1px solid var(--gold); background: transparent;
  border-radius: 2rem; padding: .25rem 1.1rem; letter-spacing: .08em;
}
.viewer-bar a:hover, .viewer-bar button:hover { background: var(--gold); color: #fff; }
.viewer iframe { flex: 1; width: 100%; border: none; background: #525659; }

/* ---------- 大事记 ---------- */
.timeline { list-style: none; }
.timeline li { display: flex; gap: 2rem; padding: 1.8rem 0; border-bottom: 1px dashed var(--line); }
.timeline li:last-child { border-bottom: none; }
.tl-year { flex: 0 0 4.5rem; font-family: Georgia, serif; font-size: 1.4rem; color: var(--gold); text-align: right; }
.tl-body h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.tl-body p { color: var(--ink-soft); }

/* ---------- 纪念墙 ---------- */
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.4rem; }
.wall .card { padding: 1.8rem 1.8rem; }
.wall blockquote { font-size: 1.05rem; text-align: left; }
.wall blockquote footer { margin-top: 1rem; font-size: .85rem; color: var(--ink-soft); text-align: right; }

/* ---------- 页脚 ---------- */
.footer {
  background: var(--ink); color: #b9c4dc;
  text-align: center; padding: 3rem 1.5rem; letter-spacing: .15em; margin-top: 4rem;
}
.footer-small { margin-top: .8rem; font-size: .78rem; color: #7487ab; }
.footer a { color: #9fb0d0; }

@media (max-width: 600px) {
  .timeline li { flex-direction: column; gap: .3rem; }
  .tl-year { text-align: left; }
  .card { padding: 1.5rem 1.4rem; }
  .nav { gap: 1.1rem; }
  .viewer-bar { flex-wrap: wrap; }
}
