@import url('https://fonts.googleapis.com/css2?family=Kalam:wght@400;700&family=Patrick+Hand&display=swap');

/* ===== CSS 自定义属性 ===== */
:root {
  --c-white: #ffffff;
  --c-light: #f5f5f5;
  --c-dark: #1f1f1f;
  --c-mid: #3a3a3a;
  --c-muted: #6b6b6b;
  --c-border: #e0e0e0;
  --c-accent: #c0392b;
  --c-accent2: #e74c3c;
  --c-layer1: rgba(255,255,255,0.95);
  --c-layer2: rgba(245,245,245,0.90);
  --shadow-sm: 0 2px 8px rgba(31,31,31,0.08);
  --shadow-md: 0 6px 20px rgba(31,31,31,0.12);
  --shadow-lg: 0 14px 40px rgba(31,31,31,0.16);
  --shadow-xl: 0 28px 72px rgba(31,31,31,0.22);
  --radius-card: 28px;
  --radius-sm: 12px;
  --font-hand: 'Kalam', 'Patrick Hand', cursive;
  --font-body: 'Patrick Hand', system-ui, -apple-system, "Segoe UI", sans-serif;
  --nav-h: 48px;
  --brand-h: 60px;
  --trans: 0.28s cubic-bezier(0.34,1.56,0.64,1);
  --trans-fast: 0.18s ease;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--c-dark);
  background: var(--c-white);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

/* ===== 布局骨架 ===== */
.site-wrap { min-height: 100vh; display: flex; flex-direction: column; }

.content-wrap {
  display: flex;
  gap: 2rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  width: 100%;
  flex: 1;
  align-items: flex-start;
}

.main-col {
  flex: 1 1 0;
  min-width: 0;
}

.full-col { flex: 1 1 100%; }

.side-col {
  width: 280px;
  flex-shrink: 0;
  position: sticky;
  top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  z-index: 2;
}

.main-wrap {
  position: relative;
  z-index: 1;
}

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-dark);
  color: var(--c-white);
  box-shadow: var(--shadow-lg);
}

.header-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: var(--brand-h);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.brand-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

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

.brand-name {
  font-family: var(--font-hand);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--c-white);
  letter-spacing: 0.02em;
  line-height: 1;
}

.brand-name:hover { color: #f0a0a0; }

.brand-tagline {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  display: none;
}

@media (min-width: 768px) { .brand-tagline { display: inline; } }

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

.header-search input {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-sm);
  color: var(--c-white);
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
  width: 220px;
  transition: background var(--trans-fast), border-color var(--trans-fast);
}

.header-search input::placeholder { color: rgba(255,255,255,0.4); }
.header-search input:focus {
  outline: none;
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.36);
}

.header-search button {
  background: var(--c-accent);
  color: var(--c-white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.45rem 1rem;
  cursor: pointer;
  font-size: 0.88rem;
  min-height: 40px;
  min-width: 44px;
  transition: background var(--trans-fast), transform var(--trans-fast);
}

.header-search button:hover { background: var(--c-accent2); transform: scale(1.04); }

.header-nav-row {
  padding: 0 1.5rem;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}
.header-nav-row::-webkit-scrollbar { display: none; }

.header-nav-row nav > p {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
}

.header-nav-row nav > p > a {
  display: inline-flex;
  align-items: center;
  height: var(--nav-h);
  padding: 0 1rem;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.78);
  border-bottom: 2px solid transparent;
  transition: color var(--trans-fast), border-color var(--trans-fast), background var(--trans-fast);
  min-height: 44px;
}

.header-nav-row nav > p > a:hover,
.header-nav-row nav > p > a[aria-current] {
  color: var(--c-white);
  border-bottom-color: var(--c-accent);
  background: rgba(255,255,255,0.05);
}

/* ===== Hero ===== */
.hero-section,
.channel-hero,
.about-banner,
.privacy-banner {
  position: relative;
  min-height: 45vh;
  background: var(--c-dark);
  overflow: hidden;
  display: flex;
  align-items: center;
  z-index: 1;
}

.hero-bg-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-family: var(--font-hand);
  font-size: clamp(6rem, 18vw, 14rem);
  font-weight: 700;
  color: rgba(255,255,255,0.04);
  letter-spacing: -0.04em;
  pointer-events: none;
  padding-right: 2rem;
  user-select: none;
  z-index: 0;
}

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

.hero-media img,
.hero-img,
.channel-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 3rem 2rem 5rem;
  max-width: 700px;
  margin-left: clamp(1rem, 5vw, 5rem);
}

.hero-h1 {
  font-family: var(--font-hand);
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--c-white);
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  max-width: 520px;
  line-height: 1.6;
}

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

.page-channel .hero-clip,
.page-about .hero-clip,
.page-privacy .hero-clip {
  background: var(--c-white);
}

/* ===== 面包屑 ===== */
.breadcrumb {
  background: var(--c-light);
  border-bottom: 1px solid var(--c-border);
}

.breadcrumb p {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  font-size: 0.85rem;
  color: var(--c-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.breadcrumb a { color: var(--c-accent); }
.breadcrumb a:hover { text-decoration: underline; }

/* ===== 区块 ===== */
.section-block {
  margin-top: 3rem;
}

.section-heading {
  font-family: var(--font-hand);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-heading > span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.section-heading > span::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--c-accent);
  border-radius: 2px;
  margin-left: 0.5rem;
}

.deco-dot {
  color: var(--c-accent);
  font-size: 1.2em;
  line-height: 1;
}

/* ===== 卡片网格（子页导航）===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.child-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--c-white);
  border-radius: var(--radius-card);
  padding: 1.5rem 1.5rem 1.75rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(31,31,31,0.06);
  transition: transform var(--trans), box-shadow var(--trans);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.child-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(192,57,43,0.06) 0%, transparent 60%);
  border-radius: var(--radius-card);
  opacity: 0;
  transition: opacity var(--trans-fast);
}

.child-card:hover {
  transform: translateY(-6px) translateZ(0);
  box-shadow: var(--shadow-xl);
}

.child-card:hover::before { opacity: 1; }

.card-num {
  font-family: var(--font-hand);
  font-size: 2.5rem;
  font-weight: 700;
  color: rgba(192,57,43,0.18);
  line-height: 1;
  display: block;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-dark);
  display: block;
  line-height: 1.4;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--c-muted);
  display: block;
  line-height: 1.5;
}

/* ===== 文章列表 ===== */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.article-item {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0.2rem 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--c-white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--trans), box-shadow var(--trans), border-color var(--trans-fast);
}

.article-item:hover {
  transform: translateX(6px) translateZ(0);
  box-shadow: var(--shadow-md);
  border-color: rgba(192,57,43,0.3);
}

.article-date {
  grid-column: 1;
  grid-row: 1 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  font-size: 0.75rem;
  color: var(--c-muted);
  writing-mode: vertical-rl;
  white-space: nowrap;
  min-height: 50px;
}

.article-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-dark);
  grid-column: 2;
  grid-row: 1;
}

.article-desc {
  font-size: 0.84rem;
  color: var(--c-muted);
  grid-column: 2;
  grid-row: 2;
  line-height: 1.45;
}

/* ===== 子页块（channel）===== */
.child-blocks {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.child-block {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  background: var(--c-white);
  border-radius: var(--radius-card);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--trans), box-shadow var(--trans);
}

.child-block:hover {
  transform: translateY(-4px) translateZ(0);
  box-shadow: var(--shadow-lg);
}

.cb-num {
  font-family: var(--font-hand);
  font-size: 2rem;
  font-weight: 700;
  color: rgba(192,57,43,0.22);
  flex-shrink: 0;
  line-height: 1;
  min-width: 40px;
}

.cb-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.cb-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-dark);
  display: block;
}

.cb-desc {
  font-size: 0.85rem;
  color: var(--c-muted);
  display: block;
  line-height: 1.45;
}

.cb-date {
  font-size: 0.78rem;
  color: var(--c-muted);
  margin-top: 0.2rem;
}

/* ===== 正文内容 ===== */
.page-content {
  max-width: 72ch;
  color: var(--c-dark);
}

.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--c-light);
}

.article-h1 {
  font-family: var(--font-hand);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--c-dark);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.84rem;
  color: var(--c-muted);
  align-items: center;
}

.meta-label {
  background: var(--c-light);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.78rem;
}

.article-hero-wrap {
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2rem;
}

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

/* 正文排版 */
.page-content h2 {
  font-family: var(--font-hand);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--c-dark);
  margin: 2.2rem 0 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-content h2 > span {
  position: relative;
}

.page-content h2 > span > span {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--c-accent);
  border-radius: 50%;
  margin-right: 0.4rem;
  vertical-align: middle;
}

.page-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-mid);
  margin: 1.6rem 0 0.6rem;
}

.page-content p {
  margin-bottom: 1.1rem;
  line-height: 1.8;
}

.page-content ul, .page-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.1rem;
}

.page-content li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

.page-content a {
  color: var(--c-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.page-content a:hover { color: var(--c-accent2); }

.page-content blockquote {
  border-left: 4px solid var(--c-accent);
  padding: 0.75rem 1.25rem;
  background: var(--c-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--c-mid);
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

.page-content th {
  background: var(--c-dark);
  color: var(--c-white);
  padding: 0.7rem 1rem;
  text-align: left;
}

.page-content td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--c-border);
}

.page-content tr:nth-child(even) td { background: var(--c-light); }

.page-content code {
  background: var(--c-light);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.88em;
  font-family: monospace;
}

.page-content pre {
  background: var(--c-dark);
  color: #e0e0e0;
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 1.5rem 0;
}

.page-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.page-content img {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  margin: 1.5rem auto;
}

.about-date, time {
  font-size: 0.84rem;
  color: var(--c-muted);
}

/* ===== 侧边栏 ===== */
.aside-card {
  background: var(--c-white);
  border-radius: var(--radius-card);
  padding: 1.4rem 1.25rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(31,31,31,0.06);
  position: relative;
  z-index: 2;
}

.aside-heading {
  font-family: var(--font-hand);
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--c-accent);
  display: inline-block;
}

.aside-text {
  font-size: 0.88rem;
  color: var(--c-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.aside-link {
  display: inline-block;
  background: var(--c-accent);
  color: var(--c-white);
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  transition: background var(--trans-fast), transform var(--trans-fast);
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.aside-link:hover { background: var(--c-accent2); transform: scale(1.04); }

.quick-link {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--c-dark);
  min-height: 40px;
  transition: background var(--trans-fast), color var(--trans-fast), padding-left var(--trans-fast);
  gap: 0.4rem;
}

.quick-link::before {
  content: '›';
  color: var(--c-accent);
  font-size: 1.1em;
  line-height: 1;
}

.quick-link:hover {
  background: var(--c-light);
  color: var(--c-accent);
  padding-left: 0.9rem;
}

.quick-link.active, .quick-link.current {
  background: rgba(192,57,43,0.08);
  color: var(--c-accent);
  font-weight: 700;
}

/* 相关阅读 */
.related-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.related-link {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--c-border);
  transition: border-color var(--trans-fast), background var(--trans-fast);
}

.related-link:hover {
  border-color: rgba(192,57,43,0.4);
  background: var(--c-light);
}

.related-link strong { font-size: 0.88rem; color: var(--c-dark); }
.related-link span { font-size: 0.78rem; color: var(--c-muted); line-height: 1.4; }

/* ===== 关于/隐私 Banner ===== */
.about-banner,
.privacy-banner {
  min-height: 32vh;
}

/* ===== 页脚 ===== */
.site-footer {
  background: var(--c-dark);
  color: rgba(255,255,255,0.7);
  margin-top: auto;
}

.footer-brand-section {
  padding: 2.5rem 1.5rem 0;
  text-align: center;
}

.footer-brand-big {
  font-family: var(--font-hand);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 700;
  color: rgba(255,255,255,0.08);
  letter-spacing: 0.02em;
  line-height: 1;
  user-select: none;
}

.footer-nav-section {
  padding: 1.25rem 1.5rem 0;
  text-align: center;
}

.footer-nav-section p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.2rem;
  font-size: 0.85rem;
}

.footer-nav-section a {
  color: rgba(255,255,255,0.55);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: color var(--trans-fast), background var(--trans-fast);
}

.footer-nav-section a:hover {
  color: var(--c-white);
  background: rgba(255,255,255,0.07);
}

.footer-copy-section {
  padding: 1rem 1.5rem 1.75rem;
  text-align: center;
}

.footer-copy-section p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
}

.footer-copy-section a {
  color: rgba(255,255,255,0.55);
  text-decoration: underline;
  margin: 0 0.3rem;
}

.footer-copy-section a:hover { color: var(--c-white); }

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

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .child-card, .child-block, .article-item {
    transition: none;
  }
}

/* ===== Z-index 层叠体系 ===== */
/* Level 1: 普通内容 */
.page-content, .article-list, .child-blocks { z-index: 1; position: relative; }
/* Level 2: 卡片 */
.child-card, .child-block, .aside-card { z-index: 2; }
/* Level 3: 侧边栏整体 */
.side-col { z-index: 3; }
/* Level 4: 导航 */
.site-header { z-index: 100; }

/* Backdrop blur for aside */
@supports (backdrop-filter: blur(8px)) {
  .aside-card {
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,0.92);
  }
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .content-wrap {
    flex-direction: column;
  }
  .side-col {
    width: 100%;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .aside-card {
    flex: 1 1 260px;
  }
}

@media (max-width: 640px) {
  .header-brand-row {
    flex-wrap: wrap;
    height: auto;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }
  .header-search input {
    width: 140px;
  }
  .hero-content {
    padding: 2rem 1rem 4rem;
    margin-left: 0;
  }
  .cards-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
  }
  .content-wrap {
    padding: 1.5rem 1rem 2rem;
  }
  .child-card {
    padding: 1.1rem 1rem;
  }
  .brand-name {
    font-size: 1.4rem;
  }
  .article-item {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .article-date {
    writing-mode: horizontal-tb;
    min-height: auto;
    grid-column: 1;
    grid-row: auto;
  }
  .article-title { grid-column: 1; grid-row: auto; }
  .article-desc { grid-column: 1; grid-row: auto; }
  .side-col {
    flex-direction: column;
  }
}

@media (max-width: 375px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .header-search input {
    width: 110px;
    font-size: 0.82rem;
  }
  .header-nav-row nav > p > a {
    padding: 0 0.65rem;
    font-size: 0.82rem;
  }
}
