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

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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --rail: 76px;
  --strip: 38px;
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  --edge: 1px solid #000000;
  --soft: 1px solid rgba(0, 0, 0, 0.16);
  --pad: clamp(1.25rem, 5vw, 4rem);
}

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

body {
  margin: 0;
  padding-top: var(--strip);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
}

body.menu-open { overflow: hidden; }

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

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

:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 3px;
}

/* 顶部细条 */
.strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--strip);
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: #000000;
  color: #ffffff;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.16em;
  white-space: nowrap;
  overflow: hidden;
  z-index: 60;
}

/* 左侧竖排栏 */
.rail {
  position: fixed;
  top: var(--strip);
  left: 0;
  bottom: 0;
  width: var(--rail);
  background: #ffffff;
  border-right: var(--edge);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 22px 0;
  z-index: 70;
}

.brand {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-decoration: none;
  padding: 8px 0;
  min-height: 44px;
}

.burger {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  width: 44px;
  height: 92px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: #000000;
  color: #ffffff;
  font-family: var(--sans);
  font-size: 16px;
  letter-spacing: 0.3em;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 220ms ease, color 220ms ease;
}

.burger:hover { background: #ffffff; color: #000000; box-shadow: inset 0 0 0 1px #000000; }

/* 全屏遮罩菜单 */
.menu {
  position: fixed;
  inset: 0 0 0 var(--rail);
  z-index: 65;
  background: #000000;
  color: #ffffff;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 240ms ease, visibility 240ms ease;
}

.menu.is-open { opacity: 1; visibility: visible; }

.menu p {
  margin: 0;
  padding: var(--pad);
  max-width: 880px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem 1.4rem;
}

.menu a {
  color: #ffffff;
  text-decoration: none;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 4vw, 2.3rem);
  line-height: 1.3;
  letter-spacing: 0.04em;
  padding: 0.55rem 0.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: border-color 220ms ease;
}

.menu a:hover { border-bottom-color: #ffffff; }

.menu :focus-visible { outline-color: #ffffff; }

/* 主体 */
main { padding-left: var(--rail); }

main [id] { scroll-margin-top: calc(var(--strip) + 28px); }

.hero {
  position: relative;
  min-height: 45vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1.1rem;
  text-align: center;
  padding: clamp(1.9rem, 5vw, 3.4rem) var(--pad);
  border-bottom: var(--edge);
  overflow: hidden;
}

.hero-mark {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  place-items: center;
  z-index: 0;
  font-family: var(--serif);
  font-size: clamp(4rem, 18vw, 12rem);
  line-height: 0.8;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: #000000;
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
}

.hero h1,
.hero .lead { position: relative; z-index: 1; }

.hero h1 {
  margin: 0;
  max-width: 22ch;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 7vw, 4.4rem);
  line-height: 1.06;
  letter-spacing: 0.02em;
}

.hero .lead {
  margin: 0;
  max-width: 46ch;
  font-size: 17px;
  line-height: 1.6;
}

/* 内容与右栏 */
.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 284px);
  gap: clamp(1.8rem, 5vw, 4.5rem);
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(1.8rem, 4.5vw, 3.6rem) var(--pad);
}

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

.prose div {
  padding-block: clamp(1.5rem, 3.6vw, 2.6rem);
  border-top: var(--edge);
}

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

.prose small {
  display: block;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.2em;
}

.prose h2 {
  margin: 0.35rem 0 0.9rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.55rem, 3.2vw, 2.2rem);
  line-height: 1.22;
  letter-spacing: 0.01em;
}

.prose h3 {
  margin: 1.6rem 0 0.6rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.28rem;
  line-height: 1.3;
}

.prose p { margin: 0 0 1rem; }

.prose ul,
.prose ol { margin: 0 0 1.2rem; padding-left: 1.3rem; }

.prose li { margin-bottom: 0.45rem; }

.prose li::marker { color: #000000; }

.prose blockquote {
  margin: 1.4rem 0;
  padding: 0.2rem 0 0.2rem 1.1rem;
  border-left: 3px solid #000000;
  font-family: var(--serif);
  font-size: 1.08rem;
}

.prose a {
  text-decoration: none;
  border-bottom: 1px solid #000000;
  padding-bottom: 1px;
}

.prose a:hover { background: #000000; color: #ffffff; }

.prose strong { font-weight: 700; }

.prose hr { border: 0; border-top: var(--edge); margin: 1.8rem 0; }

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

.prose th,
.prose td {
  border-bottom: var(--soft);
  padding: 0.6rem 0.5rem;
  text-align: left;
}

.prose th { border-bottom: var(--edge); font-weight: 700; }

.prose figure { margin: 1.3rem 0; }

.prose figcaption { font-size: 16px; padding-top: 0.4rem; }

/* 侧栏 */
.side {
  align-self: start;
  position: sticky;
  top: calc(var(--strip) + 28px);
  border-top: var(--edge);
  padding-top: 0.7rem;
}

.side small {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.side h2 {
  margin: 0.2rem 0 0.9rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.2;
}

.side-links { margin: 0; display: grid; }

.side-links a {
  display: block;
  padding: 0.68rem 0;
  border-bottom: var(--soft);
  text-decoration: none;
  font-size: 16px;
  transition: padding-left 200ms ease;
}

.side-links a:hover { padding-left: 0.5rem; }

/* 页脚 */
.foot {
  padding: clamp(1.8rem, 4.5vw, 3.6rem) var(--pad) 1.6rem;
  border-top: var(--edge);
  margin-left: var(--rail);
}

.cta {
  display: grid;
  gap: 1.2rem;
  padding-bottom: clamp(1.6rem, 4vw, 2.6rem);
  border-bottom: var(--edge);
}

.cta-word {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 7vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.cta-link {
  justify-self: start;
  display: inline-block;
  background: #000000;
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  letter-spacing: 0.2em;
  padding: 0.95rem 1.7rem;
  transition: background 220ms ease, color 220ms ease;
}

.cta-link:hover { background: #ffffff; color: #000000; box-shadow: inset 0 0 0 1px #000000; }

.cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  padding-block: 2rem;
}

.cols dl { margin: 0; min-width: 0; }

.cols dt {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2em;
  padding-bottom: 0.55rem;
  border-bottom: var(--edge);
  margin-bottom: 0.5rem;
}

.cols dd {
  margin: 0;
  padding: 0.55rem 0;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.cols dd a { text-decoration: none; display: inline-block; padding: 0.25rem 0; }

.cols dd a:hover { border-bottom: 1px solid #000000; }

.copy {
  margin: 0;
  padding-top: 1.4rem;
  border-top: var(--edge);
  font-size: 16px;
  letter-spacing: 0.12em;
}

/* 动效 */
.js .rv {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 460ms ease, transform 460ms ease;
}

.js .rv.in { opacity: 1; transform: none; }

.js .side-links a:nth-child(2) { transition-delay: 40ms; }
.js .side-links a:nth-child(3) { transition-delay: 80ms; }
.js .side-links a:nth-child(4) { transition-delay: 120ms; }
.js .side-links a:nth-child(5) { transition-delay: 160ms; }
.js .side-links a:nth-child(6) { transition-delay: 200ms; }
.js .side-links a:nth-child(7) { transition-delay: 240ms; }

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

@media (max-width: 760px) {
  :root { --rail: 0px; }

  body { padding-top: calc(var(--strip) + 56px); }

  .rail {
    top: var(--strip);
    bottom: auto;
    right: 0;
    width: auto;
    height: 56px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    border-right: 0;
    border-bottom: var(--edge);
  }

  .brand {
    writing-mode: horizontal-tb;
    font-size: 19px;
    letter-spacing: 0.22em;
    padding: 0;
    display: flex;
    align-items: center;
    min-height: 44px;
  }

  .burger {
    writing-mode: horizontal-tb;
    width: auto;
    height: auto;
    min-height: 44px;
    padding: 0 16px;
    letter-spacing: 0.2em;
  }

  .menu { inset: 0; }
  .menu p { gap: 0.4rem 1rem; }

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

  .cols { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }

  .hero { min-height: 42vh; }
}

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

  .js .rv,
  .js .rv.in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .menu,
  .burger,
  .cta-link,
  .side-links a { transition: none; }
}

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