@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=Nunito:ital,wght@0,700;0,800;0,900;1,700&display=swap');

/* ============================================================
   CSS 变量 & 重置
   ============================================================ */
:root {
  --paper: #fdfbf7;
  --paper-2: #f5f5f5;
  --ink: #1a1a1a;
  --ink-light: #444444;
  --ink-muted: #888888;
  --border: #d8d4cc;
  --border-light: #e8e4de;
  --accent: #1a1a1a;
  --radius-card: 28px;
  --radius-sm: 8px;
  --radius-pill: 100px;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Nunito', 'DM Sans', system-ui, sans-serif;
  --header-h: 56px;
  --announce-h: 36px;
  --anchor-h: 44px;
  --sticky-top: calc(var(--header-h) + var(--announce-h));
}

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

html {
  scroll-behavior: smooth;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ============================================================
   纸张噪点纹理
   ============================================================ */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

/* ============================================================
   顶部公告条
   ============================================================ */
.header-announce {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  height: var(--announce-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
}

/* ============================================================
   顶部导航栏
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}

.header-bar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-mark { height: 36px; width: auto; }

.logo-text-icon {
  width: 44px;
  height: 44px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* 汉堡按钮 */
.burger-btn {
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: none;
}

.burger-btn:hover { background: var(--paper-2); }

.burger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: none;
}

.burger-btn.is-open .burger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.is-open .burger-line:nth-child(2) { opacity: 0; }
.burger-btn.is-open .burger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   全屏遮罩菜单
   ============================================================ */
.fullscreen-menu {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: none;
}

.fullscreen-menu.is-open {
  opacity: 1;
  pointer-events: all;
}

.menu-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  font-size: 1.4rem;
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(253,251,247,0.3);
}

.menu-aside {
  text-align: center;
}

.menu-aside nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.menu-aside nav ul li a {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-weight: 900;
  color: var(--paper);
  padding: 0.5rem 2rem;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(253,251,247,0.1);
  transition: none;
}

.menu-aside nav ul li a:hover {
  background: rgba(253,251,247,0.08);
}

/* ============================================================
   粘性锚点导航条
   ============================================================ */
.sticky-anchor-bar {
  position: sticky;
  top: calc(var(--announce-h) + var(--header-h));
  z-index: 150;
  background: var(--paper-2);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}

.sticky-anchor-bar::-webkit-scrollbar { display: none; }

.anchor-inner {
  display: flex;
  align-items: center;
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.anchor-link {
  display: flex;
  align-items: center;
  height: var(--anchor-h);
  padding: 0 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-light);
  white-space: nowrap;
  border-right: 1px solid var(--border-light);
  letter-spacing: 0.04em;
  transition: none;
}

.anchor-link:last-child { border-right: none; }
.anchor-link:hover { color: var(--ink); background: rgba(26,26,26,0.04); }

/* ============================================================
   Hero 区块
   ============================================================ */
.hero-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  padding: 5rem 2rem 4rem;
  scroll-margin-top: calc(var(--announce-h) + var(--header-h) + var(--anchor-h));
}

.hero-bg-text {
  position: absolute;
  right: -0.1em;
  bottom: -0.2em;
  font-family: var(--font-display);
  font-size: clamp(8rem, 22vw, 18rem);
  font-weight: 900;
  color: rgba(26,26,26,0.04);
  line-height: 1;
  letter-spacing: -0.05em;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.hero-text {
  flex: 1;
  text-align: right;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--ink-muted);
  text-transform: uppercase;
  margin-bottom: 1rem;
  font-family: var(--font-display);
}

.hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--ink-light);
  max-width: 36ch;
  margin-left: auto;
  line-height: 1.8;
}

.hero-media {
  flex-shrink: 0;
  width: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-illustration {
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
}

/* 糖果装饰图形 */
.hero-deco {
  position: relative;
  height: 260px;
}

.candy-shape {
  position: absolute;
  border-radius: 50%;
  border: 3px solid var(--ink);
}

.candy-1 {
  width: 120px;
  height: 120px;
  top: 20px;
  left: 40px;
  background: var(--paper-2);
}

.candy-2 {
  width: 70px;
  height: 70px;
  bottom: 30px;
  right: 20px;
  background: var(--ink);
}

.candy-3 {
  width: 45px;
  height: 45px;
  top: 30px;
  right: 60px;
  background: transparent;
  border-style: dashed;
}

/* ============================================================
   scroll-margin-top for sections
   ============================================================ */
div[id] {
  scroll-margin-top: calc(var(--announce-h) + var(--header-h) + var(--anchor-h) + 16px);
}

/* ============================================================
   正文与侧边栏布局
   ============================================================ */
.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

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

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

/* ============================================================
   正文内容样式 (page.content 注入后的排版)
   ============================================================ */
.content-main h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 900;
  margin-top: 3.5rem;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  padding-top: 2rem;
  border-top: 2px solid var(--ink);
}

.content-main h2:first-child,
.content-main div:first-child h2 { margin-top: 0; border-top: none; padding-top: 0; }

.content-main hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0 2rem;
}

.content-main h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.content-main p {
  margin-bottom: 1.2rem;
  color: var(--ink);
  max-width: 72ch;
}

.content-main ul, .content-main ol {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.2rem;
}

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

.content-main li {
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.content-main strong { font-weight: 700; }
.content-main em { font-style: italic; }

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

.content-main a:hover { opacity: 0.65; }

.content-main blockquote {
  border-left: 3px solid var(--ink);
  padding: 0.75rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--paper-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.content-main div {
  margin-bottom: 3rem;
}

/* ============================================================
   侧边栏
   ============================================================ */
.content-aside {
  position: sticky;
  top: calc(var(--announce-h) + var(--header-h) + var(--anchor-h) + 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.content-aside nav {
  background: var(--paper-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
}

.content-aside nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.content-aside nav ul li a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-light);
  border-radius: var(--radius-sm);
  transition: none;
  letter-spacing: 0.02em;
}

.content-aside nav ul li a:hover {
  background: var(--border-light);
  color: var(--ink);
}

.aside-brand-card {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-card);
  padding: 2rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.aside-brand-icon {
  width: 56px;
  height: 56px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
}

.aside-brand-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--paper);
}

.aside-brand-desc {
  font-size: 0.82rem;
  color: rgba(253,251,247,0.65);
  letter-spacing: 0.08em;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}

.footer-address {
  font-style: normal;
  font-size: 0.82rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 1rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col ul li a {
  font-size: 0.9rem;
  color: var(--ink-light);
  display: block;
  padding: 0.2rem 0;
  transition: none;
}

.footer-col ul li a:hover { color: var(--ink); text-decoration: underline; }

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

/* ============================================================
   Scroll Reveal 动效
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s cubic-bezier(0.22,1,0.36,1), transform 0.5s cubic-bezier(0.22,1,0.36,1);
  }

  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  .reveal-stagger > * {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.45s cubic-bezier(0.22,1,0.36,1), transform 0.45s cubic-bezier(0.22,1,0.36,1);
  }

  .reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; opacity: 1; transform: none; }
  .reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 80ms; opacity: 1; transform: none; }
  .reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 160ms; opacity: 1; transform: none; }
  .reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 240ms; opacity: 1; transform: none; }
  .reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 320ms; opacity: 1; transform: none; }
  .reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 400ms; opacity: 1; transform: none; }
  .reveal-stagger.is-visible > *:nth-child(7) { transition-delay: 480ms; opacity: 1; transform: none; }
}

/* ============================================================
   响应式断点
   ============================================================ */
@media (max-width: 960px) {
  .content-with-aside {
    grid-template-columns: 1fr;
  }

  .content-aside {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .content-aside nav { flex: 1; min-width: 240px; }
  .aside-brand-card { flex: 0 0 200px; }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer-col--brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 52px;
    --announce-h: 32px;
    --anchor-h: 40px;
  }

  .hero-section {
    min-height: 70vh;
    padding: 4rem 1.25rem 3rem;
  }

  .hero-content {
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 2rem;
  }

  .hero-text { text-align: right; }

  .hero-media {
    width: 160px;
    height: 160px;
  }

  .hero-deco { height: 160px; }
  .candy-1 { width: 80px; height: 80px; top: 10px; left: 20px; }
  .candy-2 { width: 50px; height: 50px; bottom: 15px; right: 10px; }
  .candy-3 { width: 30px; height: 30px; top: 15px; right: 35px; }

  .hero-bg-text { font-size: clamp(6rem, 30vw, 9rem); }

  .content-section { padding: 2.5rem 1.25rem; }

  .content-aside {
    flex-direction: column;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-col--brand { grid-column: auto; }

  .anchor-link { padding: 0 0.65rem; font-size: 0.78rem; }

  .content-main h2 { font-size: 1.35rem; margin-top: 2.5rem; }

  .menu-aside nav ul li a { font-size: clamp(1.4rem, 7vw, 2rem); }
}

@media (max-width: 375px) {
  html { font-size: 16px; }
  .hero-h1 { font-size: 1.9rem; }
}
