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

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #f5f5f5;
  color: #1f1f1f;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

img { max-width: 100%; display: block; }

a { color: #1f1f1f; }

/* ---------- 顶部细条 ---------- */
.annbar {
  background: #1f1f1f;
  color: #fff;
  padding: 8px 16px;
  text-align: center;
}

.annbar-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: .12em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 页头 ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #ffffff;
  border-bottom: 1px solid #e8e8e8;
}

.head-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 64px;
  padding: 10px clamp(16px, 4vw, 40px);
}

.menu-aside {
  grid-column: 1 / -1;
  grid-row: 1;
  min-width: 0;
}

.primary-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-right: 98px;
}

.nav-side {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(6px, 1.4vw, 18px);
  margin: 0;
  padding: 0;
}

.nav-side a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  font-size: 16px;
  color: #1f1f1f;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color .22s ease, color .22s ease;
}

.nav-side a:hover { border-bottom-color: #1f1f1f; }

.brand {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  z-index: 46;
  background: #ffffff;
  padding: 4px 14px;
  font-family: 'Playfair Display', Georgia, 'Songti SC', serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .01em;
  color: #1f1f1f;
  text-decoration: none;
  white-space: nowrap;
}

.burger {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  color: #1f1f1f;
  background: #ffffff;
  border: 1px solid #e2e2e2;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.burger:hover { background: #f5f5f5; border-color: #cfcfcf; }

.burger-bars {
  display: block;
  position: relative;
  width: 17px;
  height: 2px;
  background: #1f1f1f;
  transition: background .2s ease;
}

.burger-bars::before,
.burger-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 17px;
  height: 2px;
  background: #1f1f1f;
  transition: transform .24s ease;
}

.burger-bars::before { top: -6px; }
.burger-bars::after { top: 6px; }

body.menu-open .burger-bars { background: transparent; }
body.menu-open .burger-bars::before { transform: translateY(6px) rotate(45deg); }
body.menu-open .burger-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 主体 ---------- */
.page-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 26px clamp(16px, 4vw, 40px) 10px;
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

/* 左侧索引 */
.index-aside {
  position: sticky;
  top: 92px;
  align-self: start;
  min-width: 0;
}

.index-title {
  font-family: 'Playfair Display', Georgia, 'Songti SC', serif;
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 2px;
  letter-spacing: .01em;
}

.subtitle {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: .04em;
  color: #8a8a8a;
  line-height: 1.5;
}

.index-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.index-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border-left: 2px solid #e2e2e2;
  font-size: 16px;
  color: #4a4a4a;
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.index-nav a:hover {
  color: #1f1f1f;
  border-left-color: #1f1f1f;
  background: #ffffff;
}

/* 正文列 */
.doc { min-width: 0; }

/* ---------- 首屏 ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 18px;
  align-items: center;
  min-height: 45vh;
  margin: 0 0 18px;
}

.hero-art {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

.tile {
  height: clamp(180px, 25vh, 248px);
  border-radius: 24px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, .05);
  transition: transform .3s ease;
}

.tile-1 { transform: translateY(-10px); }
.tile-2 { transform: translateY(16px); }

.tile:hover { transform: translateY(-4px); }
.tile-2:hover { transform: translateY(10px); }

.tile-img { width: 100%; height: 100%; object-fit: cover; }

.tile-blank {
  display: flex;
  align-items: flex-end;
  padding: 14px;
  background: linear-gradient(155deg, #ffffff 0%, #ebebeb 100%);
  border: 1px solid #ececec;
}

.tile-blank span {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 13px;
  letter-spacing: .05em;
  color: #9a9a9a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-copy { text-align: right; padding: 0 2px; }

.hero-title {
  font-family: 'Playfair Display', Georgia, 'Songti SC', serif;
  font-size: clamp(2rem, 5.2vw, 3.4rem);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -.012em;
  margin: 0 0 14px;
  overflow-wrap: break-word;
}

.hero-lead {
  margin: 0 0 0 auto;
  max-width: 34ch;
  color: #5c5c5c;
  font-size: 16px;
  line-height: 1.6;
}

/* ---------- 正文卡片 ---------- */
.doc > article {
  scroll-margin-top: 88px;
  background: #ffffff;
  border-radius: 28px;
  padding: clamp(20px, 4vw, 38px);
  margin: 0 0 18px;
  border-bottom: 3px solid #1f1f1f;
  box-shadow: 0 4px 6px rgba(0, 0, 0, .05);
  transition: transform .3s ease, box-shadow .3s ease;
}

.doc > article.in:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .08);
}

.doc article h2 {
  font-family: 'Playfair Display', Georgia, 'Songti SC', serif;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  line-height: 1.28;
  font-weight: 600;
  margin: 0 0 12px;
}

.doc article h3 {
  font-size: 1.08rem;
  line-height: 1.5;
  margin: 0 0 10px;
}

.doc article p {
  margin: 0 0 14px;
  max-width: 68ch;
}

.doc article p:last-child { margin-bottom: 0; }

.doc article ul,
.doc article ol {
  margin: 0 0 14px;
  padding-left: 1.25em;
  max-width: 68ch;
}

.doc article li { margin-bottom: 8px; }
.doc article li:last-child { margin-bottom: 0; }

.doc article a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.doc article a:hover { background: #f5f5f5; }

.doc article blockquote {
  margin: 0 0 14px;
  padding: 12px 18px;
  background: #f5f5f5;
  border-left: 3px solid #1f1f1f;
  border-radius: 0 18px 18px 0;
}

.doc article blockquote p:last-child { margin-bottom: 0; }

.doc article img { border-radius: 18px; height: auto; }

.doc article strong { font-weight: 600; }

.doc article + article { margin-top: 0; }

/* ---------- 页脚 ---------- */
.site-foot {
  max-width: 1240px;
  margin: 34px auto 0;
  padding: 24px clamp(16px, 4vw, 40px) 88px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  border-top: 1px solid #e2e2e2;
}

.foot-links {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 15px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: #4a4a4a;
  text-decoration: none;
}

.foot-links a:hover { color: #1f1f1f; text-decoration: underline; }

.foot-brand {
  margin: 0;
  justify-self: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 15px;
  letter-spacing: .02em;
  white-space: nowrap;
}

.foot-copy {
  justify-self: end;
  font-size: 13px;
  color: #8a8a8a;
  text-align: right;
}

/* ---------- 回到顶部 ---------- */
.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: #1f1f1f;
  color: #ffffff;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
  transition: transform .22s ease, background .22s ease;
}

.to-top:hover { transform: translateY(-2px); background: #000000; }

/* ---------- 滚动显现 ---------- */
.reveal-ready .doc > article {
  opacity: 0;
  transform: translateY(14px);
}

.reveal-ready .doc > article.in {
  opacity: 1;
  transform: none;
  transition: opacity .55s ease, transform .55s ease, box-shadow .3s ease;
}

/* ---------- 遮罩菜单（全宽度通用） ---------- */
@media (max-width: 960px) {
  .menu-aside {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: #1f1f1f;
    padding: 96px 26px 40px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .28s ease, transform .28s ease, visibility .28s ease;
  }

  body.menu-open .menu-aside {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .primary-nav {
    flex-direction: column;
    gap: 22px;
    padding-right: 0;
  }

  .nav-side {
    flex-direction: column;
    gap: 0;
  }

  .nav-side a {
    width: 100%;
    min-height: 52px;
    color: #ffffff;
    font-family: 'Playfair Display', Georgia, 'Songti SC', serif;
    font-size: 21px;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
  }

  .nav-side a:hover { border-bottom-color: #ffffff; }
}

/* ---------- 窄屏布局 ---------- */
@media (max-width: 960px) {
  .page-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding-top: 18px;
  }

  .index-aside { position: static; }

  .index-nav {
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .index-nav ul {
    flex-direction: row;
    gap: 8px;
  }

  .index-nav a {
    border: 1px solid #e2e2e2;
    border-radius: 999px;
    background: #ffffff;
    padding: 0 15px;
    white-space: nowrap;
  }

  .index-nav a:hover { border-color: #1f1f1f; }

  .subtitle { margin-bottom: 10px; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 14px;
    margin-bottom: 16px;
  }

  .hero-copy { order: -1; text-align: left; padding: 0; }
  .hero-lead { margin-left: 0; max-width: none; }
  .hero-art { gap: 12px; }
  .tile { height: 132px; border-radius: 20px; }
  .tile-1 { transform: none; }
  .tile-2 { transform: translateY(10px); }

  .doc > article { border-radius: 24px; }

  .site-foot {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding-bottom: 82px;
  }

  .foot-brand { justify-self: start; }
  .foot-copy { justify-self: start; text-align: left; }
}

@media (max-width: 420px) {
  .tile { height: 116px; }
}

/* ---------- 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .reveal-ready .doc > article {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

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