@import url('https://fonts.googleapis.com/css2?family=Lexend+Mega:wght@100..900&family=Public+Sans:wght@100..900&display=swap');

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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --edge: 4px solid #000000;
  --hair: 1px solid rgba(0, 0, 0, 0.16);
  --disp: 'Lexend Mega', 'Public Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --body: 'Public Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --rail: 250px;
  --tick: 38px;
}

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

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.72;
  letter-spacing: 0.005em;
}

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

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

h1,
h2,
h3,
h4 {
  font-family: var(--disp);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.1;
  text-wrap: balance;
}

p {
  max-width: 64ch;
}

/* ---------- 顶部细条 ---------- */
.strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  margin: 0;
  height: var(--tick);
  display: flex;
  align-items: center;
  padding: 0 16px;
  max-width: none;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--disp);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.16em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 左侧竖排导航 ---------- */
.bar {
  position: fixed;
  top: var(--tick);
  left: 0;
  bottom: 0;
  z-index: 60;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px 18px 34px;
  background: var(--paper);
  border-right: var(--edge);
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--disp);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.brand-mark {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--disp);
  font-size: 19px;
  line-height: 1;
}

.brand-mark.is-img {
  padding: 0;
  overflow: hidden;
  background: var(--ink);
}

.brand-img {
  width: 38px;
  height: 38px;
  object-fit: cover;
  filter: grayscale(1) contrast(1.2);
}

.brand:hover .brand-mark {
  background: #000000;
  outline: 3px solid #000000;
  outline-offset: 3px;
}

.nav summary {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border: 3px solid var(--ink);
  font-family: var(--disp);
  font-size: 13px;
  letter-spacing: 0.14em;
  user-select: none;
}

.nav summary::-webkit-details-marker {
  display: none;
}

.nav summary::after {
  content: "+";
  font-size: 17px;
  line-height: 1;
}

.nav[open] summary::after {
  content: "\2212";
}

.nav summary:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.nav menu {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav menu li {
  margin: 0;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
  border-bottom: var(--hair);
}

.nav a::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  background: var(--ink);
}

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

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

/* ---------- 主体骨架 ---------- */
.main {
  margin-left: var(--rail);
  padding-top: var(--tick);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  min-height: calc(100vh - var(--tick));
  border-bottom: 8px solid var(--ink);
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(rgba(0, 0, 0, 0.26) 1.5px, transparent 1.5px);
  background-size: 15px 15px;
  opacity: 0.45;
  pointer-events: none;
}

.hero-fig {
  position: relative;
  z-index: 1;
  margin: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-right: var(--edge);
  background: var(--paper);
}

.hero-fig::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0, 0, 0, 0.55) 2px, transparent 2px);
  background-size: 9px 9px;
  opacity: 0.5;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15);
  transform: scale(1.08);
  will-change: transform;
}

.hero-fig figcaption {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  margin: 0 0 0 0;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--disp);
  font-size: 12px;
  letter-spacing: 0.16em;
}

.hero-txt {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 22px;
  padding: clamp(24px, 5vw, 68px);
  text-align: center;
}

.hero-txt h1 {
  margin: 0;
  font-size: clamp(30px, 4.4vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.dek {
  margin: 0;
  max-width: 30ch;
  font-size: 17px;
  line-height: 1.65;
  border-top: 3px solid var(--ink);
  padding-top: 18px;
}

/* ---------- 正文 + 右侧栏 ---------- */
.deck {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 268px;
  border-bottom: 8px solid var(--ink);
}

.prose {
  min-width: 0;
  padding: clamp(20px, 3.2vw, 52px);
  border-right: var(--edge);
}

.prose > section {
  display: grid;
  grid-template-columns: minmax(0, 0.4fr) minmax(0, 1fr);
  column-gap: clamp(18px, 3vw, 44px);
  padding: clamp(26px, 4vw, 52px) 0;
  border-top: 4px solid var(--ink);
  scroll-margin-top: calc(var(--tick) + 18px);
}

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

.prose > section > small {
  grid-column: 1;
  display: block;
  padding-bottom: 8px;
  font-family: var(--disp);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.prose > section > h2 {
  grid-column: 1;
  margin: 0 0 10px;
  font-size: clamp(21px, 2.5vw, 33px);
  line-height: 1.08;
}

.prose > section > h3 {
  grid-column: 1;
  margin: 18px 0 6px;
  font-size: clamp(17px, 1.7vw, 21px);
}

.prose > section > *:not(small):not(h2):not(h3) {
  grid-column: 2;
}

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

.prose > section > p:first-of-type::first-letter {
  float: left;
  padding: 6px 12px 0 0;
  font-family: var(--disp);
  font-weight: 800;
  font-size: 3.4em;
  line-height: 0.78;
}

.prose h2 + p,
.prose h3 + p {
  margin-top: 0;
}

.prose ul,
.prose ol {
  margin: 0 0 1.2em;
  padding-left: 0;
  list-style: none;
}

.prose li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 0.6em;
}

.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 10px;
  height: 10px;
  background: var(--ink);
}

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

.prose a:hover {
  background: var(--ink);
  color: var(--paper);
  text-decoration-color: var(--paper);
}

.prose blockquote {
  margin: 26px 0;
  padding: 20px 22px;
  background: var(--ink);
  color: var(--paper);
  border-left: 12px solid var(--ink);
  font-family: var(--disp);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.prose blockquote p {
  margin: 0 0 0.5em;
  max-width: 46ch;
}

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

.prose blockquote a {
  color: var(--paper);
}

.prose figure {
  margin: 26px 0;
  border: 3px solid var(--ink);
}

.prose figure img {
  width: 100%;
  filter: grayscale(1) contrast(1.12);
}

.prose figcaption {
  padding: 9px 12px;
  border-top: 3px solid var(--ink);
  font-family: var(--disp);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.prose hr {
  border: 0;
  border-top: 4px solid var(--ink);
  margin: 30px 0;
}

/* ---------- 右侧栏 ---------- */
.rail {
  align-self: start;
  position: sticky;
  top: calc(var(--tick) + 12px);
  padding: 30px 20px;
  min-width: 0;
}

.eyebrow {
  display: block;
  font-family: var(--disp);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-bottom: 3px solid var(--ink);
  padding-bottom: 8px;
}

.rail-t {
  margin: 14px 0 16px;
  font-size: 19px;
  line-height: 1.2;
  text-transform: none;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rail-list li + li {
  border-top: var(--hair);
}

.rail-list a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 0;
  font-size: 15px;
  line-height: 1.3;
  text-decoration: none;
}

.rail-list a::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border: 2px solid var(--ink);
}

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

.rail-list a:hover::before,
.rail-list a:focus-visible::before {
  background: var(--paper);
  border-color: var(--paper);
  outline: none;
}

/* ---------- 页脚 ---------- */
.foot {
  margin-left: var(--rail);
  padding: 40px 20px 46px;
  background: var(--ink);
  color: var(--paper);
  text-align: center;
}

.foot p {
  margin: 0 auto 8px;
  max-width: none;
  font-family: var(--disp);
  font-size: 17px;
  letter-spacing: 0.06em;
}

.foot small {
  display: block;
  font-size: 12px;
  letter-spacing: 0.22em;
  opacity: 0.72;
}

/* ---------- 动效 ---------- */
.reveal-on .prose > section,
.reveal-on .rail,
.reveal-on .hero-fig {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-on .in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal-on .prose > section,
  .reveal-on .rail,
  .reveal-on .hero-fig {
    transition: none;
  }
  .hero-img {
    transform: none !important;
  }
}

/* ---------- 平板 ---------- */
@media (max-width: 1080px) {
  :root {
    --rail: 216px;
  }
  .deck {
    grid-template-columns: minmax(0, 1fr) 232px;
  }
  .prose > section {
    grid-template-columns: minmax(0, 0.46fr) minmax(0, 1fr);
  }
}

/* ---------- 手机 ---------- */
@media (max-width: 900px) {
  .strip {
    position: static;
    height: auto;
    padding: 11px 16px;
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .bar {
    position: static;
    width: auto;
    border-right: 0;
    border-bottom: var(--edge);
    padding: 14px 16px 16px;
    gap: 12px;
    overflow: visible;
  }

  .brand {
    justify-content: flex-start;
    min-height: 44px;
  }

  .nav summary {
    justify-content: flex-start;
    gap: 8px;
    min-height: 44px;
    width: 100%;
  }

  .nav summary::after {
    margin-left: auto;
  }

  .nav menu {
    margin-top: 10px;
  }

  .nav a {
    min-height: 48px;
    padding: 11px 10px;
    font-size: 16px;
  }

  .main {
    margin-left: 0;
    padding-top: 0;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    border-bottom-width: 6px;
  }

  .hero-txt {
    order: 1;
    align-items: flex-start;
    text-align: left;
    gap: 16px;
    padding: 30px 18px 34px;
  }

  .hero-txt h1 {
    font-size: clamp(27px, 8vw, 38px);
  }

  .dek {
    max-width: none;
    font-size: 16px;
    padding-top: 14px;
  }

  .hero-fig {
    order: 2;
    min-height: 42vh;
    border-right: 0;
    border-top: var(--edge);
  }

  .deck {
    grid-template-columns: 1fr;
    border-bottom-width: 6px;
  }

  .prose {
    order: 1;
    padding: 26px 18px;
    border-right: 0;
  }

  .prose > section {
    grid-template-columns: 1fr;
    padding: 28px 0;
    border-top-width: 3px;
    scroll-margin-top: 14px;
  }

  .prose > section > small,
  .prose > section > h2,
  .prose > section > h3,
  .prose > section > *:not(small):not(h2):not(h3) {
    grid-column: 1;
  }

  .prose > section > h2 {
    font-size: clamp(21px, 6.2vw, 27px);
    margin-bottom: 12px;
  }

  .prose p {
    font-size: 16px;
  }

  .prose > section > p:first-of-type::first-letter {
    font-size: 3em;
  }

  .rail {
    order: 2;
    position: static;
    padding: 26px 18px 34px;
    border-top: var(--edge);
  }

  .rail-list a {
    min-height: 46px;
    padding: 10px 0;
  }

  .foot {
    margin-left: 0;
    padding: 32px 18px 38px;
  }
}

@media (max-width: 420px) {
  .hero-txt h1 {
    font-size: 26px;
  }
  .strip {
    white-space: normal;
  }
}

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