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

/* ============================================================
   CSS 变量
============================================================ */
:root {
  --c-primary: #56228b;
  --c-primary-light: #7a3db8;
  --c-primary-dark: #3a1660;
  --c-accent: #8b4513;
  --c-accent-light: #b05a1a;
  --c-ink: #1f1726;
  --c-ink-soft: #2e2038;
  --c-surface: #16101f;
  --c-surface-2: #1e1530;
  --c-surface-3: #261d38;
  --c-border: rgba(86,34,139,0.35);
  --c-text: #e8dff5;
  --c-text-muted: #a098b8;
  --c-text-dim: #6e6488;
  --c-gold: #c8a96e;

  --r-sm: 16px;
  --r-md: 20px;
  --r-lg: 24px;
  --r-pill: 999px;

  --shadow-soft: 0 4px 24px rgba(31,23,38,0.55);
  --shadow-card: 0 2px 12px rgba(31,23,38,0.4);

  --font-head: 'Russo One', 'Chakra Petch', sans-serif;
  --font-body: 'Chakra Petch', system-ui, -apple-system, sans-serif;

  --header-h: 68px;
  --max-content: 1160px;
  --aside-w: 240px;
  --gap: 28px;
}

/* ============================================================
   Reset & Base
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--c-text);
  background-color: var(--c-surface);
  overflow-x: hidden;
}

a { color: var(--c-primary-light); text-decoration: none; transition: color .2s; }
a:hover { color: var(--c-gold); }
a:focus-visible { outline: 2px solid var(--c-primary-light); outline-offset: 3px; border-radius: 4px; }

img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ============================================================
   Page Wrapper
============================================================ */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 80% 0%, rgba(86,34,139,.18) 0%, transparent 60%),
    radial-gradient(ellipse at 0% 100%, rgba(139,69,19,.12) 0%, transparent 55%),
    var(--c-surface);
}

/* ============================================================
   Header
============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(22,16,31,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
}

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

.brand-area {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo { width: 36px; height: 36px; border-radius: 8px; }

.brand-name {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--c-text);
  letter-spacing: .03em;
  line-height: 1.2;
  white-space: nowrap;
}
.brand-name:hover { color: var(--c-gold); }

/* Nav pills */
.main-nav { flex: 1; overflow: hidden; }
.nav-pills {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0;
}
.nav-pills::-webkit-scrollbar { display: none; }
.nav-pills li { flex-shrink: 0; }

.nav-pill {
  display: inline-block;
  padding: 8px 14px;
  min-height: 40px;
  line-height: 1;
  display: flex;
  align-items: center;
  font-size: .8rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--c-text-muted);
  background: rgba(86,34,139,.15);
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  transition: background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.nav-pill:hover, .nav-pill.active {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}

/* Search */
.header-search { flex-shrink: 0; }
.search-form {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: .85rem;
  padding: 8px 14px;
  width: 160px;
  min-height: 40px;
}
.search-input::placeholder { color: var(--c-text-dim); }
.search-btn {
  background: var(--c-primary);
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  min-height: 40px;
  min-width: 40px;
  font-size: 1rem;
  transition: background .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-btn:hover { background: var(--c-primary-light); }

/* ============================================================
   Hero — Home
============================================================ */
.hero-section {
  position: relative;
  min-height: 45vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--c-ink) 0%, var(--c-surface-3) 60%, var(--c-primary-dark) 100%);
}

.hero-skew {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--c-surface);
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  z-index: 2;
}

.hero-blob {
  position: absolute;
  top: 0; right: 0;
  width: 420px;
  height: 320px;
  opacity: .6;
  pointer-events: none;
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 3;
  max-width: var(--max-content);
  width: 100%;
  margin: 0 auto;
  padding: 60px 20px 80px;
  text-align: right;
}

.hero-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-gold);
  background: rgba(200,169,110,.12);
  border: 1px solid rgba(200,169,110,.3);
  border-radius: var(--r-pill);
  padding: 5px 16px;
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.15;
  color: #fff;
  margin-bottom: 18px;
  letter-spacing: .02em;
}

.hero-sub {
  font-size: 1rem;
  color: var(--c-text-muted);
  max-width: 520px;
  margin-left: auto;
  margin-bottom: 28px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ============================================================
   Hero — Category
============================================================ */
.cat-hero {
  position: relative;
  min-height: 200px;
  background: linear-gradient(120deg, var(--c-ink) 0%, var(--c-surface-3) 70%);
  overflow: hidden;
}
.cat-hero-skew {
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 44px;
  background: var(--c-surface);
  clip-path: polygon(0 100%, 100% 20%, 100% 100%);
  z-index: 2;
}
.cat-hero-inner {
  position: relative;
  z-index: 3;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 44px 20px 64px;
}
.cat-title {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.2;
}
.cat-desc {
  color: var(--c-text-muted);
  font-size: .95rem;
  max-width: 560px;
}

/* About hero */
.about-hero {
  position: relative;
  min-height: 180px;
  background: linear-gradient(110deg, var(--c-primary-dark) 0%, var(--c-ink) 100%);
  overflow: hidden;
}
.about-hero-skew {
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 44px;
  background: var(--c-surface);
  clip-path: polygon(0 60%, 100% 0, 100% 100%, 0 100%);
  z-index: 2;
}
.about-hero-inner {
  position: relative; z-index: 3;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 44px 20px 64px;
}
.about-title {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: #fff;
  margin-bottom: 10px;
}
.about-sub { color: var(--c-text-muted); font-size: .95rem; max-width: 500px; }

/* Privacy hero */
.privacy-hero {
  background: var(--c-surface-2);
  border-bottom: 1px solid var(--c-border);
  padding: 40px 20px 32px;
}
.privacy-hero-inner {
  max-width: var(--max-content);
  margin: 0 auto;
}
.privacy-title {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: #fff;
  margin-bottom: 8px;
}
.privacy-date { color: var(--c-text-muted); font-size: .85rem; }

/* ============================================================
   Buttons
============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  min-height: 48px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .9rem;
  color: #fff;
  background: var(--c-primary);
  border-radius: var(--r-pill);
  border: 2px solid var(--c-primary);
  transition: background .2s, transform .15s;
  letter-spacing: .04em;
}
.btn-primary:hover { background: var(--c-primary-light); border-color: var(--c-primary-light); color: #fff; transform: translateY(-2px); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  min-height: 48px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .9rem;
  color: var(--c-text);
  background: transparent;
  border-radius: var(--r-pill);
  border: 2px solid var(--c-border);
  transition: border-color .2s, color .2s, transform .15s;
  letter-spacing: .04em;
}
.btn-outline:hover { border-color: var(--c-gold); color: var(--c-gold); transform: translateY(-2px); }

.card-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 18px;
  min-height: 40px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--c-primary-light);
  border: 1px solid var(--c-primary);
  border-radius: var(--r-pill);
  transition: background .2s, color .2s;
  margin-top: 10px;
}
.card-link:hover { background: var(--c-primary); color: #fff; }

/* ============================================================
   Content Band & Layout
============================================================ */
.content-band {
  flex: 1;
  max-width: var(--max-content);
  width: 100%;
  margin: 32px auto 0;
  padding: 0 20px 60px;
}

.site-main {
  display: flex;
  flex-direction: row-reverse;
  gap: var(--gap);
  align-items: flex-start;
}

/* Aside LEFT via row-reverse trick: aside is DOM-second, visually left */
.site-aside {
  flex-shrink: 0;
  width: var(--aside-w);
  position: sticky;
  top: calc(var(--header-h) + 16px);
  max-height: calc(100vh - var(--header-h) - 32px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--c-border) transparent;
}

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

/* ============================================================
   Aside blocks
============================================================ */
.aside-block {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 18px 16px;
  margin-bottom: 16px;
}
.aside-block h3 {
  font-family: var(--font-head);
  font-size: .82rem;
  letter-spacing: .1em;
  color: var(--c-gold);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-border);
}
.aside-block h3 span { display: inline; }
.aside-links { display: flex; flex-direction: column; gap: 6px; }
.aside-links li a {
  display: block;
  padding: 6px 8px;
  font-size: .82rem;
  color: var(--c-text-muted);
  border-radius: 8px;
  transition: background .15s, color .15s;
  min-height: 32px;
  line-height: 1.4;
}
.aside-links li a:hover { background: rgba(86,34,139,.25); color: var(--c-text); }
.aside-tip { font-size: .8rem; color: var(--c-text-dim); line-height: 1.6; }

/* ============================================================
   Article sections
============================================================ */
.article-header-section { margin-bottom: 24px; }

.breadcrumb {
  font-size: .78rem;
  color: var(--c-text-dim);
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.breadcrumb a { color: var(--c-text-muted); }
.breadcrumb a:hover { color: var(--c-primary-light); }
.breadcrumb span { color: var(--c-text-dim); }

.article-title, .cat-title {
  font-family: var(--font-head);
  color: #fff;
}
.article-title {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  line-height: 1.25;
  margin-bottom: 12px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.article-date {
  font-size: .78rem;
  color: var(--c-text-dim);
  background: var(--c-surface-2);
  padding: 4px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--c-border);
}
.article-hero-img {
  width: 100%;
  border-radius: var(--r-lg);
  margin-bottom: 24px;
}

/* ============================================================
   Prose div
============================================================ */
.prose-section {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 28px 28px 32px;
  margin-bottom: 28px;
}

.prose-section h2,
.page-content-section h2 {
  font-family: var(--font-head);
  font-size: 1.25rem;
  color: var(--c-primary-light);
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--c-border);
}
.prose-section h3,
.page-content-section h3 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  color: var(--c-gold);
  margin: 20px 0 8px;
}
.prose-section p,
.page-content-section p { margin-bottom: 14px; color: var(--c-text); line-height: 1.8; }
.prose-section ul,
.page-content-section ul { margin: 12px 0 16px 20px; list-style: disc; }
.prose-section ol,
.page-content-section ol { margin: 12px 0 16px 20px; list-style: decimal; }
.prose-section li,
.page-content-section li { margin-bottom: 6px; color: var(--c-text); line-height: 1.7; }
.prose-section a { color: var(--c-primary-light); text-decoration: underline; text-underline-offset: 3px; }
.prose-section a:hover { color: var(--c-gold); }

/* ============================================================
   Cards
============================================================ */
/* Category grid on home */
.category-grid-section,
.child-list-section,
.recent-section,
.article-footer-section,
.about-nav-section,
.privacy-links-section {
  margin-bottom: 36px;
}

.category-grid-section h2,
.child-list-section h2,
.recent-section h2,
.article-footer-section h2,
.about-nav-section h2,
.privacy-links-section h2 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--c-text);
  margin-bottom: 18px;
  padding-left: 12px;
  border-left: 3px solid var(--c-primary);
}
.category-grid-section h2 span,
.child-list-section h2 span,
.recent-section h2 span,
.article-footer-section h2 span,
.about-nav-section h2 span,
.privacy-links-section h2 span { display: inline; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.child-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.about-cat-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.privacy-link-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

/* Card base — 描边无阴影，圆角 0 (per spec) */
.child-card,
.recent-card,
.related-card {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: 0;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, background .2s;
}
.child-card:hover,
.recent-card:hover,
.related-card:hover {
  border-color: var(--c-primary);
  background: var(--c-surface-3);
}
.child-card h3,
.recent-card h3,
.related-card h3 {
  font-family: var(--font-head);
  font-size: .9rem;
  color: var(--c-text);
  margin-bottom: 8px;
  line-height: 1.4;
}
.child-card h3 span,
.recent-card h3 span,
.related-card h3 span { display: inline; }
.child-card p,
.recent-card p { font-size: .82rem; color: var(--c-text-muted); line-height: 1.6; flex: 1; }
.recent-card time { font-size: .75rem; color: var(--c-text-dim); margin-bottom: 6px; display: block; }

/* ============================================================
   About brand block
============================================================ */
.about-brand-block {
  text-align: center;
  padding: 24px 20px 28px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--c-ink) 0%, var(--c-primary-dark) 100%);
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border);
}
.about-brand-name {
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--c-gold);
  margin-bottom: 10px;
}
.about-brand-desc { font-size: .9rem; color: var(--c-text-muted); line-height: 1.7; }

/* ============================================================
   Footer
============================================================ */
.site-footer {
  background: var(--c-ink);
  border-top: 1px solid var(--c-border);
  padding: 0 20px;
  display: flex;
  align-items: center;
  min-height: 56px;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

.footer-logo { flex-shrink: 0; }
.footer-brand {
  font-family: var(--font-head);
  font-size: .85rem;
  color: var(--c-text-muted);
}
.footer-brand:hover { color: var(--c-gold); }

.footer-nav { flex: 1; overflow: hidden; }
.footer-dl {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  justify-content: center;
}
.footer-dl dt { display: block; }
.footer-dl dt a {
  font-size: .75rem;
  color: var(--c-text-dim);
  padding: 4px 2px;
  min-height: 32px;
  display: flex;
  align-items: center;
  transition: color .15s;
}
.footer-dl dt a:hover { color: var(--c-primary-light); }

.footer-copy {
  flex-shrink: 0;
  font-size: .72rem;
  color: var(--c-text-dim);
}

/* ============================================================
   Scroll Reveal Animation
============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

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

/* ============================================================
   Responsive
============================================================ */
@media (max-width: 900px) {
  .site-main {
    flex-direction: column;
  }
  .site-aside {
    width: 100%;
    position: static;
    max-height: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }
  .aside-block {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
  }
}

@media (max-width: 680px) {
  :root { --header-h: 60px; }

  .header-inner { gap: 10px; }
  .brand-name { font-size: .85rem; }
  .main-nav { display: none; }
  .search-input { width: 110px; }

  .hero-inner { padding: 40px 16px 60px; text-align: left; }
  .hero-sub { margin-left: 0; }
  .hero-actions { justify-content: flex-start; }
  .hero-blob { width: 220px; height: 180px; opacity: .3; }

  .cat-hero-inner,
  .about-hero-inner { padding: 32px 16px 52px; }

  .content-band { padding: 0 12px 40px; margin-top: 20px; }

  .prose-section { padding: 18px 14px 22px; }

  .category-grid,
  .recent-grid,
  .child-list,
  .about-cat-list,
  .related-list,
  .privacy-link-list { grid-template-columns: 1fr; }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 10px;
    min-height: auto;
  }
  .footer-dl { justify-content: flex-start; }
}

@media (max-width: 400px) {
  .hero-title { font-size: 1.65rem; }
  .btn-primary, .btn-outline { padding: 10px 18px; font-size: .82rem; }
}

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