@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,700;1,400&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --grey: #6b6b6b;
  --soft: #a8a8a8;
  --faint: #e6e6e6;
  --wash: #f4f4f4;
  --bar: 68px;
  --pad: clamp(16px, 3.2vw, 56px);
  --sans: "Plus Jakarta Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --serif: Georgia, "Songti SC", "Noto Serif SC", "SimSun", serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 1em; }

[hidden] { display: none !important; }

/* ---------- 顶栏 ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: var(--bar);
  padding: 0 var(--pad);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ink);
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 22px -14px rgba(0, 0, 0, 0.9);
  transition: transform 0.25s ease;
}
.mark:hover { transform: translateY(-2px); }

.find { margin-left: auto; }
.find input {
  width: clamp(112px, 20vw, 190px);
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1;
}
.find input::placeholder { color: var(--grey); }
.find input:focus {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ---------- 骨架 ---------- */
.shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  align-items: start;
}

.rail {
  position: sticky;
  top: var(--bar);
  align-self: start;
  min-height: calc(100vh - var(--bar));
  padding: 30px var(--pad) 40px;
  border-right: 1px solid var(--ink);
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.035), rgba(0, 0, 0, 0) 42%);
}

.kick {
  display: block;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--grey);
}

.rail-h {
  margin: 0.12em 0 0.72em;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.rail-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: navidx;
}

.rail-nav li {
  counter-increment: navidx;
  border-top: 1px solid var(--faint);
}
.rail-nav li:last-child { border-bottom: 1px solid var(--faint); }

.rail-nav a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 8px 2px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.rail-nav a::before {
  content: counter(navidx, decimal-leading-zero);
  flex: 0 0 auto;
  margin-right: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--soft);
  letter-spacing: 0.04em;
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  background: var(--ink);
  color: var(--paper);
  padding-left: 8px;
}
.rail-nav a:hover::before,
.rail-nav a:focus-visible::before { color: var(--paper); }

/* ---------- 内容容器 ---------- */
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---------- 首屏 ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.06fr 0.94fr;
  align-items: center;
  gap: clamp(20px, 4.5vw, 60px);
  min-height: calc(100vh - var(--bar));
  padding: clamp(28px, 7vh, 72px) 0;
  border-bottom: 2px solid var(--ink);
}

.hero-h1 {
  margin: 0 0 20px;
  font-size: clamp(34px, 5.4vw, 70px);
  line-height: 1.03;
  font-weight: 700;
  letter-spacing: -0.035em;
  word-break: break-word;
}

.lede {
  margin: 0;
  max-width: 32ch;
  padding-left: 16px;
  border-left: 3px solid var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  color: #111111;
}

.hero-fig {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--wash);
  box-shadow: 0 40px 70px -50px rgba(0, 0, 0, 0.85);
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(96px, 17vw, 210px);
  font-weight: 700;
  letter-spacing: -0.07em;
  color: var(--ink);
}

.badge {
  position: absolute;
  left: 0;
  bottom: 0;
  padding: 9px 15px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

/* ---------- 引文块 ---------- */
.pull {
  display: grid;
  padding: clamp(26px, 5vw, 54px) 0;
  border-bottom: 1px solid var(--ink);
}

.pull .quote {
  grid-area: 1 / 1;
  margin: 0;
  padding-left: 20px;
  border-left: 5px solid var(--ink);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(19px, 2.4vw, 28px);
  line-height: 1.45;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.pull .quote.on { opacity: 1; }
.pull .quote p { margin: 0; }

/* ---------- 正文 ---------- */
.entry { padding: clamp(28px, 6vw, 72px) 0 64px; }

.body-html {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.85;
  max-width: 74ch;
}

.body-html > article {
  padding: clamp(26px, 4vw, 46px) 0;
  border-top: 1px solid var(--faint);
  scroll-margin-top: calc(var(--bar) + 14px);
}
.body-html > article:first-child {
  padding-top: 0;
  border-top: 0;
}

.body-html small {
  display: block;
  margin-bottom: 0.5em;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--grey);
}

.body-html h2 {
  margin: 0 0 0.5em;
  font-family: var(--sans);
  font-size: clamp(23px, 2.9vw, 34px);
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: -0.025em;
  column-span: all;
}

.body-html h3 {
  margin: 1.4em 0 0.4em;
  font-family: var(--sans);
  font-size: clamp(19px, 2.2vw, 23px);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.015em;
  break-after: avoid;
}

.body-html h2 + p::first-letter {
  float: left;
  font-family: var(--sans);
  font-size: 3.5em;
  line-height: 0.76;
  font-weight: 700;
  padding: 0.08em 0.1em 0 0;
}

.body-html a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.body-html a:hover { background: var(--ink); color: var(--paper); }

.body-html blockquote {
  margin: 1.4em 0;
  padding: 4px 0 4px 20px;
  border-left: 4px solid var(--ink);
  font-style: italic;
  color: #111111;
}

.body-html ul,
.body-html ol {
  margin: 0 0 1.2em;
  padding-left: 1.2em;
}
.body-html li { margin-bottom: 0.4em; }

.body-html img {
  margin: 1.2em 0;
  border: 1px solid var(--ink);
}

/* ---------- 页脚 ---------- */
.foot {
  border-top: 2px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: clamp(28px, 5vw, 58px) var(--pad) 34px;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 92px;
  border-bottom: 1px solid #3a3a3a;
  text-decoration: none;
  font-size: clamp(26px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  transition: padding-left 0.3s ease;
}
.cta::after {
  content: "↑";
  font-size: 0.7em;
  font-weight: 400;
}
.cta:hover { padding-left: 12px; }

.foot-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 26px 40px;
  margin: 30px 0 26px;
}

.foot address {
  font-style: normal;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.foot-links small {
  display: block;
  font-size: 15px;
  letter-spacing: 0.2em;
  color: var(--soft);
}

.foot-h {
  margin: 0.18em 0 0.6em;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.foot-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
}

.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  text-decoration: none;
  border-bottom: 1px solid #4a4a4a;
  font-size: 16px;
}
.foot-links a:hover { border-bottom-color: var(--paper); }

.copy {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid #292929;
  text-align: center;
  font-size: 15px;
  color: var(--soft);
}

/* ---------- 进入动效 ---------- */
.js [data-rv],
.js .rv {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js [data-rv].in,
.js .rv.in {
  opacity: 1;
  transform: none;
}

.js .rail-nav li {
  animation: railin 0.5s ease both;
}
.js .rail-nav li:nth-child(1) { animation-delay: 0.05s; }
.js .rail-nav li:nth-child(2) { animation-delay: 0.1s; }
.js .rail-nav li:nth-child(3) { animation-delay: 0.15s; }
.js .rail-nav li:nth-child(4) { animation-delay: 0.2s; }
.js .rail-nav li:nth-child(5) { animation-delay: 0.25s; }
.js .rail-nav li:nth-child(6) { animation-delay: 0.3s; }
.js .rail-nav li:nth-child(7) { animation-delay: 0.35s; }

@keyframes railin {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 桌面加宽：正文双栏 ---------- */
@media (min-width: 1080px) {
  .body-html > article {
    column-count: 2;
    column-gap: 3rem;
  }
}

/* ---------- 移动端 ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }

  .rail {
    position: sticky;
    top: var(--bar);
    z-index: 40;
    display: flex;
    align-items: center;
    min-height: 0;
    padding: 0 var(--pad);
    border-right: 0;
    border-bottom: 1px solid var(--ink);
    background: var(--paper);
  }

  .rail .kick,
  .rail .rail-h { display: none; }

  .rail-nav { min-width: 0; overflow-x: auto; }

  .rail-nav ul { display: flex; }

  .rail-nav li {
    border-top: 0;
    border-right: 1px solid var(--faint);
  }
  .rail-nav li:last-child { border-bottom: 0; }

  .rail-nav a {
    min-height: 48px;
    padding: 0 12px;
    white-space: nowrap;
  }
  .rail-nav a:hover,
  .rail-nav a:focus-visible { padding-left: 12px; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 26px 0 30px;
  }

  .hero-fig { aspect-ratio: 3 / 2; }

  .body-html { font-size: 17px; }
}

@media (max-width: 420px) {
  .rail-nav a { font-size: 15px; }
  .find input { width: 104px; }
}

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

  .js [data-rv],
  .js .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .js .rail-nav li { animation: none; }

  .pull { gap: 16px; }
  .pull .quote {
    grid-area: auto;
    opacity: 1;
    transition: none;
  }

  .mark,
  .cta,
  .rail-nav a { transition: none; }
}

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