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

/* ===== 基础变量 ===== */
:root {
  --c-primary: #56228b;
  --c-secondary: #8b4513;
  --c-ink: #1f1726;
  --c-primary-light: #7a3fbf;
  --c-primary-dark: #3a1660;
  --c-secondary-light: #b5621e;
  --c-bg: #12091c;
  --c-bg2: #1c0f2e;
  --c-bg3: #251538;
  --c-surface: #2a1545;
  --c-surface2: #341c52;
  --c-text: #e8d9f5;
  --c-text-muted: #a992c4;
  --c-text-dim: #7a5f99;
  --c-gold: #c8a96e;
  --c-earth: #6b4226;
  --c-border: rgba(86, 34, 139, 0.35);
  --c-border-light: rgba(200, 169, 110, 0.2);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  --shadow-soft: 0 4px 24px rgba(86, 34, 139, 0.18);
  --shadow-med: 0 8px 40px rgba(86, 34, 139, 0.28);
  --shadow-glow: 0 0 32px rgba(86, 34, 139, 0.4);

  --font-display: 'Cinzel', 'Georgia', serif;
  --font-body: 'Josefin Sans', system-ui, -apple-system, sans-serif;

  --header-h: 72px;
  --scroll-top: 80px;

  --transition-fast: 0.18s ease;
  --transition-med: 0.32s ease;
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--scroll-top);
  font-size: 17px;
  background: var(--c-bg);
  color: var(--c-text);
}

body {
  font-family: var(--font-body);
  line-height: 1.7;
  min-height: 100vh;
  background: var(--c-bg);
  overflow-x: hidden;
}

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

a {
  color: var(--c-primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover, a:focus-visible {
  color: var(--c-gold);
}

:focus-visible {
  outline: 2px solid var(--c-primary-light);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* ===== 有机背景纹理 blob ===== */
body::before {
  content: '';
  position: fixed;
  top: -20%;
  right: -15%;
  width: 60vmax;
  height: 60vmax;
  background: radial-gradient(ellipse at 60% 40%, rgba(86,34,139,0.22) 0%, rgba(31,23,38,0) 70%);
  border-radius: 40% 60% 55% 45% / 45% 55% 60% 40%;
  pointer-events: none;
  z-index: 0;
  animation: blobDrift 18s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  bottom: -10%;
  left: -10%;
  width: 50vmax;
  height: 50vmax;
  background: radial-gradient(ellipse at 40% 60%, rgba(139,69,19,0.16) 0%, rgba(31,23,38,0) 70%);
  border-radius: 60% 40% 45% 55% / 55% 45% 40% 60%;
  pointer-events: none;
  z-index: 0;
  animation: blobDrift2 22s ease-in-out infinite alternate;
}

@keyframes blobDrift {
  0% { transform: translate(0,0) scale(1); }
  100% { transform: translate(-3%, 5%) scale(1.08); }
}
@keyframes blobDrift2 {
  0% { transform: translate(0,0) scale(1); }
  100% { transform: translate(4%, -4%) scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
}

/* ===== 全屏遮罩菜单 ===== */
.overlay-menu {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(18,9,28,0.97) 0%, rgba(31,23,38,0.97) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-med);
}

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

.overlay-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  font-size: 1.4rem;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), color var(--transition-fast);
}

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

.overlay-nav p {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.overlay-nav a {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--c-text);
  letter-spacing: 0.08em;
  padding: 0.5rem 2rem;
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background var(--transition-fast);
  min-height: 48px;
  display: flex;
  align-items: center;
}

.overlay-nav a:hover, .overlay-nav a:focus-visible {
  color: var(--c-gold);
  background: rgba(86,34,139,0.2);
}

.overlay-search {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.search-input {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-pill);
  outline: none;
  width: 220px;
  transition: border-color var(--transition-fast);
}

.search-input::placeholder {
  color: var(--c-text-dim);
}

.search-input:focus {
  border-color: var(--c-primary-light);
}

.search-btn {
  background: var(--c-primary);
  color: #fff;
  border: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  min-height: 44px;
  transition: background var(--transition-fast);
}

.search-btn:hover {
  background: var(--c-primary-light);
}

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 800;
  height: var(--header-h);
  background: linear-gradient(90deg, rgba(18,9,28,0.95) 0%, rgba(26,13,42,0.95) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
}

.header-inner {
  max-width: 1360px;
  margin: 0 auto;
  height: 100%;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  gap: 1rem;
}

.header-nav p {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  align-items: center;
}

.header-nav--left p { justify-content: flex-end; }
.header-nav--right p { justify-content: flex-start; }

.header-nav a {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--c-text-muted);
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.header-nav a:hover, .header-nav a:focus-visible {
  color: var(--c-gold);
  background: rgba(86,34,139,0.18);
}

.header-brand {
  text-align: center;
}

.header-brand a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.site-brand-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
}

.hamburger-btn {
  background: none;
  border: 1px solid var(--c-border);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.hamburger-btn:hover {
  border-color: var(--c-primary-light);
  background: rgba(86,34,139,0.18);
}

.ham-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--c-text-muted);
  border-radius: 2px;
  transition: background var(--transition-fast);
}

.hamburger-btn:hover .ham-line {
  background: var(--c-gold);
}

/* ===== Hero ===== */
.hero-section {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  z-index: 1;
  background: linear-gradient(135deg, var(--c-bg) 0%, var(--c-bg2) 60%, var(--c-bg3) 100%);
}

.hero-inner {
  max-width: 1360px;
  margin: 0 auto;
  min-height: 70vh;
  padding: 3rem 2rem 5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  position: relative;
  z-index: 2;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1.4rem;
  text-align: left;
}

.hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 20px rgba(86,34,139,0.5);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--c-text-muted);
  line-height: 1.8;
  max-width: 480px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.85rem 2.2rem;
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-light) 100%);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  border-radius: var(--radius-lg);
  min-height: 48px;
  box-shadow: var(--shadow-soft);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast), background var(--transition-fast);
}

.hero-cta:hover, .hero-cta:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, var(--c-primary-light) 0%, var(--c-primary) 100%);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero-media .hero-img {
  width: 100%;
  max-height: 60vh;
  object-fit: cover;
  border-radius: var(--radius-xl) var(--radius-lg) var(--radius-xl) var(--radius-lg);
  box-shadow: var(--shadow-med), 0 0 60px rgba(139,69,19,0.2);
}

.hero-media--empty {
  min-height: 300px;
  background: linear-gradient(135deg, var(--c-surface) 0%, var(--c-surface2) 100%);
  border-radius: var(--radius-xl) var(--radius-lg) var(--radius-xl) var(--radius-lg);
  width: 100%;
}

/* 斜切色带 */
.hero-slash {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 100px;
  z-index: 1;
  background: var(--c-bg);
  clip-path: polygon(0 60%, 100% 0%, 100% 100%, 0% 100%);
}

/* ===== 正文主容器 ===== */
.site-main {
  position: relative;
  z-index: 1;
  max-width: 1360px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

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

/* 内容主体 */
.content-body {
  min-width: 0;
}

/* ===== page.content 内部的 article 样式 ===== */
.content-body article {
  background: linear-gradient(135deg, var(--c-surface) 0%, var(--c-bg3) 100%);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  margin-bottom: 2.5rem;
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-soft);
  scroll-margin-top: var(--scroll-top);
  position: relative;
  overflow: hidden;
}

.content-body article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-primary) 0%, var(--c-secondary) 100%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.content-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--c-text);
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.content-body h3 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 500;
  color: var(--c-gold);
  letter-spacing: 0.05em;
  margin: 1.5rem 0 0.6rem;
}

.content-body hr {
  border: none;
  border-top: 1px solid var(--c-border-light);
  margin: 1.2rem 0 1.4rem;
}

.content-body p {
  color: var(--c-text-muted);
  line-height: 1.85;
  margin-bottom: 1rem;
  font-size: 1rem;
}

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

.content-body ul, .content-body ol {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}

.content-body li {
  color: var(--c-text-muted);
  line-height: 1.8;
  margin-bottom: 0.4rem;
}

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

.content-body a:hover {
  color: var(--c-gold);
}

.content-body strong, .content-body b {
  color: var(--c-text);
  font-weight: 600;
}

.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.content-body th {
  background: var(--c-primary);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  text-align: left;
  letter-spacing: 0.06em;
}

.content-body td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text-muted);
  font-size: 0.95rem;
}

.content-body tr:last-child td {
  border-bottom: none;
}

.content-body tr:nth-child(even) td {
  background: rgba(86,34,139,0.06);
}

/* ===== 侧边栏 aside ===== */
.content-aside {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  background: linear-gradient(160deg, var(--c-surface) 0%, var(--c-bg3) 100%);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.4rem;
  box-shadow: var(--shadow-soft);
}

.aside-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--c-gold);
  letter-spacing: 0.1em;
  margin-bottom: 0.7rem;
}

.aside-links {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.aside-link {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.4rem 0.75rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--c-text-muted);
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.aside-link:hover, .aside-link:focus-visible {
  color: var(--c-text);
  background: rgba(86,34,139,0.22);
}

/* aside 内 hr */
.content-aside hr {
  border: none;
  border-top: 1px solid var(--c-border-light);
  margin: 0.8rem 0 1rem;
}

/* ===== 页脚 ===== */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--c-border);
  background: linear-gradient(90deg, rgba(18,9,28,0.98) 0%, rgba(26,13,42,0.98) 100%);
}

.site-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  max-width: 1360px;
  margin: 0 auto;
  padding: 1.4rem 2rem;
  gap: 1.5rem;
}

/* 注意：footer 直接子 article ≥2，flex 布局 */
.footer-copy,
.footer-links {
  flex: 0 1 auto;
}

.footer-copy p,
.footer-links p {
  font-size: 0.82rem;
  color: var(--c-text-dim);
  line-height: 1.5;
}

/* 覆盖上方 footer 的 max-width 设定，footer 本身是 article 父级 */
.site-footer.site-footer {
  display: flex;
}

/* ===== 动效：交错列表淡入 ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.content-body article {
  animation: fadeUp 0.5s ease both;
}

.content-body article:nth-child(1) { animation-delay: 0.05s; }
.content-body article:nth-child(2) { animation-delay: 0.12s; }
.content-body article:nth-child(3) { animation-delay: 0.19s; }
.content-body article:nth-child(4) { animation-delay: 0.26s; }
.content-body article:nth-child(5) { animation-delay: 0.33s; }
.content-body article:nth-child(6) { animation-delay: 0.4s; }
.content-body article:nth-child(7) { animation-delay: 0.47s; }

@media (prefers-reduced-motion: reduce) {
  .content-body article {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .content-section {
    grid-template-columns: 1fr 240px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 64px;
    --scroll-top: 72px;
  }

  .header-inner {
    grid-template-columns: 1fr auto auto;
    padding: 0 1rem;
  }

  .header-nav {
    display: none;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 2.5rem 1.25rem 4rem;
    text-align: center;
  }

  .hero-text {
    align-items: center;
    text-align: center;
  }

  .hero-desc { max-width: 100%; }

  .hero-media {
    order: -1;
  }

  .hero-media .hero-img {
    max-height: 45vw;
  }

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

  .content-aside {
    position: static;
    order: -1;
  }

  .site-main {
    padding: 2rem 1rem 3rem;
  }

  .content-body article {
    padding: 1.8rem 1.2rem;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1.2rem 1.25rem;
  }
}

@media (max-width: 480px) {
  .hero-h1 {
    font-size: 1.6rem;
  }

  .overlay-nav a {
    font-size: 1.2rem;
  }
}

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