/* =========================================================
   聚合入口指南 — /assets/site.css
   共享外壳：reset / tokens / 排版 / 头部 / 页脚 / 基础组件
   ========================================================= */

/* ---------- 1. reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body,
h1, h2, h3, h4, h5,
p, ul, ol, li, figure, blockquote, dl, dd {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

a { color: inherit; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

::selection {
  background: var(--cyan);
  color: var(--ink-950);
}

/* ---------- 2. tokens ---------- */
:root {
  --ink-950: #071521;
  --ink-900: #0C2233;
  --ink-800: #14344A;
  --cyan: #35E0CE;
  --cyan-dim: #1FA99B;
  --amber: #F2A33A;
  --paper: #F3EFE6;
  --haze: #8FA6B8;
  --line: #24445C;
  --cyan-soft: #B9F5EC;
  --amber-soft: #FFD8A6;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
    "Microsoft YaHei", "Source Han Sans SC", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace,
    SFMono-Regular, Menlo, Consolas, monospace;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC",
    Georgia, "Times New Roman", serif;

  --wrap: 1320px;
  --gutter: 24px;
  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 40px;
  --sp-5: 64px;
  --sp-6: 96px;
  --cut: 16px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  background: var(--ink-950);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  color: var(--paper);
  line-height: 1.16;
  letter-spacing: -.02em;
}

h1 { font-size: clamp(34px, 4.2vw, 60px); font-weight: 900; }
h2 { font-size: clamp(25px, 2.6vw, 36px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
h4 { font-size: 16px; font-weight: 700; letter-spacing: 0; }

p { font-size: inherit; }

a { text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.section--paper :focus-visible { outline-color: var(--cyan-dim); }

/* ---------- 4. 布局工具 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow { max-width: 860px; }

.section { padding-block: var(--sp-6); }

.section + .section { border-top: 1px solid var(--line); }

.section--paper {
  background: var(--paper);
  color: var(--ink-950);
}

.section--paper h1,
.section--paper h2,
.section--paper h3,
.section--paper h4 { color: var(--ink-950); }

.section--paper .eyebrow { color: var(--cyan-dim); }

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--sp-2) var(--sp-3);
  margin-bottom: var(--sp-4);
}

.grid { display: grid; gap: var(--sp-3); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--split { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

/* ---------- 5. 小工具类 ---------- */
.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--haze);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 1px;
  background: currentColor;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: gap .12s ease-out, border-color .12s ease-out;
}

.link-arrow::after {
  content: "→";
  font-family: var(--font-mono);
}

.link-arrow:hover {
  gap: 12px;
  border-bottom-color: currentColor;
}

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--paper);
  transition: background-color .12s ease-out,
              border-color .12s ease-out,
              color .12s ease-out;
}

.btn--line {
  border-color: var(--cyan-dim);
  color: var(--cyan);
}

.btn--line:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink-950);
}

.btn--accent {
  background: var(--amber);
  border-color: var(--amber);
  color: #201203;
}

.btn--accent:hover {
  background: var(--amber-soft);
  border-color: var(--amber-soft);
}

/* ---------- 7. 面板 / 标签 ---------- */
.panel {
  position: relative;
  background: var(--ink-900);
  border: 1px solid var(--line);
  padding: var(--sp-3);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  transition: background-color .12s ease-out,
              border-color .12s ease-out,
              transform .12s ease-out;
}

.panel:hover {
  background: var(--ink-800);
  border-color: var(--cyan-dim);
  transform: translateY(-2px);
}

.panel__title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--paper);
  margin-bottom: var(--sp-1);
}

.panel__body {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--haze);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.6;
  border: 1px solid var(--line);
  color: var(--haze);
}

.tag--cyan {
  background: var(--cyan-soft);
  border-color: var(--cyan-soft);
  color: var(--ink-950);
}

.tag--amber {
  background: var(--amber-soft);
  border-color: var(--amber-soft);
  color: var(--ink-950);
}

/* ---------- 8. 图片容器（页面阶段复用） ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(150deg, var(--ink-900) 0%, var(--ink-950) 100%);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}

.media-frame__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame__cap {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 3px 10px;
  background: var(--cyan-soft);
  color: var(--ink-950);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 4 / 5; }

/* ---------- 9. 面包屑 ---------- */
.crumbs {
  font-size: 12.5px;
  color: var(--haze);
  margin-bottom: var(--sp-3);
}

.crumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.crumbs__list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.crumbs__list li + li::before {
  content: "/";
  color: var(--line);
  font-family: var(--font-mono);
}

.crumbs__list a {
  color: var(--haze);
  text-decoration: none;
  transition: color .12s ease-out;
}

.crumbs__list a:hover { color: var(--cyan); }

.crumbs__list [aria-current="page"] { color: var(--paper); }

/* ---------- 10. 长文排版 ---------- */
.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.8;
}

.prose > * + * { margin-top: 1.05em; }

.prose h2 { margin-top: 2em; font-size: 26px; }
.prose h3 { margin-top: 1.6em; font-size: 19px; }

.prose ul,
.prose ol {
  padding-left: 1.25em;
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .4em; }

.prose a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.prose strong { font-weight: 700; color: var(--paper); }

.section--paper .prose a { color: var(--cyan-dim); }
.section--paper .prose strong { color: var(--ink-950); }

/* ---------- 11. 章节索引（滚动高亮） ---------- */
.index-list {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.index-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0 8px 12px;
  border-left: 1px solid var(--line);
  font-size: 13px;
  color: var(--haze);
  text-decoration: none;
  transition: color .12s ease-out,
              border-color .12s ease-out,
              background-color .12s ease-out;
}

.index-link::before {
  content: attr(data-idx);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--line);
  transition: color .12s ease-out;
}

.index-link:hover {
  color: var(--paper);
  border-left-color: var(--cyan-dim);
}

.index-link[aria-current] {
  color: var(--cyan);
  border-left-color: var(--cyan);
  background: linear-gradient(90deg, rgba(53, 224, 206, .12), transparent 72%);
}

.index-link[aria-current]::before { color: var(--cyan); }

/* ---------- 12. 头部：紧凑命令栏 ---------- */
.skip-link {
  position: absolute;
  top: 0;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--cyan);
  color: var(--ink-950);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-120%);
  transition: transform .15s ease-out;
}

.skip-link:focus { transform: translateY(8px); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(7, 21, 33, .94);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  width: 100%;
  max-width: var(--wrap);
  min-height: 68px;
  margin-inline: auto;
  padding: 0 var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
}

.brand__mark {
  display: block;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  background: var(--cyan);
  clip-path: polygon(28% 0, 100% 0, 100% 72%, 72% 100%, 0 100%, 0 28%);
  transition: background-color .12s ease-out;
}

.brand:hover .brand__mark { background: var(--amber); }

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.05;
}

.brand__name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--paper);
}

.brand__ver {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber);
}

.nav {
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.5vw, 22px);
}

.nav__item { display: block; }

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 2px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .01em;
  white-space: nowrap;
  color: var(--haze);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .12s ease-out, border-color .12s ease-out;
}

.nav__link::before {
  content: attr(data-idx);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--line);
  transition: color .12s ease-out;
}

.nav__link:hover {
  color: var(--paper);
  border-bottom-color: var(--cyan-dim);
}

.nav__link:hover::before { color: var(--cyan-dim); }

.nav__link[aria-current="page"] {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.nav__link[aria-current="page"]::before { color: var(--cyan); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--paper);
  border: 1px solid var(--line);
  transition: border-color .12s ease-out, color .12s ease-out;
}

.nav-toggle:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 16px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform .15s ease-out, opacity .12s ease-out;
}

.site-header[data-open] .nav-toggle__bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-header[data-open] .nav-toggle__bars span:nth-child(2) { opacity: 0; }

.site-header[data-open] .nav-toggle__bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-toggle__label { line-height: 1; }

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--amber) 100%);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* ---------- 13. 页脚：展览目录页 ---------- */
.site-footer {
  margin-top: var(--sp-6);
  background: var(--ink-950);
  border-top: 1px solid var(--line);
  color: var(--haze);
  font-size: 14px;
}

.site-footer__inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: var(--sp-5) var(--gutter) 28px;
}

.foot-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.foot-brand .brand { margin-bottom: 14px; }

.foot-brand__note {
  max-width: 28ch;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--haze);
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.foot-col__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cyan);
}

.foot-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.foot-list a {
  display: inline-block;
  padding-bottom: 2px;
  font-size: 14px;
  color: var(--haze);
  text-decoration: none;
  background-image: linear-gradient(var(--cyan), var(--cyan));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: color .12s ease-out, background-size .18s ease-out;
}

.foot-list a:hover {
  color: var(--paper);
  background-size: 100% 1px;
}

.foot-contact__row {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(36, 68, 92, .65);
}

.foot-contact__row:last-of-type { border-bottom: 0; }

.foot-contact__k {
  flex: 0 0 44px;
  padding-top: 3px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cyan-dim);
}

.foot-contact__v {
  flex: 1 1 auto;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--paper);
  word-break: break-word;
}

.foot-contact__note {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--haze);
}

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  margin-top: var(--sp-4);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--haze);
}

.foot-bottom__copy { line-height: 1.6; }

.foot-bottom__links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-left: auto;
}

.foot-bottom__links a {
  color: var(--haze);
  text-decoration: none;
  transition: color .12s ease-out;
}

.foot-bottom__links a:hover { color: var(--cyan); }

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

  .site-header__inner { gap: 12px; }

  .brand { order: 1; }

  .header-actions { order: 2; margin-left: auto; }

  .nav-toggle { order: 3; }

  .nav {
    order: 4;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    max-height: calc(100vh - 68px);
    max-height: calc(100dvh - 68px);
    overflow-y: auto;
    padding: 4px var(--gutter) 20px;
    background: var(--ink-900);
    border-bottom: 1px solid var(--line);
  }

  .site-header[data-open] .nav { display: flex; }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .nav__item { border-bottom: 1px solid var(--line); }
  .nav__item:last-child { border-bottom: 0; }

  .nav__link {
    width: 100%;
    padding: 14px 0;
    font-size: 15px;
    border-bottom: 0;
  }

  .nav__link::before { font-size: 11px; }

  .nav__link[aria-current="page"] {
    border-bottom: 0;
    box-shadow: inset 2px 0 0 var(--cyan);
    padding-left: 12px;
  }
}

@media (max-width: 900px) {
  .foot-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .foot-brand__note { max-width: 46ch; }

  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .grid--split { grid-template-columns: minmax(0, 1fr); }

  .index-list {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 18px;
  }

  .index-link {
    border-left: 0;
    border-bottom: 1px solid var(--line);
    padding: 6px 0;
  }

  .index-link[aria-current] {
    background: none;
    border-bottom-color: var(--cyan);
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: 18px;
    --sp-5: 48px;
    --sp-6: 64px;
  }

  body { font-size: 16px; }

  .grid--2,
  .grid--3 { grid-template-columns: minmax(0, 1fr); }

  .foot-cols { grid-template-columns: minmax(0, 1fr); gap: 26px; }

  .foot-bottom__links { margin-left: 0; }

  .section + .section { border-top: 1px solid var(--line); }
}

@media (max-width: 420px) {
  .nav-toggle__label { display: none; }

  .nav-toggle { padding: 8px; }

  .site-header__inner { gap: 8px; }

  .brand__ver { display: none; }

  .brand__name { font-size: 14.5px; }

  .btn { padding: 8px 11px; font-size: 12px; }
}

/* ---------- 15. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  .panel:hover { transform: none; }
  .link-arrow:hover { gap: 8px; }
}
