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

/* =====================
   CSS 变量 & 基础重置
   ===================== */
:root {
  --c-black: #000000;
  --c-white: #ffffff;
  --c-gray-100: #f5f5f5;
  --c-gray-200: #e8e8e8;
  --c-gray-400: #999999;
  --c-gray-600: #555555;
  --c-accent: #000000;
  --c-accent-inv: #ffffff;
  --radius: 4px;
  --base: 8px;
  --header-h: 64px;
  --announce-h: 36px;
  --total-top: calc(var(--header-h) + var(--announce-h));
  --font: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --max-w: 1280px;
  --grid-cols: 12;
  --grid-gap: 1rem;
}

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

html {
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--c-black);
  background: var(--c-white);
  min-height: 100vh;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* =====================
   公告条
   ===================== */
.announce-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--announce-h);
  background: var(--c-black);
  color: var(--c-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 var(--base);
}

/* =====================
   站点头部 & 导航
   ===================== */
.site-header {
  position: fixed;
  top: var(--announce-h);
  left: 0;
  right: 0;
  z-index: 190;
  height: var(--header-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-gray-200);
}

.main-nav {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 calc(var(--base) * 3);
  gap: var(--grid-gap);
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: calc(var(--base) * 2.5);
  margin: 0;
}

.nav-right {
  justify-content: flex-end;
}

.main-nav p a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--c-black);
  padding: calc(var(--base) * 0.75) calc(var(--base));
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.main-nav p a:hover {
  opacity: 0.5;
}

.brand-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
}

.brand-text {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--c-black);
}

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

/* 汉堡按钮 */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: calc(var(--base) * 1.25);
  min-height: 40px;
  min-width: 40px;
  position: absolute;
  right: calc(var(--base) * 3);
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.ham-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-black);
  transition: transform 0.25s, opacity 0.25s;
}

/* 全屏菜单 */
.fullscreen-menu {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--c-black);
  color: var(--c-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.fullscreen-menu[aria-hidden="true"] {
  opacity: 0;
  pointer-events: none;
}

.fullscreen-menu[aria-hidden="false"] {
  opacity: 1;
  pointer-events: all;
}

.menu-close {
  position: absolute;
  top: calc(var(--base) * 3);
  right: calc(var(--base) * 3);
  background: none;
  border: none;
  color: var(--c-white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: calc(var(--base) * 1.25);
  min-height: 40px;
  min-width: 40px;
  line-height: 1;
}

.fullscreen-nav p {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--base) * 2);
  margin: 0;
}

.fullscreen-nav p a {
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 300;
  color: var(--c-white);
  letter-spacing: 0.04em;
  padding: calc(var(--base)) calc(var(--base) * 2);
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  transition: opacity 0.2s;
}

.fullscreen-nav p a:hover {
  opacity: 0.6;
}

/* =====================
   Hero 区块
   ===================== */
.hero-block {
  margin-top: var(--total-top);
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-black);
  color: var(--c-white);
  position: relative;
  overflow: hidden;
  padding: calc(var(--base) * 8) calc(var(--base) * 3);
}

.hero-inner {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-text {
  text-align: center;
  max-width: 720px;
}

.hero-h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: calc(var(--base) * 2.5);
  color: var(--c-white);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  color: rgba(255,255,255,0.7);
  margin-bottom: calc(var(--base) * 4);
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--c-white);
  color: var(--c-black);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: calc(var(--base) * 1.5) calc(var(--base) * 4);
  border-radius: var(--radius);
  min-height: 48px;
  transition: opacity 0.2s, transform 0.2s;
  border: 2px solid var(--c-white);
}

.hero-cta:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* =====================
   主体内容区
   ===================== */
.site-main {
  background: var(--c-white);
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: calc(var(--base) * 8) calc(var(--base) * 3);
}

.content-section {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: calc(var(--base) * 6);
  align-items: start;
}

/* =====================
   侧边栏 (左侧)
   ===================== */
.content-aside {
  position: sticky;
  top: calc(var(--total-top) + calc(var(--base) * 2));
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--c-gray-200);
  border-radius: var(--radius);
  padding: calc(var(--base) * 3);
}

.aside-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: calc(var(--base) * 0.5);
}

.aside-title + .subtitle {
  font-size: 0.8125rem;
  color: var(--c-gray-600);
  margin-bottom: calc(var(--base) * 2);
}

.content-aside nav {
  display: flex;
  flex-direction: column;
  gap: calc(var(--base) * 0.5);
}

.aside-link {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--c-gray-600);
  padding: calc(var(--base) * 0.75) calc(var(--base));
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
  min-height: 40px;
  display: flex;
  align-items: center;
  border-left: 2px solid transparent;
}

.aside-link:hover {
  background: var(--c-gray-100);
  color: var(--c-black);
  border-left-color: var(--c-black);
}

/* =====================
   正文内容
   ===================== */
.content-body {
  min-width: 0;
}

.content-body h2 {
  font-size: clamp(1.375rem, 2.5vw, 1.875rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-top: calc(var(--base) * 7);
  margin-bottom: calc(var(--base) * 1.5);
  padding-top: calc(var(--base) * 5);
  border-top: 2px solid var(--c-black);
}

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

.content-body h3 {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 600;
  margin-top: calc(var(--base) * 4);
  margin-bottom: calc(var(--base));
}

.content-body p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--c-black);
  margin-bottom: calc(var(--base) * 2);
}

.content-body ul,
.content-body ol {
  padding-left: calc(var(--base) * 3);
  margin-bottom: calc(var(--base) * 2);
}

.content-body li {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: calc(var(--base) * 0.75);
}

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

.content-body a:hover {
  opacity: 0.6;
}

.content-body div {
  scroll-margin-top: calc(var(--total-top) + calc(var(--base) * 2));
  padding-bottom: calc(var(--base) * 4);
}

.content-body blockquote {
  border-left: 3px solid var(--c-black);
  padding-left: calc(var(--base) * 3);
  margin: calc(var(--base) * 3) 0;
  color: var(--c-gray-600);
  font-style: italic;
}

.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: calc(var(--base) * 3);
  font-size: 0.9375rem;
}

.content-body th,
.content-body td {
  padding: calc(var(--base)) calc(var(--base) * 1.5);
  border: 1px solid var(--c-gray-200);
  text-align: left;
}

.content-body th {
  background: var(--c-gray-100);
  font-weight: 600;
}

/* 玻璃拟态卡片（正文内可能有） */
.content-body .card,
.glass-card {
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--c-gray-200);
  border-radius: var(--radius);
  padding: calc(var(--base) * 3);
  margin-bottom: calc(var(--base) * 2);
}

/* =====================
   页脚
   ===================== */
.site-footer {
  background: var(--c-black);
  color: var(--c-white);
}

.footer-cta {
  padding: calc(var(--base) * 12) calc(var(--base) * 3);
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-cta-title {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: calc(var(--base));
}

.footer-cta .subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: calc(var(--base) * 4);
}

.footer-btn {
  background: var(--c-white);
  color: var(--c-black);
  border-color: var(--c-white);
}

.footer-btn:hover {
  background: rgba(255,255,255,0.85);
}

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: calc(var(--base) * 3) calc(var(--base) * 3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--base) * 2);
  flex-wrap: wrap;
}

.footer-copy,
.footer-note {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
}

/* =====================
   Scroll Reveal 动效
   ===================== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
  .stagger > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.45s ease, transform 0.45s ease;
  }
  .stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
  .stagger.is-visible > *:nth-child(2) { transition-delay: 0.12s; }
  .stagger.is-visible > *:nth-child(3) { transition-delay: 0.19s; }
  .stagger.is-visible > *:nth-child(4) { transition-delay: 0.26s; }
  .stagger.is-visible > *:nth-child(5) { transition-delay: 0.33s; }
  .stagger.is-visible > *:nth-child(6) { transition-delay: 0.40s; }
  .stagger.is-visible > *:nth-child(n+7) { transition-delay: 0.47s; }
  .stagger.is-visible > * {
    opacity: 1;
    transform: none;
  }
}

/* =====================
   响应式断点
   ===================== */

/* 平板 */
@media (max-width: 1024px) {
  .content-section {
    grid-template-columns: 180px 1fr;
    gap: calc(var(--base) * 4);
  }

  .main-nav p a {
    font-size: 0.75rem;
    gap: calc(var(--base) * 1.5);
  }
}

/* 移动端 */
@media (max-width: 768px) {
  :root {
    --header-h: 56px;
    --announce-h: 32px;
  }

  .main-nav {
    grid-template-columns: 1fr auto auto;
    padding: 0 calc(var(--base) * 2);
  }

  .nav-left,
  .nav-right {
    display: none;
  }

  .hamburger {
    position: static;
    transform: none;
    right: auto;
    top: auto;
  }

  .hero-block {
    min-height: 70vh;
    padding: calc(var(--base) * 6) calc(var(--base) * 2);
  }

  .wrap {
    padding: calc(var(--base) * 5) calc(var(--base) * 2);
  }

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

  .content-aside {
    position: static;
    margin-bottom: calc(var(--base) * 4);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: calc(var(--base));
  }

  .content-body h2 {
    margin-top: calc(var(--base) * 5);
    padding-top: calc(var(--base) * 3);
  }
}

@media (max-width: 480px) {
  .announce-bar {
    font-size: 0.75rem;
  }

  .hero-h1 {
    font-size: 1.75rem;
  }

  .hero-sub {
    font-size: 0.9375rem;
  }

  .fullscreen-nav p a {
    font-size: 1.25rem;
  }
}

/* =====================
   工具
   ===================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* div scroll offset */
div[id] {
  scroll-margin-top: calc(var(--total-top) + 16px);
}

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