@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 {
  --c-primary: #6514ff;
  --c-accent: #bf00ff;
  --c-dark: #1c1726;
  --c-dark2: #251e35;
  --c-dark3: #2f2645;
  --c-surface: #1a1428;
  --c-text: #f0eaff;
  --c-text-muted: #9d8ec4;
  --c-border: #3d3160;
  --c-neon: #e040fb;
  --c-neon2: #7c3aed;
  --sidebar-w: 260px;
  --gap-lg: 64px;
  --gap-md: 48px;
  --gap-sm: 24px;
  --radius-card: 18px;
  --radius-btn: 50px;
  --transition: 220ms cubic-bezier(.4,0,.2,1);
  --font-main: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Nunito', 'DM Sans', system-ui, sans-serif;
}

/* ===== 全局 reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body.body-dark {
  background: var(--c-dark);
  color: var(--c-text);
  font-family: var(--font-main);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
}

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

/* ===== 页面外壳 ===== */
.page-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ===== 左侧竖排导航 ===== */
.sidebar-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--c-dark2);
  border-right: 2px solid var(--c-border);
  z-index: 900;
  transform: translateX(-100%);
  transition: transform 300ms cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
}

.sidebar-nav.is-open {
  transform: translateX(0);
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 32px 20px;
  overflow-y: auto;
}

.sidebar-brand {
  text-align: center;
  margin-bottom: 40px;
  flex-shrink: 0;
}

.sidebar-logo-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.brand-logomark { width: 48px; height: 48px; object-fit: contain; }
.brand-logo { max-width: 140px; height: auto; }
.brand-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--c-text);
  letter-spacing: .02em;
  line-height: 1.2;
  text-align: center;
}

.sidebar-menu {
  flex: 1;
}

.sidebar-menu ol {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-menu ol li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--c-text-muted);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-menu ol li a:hover,
.sidebar-menu ol li a:focus-visible {
  background: var(--c-primary);
  color: #fff;
  outline: none;
}

.sidebar-close {
  margin-top: 32px;
  align-self: center;
  background: var(--c-dark3);
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
  font-size: 1.1rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}

.sidebar-close:hover {
  background: var(--c-accent);
  color: #fff;
}

/* 遮罩 */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28,23,38,.72);
  z-index: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}

.sidebar-overlay.is-visible {
  opacity: 1;
  pointer-events: all;
}

/* ===== 汉堡按钮 ===== */
.hamburger {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 1000;
  width: 48px;
  height: 48px;
  background: var(--c-primary);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 12px;
  transition: background var(--transition), transform var(--transition);
  box-shadow: 0 4px 20px rgba(101,20,255,.5);
}

.hamburger:hover {
  background: var(--c-accent);
  transform: scale(1.06);
}

.ham-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger[aria-expanded="true"] .ham-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger[aria-expanded="true"] .ham-bar:nth-child(2) {
  opacity: 0;
}
.hamburger[aria-expanded="true"] .ham-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== 内容区 ===== */
.content-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ===== Hero 区块 ===== */
.hero-block {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--c-dark);
  padding: 60px var(--gap-sm) var(--gap-lg);
}

/* 点阵底纹 */
.hero-dot-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(101,20,255,.35) 1px, transparent 1px);
  background-size: 28px 28px;
  animation: dotDrift 18s linear infinite;
  pointer-events: none;
  z-index: 0;
}

/* 网格底纹 */
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(191,0,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(191,0,255,.08) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

@keyframes dotDrift {
  0% { background-position: 0 0; }
  100% { background-position: 28px 28px; }
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--gap-lg);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* 文案右对齐 */
.hero-copy {
  flex: 1;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
  order: 2;
}

.hero-media {
  flex: 0 0 420px;
  order: 1;
}

.hero-eyebrow {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--c-accent);
  background: rgba(191,0,255,.12);
  border: 1px solid rgba(191,0,255,.3);
  padding: 6px 16px;
  border-radius: 50px;
  display: inline-block;
}

.hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.15;
  color: #fff;
  background: linear-gradient(135deg, #fff 30%, var(--c-neon));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--c-text-muted);
  max-width: 380px;
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  height: 52px;
  padding: 0 36px;
  border-radius: var(--radius-btn);
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  box-shadow: 0 4px 24px rgba(101,20,255,.5);
  transition: transform var(--transition), box-shadow var(--transition);
}

.hero-cta:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 8px 32px rgba(191,0,255,.6);
}

/* 双图错位拼贴 */
.hero-collage {
  position: relative;
  width: 100%;
  height: 380px;
}

.hero-img {
  position: absolute;
  object-fit: cover;
  border-radius: var(--radius-card);
  border: 2px solid var(--c-border);
}

.hero-img-a {
  width: 68%;
  height: 72%;
  top: 0;
  left: 0;
  z-index: 2;
  box-shadow: -6px 6px 32px rgba(101,20,255,.4);
}

.hero-img-b {
  width: 62%;
  height: 68%;
  bottom: 0;
  right: 0;
  z-index: 3;
  box-shadow: 6px -4px 28px rgba(191,0,255,.35);
}

.hero-geo-accent {
  position: absolute;
  border-radius: 12px;
  z-index: 1;
}

.geo-1 {
  width: 80px;
  height: 80px;
  background: var(--c-primary);
  opacity: .55;
  bottom: 30px;
  left: 10px;
  transform: rotate(18deg);
  animation: geoFloat 6s ease-in-out infinite;
}

.geo-2 {
  width: 48px;
  height: 48px;
  background: var(--c-accent);
  opacity: .5;
  top: 18px;
  right: 8px;
  transform: rotate(-12deg);
  animation: geoFloat 8s ease-in-out infinite reverse;
}

@keyframes geoFloat {
  0%, 100% { transform: rotate(18deg) translateY(0); }
  50% { transform: rotate(18deg) translateY(-12px); }
}

/* ===== 主内容 ===== */
.main-content {
  flex: 1;
  padding: var(--gap-md) var(--gap-sm);
}

.content-article {
  max-width: 900px;
  margin: 0 auto;
}

.content-sections {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

/* 正文区块内的 section（来自 page.content） */
.content-sections section {
  scroll-margin-top: 80px;
  padding: var(--gap-md) 40px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  position: relative;
  overflow: hidden;
}

.content-sections section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--c-primary), var(--c-accent));
  border-radius: 4px 0 0 4px;
}

/* 正文 h2/h3 */
.content-sections h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 20px;
  line-height: 1.2;
}

.content-sections h2 span {
  display: inline;
}

.content-sections h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--c-neon);
  margin: 28px 0 12px;
}

.content-sections h3 span {
  display: inline;
}

.content-sections p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-text);
  margin-bottom: 14px;
}

.content-sections ul,
.content-sections ol {
  padding-left: 1.4em;
  margin-bottom: 14px;
  list-style: disc;
}

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

.content-sections li {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--c-text);
  margin-bottom: 6px;
}

.content-sections a {
  color: var(--c-neon);
  text-decoration: underline;
  text-decoration-color: rgba(191,0,255,.4);
  transition: color var(--transition);
}

.content-sections a:hover {
  color: var(--c-accent);
}

.content-sections strong {
  color: #fff;
  font-weight: 700;
}

.content-sections table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.93rem;
}

.content-sections th {
  background: var(--c-primary);
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
}

.content-sections td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
}

.content-sections tr:nth-child(even) td {
  background: rgba(101,20,255,.07);
}

/* ===== aside（内容左侧） ===== */
.main-content {
  display: flex;
  gap: var(--gap-md);
  align-items: flex-start;
}

.page-aside {
  flex: 0 0 200px;
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  order: -1;
}

.aside-block {
  background: var(--c-dark2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 20px 16px;
}

.aside-block-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--c-accent);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

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

.aside-nav-list li a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--c-text-muted);
  transition: background var(--transition), color var(--transition);
  min-height: 36px;
  line-height: 1.4;
}

.aside-nav-list li a:hover {
  background: rgba(101,20,255,.25);
  color: var(--c-text);
}

.content-article {
  flex: 1;
  min-width: 0;
}

/* ===== Scroll Reveal 动效 ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 480ms ease, transform 480ms ease;
  }
  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 页脚 ===== */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 32px;
  border-top: 1px solid var(--c-border);
  background: var(--c-dark2);
  flex-wrap: wrap;
}

.footer-brand-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

.footer-brand-text {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 900;
  color: var(--c-text-muted);
}

.footer-nav ol {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.footer-nav ol li a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--c-text-muted);
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
}

.footer-nav ol li a:hover {
  color: var(--c-text);
  background: rgba(101,20,255,.2);
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  white-space: nowrap;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .hero-layout {
    flex-direction: column;
    gap: var(--gap-sm);
  }
  .hero-copy {
    order: 1;
    text-align: center;
    align-items: center;
  }
  .hero-media {
    order: 2;
    width: 100%;
    flex: none;
  }
  .hero-collage {
    height: 280px;
  }
  .main-content {
    flex-direction: column;
  }
  .page-aside {
    flex: none;
    width: 100%;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .aside-block {
    flex: 1 1 160px;
  }
}

@media (max-width: 640px) {
  :root { --gap-lg: 40px; --gap-md: 32px; --gap-sm: 16px; }

  .hero-block {
    min-height: 60vh;
    padding: 72px 16px 40px;
  }

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

  .content-sections section {
    padding: 28px 20px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 16px;
  }

  .footer-nav ol {
    gap: 2px;
  }

  .hamburger {
    top: 12px;
    left: 12px;
  }
}

@media (max-width: 375px) {
  .hero-collage { height: 220px; }
  .hero-h1 { font-size: 1.75rem; }
  .content-sections h2 { font-size: 1.4rem; }
}

/* ===== focus-visible 无障碍 ===== */
:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}

/* ===== 滚动条定制 ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--c-dark); }
::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-primary); }
