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

/* ===== CSS 自定义属性 ===== */
:root {
  --c-paper: #fdfbf7;
  --c-offwhite: #f5f5f5;
  --c-ink: #1a1a1a;
  --c-ink-light: #3a3a3a;
  --c-ink-muted: #6a6a6a;
  --c-border: #d8d4cc;
  --c-border-light: #e8e4de;
  --c-accent: #1a1a1a;
  --c-accent-hover: #3a3a3a;
  --c-card-line: #1a1a1a;
  --nav-width: 240px;
  --f-serif: 'Newsreader', 'Georgia', 'Times New Roman', serif;
  --f-sans: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  --radius-card: 28px;
  --radius-btn: 4px;
  --shadow-paper: 0 1px 3px rgba(26,26,26,0.08);
}

/* ===== 纸质肌理噪点 ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.6;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 17px;
  line-height: 1.65;
  scroll-behavior: smooth;
  background: var(--c-paper);
  color: var(--c-ink);
}

body {
  font-family: var(--f-sans);
  font-weight: 400;
  background: var(--c-paper);
  color: var(--c-ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--c-ink);
  text-decoration: none;
  transition: none;
}

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

ul, ol {
  list-style: none;
}

/* ===== 站点骨架：左侧导航 + 右侧内容 ===== */
.site-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* ===== 左侧固定竖排导航 ===== */
.sidenav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-width);
  height: 100vh;
  background: var(--c-ink);
  color: var(--c-paper);
  display: flex;
  flex-direction: column;
  z-index: 100;
  border-right: 2px solid var(--c-ink);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidenav-brand {
  padding: 2rem 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(253,251,247,0.15);
  flex-shrink: 0;
}

.brand-link {
  display: block;
  color: var(--c-paper);
  text-decoration: none;
}

.brand-link:hover {
  text-decoration: none;
  opacity: 0.85;
}

.brand-text {
  font-family: var(--f-serif);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--c-paper);
  display: block;
  line-height: 1.3;
}

.brand-logo {
  max-width: 160px;
  height: auto;
  filter: invert(1);
}

/* 导航菜单 */
.sidenav-menu {
  flex: 1;
  padding: 1.25rem 0;
  overflow-y: auto;
}

.nav-dl {
  padding: 0;
}

.nav-group-label {
  display: block;
  font-family: var(--f-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(253,251,247,0.45);
  padding: 0 1.5rem 0.75rem;
}

.nav-dl dd {
  display: block;
}

.nav-dl dd a,
.nav-dl dt a {
  display: flex;
  align-items: center;
  padding: 0.6rem 1.5rem;
  font-family: var(--f-sans);
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(253,251,247,0.85);
  border-left: 3px solid transparent;
  min-height: 40px;
}

.nav-dl dd a:hover,
.nav-dl dt a:hover {
  color: var(--c-paper);
  border-left-color: var(--c-paper);
  background: rgba(253,251,247,0.06);
  text-decoration: none;
}

/* 侧边导航 CTA */
.sidenav-cta {
  padding: 1.25rem 1.5rem 2rem;
  border-top: 1px solid rgba(253,251,247,0.15);
  flex-shrink: 0;
}

/* ===== CTA 按钮通用 ===== */
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.5rem;
  font-family: var(--f-sans);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-btn);
  cursor: pointer;
  text-decoration: none;
  border: 1.5px solid transparent;
  letter-spacing: 0.03em;
}

.cta-btn:hover {
  text-decoration: none;
}

.cta-primary {
  background: var(--c-paper);
  color: var(--c-ink);
  border-color: var(--c-paper);
}

.cta-primary:hover {
  background: var(--c-offwhite);
}

.cta-secondary {
  background: transparent;
  color: var(--c-paper);
  border-color: rgba(253,251,247,0.5);
}

.cta-secondary:hover {
  border-color: var(--c-paper);
  background: rgba(253,251,247,0.08);
}

/* 页脚深色背景上的主按钮 */
.cta-dark {
  background: var(--c-paper);
  color: var(--c-ink);
  border-color: var(--c-paper);
}

.cta-dark:hover {
  background: var(--c-offwhite);
}

.sidenav-cta .cta-btn {
  width: 100%;
  background: transparent;
  color: var(--c-paper);
  border-color: rgba(253,251,247,0.4);
  font-size: 0.85rem;
}

.sidenav-cta .cta-btn:hover {
  background: rgba(253,251,247,0.1);
  border-color: var(--c-paper);
}

/* ===== 主内容区 ===== */
.main-content {
  margin-left: var(--nav-width);
  flex: 1;
  min-width: 0;
}

/* ===== Hero 区块 ===== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background: var(--c-ink);
  color: var(--c-paper);
  overflow: hidden;
  scroll-margin-top: 0;
}

/* 点阵底纹 */
.hero-dot-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(253,251,247,0.18) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding: 4rem 5rem 4rem 2rem;
  text-align: right;
}

.hero-title {
  font-family: var(--f-serif);
  font-size: clamp(2.6rem, 6vw, 5.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--c-paper);
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-family: var(--f-sans);
  font-size: 1rem;
  font-weight: 300;
  color: rgba(253,251,247,0.65);
  max-width: 440px;
  margin-left: auto;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ===== 正文主容器结构 ===== */
main {
  background: var(--c-paper);
  padding: 0;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2.5rem;
}

.content-section {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

.content-article {
  min-width: 0;
}

/* section scroll margin for fixed sidebar */
section {
  scroll-margin-top: 80px;
}

/* ===== 正文内容样式 ===== */
.content-article h1,
.content-article h2,
.content-article h3,
.content-article h4 {
  font-family: var(--f-serif);
  font-weight: 600;
  color: var(--c-ink);
  line-height: 1.25;
}

.content-article h2 {
  font-size: 1.75rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--c-ink);
}

.content-article h3 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.content-article p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-ink);
  margin-bottom: 1.25rem;
}

.content-article ul,
.content-article ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.content-article ul {
  list-style: disc;
}

.content-article ol {
  list-style: decimal;
}

.content-article li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.content-article a {
  color: var(--c-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-article blockquote {
  border-left: 3px solid var(--c-ink);
  padding: 0.75rem 1.25rem;
  background: var(--c-offwhite);
  margin: 1.5rem 0;
  font-style: italic;
}

.content-article table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.content-article th,
.content-article td {
  padding: 0.65rem 1rem;
  border: 1px solid var(--c-border);
  text-align: left;
}

.content-article th {
  background: var(--c-offwhite);
  font-weight: 600;
}

/* ===== 卡片样式（正文内可能有） ===== */
.content-article .card {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--c-paper);
  position: relative;
}

.content-article .card::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--c-card-line);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}

/* ===== 侧边栏 ===== */
.content-aside {
  position: sticky;
  top: 2rem;
}

.aside-inner {
  background: var(--c-offwhite);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 1.75rem 1.5rem;
  position: relative;
}

.aside-inner::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--c-card-line);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
}

.aside-eyebrow {
  display: block;
  font-family: var(--f-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-ink-muted);
  margin-bottom: 0.4rem;
}

.aside-title {
  font-family: var(--f-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--c-border);
}

.aside-nav {
  margin-bottom: 1.5rem;
}

.aside-nav li {
  border-bottom: 1px solid var(--c-border-light);
}

.aside-nav li:last-child {
  border-bottom: none;
}

.aside-nav a {
  display: flex;
  align-items: center;
  padding: 0.55rem 0;
  font-size: 0.88rem;
  color: var(--c-ink-light);
  min-height: 40px;
}

.aside-nav a:hover {
  color: var(--c-ink);
  text-decoration: none;
  padding-left: 0.4rem;
}

.aside-note {
  font-size: 0.8rem;
  color: var(--c-ink-muted);
  line-height: 1.6;
  padding-top: 0.75rem;
  border-top: 1px solid var(--c-border-light);
}

/* ===== h2/h3 前的 small 眉题（契约结构） ===== */
small.aside-eyebrow,
small.footer-eyebrow {
  display: block;
}

.content-article small + h2,
.content-article small + h3 {
  margin-top: 0.25rem;
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--c-ink);
  color: var(--c-paper);
  border-top: 2px solid var(--c-ink);
}

/* 大 CTA 块 */
.footer-cta-block {
  text-align: center;
  padding: 5rem 2.5rem 4rem;
  border-bottom: 1px solid rgba(253,251,247,0.12);
  max-width: 700px;
  margin: 0 auto;
}

.footer-eyebrow {
  display: block;
  font-family: var(--f-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(253,251,247,0.4);
  margin-bottom: 0.75rem;
}

.footer-cta-title {
  font-family: var(--f-serif);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--c-paper);
  margin-bottom: 1rem;
  line-height: 1.15;
}

.footer-cta-desc {
  font-size: 0.95rem;
  color: rgba(253,251,247,0.6);
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* 三栏 */
.footer-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 2.5rem 3rem;
  border-bottom: 1px solid rgba(253,251,247,0.1);
}

.footer-brand-text {
  font-family: var(--f-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-paper);
  display: block;
  margin-bottom: 0.75rem;
}

.footer-brand-desc {
  font-size: 0.85rem;
  color: rgba(253,251,247,0.5);
  line-height: 1.65;
}

/* 页脚导航 dl */
.footer-nav .nav-dl .nav-group-label {
  color: rgba(253,251,247,0.4);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  padding: 0 0 0.75rem;
}

.footer-nav .nav-dl dd a {
  padding: 0.4rem 0;
  color: rgba(253,251,247,0.7);
  font-size: 0.88rem;
  border-left: none;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.footer-nav .nav-dl dd a:hover {
  color: var(--c-paper);
  border-left: none;
  background: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-info-title {
  font-family: var(--f-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-paper);
  margin-bottom: 0.75rem;
  margin-top: 0.3rem;
}

.footer-col p {
  font-size: 0.85rem;
  color: rgba(253,251,247,0.55);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}

.footer-contact a {
  color: rgba(253,251,247,0.7);
}

.footer-contact a:hover {
  color: var(--c-paper);
}

/* 版权底栏 */
.footer-bottom {
  padding: 1.5rem 2.5rem;
  text-align: center;
  border-top: 1px solid rgba(253,251,247,0.08);
}

.footer-copy {
  font-size: 0.78rem;
  color: rgba(253,251,247,0.35);
  letter-spacing: 0.02em;
}

/* ===== 视差与滚动动效（prefers-reduced-motion 关闭） ===== */
@media (prefers-reduced-motion: no-preference) {
  .content-article > * {
    animation: fadeInUp 0.4s ease both;
  }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== 响应式：平板 ===== */
@media (max-width: 1024px) {
  :root {
    --nav-width: 200px;
  }

  .hero-inner {
    padding: 3rem 3rem 3rem 1.5rem;
    max-width: 560px;
  }

  .content-section {
    grid-template-columns: 1fr 240px;
    gap: 2rem;
  }

  .footer-columns {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-columns .footer-col:first-child {
    grid-column: 1 / -1;
  }
}

/* ===== 响应式：移动端 ===== */
@media (max-width: 768px) {
  :root {
    --nav-width: 0px;
  }

  html {
    font-size: 16px;
  }

  .site-shell {
    flex-direction: column;
  }

  /* 移动端：侧边导航变顶部横条 */
  .sidenav {
    position: relative;
    width: 100%;
    height: auto;
    flex-direction: column;
    border-right: none;
    border-bottom: 2px solid var(--c-ink);
  }

  .sidenav-brand {
    padding: 1.25rem 1.25rem 1rem;
  }

  .sidenav-menu {
    padding: 0.5rem 0;
  }

  .nav-dl dd a,
  .nav-dl dt a {
    padding: 0.6rem 1.25rem;
    font-size: 0.88rem;
  }

  .sidenav-cta {
    padding: 1rem 1.25rem 1.25rem;
  }

  .main-content {
    margin-left: 0;
  }

  /* 移动端 Hero：h1 必须在首屏可见，垂直居中对齐 */
  .hero-section {
    min-height: 100svh;
    justify-content: center;
    align-items: center;
    padding: 0;
  }

  .hero-inner {
    padding: 2rem 1.5rem;
    text-align: left;
    max-width: 100%;
    width: 100%;
  }

  .hero-sub {
    margin-left: 0;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .hero-title {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .wrap {
    padding: 2.5rem 1.25rem;
  }

  .content-section {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .content-aside {
    position: static;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem 1.5rem;
  }

  .footer-cta-block {
    padding: 3rem 1.5rem;
  }

  .footer-bottom {
    padding: 1.25rem 1.5rem;
  }

  div {
    scroll-margin-top: 60px;
  }
}

@media (max-width: 375px) {
  .hero-title {
    font-size: 2rem;
  }

  .cta-btn {
    font-size: 0.85rem;
    padding: 0.6rem 1.1rem;
  }

  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
  }
}

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