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

/* ===== 重置 & 基础 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  background: #fff;
  color: #000;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  background: #fff;
  color: #000;
  overflow-x: hidden;
  max-width: 100vw;
}

ul, ol { list-style: none; }

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

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

/* ===== 顶部公告条 ===== */
.topbar {
  background: #000;
  color: #fff;
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
}

/* ===== 站点头部：品牌行 + 菜单行 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 2px solid #000;
}

.brand-row {
  display: flex;
  align-items: center;
  padding: 1rem 4vw;
  border-bottom: 1px solid #000;
  min-height: 56px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.25rem 0;
}

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

.brand-text {
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #000;
  line-height: 1;
  white-space: nowrap;
}

/* aside>nav>ul>li>a 导航结构 */
.nav-aside {
  width: 100%;
  background: #fff;
}

.main-nav {
  padding: 0 4vw;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.main-nav ul {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  min-width: max-content;
}

.main-nav ul li a {
  display: inline-flex;
  align-items: center;
  padding: 0 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #000;
  border-right: 1px solid #e0e0e0;
  transition: background 0.18s, color 0.18s;
  min-height: 44px;
  white-space: nowrap;
}

.main-nav ul li:first-child a {
  border-left: 1px solid #e0e0e0;
}

.main-nav ul li a:hover,
.main-nav ul li a:focus {
  background: #000;
  color: #fff;
  outline: none;
}

/* ===== Hero 区块 ===== */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
  background: #000;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.85) 40%, rgba(0,0,0,0.4) 100%);
}

.hero-bg-number {
  position: absolute;
  left: 4vw;
  bottom: -0.1em;
  font-size: clamp(8rem, 28vw, 22rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  color: rgba(255,255,255,0.04);
  line-height: 1;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: right;
  padding: 0 6vw 8vh 6vw;
  max-width: 900px;
  width: 100%;
}

.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1.5rem;
}

.hero-h1 {
  font-size: clamp(2.2rem, 7vw, 7rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #fff;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  word-break: break-all;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 300;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 480px;
  margin-left: auto;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #000;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 0 2.5rem;
  border: 2px solid #fff;
  min-height: 48px;
  transition: background 0.2s, color 0.2s;
}

.hero-cta:hover,
.hero-cta:focus {
  background: transparent;
  color: #fff;
  outline: none;
}

/* ===== 主体区：main>div>article + 右侧 aside ===== */
.site-main {
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-template-areas: "article sidebar";
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 6rem 4vw;
  align-items: start;
  width: 100%;
}

.content-article {
  grid-area: div;
  border-right: 2px solid #000;
  padding-right: 4rem;
  min-width: 0;
}

.content-body {
  width: 100%;
}

/* h2 后紧跟 hr */
.section-heading {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

hr {
  border: none;
  border-top: 2px solid #000;
  margin: 1rem 0 2.5rem;
}

/* ===== page.content 正文样式 ===== */
.content-body h2 {
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  margin: 4rem 0 0.75rem;
  line-height: 1.1;
}

.content-body h3 {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 0.6rem;
}

.content-body p {
  font-size: 1rem;
  line-height: 1.75;
  color: #222;
  margin-bottom: 1.25rem;
  max-width: 72ch;
  word-break: break-word;
}

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

.content-body li {
  font-size: 1rem;
  line-height: 1.75;
  color: #222;
  margin-bottom: 0.4rem;
}

.content-body a {
  color: #000;
  font-weight: 600;
  border-bottom: 1.5px solid #000;
  transition: opacity 0.15s;
}

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

.content-body strong {
  font-weight: 700;
}

.content-body blockquote {
  border-left: 4px solid #000;
  padding: 0.75rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #444;
  background: #f8f8f8;
}

/* article 区块分隔：page.content 内的 article */
.content-body article {
  padding-top: 3rem;
  border-top: 1px solid #d0d0d0;
  margin-top: 3rem;
  scroll-margin-top: 100px;
}

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

/* ===== 侧边栏 ===== */
.sidebar-aside {
  grid-area: sidebar;
  position: sticky;
  top: 100px;
  padding-left: 2.5rem;
  min-width: 0;
}

.sidebar-inner {
  border: 2px solid #000;
  padding: 1.5rem;
}

.sidebar-title {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

.sidebar-nav {
  width: 100%;
}

.sidebar-nav ul {
  display: flex;
  flex-direction: column;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 0 0.25rem;
  font-size: 0.82rem;
  font-weight: 500;
  border-bottom: 1px solid #e8e8e8;
  transition: padding-left 0.15s;
  min-height: 44px;
  line-height: 1.3;
  word-break: break-all;
}

.sidebar-link:hover,
.sidebar-link:focus {
  padding-left: 0.5rem;
  font-weight: 700;
  outline: none;
}

.sidebar-badge {
  margin-top: 1.5rem;
  background: #000;
  color: #fff;
  text-align: center;
  padding: 0.6rem 0.75rem;
}

.badge-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* ===== 页脚 ===== */
.site-footer {
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.25rem 4vw;
  border-top: 4px solid #000;
  min-height: 64px;
  width: 100%;
}

.footer-logo-block {
  flex-shrink: 0;
}

.footer-brand {
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #fff;
}

.footer-nav {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  justify-content: center;
}

.footer-nav ul li a {
  display: inline-flex;
  align-items: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.5rem 0.6rem;
  min-height: 44px;
  border-right: 1px solid rgba(255,255,255,0.15);
  transition: color 0.15s;
  white-space: nowrap;
}

.footer-nav ul li:last-child a {
  border-right: none;
}

.footer-nav ul li a:hover {
  color: #fff;
}

.footer-copy {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.45);
  font-weight: 400;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ===== 动效 ===== */
@media (prefers-reduced-motion: no-preference) {
  .hero-content {
    animation: fadeSlideUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  @keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(2.5rem); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .hero-bg-number {
    animation: bgNumFade 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  @keyframes bgNumFade {
    from { opacity: 0; transform: translateX(-2rem); }
    to   { opacity: 1; transform: translateX(0); }
  }

  .content-body article {
    animation: staggerFadeIn 0.6s ease both;
    animation-play-state: paused;
  }

  .content-body article.in-view {
    animation-play-state: running;
  }

  @keyframes staggerFadeIn {
    from { opacity: 0; transform: translateY(1.5rem); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .sidebar-inner {
    animation: fadeSlideUp 0.8s 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
  }
}

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

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .site-main {
    grid-template-columns: 1fr;
    grid-template-areas:
      "article"
      "sidebar";
    padding: 3rem 5vw;
  }

  .content-article {
    border-right: none;
    padding-right: 0;
    border-bottom: 2px solid #000;
    padding-bottom: 3rem;
  }

  .sidebar-aside {
    position: static;
    padding-left: 0;
    padding-top: 2rem;
  }

  .sidebar-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .sidebar-link {
    border: 1px solid #000;
    padding: 0 0.75rem;
    min-height: 44px;
  }
}

@media (max-width: 600px) {
  .brand-row {
    padding: 0.75rem 4vw;
  }

  .brand-text {
    font-size: 1rem;
  }

  .main-nav {
    padding: 0 4vw;
  }

  .main-nav ul li a {
    font-size: 0.72rem;
    padding: 0 0.75rem;
    min-height: 44px;
  }

  .hero-content {
    text-align: left;
    padding: 0 5vw 6vh;
  }

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

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1.25rem 5vw;
  }

  .footer-nav {
    width: 100%;
  }

  .footer-nav ul {
    justify-content: flex-start;
  }

  .footer-nav ul li a {
    font-size: 0.68rem;
    padding: 0.25rem 0.5rem;
    min-height: 44px;
  }

  .footer-copy {
    white-space: normal;
  }
}
