@import url('https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400;700&family=Cabin:wght@400;500;600;700&display=swap');

:root {
  --ink: #1f1f1f;
  --paper: #ffffff;
  --mist: #f5f5f5;
  --line: #e6e6e6;
  --soft: #4a4a4a;
  --display: "Amatic SC", "Cabin", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --body: "Cabin", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --e1: 0 1px 2px rgba(31, 31, 31, .07), 0 2px 6px rgba(31, 31, 31, .05);
  --e2: 0 2px 4px rgba(31, 31, 31, .06), 0 8px 18px rgba(31, 31, 31, .07);
  --e3: 0 4px 10px rgba(31, 31, 31, .07), 0 16px 34px rgba(31, 31, 31, .09);
  --e4: 0 8px 18px rgba(31, 31, 31, .09), 0 26px 54px rgba(31, 31, 31, .14);
  --r: 28px;
}

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

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

body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font: 400 16px/1.75 var(--body);
  overflow-x: hidden;
}

img { max-width: 100%; }

a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 顶部 ---------- */
.site-head {
  position: relative;
  z-index: 5;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px 8px;
}

.head-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  max-width: 1120px;
  margin: 0 auto;
}

.head-nav-a { justify-self: start; }
.head-nav-b { justify-self: end; }

.nav-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.head-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--mist);
  color: var(--ink);
  font-size: 16px;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.head-nav a:hover,
.head-nav a:focus-visible {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  box-shadow: var(--e2);
  transform: translateY(-1px);
}

.brand {
  justify-self: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: .02em;
  text-decoration: none;
  color: var(--ink);
  padding: 4px 10px;
  border-radius: 14px;
  white-space: nowrap;
}

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

.head-tools {
  max-width: 1120px;
  margin: 8px auto 0;
}

.find {
  display: flex;
  gap: 8px;
}

.find input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 42px;
  padding: 8px 16px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(31, 31, 31, .05);
}

.find input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.find button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 8px 20px;
  font: inherit;
  font-size: 16px;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--e1);
}

.find button:hover { box-shadow: var(--e3); }

/* ---------- 粘性锚点条 ---------- */
.anchor-bar {
  position: sticky;
  top: 0;
  z-index: 4;
  background: rgba(255, 255, 255, .84);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--e1);
  padding: 8px 12px;
}

.anchor-line {
  display: flex;
  gap: 6px;
  margin: 0 auto;
  padding: 0;
  max-width: 1120px;
  overflow-x: auto;
  scrollbar-width: none;
}

.anchor-line::-webkit-scrollbar { display: none; }

.anchor-line a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(31, 31, 31, .05);
  font-size: 16px;
  white-space: nowrap;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, opacity .18s ease;
}

.anchor-line a:hover,
.anchor-line a:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

.anchor-line a.dim { opacity: .32; }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  height: 45vh;
  min-height: 300px;
  max-height: 420px;
  overflow: hidden;
  background: linear-gradient(135deg, #ececec, #dcdcdc);
}

.hero-media {
  position: absolute;
  left: 0;
  right: 0;
  top: -6%;
  height: 112%;
  z-index: 0;
  will-change: transform;
}

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

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, .1) 0%, rgba(31, 31, 31, .5) 100%);
}

.hero-ghost {
  position: absolute;
  z-index: 2;
  left: 0;
  bottom: -.08em;
  right: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(52px, 13vw, 132px);
  line-height: .82;
  letter-spacing: .03em;
  color: rgba(255, 255, 255, .3);
  white-space: nowrap;
  pointer-events: none;
  will-change: transform;
}

/* ---------- 叠层浮卡 ---------- */
.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.hero-float {
  position: relative;
  z-index: 3;
  margin-top: -76px;
}

.hero-card {
  background: var(--paper);
  border-radius: var(--r);
  border-bottom: 4px solid var(--ink);
  padding: 24px 22px;
  box-shadow: var(--e4);
  transform: rotate(-.4deg);
}

.hero-card h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(26px, 5.2vw, 44px);
  line-height: 1.24;
  letter-spacing: .01em;
}

.hero-lead {
  margin: 10px 0 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--soft);
}

/* ---------- 主区 ---------- */
main {
  display: block;
  padding: 26px 0 56px;
}

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 26px;
  align-items: start;
}

.content-col {
  position: relative;
  z-index: 2;
  min-width: 0;
  background: var(--paper);
  border-radius: var(--r);
  border-bottom: 4px solid var(--ink);
  padding: 28px 24px;
  box-shadow: var(--e2);
}

.content-col > section {
  padding: 26px 0 6px;
  border-top: 1px dashed #e0e0e0;
}

.content-col > section:first-child {
  border-top: 0;
  padding-top: 0;
}

section[id] { scroll-margin-top: 92px; }

.content-col h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(22px, 3.6vw, 32px);
  line-height: 1.28;
  letter-spacing: .01em;
}

.content-col h2 + p,
.content-col h2 + p.subtitle,
.subtitle {
  margin: 0 0 14px;
  color: var(--soft);
  font-size: 16px;
  line-height: 1.7;
}

.content-col h2 + p:not(.subtitle) {
  color: var(--ink);
}

.content-col p {
  margin: 0 0 14px;
  font-size: 16.5px;
  line-height: 1.78;
}

.content-col h3 {
  margin: 22px 0 10px;
  font-size: 19px;
  line-height: 1.5;
}

.content-col ul,
.content-col ol {
  margin: 0 0 16px;
  padding-left: 1.3em;
}

.content-col li {
  margin: 0 0 8px;
  line-height: 1.75;
}

.content-col blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  background: var(--mist);
  border-left: 4px solid var(--ink);
  border-radius: 14px;
}

.content-col blockquote p:last-child { margin-bottom: 0; }

/* ---------- 侧栏 ---------- */
.side {
  position: relative;
  z-index: 1;
}

.side-card {
  position: sticky;
  top: 82px;
  background: var(--paper);
  border-radius: var(--r);
  border-bottom: 4px solid var(--ink);
  padding: 20px 18px;
  box-shadow: var(--e3);
  transform: rotate(.6deg);
}

.side-card h2 {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 26px;
  line-height: 1.3;
}

.side-card .subtitle {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--soft);
}

.side-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: s;
}

.side-list li { counter-increment: s; }

.side-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  margin-bottom: 6px;
  border-radius: 999px;
  background: var(--mist);
  border: 1px solid var(--line);
  font-size: 16px;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.side-list a::before {
  content: counter(s, decimal-leading-zero);
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  color: var(--soft);
}

.side-list a:hover,
.side-list a:focus-visible {
  background: var(--ink);
  color: var(--paper);
  transform: translateX(2px);
}

.side-list a:hover::before,
.side-list a:focus-visible::before { color: rgba(255, 255, 255, .7); }

/* ---------- 页脚 ---------- */
.site-foot {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 16px 26px;
  background: var(--ink);
  color: var(--paper);
}

.foot-brand a {
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: .02em;
  color: var(--paper);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}

.foot-nav .nav-line { gap: 6px; }

.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .28);
  font-size: 16px;
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}

.foot-nav a:hover,
.foot-nav a:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

.foot-meta p {
  margin: 0;
  font-size: 16px;
  color: rgba(255, 255, 255, .72);
}

/* ---------- 滚动显现 ---------- */
.reveal {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity .65s ease, transform .65s cubic-bezier(.22, .7, .3, 1);
}

.reveal.in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1fr); }
  .side-card { position: static; transform: none; }
}

@media (max-width: 760px) {
  .head-row {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 8px;
  }
  .head-nav-a, .head-nav-b { justify-self: center; }
  .head-nav .nav-line { justify-content: center; }
  .brand { order: -1; font-size: 26px; }
  .hero { height: 42vh; min-height: 280px; }
  .hero-float { margin-top: -64px; }
  .hero-card { transform: none; }
  .content-col { padding: 22px 18px; }
  .site-foot { justify-content: center; text-align: center; }
  .foot-nav .nav-line { justify-content: center; }
}

@media (max-width: 420px) {
  .head-nav a { padding: 8px 11px; }
  .anchor-line a { padding: 7px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-media, .hero-ghost { transform: none !important; }
}

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