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

:root {
  --ink: #000000;
  --bg: #ffffff;
  --rail: 264px;
  --line: rgba(0, 0, 0, 0.14);
  --line-soft: rgba(0, 0, 0, 0.08);
  --font: 'Space Grotesk', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

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

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

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

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

a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- 左侧竖排轨道 ---------- */

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 30px 24px;
  background: var(--bg);
  border-right: 1px solid var(--ink);
  overflow-y: auto;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 15px;
  height: 15px;
  background: var(--ink);
  flex: 0 0 auto;
  transition: transform 0.24s ease;
}

.brand:hover .brand-mark { transform: rotate(45deg); }

.brand-name { font-size: 16px; }

.rail-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: railn;
  border-top: 1px solid var(--line);
}

.rail-nav li {
  counter-increment: railn;
  border-bottom: 1px solid var(--line-soft);
}

.rail-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 4px;
  text-decoration: none;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.4;
  transition: background 0.22s ease, color 0.22s ease, padding-left 0.22s ease;
}

.rail-nav a::before {
  content: counter(railn, decimal-leading-zero);
  flex: 0 0 auto;
  width: 24px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.45);
  transition: color 0.22s ease;
}

.rail-nav a::after {
  content: "";
  flex: 0 0 auto;
  margin-left: auto;
  width: 8px;
  height: 8px;
  background: var(--bg);
  opacity: 0;
  transition: opacity 0.22s ease;
}

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

.rail-nav a:hover::before,
.rail-nav a:focus-visible::before { color: rgba(255, 255, 255, 0.6); }

.rail-nav a:hover::after,
.rail-nav a:focus-visible::after { opacity: 1; }

.lbl { min-width: 0; }

/* ---------- 主区域 ---------- */

.main {
  margin-left: var(--rail);
  min-height: 100vh;
}

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0 clamp(20px, 5vw, 72px) clamp(48px, 9vh, 104px);
  background: var(--ink);
  color: var(--bg);
  overflow: hidden;
}

.hero-img,
.hero img.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
  opacity: 0.4;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.82) 100%);
  pointer-events: none;
}

.hero-ghost {
  position: absolute;
  top: 7vh;
  left: clamp(16px, 4vw, 56px);
  z-index: 1;
  font-size: clamp(3rem, 12.5vw, 10.5rem);
  font-weight: 700;
  line-height: 0.86;
  letter-spacing: -0.045em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.42);
  will-change: transform;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(2.1rem, 6.4vw, 5.2rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.hero-desc {
  margin: 0;
  max-width: 44ch;
  font-size: clamp(0.98rem, 1.6vw, 1.15rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.86);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  padding-top: 16px;
}

/* ---------- 正文与侧栏 ---------- */

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 296px;
  gap: clamp(28px, 4vw, 64px);
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) clamp(20px, 4vw, 48px);
}

.prose { min-width: 0; }

.prose article {
  padding-block: clamp(30px, 4vw, 54px);
  border-top: 1px solid var(--line);
  scroll-margin-top: 28px;
  animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.prose article:nth-child(1) { animation-delay: 0.04s; }
.prose article:nth-child(2) { animation-delay: 0.09s; }
.prose article:nth-child(3) { animation-delay: 0.14s; }
.prose article:nth-child(4) { animation-delay: 0.19s; }
.prose article:nth-child(5) { animation-delay: 0.24s; }
.prose article:nth-child(6) { animation-delay: 0.29s; }
.prose article:nth-child(7) { animation-delay: 0.34s; }

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

.prose h2 {
  margin: 0 0 14px;
  font-size: clamp(1.45rem, 2.9vw, 2.1rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.025em;
}

.prose h3 {
  margin: 26px 0 10px;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 600;
  line-height: 1.3;
}

.prose hr {
  width: 64px;
  height: 0;
  margin: 0 0 22px;
  border: 0;
  border-top: 2px solid var(--ink);
}

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

.prose ul,
.prose ol {
  margin: 0 0 1.05em;
  padding-left: 1.25em;
}

.prose li { margin-bottom: 0.35em; }

.prose blockquote {
  margin: 0 0 1.2em;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--ink);
  font-size: 1.03em;
}

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

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

.prose img { margin: 18px 0; }

.side {
  position: sticky;
  top: 32px;
  align-self: start;
  border-top: 2px solid var(--ink);
  padding-top: 14px;
}

.side-title {
  margin: 0 0 10px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.side hr {
  width: 40px;
  height: 0;
  margin: 0 0 12px;
  border: 0;
  border-top: 2px solid var(--ink);
}

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

.side-list li {
  counter-increment: siden;
  border-bottom: 1px solid var(--line-soft);
}

.side-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 6px 2px;
  font-size: 14.5px;
  line-height: 1.4;
  text-decoration: none;
}

.side-list a::before {
  content: counter(siden, decimal-leading-zero);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.4);
}

.side-list a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

.foot {
  margin-left: var(--rail);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  padding: clamp(40px, 5.5vw, 72px) clamp(20px, 4vw, 48px);
  background: var(--ink);
  color: var(--bg);
}

.foot-cta-title {
  margin: 0 0 16px;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.foot-cta-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  text-decoration: none;
  border: 1px solid var(--bg);
  transition: background 0.22s ease, color 0.22s ease;
}

.foot-cta-btn:hover { background: var(--ink); color: var(--bg); }

.foot-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 18px;
}

.foot-nav li { break-inside: avoid; }

.foot-nav a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 0;
  font-size: 14.5px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: color 0.22s ease;
}

.foot-nav a:hover { color: var(--bg); text-decoration: underline; text-underline-offset: 3px; }

.foot-copy {
  align-self: end;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 断点 ---------- */

@media (max-width: 900px) {
  .rail {
    position: sticky;
    inset: auto;
    top: 0;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 9px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
    overflow-x: auto;
    overflow-y: hidden;
  }

  .brand { flex: 0 0 auto; min-height: 44px; }
  .brand-name { font-size: 15px; }

  .rail-nav {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

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

  .rail-nav ol {
    display: flex;
    border-top: 0;
  }

  .rail-nav li {
    border-bottom: 0;
    border-left: 1px solid var(--line-soft);
  }

  .rail-nav li:last-child { border-right: 1px solid var(--line-soft); }

  .rail-nav a {
    min-height: 44px;
    padding: 10px 12px;
    white-space: nowrap;
    font-size: 15px;
  }

  .rail-nav a::after { display: none; }
  .rail-nav a:hover,
  .rail-nav a:focus-visible { padding-left: 12px; }

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

  .hero { min-height: calc(100svh - 64px); }

  .hero-ghost { top: 4vh; font-size: clamp(2.6rem, 14vw, 6rem); }

  .stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .side {
    position: static;
    order: 2;
  }

  .prose article { scroll-margin-top: 76px; }

  .foot {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .foot-copy { align-self: start; }
}

@media (max-width: 480px) {
  body { font-size: 16.5px; }
  .hero-desc { font-size: 1rem; }
  .foot-nav ol { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-inner,
  .prose article { animation: none; }
  .hero-ghost { transform: none !important; }
  .brand-mark,
  .rail-nav a,
  .foot-cta-btn,
  .foot-nav a { transition: none; }
}

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