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

/* ===========================
   CSS 变量 & 基础重置
=========================== */
:root {
  --c-white: #ffffff;
  --c-light: #f5f5f5;
  --c-dark: #1f1f1f;
  --c-mid: #6b6b6b;
  --c-border: #e0e0e0;
  --c-accent: #c0392b;
  --c-accent-soft: rgba(192, 57, 43, 0.08);
  --c-overlay: rgba(31, 31, 31, 0.96);

  --shadow-sm: 0 1px 4px rgba(31,31,31,0.08), 0 1px 2px rgba(31,31,31,0.04);
  --shadow-md: 0 4px 16px rgba(31,31,31,0.10), 0 2px 6px rgba(31,31,31,0.06);
  --shadow-lg: 0 8px 32px rgba(31,31,31,0.14), 0 4px 12px rgba(31,31,31,0.08);
  --shadow-xl: 0 20px 60px rgba(31,31,31,0.18), 0 8px 24px rgba(31,31,31,0.10);

  --radius-card: 18px;
  --radius-sm: 8px;
  --radius-pill: 999px;

  --font-head: 'Outfit', 'Rubik', system-ui, sans-serif;
  --font-body: 'Rubik', 'Outfit', system-ui, sans-serif;

  --nav-h: 64px;
  --announce-h: 40px;
  --header-total: calc(var(--announce-h) + var(--nav-h));

  --max-content: 1200px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

body.body-root {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--c-dark);
  background: var(--c-light);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, menu { list-style: none; }
dl, dt, dd { margin: 0; padding: 0; }
button { cursor: pointer; font: inherit; border: none; background: none; }

/* ===========================
   公告条
=========================== */
.announce-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--c-dark);
  color: var(--c-white);
  height: var(--announce-h);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.announce-text {
  opacity: 0.85;
}

/* ===========================
   导航 Header
=========================== */
.site-header {
  position: sticky;
  top: var(--announce-h);
  z-index: 39;
  background: var(--c-white);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
  height: var(--nav-h);
}

.header-inner {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 50;
  position: relative;
  min-height: 44px;
  min-width: 44px;
}

.site-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
}

.site-icon-text {
  width: 40px;
  height: 40px;
  background: var(--c-dark);
  color: var(--c-white);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

/* details/summary 导航 */
.nav-details {
  position: static;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 12px;
  cursor: pointer;
  list-style: none;
  position: relative;
  z-index: 50;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

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

.nav-toggle:hover {
  background: var(--c-light);
}

.hamburger-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-dark);
  border-radius: 2px;
  transition: opacity var(--transition), transform var(--transition);
  pointer-events: none;
}

.toggle-close {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  font-weight: 600;
  color: var(--c-white);
  pointer-events: none;
  line-height: 1;
}

/* 打开状态 */
.nav-details[open] .hamburger-bar {
  display: none;
}

.nav-details[open] .toggle-close {
  display: block;
}

.nav-details[open] .nav-toggle {
  background: transparent;
}

/* 全屏遮罩 */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 38;
  background: var(--c-overlay);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: overlayIn 0.3s ease;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.nav-overlay-inner {
  text-align: center;
  padding: 40px 24px;
  max-width: 480px;
  width: 100%;
}

.nav-brand-full {
  margin-bottom: 40px;
}

.nav-brand-link {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  color: var(--c-white);
  letter-spacing: 0.02em;
}

.nav-brand-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  margin-top: 8px;
  line-height: 1.5;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 40px;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 600;
  color: var(--c-white);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  letter-spacing: 0.02em;
  min-height: 52px;
}

.nav-link:hover {
  background: rgba(255,255,255,0.08);
  color: var(--c-white);
}

.nav-footer-note {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.1em;
}

/* ===========================
   层叠卡片工具类
=========================== */
.layer-card {
  background: var(--c-white);
  border-radius: var(--radius-card);
  position: relative;
}

.layer-1 { box-shadow: var(--shadow-sm); z-index: 1; }
.layer-2 { box-shadow: var(--shadow-md); z-index: 2; }
.layer-3 { box-shadow: var(--shadow-lg); z-index: 3; }
.layer-4 { box-shadow: var(--shadow-xl); z-index: 4; }

/* ===========================
   Hero 区块
=========================== */
.hero-section {
  position: relative;
  overflow: hidden;
  background: var(--c-white);
  padding: 48px 24px 56px;
  min-height: 45vh;
  display: flex;
  align-items: center;
}

.hero-inner {
  max-width: var(--max-content);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
}

/* 左侧图 */
.hero-figure {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 4/3;
  border: 1px solid var(--c-border);
}

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

.hero-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--c-light) 0%, #e8e8e8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-icon-char {
  font-family: var(--font-head);
  font-size: 80px;
  font-weight: 700;
  color: var(--c-dark);
  opacity: 0.12;
  user-select: none;
}

.hero-float-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--c-dark);
  color: var(--c-white);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.08em;
  box-shadow: var(--shadow-md);
  min-height: 32px;
  display: flex;
  align-items: center;
}

/* 右侧文：右对齐 */
.hero-aside {
  text-align: right;
  padding: 36px 32px;
  border: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.hero-eyebrow {
  display: flex;
  justify-content: flex-end;
}

.eyebrow-label {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--c-mid);
  text-transform: uppercase;
  background: var(--c-light);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--c-border);
  display: inline-block;
}

.hero-h1 {
  font-family: var(--font-head);
  font-size: clamp(22px, 3.5vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-dark);
  letter-spacing: -0.01em;
}

.hero-lead {
  font-size: 15px;
  line-height: 1.7;
  color: var(--c-mid);
  max-width: 380px;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--c-dark);
  color: var(--c-white);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--c-dark);
  transition: background var(--transition), color var(--transition);
  min-height: 48px;
}

.btn-primary:hover {
  background: transparent;
  color: var(--c-dark);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--c-dark);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--c-border);
  transition: border-color var(--transition), background var(--transition);
  min-height: 48px;
}

.btn-ghost:hover {
  border-color: var(--c-dark);
  background: var(--c-light);
}

.hero-stats-row {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.stat-pill {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 500;
  color: var(--c-mid);
  border: 1px solid var(--c-border);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--c-light);
  min-height: 32px;
  display: flex;
  align-items: center;
}

/* 装饰元素 */
.hero-deco-dot {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.deco-1 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(31,31,31,0.04) 0%, transparent 70%);
  top: -60px;
  right: -60px;
}

.deco-2 {
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(31,31,31,0.03) 0%, transparent 70%);
  bottom: -30px;
  left: 10%;
}

.hero-deco-ring {
  position: absolute;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(31,31,31,0.05);
  border-radius: 50%;
  bottom: -120px;
  right: -80px;
  pointer-events: none;
  z-index: 0;
}

/* ===========================
   正文内容区
=========================== */
.content-section {
  padding: 64px 24px;
  background: var(--c-light);
}

.content-layout {
  max-width: var(--max-content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}

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

/* page.content 内部元素样式（div[id]由CMS插入） */
.content-main div {
  background: var(--c-white);
  border-radius: var(--radius-card);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
  padding: 40px;
  margin-bottom: 32px;
  position: relative;
  transition: box-shadow var(--transition), transform var(--transition);
}

.content-main div:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.content-main div:last-child {
  margin-bottom: 0;
}

.content-main h2 {
  font-family: var(--font-head);
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: 16px;
  line-height: 1.3;
}

.content-main h3 {
  font-family: var(--font-head);
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 600;
  color: var(--c-dark);
  margin-top: 28px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.content-main p {
  font-size: 16px;
  line-height: 1.8;
  color: #3a3a3a;
  margin-bottom: 16px;
}

.content-main p:last-child {
  margin-bottom: 0;
}

.content-main ul, .content-main ol {
  padding-left: 1.5em;
  margin-bottom: 16px;
}

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

.content-main li {
  font-size: 16px;
  line-height: 1.7;
  color: #3a3a3a;
  margin-bottom: 8px;
}

.content-main strong {
  font-weight: 600;
  color: var(--c-dark);
}

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

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

.content-main blockquote {
  border-left: 3px solid var(--c-dark);
  padding: 12px 20px;
  margin: 20px 0;
  background: var(--c-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--c-mid);
}

.content-main figure {
  margin: 24px 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.content-main figcaption {
  font-size: 13px;
  color: var(--c-mid);
  padding: 8px 0;
  text-align: center;
}

.content-main small {
  font-size: 13px;
  color: var(--c-mid);
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 6px;
}

.content-main small + h2,
.content-main small + h3 {
  margin-top: 4px;
}

/* ===========================
   侧边栏 Aside
=========================== */
.content-aside {
  position: sticky;
  top: calc(var(--header-total) + 24px);
  border: 1px solid var(--c-border);
  padding: 0;
  overflow: hidden;
}

.aside-block {
  padding: 24px;
  border-bottom: 1px solid var(--c-border);
}

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

.aside-highlight {
  background: var(--c-light);
}

.aside-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: 14px;
  margin-top: 6px;
}

.aside-sub-title {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  color: var(--c-dark);
  margin-bottom: 10px;
  margin-top: 6px;
}

.aside-nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aside-link {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-mid);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  line-height: 1.4;
  min-height: 44px;
}

.aside-link:hover {
  background: var(--c-light);
  color: var(--c-dark);
}

.aside-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--c-mid);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag-item {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 500;
  background: var(--c-white);
  color: var(--c-dark);
  border: 1px solid var(--c-border);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

/* ===========================
   页脚
=========================== */
.site-footer {
  background: var(--c-dark);
  color: var(--c-white);
  padding: 56px 24px 32px;
}

.footer-inner {
  max-width: var(--max-content);
  margin: 0 auto;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-dt {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  color: var(--c-white);
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-dd {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  margin-bottom: 10px;
}

.footer-logo {
  opacity: 0.7;
  margin-top: 4px;
  filter: invert(1);
}

.footer-link {
  color: rgba(255,255,255,0.55);
  transition: color var(--transition);
  display: flex;
  align-items: center;
  min-height: 44px;
  line-height: 1.4;
  padding: 4px 0;
}

.footer-link:hover {
  color: var(--c-white);
}

.footer-keyword {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  margin-top: 12px;
  line-height: 1.5;
}

.footer-bottom {
  text-align: center;
}

.footer-copy {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  line-height: 1.6;
}

/* ===========================
   Scroll Reveal 动效
=========================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
  .content-main div {
    transition: none;
  }
}

/* ===========================
   响应式：平板
=========================== */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr 280px;
    gap: 28px;
  }

  .hero-inner {
    gap: 32px;
  }
}

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

  .announce-bar {
    font-size: 12px;
    padding: 0 12px;
  }

  .announce-text {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .hero-section {
    padding: 32px 16px 40px;
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-figure {
    aspect-ratio: 16/9;
  }

  .hero-aside {
    text-align: left;
    align-items: flex-start;
    padding: 24px;
  }

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

  .hero-cta-row {
    justify-content: flex-start;
  }

  .hero-stats-row {
    justify-content: flex-start;
  }

  .hero-h1 {
    font-size: clamp(20px, 6vw, 28px);
  }

  .content-section {
    padding: 32px 16px;
  }

  .content-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .content-aside {
    position: static;
  }

  .content-main div {
    padding: 24px 20px;
  }

  .nav-link {
    font-size: 18px;
    padding: 14px 20px;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .footer-cols {
    grid-template-columns: 1fr;
    gap: 24px;
  }

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

  .header-inner {
    padding: 0 16px;
  }

  .btn-primary,
  .btn-ghost {
    min-height: 48px;
    padding: 13px 20px;
  }

  .aside-link {
    min-height: 48px;
    padding: 12px 12px;
  }

  .footer-link {
    min-height: 48px;
  }
}

/* ===========================
   页面包装器
=========================== */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}
