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

/* ─── CSS 自定义属性 ─── */
:root {
  --paper: #fdfbf7;
  --paper-2: #f5f5f5;
  --ink: #1a1a1a;
  --ink-2: #3a3a3a;
  --ink-3: #6a6a6a;
  --border: #d8d4cc;
  --border-light: #e8e4de;
  --accent: #1a1a1a;
  --accent-hover: #3a3a3a;
  --radius-card: 18px;
  --radius-btn: 10px;
  --sidebar-w: 240px;
  --font-sans: 'Plus Jakarta Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --shadow-card: 0 1px 4px rgba(26,26,26,0.07);
}

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

html {
  scroll-behavior: smooth;
  font-size: 18px;
  background: var(--paper);
  color: var(--ink);
}

body.body-paper {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.7;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Grain texture overlay */
body.body-paper::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.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
ul, menu { list-style: none; }

/* ─── Page Shell ─── */
.page-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ─── Sidebar Navigation ─── */
.sidebar-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--paper-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-nav[open] { }

.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 20px 20px;
  cursor: pointer;
  list-style: none;
  border-bottom: 1px solid var(--border-light);
  min-height: 80px;
}

.sidebar-toggle::-webkit-details-marker { display: none; }

.brand-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.logo-link { display: inline-block; }

.brand-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
}

.hamburger-icon span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.nav-menu {
  padding: 16px 0 24px;
  flex: 1;
}

.nav-menu li {
  display: block;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  border-left: 3px solid transparent;
  min-height: 44px;
  transition: none;
}

.nav-link:hover,
.nav-link:focus {
  background: var(--border-light);
  border-left-color: var(--ink);
  color: var(--ink);
  outline: none;
}

.nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  font-style: normal;
}

.nav-text {
  flex: 1;
}

.nav-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 16px;
  border-top: 1px solid var(--border-light);
  word-break: break-all;
  min-height: 44px;
}

/* ─── Content Shell ─── */
.content-shell {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ─── Hero Zone ─── */
.hero-zone {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 40px 60px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  background: var(--paper);
}

/* Dot grid background */
.hero-dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.6;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 620px;
}

.hero-eyebrow {
  display: inline-block;
  margin-bottom: 16px;
}

.hero-eyebrow span {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--ink-3);
  background: var(--paper);
}

.hero-h1 {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: 36px;
  font-weight: 400;
}

.hero-cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 600;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-btn);
  border: 1px solid var(--ink);
  min-height: 48px;
  letter-spacing: 0.01em;
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--ink-2);
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 600;
  background: transparent;
  color: var(--ink);
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
  min-height: 48px;
}

.btn-ghost:hover,
.btn-ghost:focus {
  background: var(--paper-2);
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* Hero deco card */
.hero-deco {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: none;
}

.hero-deco-card {
  width: 80px;
  height: 100px;
  background: var(--paper-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.deco-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ink);
}

.deco-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.deco-lines span {
  display: block;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
}

.deco-lines span:nth-child(1) { width: 100%; }
.deco-lines span:nth-child(2) { width: 70%; }
.deco-lines span:nth-child(3) { width: 85%; }

/* ─── Main Area ─── */
.main-area {
  flex: 1;
}

.wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 40px 80px;
}

/* ─── Content Section + Article ─── */
.content-section {
  width: 100%;
}

.content-article {
  width: 100%;
}

.content-with-aside {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
}

/* ─── Article Body (page.content 正文样式) ─── */
.article-body {
  min-width: 0;
}

.article-body h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  margin: 56px 0 20px;
  letter-spacing: -0.02em;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  line-height: 1.3;
}

.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin: 40px 0 14px;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.article-body p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-2);
  margin-bottom: 20px;
}

.article-body ul,
.article-body ol {
  margin: 0 0 20px 20px;
  padding: 0;
}

.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }

.article-body li {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-2);
  margin-bottom: 8px;
}

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

.article-body a:hover {
  text-decoration-color: var(--ink);
}

.article-body strong, .article-body b {
  font-weight: 600;
  color: var(--ink);
}

.article-body em { font-style: italic; }

.article-body blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 3px solid var(--ink);
  background: var(--paper-2);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--ink-2);
}

.article-body section {
  margin-bottom: 64px;
  scroll-margin-top: 100px;
}

.article-body section:last-child { margin-bottom: 0; }

/* 卡片风格的 section 内部块 */
.article-body .card,
.article-body [class*="card"] {
  background: var(--paper-2);
  border-radius: var(--radius-card);
  padding: 24px 28px;
  margin-bottom: 20px;
  border: none;
}

/* ─── Aside ─── */
.content-aside {
  position: sticky;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.aside-card {
  background: var(--paper-2);
  border-radius: var(--radius-card);
  padding: 22px 20px;
  border: 1px solid var(--border-light);
}

.aside-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}

.aside-title span {
  display: inline;
}

.aside-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aside-links li { list-style: none; }

.aside-link {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 7px 10px;
  border-radius: 8px;
  min-height: 36px;
  display: flex;
  align-items: center;
}

.aside-link:hover {
  background: var(--border-light);
  color: var(--ink);
}

.aside-tip-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink-3);
  margin: 0;
}

/* ─── Scroll Margin for sections ─── */
article[id] {
  scroll-margin-top: 80px;
}

/* ─── Footer ─── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 40px 32px;
  text-align: center;
  background: var(--paper-2);
}

.site-footer p.footer-brand {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.5;
}

.site-footer small.footer-copy {
  display: block;
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.6;
}

/* ─── Scroll Reveal Animation ─── */
@media (prefers-reduced-motion: no-preference) {
  .article-body article {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.4s ease, transform 0.4s ease;
  }
  .article-body article.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* Stagger for aside cards */
  .aside-card {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s ease, transform 0.35s ease;
  }
  .aside-card.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
  .aside-card:nth-child(2) { transition-delay: 0.1s; }
}

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

/* ─── Tablet ─── */
@media (max-width: 960px) {
  :root { --sidebar-w: 0px; }

  .sidebar-nav {
    position: relative;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
  }

  .sidebar-toggle {
    padding: 16px 20px;
    min-height: 64px;
  }

  .sidebar-nav:not([open]) .nav-menu {
    display: none;
  }

  .sidebar-nav[open] .nav-menu {
    display: block;
  }

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

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

  .content-with-aside {
    grid-template-columns: 1fr;
  }

  .content-aside {
    position: static;
  }

  .hero-deco {
    display: none;
  }

  .wrap {
    padding: 40px 24px 60px;
  }

  .hero-zone {
    padding: 60px 24px 48px;
    min-height: 60vh;
  }
}

/* ─── Mobile ─── */
@media (max-width: 600px) {
  html { font-size: 16px; }

  .hero-h1 {
    font-size: 28px;
  }

  .hero-desc {
    font-size: 16px;
  }

  .hero-cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-ghost {
    justify-content: center;
    min-height: 48px;
    font-size: 16px;
  }

  .wrap {
    padding: 32px 16px 48px;
  }

  .article-body h2 {
    font-size: 22px;
    margin: 44px 0 16px;
  }

  .article-body h3 {
    font-size: 18px;
  }

  .article-body p,
  .article-body li {
    font-size: 16px;
  }

  .nav-link {
    min-height: 48px;
    font-size: 16px;
  }

  .sidebar-toggle {
    min-height: 64px;
  }

  .site-footer {
    padding: 24px 16px 28px;
  }

  .site-footer small.footer-copy {
    font-size: 12px;
  }

  article[id] {
    scroll-margin-top: 70px;
  }
}

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