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

:root {
  --paper: #fdfbf7;
  --wash: #f5f5f5;
  --ink: #1a1a1a;
  --line: #e0e0e0;
  --line-soft: #ebe7e0;
  --muted: #5c5850;
  --rail: 232px;
  --r: 4px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Source Sans 3', 'Lexend', -apple-system, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.55;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='180' height='180' filter='url(%23n)' opacity='0.24'/></svg>");
}

h1,
h2,
h3,
h4 {
  font-family: 'Lexend', 'Source Sans 3', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

a {
  color: var(--ink);
}

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

/* ---------- 左侧竖排导航 ---------- */

.masthead {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 26px;
  width: var(--rail);
  height: 100vh;
  padding: 22px 18px 26px;
  background: rgba(253, 251, 247, 0.9);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  color: var(--ink);
  text-decoration: none;
  font-family: 'Lexend', sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}

.mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 3px;
}

.rail {
  min-height: 0;
  overflow-y: auto;
}

.rail p {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.rail a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 10px;
  font-family: 'Lexend', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-soft);
  border-left: 2px solid transparent;
}

.rail a:hover,
.rail a:focus-visible {
  background: var(--wash);
  border-left-color: var(--ink);
}

.rail a:nth-child(3) {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 10px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r);
  font-family: 'Lexend', sans-serif;
  font-size: 16px;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
}

.cta:hover,
.cta:focus-visible {
  background: #000;
}

/* ---------- 主体 ---------- */

main {
  margin-left: var(--rail);
  padding: 0 clamp(18px, 4.5vw, 62px);
}

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

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 5vw, 66px);
  min-height: 100vh;
  padding: 104px 0 72px;
  overflow: hidden;
}

.hero-figure {
  margin: 0;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--wash);
  overflow: hidden;
}

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

.hero-copy {
  position: relative;
  z-index: 1;
  text-align: right;
}

.hero-num {
  position: absolute;
  top: -0.42em;
  right: -0.06em;
  z-index: -1;
  font-family: 'Lexend', sans-serif;
  font-size: clamp(120px, 19vw, 250px);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: #eceae2;
  user-select: none;
  will-change: transform;
}

.hero-copy h1 {
  margin: 0 0 0.5em;
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-lead {
  max-width: 34ch;
  margin: 0 0 0 auto;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

/* ---------- 正文区：左栏 + 正文 ---------- */

.spread {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  align-items: start;
  gap: clamp(22px, 4vw, 58px);
  padding: 60px 0 72px;
  border-top: 1px solid var(--ink);
}

.rail-aside {
  position: sticky;
  top: 26px;
  padding: 16px 16px 18px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: var(--r);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}

.rail-aside small {
  display: block;
  font-family: 'Lexend', sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.rail-aside h2 {
  margin: 4px 0 14px;
  font-size: 20px;
  line-height: 1.35;
}

.rail-aside ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-left: 2px solid var(--line);
}

.rail-aside a {
  display: block;
  padding: 10px 0 10px 12px;
  min-height: 40px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  text-decoration: none;
}

.rail-aside a:hover,
.rail-aside a:focus-visible {
  border-left: 2px solid var(--ink);
  margin-left: -2px;
  padding-left: 14px;
  background: rgba(255, 255, 255, 0.7);
}

/* ---------- 正文 ---------- */

.prose {
  min-width: 0;
  max-width: 74ch;
}

.prose section {
  padding: 42px 0;
  border-bottom: 1px solid var(--line);
}

.prose section:first-child {
  padding-top: 0;
}

.prose section:last-child {
  border-bottom: 0;
}

.prose small {
  display: block;
  margin-bottom: 2px;
  font-family: 'Lexend', sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.prose h2 {
  margin: 0.1em 0 0.65em;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.32;
}

.prose h3 {
  margin: 1.5em 0 0.5em;
  font-size: 20px;
  line-height: 1.45;
}

.prose p {
  margin: 0 0 1.05em;
}

.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.3em;
}

.prose li {
  margin: 0.35em 0;
}

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

.prose blockquote {
  margin: 1.4em 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--ink);
  color: var(--muted);
}

.prose figure {
  margin: 1.5em 0;
}

.prose img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.prose figcaption {
  margin-top: 8px;
  font-size: 16px;
  color: var(--muted);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  font-size: 16px;
}

.prose th,
.prose td {
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: left;
}

.prose code {
  font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font-size: 15px;
  background: var(--wash);
  padding: 1px 4px;
  border-radius: 2px;
}

/* ---------- 页脚 ---------- */

.colophon {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 30px;
  margin-left: var(--rail);
  padding: 42px clamp(18px, 4.5vw, 62px) 30px;
  border-top: 1px solid var(--ink);
}

.colophon p {
  margin: 0;
}

.colophon-brand {
  font-family: 'Lexend', sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.colophon-brand span {
  display: block;
  margin-top: 10px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--muted);
}

.colophon-links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: flex-end;
  gap: 2px 16px;
}

.colophon-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.colophon-links a:hover,
.colophon-links a:focus-visible {
  border-bottom-color: var(--ink);
}

.colophon small {
  grid-column: 1 / -1;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 16px;
  color: var(--muted);
  text-align: center;
}

/* ---------- 滚动显现 ---------- */

html.js .reveal {
  transform: translateY(16px);
  transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}

html.js .reveal.in {
  transform: none;
}

/* ---------- 窄屏 ---------- */

@media (max-width: 900px) {
  .masthead {
    position: sticky;
    top: 0;
    width: auto;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(253, 251, 247, 0.96);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .mark {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .rail {
    order: 3;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .rail::-webkit-scrollbar {
    display: none;
  }

  .rail p {
    flex-direction: row;
    white-space: nowrap;
  }

  .rail a {
    min-height: 44px;
    padding: 10px 13px;
    border-bottom: 0;
    border-right: 1px solid var(--line-soft);
    border-left: 0;
  }

  .rail a:nth-child(3) {
    margin-top: 0;
    border-top: 0;
  }

  .rail a:hover,
  .rail a:focus-visible {
    border-left: 0;
    border-bottom: 2px solid var(--ink);
  }

  .cta {
    margin-left: auto;
    min-height: 44px;
    padding: 10px 16px;
  }

  main,
  .colophon {
    margin-left: 0;
  }

  main {
    padding: 0 16px;
  }

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

  .hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 34px 0 40px;
  }

  .hero-figure {
    order: 2;
    aspect-ratio: 16 / 10;
    max-height: 44vh;
  }

  .hero-copy {
    order: 1;
  }

  .hero-num {
    font-size: clamp(90px, 26vw, 150px);
    top: -0.36em;
  }

  .hero-lead {
    max-width: 46ch;
  }

  .spread {
    grid-template-columns: 1fr;
    padding: 34px 0 44px;
  }

  .rail-aside {
    position: static;
  }

  .rail-aside ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0 10px;
    border-left: 0;
  }

  .rail-aside a {
    padding: 8px 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .rail-aside a:hover,
  .rail-aside a:focus-visible {
    margin-left: 0;
    padding-left: 0;
    border-bottom: 1px solid var(--ink);
    background: none;
  }

  .prose section {
    padding: 30px 0;
  }

  .colophon {
    grid-template-columns: 1fr;
    padding: 30px 16px 24px;
  }

  .colophon-links {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js .reveal {
    transform: none;
    transition: none;
  }

  .hero-num {
    transform: none !important;
  }
}

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