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

/* ===== CSS 自定义属性 ===== */
:root {
  --clr-primary: #eb879c;
  --clr-primary-light: #ffb6c1;
  --clr-dark: #26171a;
  --clr-dark-2: #3a2228;
  --clr-dark-3: #4e2e36;
  --clr-surface: #f9eef0;
  --clr-surface-2: #fdf5f7;
  --clr-text: #26171a;
  --clr-text-muted: #7a4f58;
  --clr-text-light: #f9eef0;
  --clr-border: #f0d0d8;
  --clr-white: #ffffff;

  --shadow-soft: 0 2px 8px rgba(38,23,26,0.10), 0 1px 3px rgba(235,135,156,0.08);
  --shadow-md: 0 4px 16px rgba(38,23,26,0.14), 0 2px 6px rgba(235,135,156,0.10);
  --shadow-lg: 0 8px 32px rgba(38,23,26,0.18), 0 4px 12px rgba(235,135,156,0.12);

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

  --font-head: 'Barlow Condensed', 'Impact', system-ui, sans-serif;
  --font-body: 'Barlow', system-ui, -apple-system, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;

  --transition: 200ms ease;
  --transition-slow: 300ms ease;

  --nav-h: 64px;
}

/* ===== 重置 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 18px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--clr-text);
  background: var(--clr-surface);
  padding-bottom: var(--nav-h);
}
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius-sm); }
a { color: var(--clr-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--clr-dark-3); }
a:focus-visible {
  outline: 3px solid var(--clr-primary);
  outline-offset: 2px;
  border-radius: 2px;
}
ul { list-style: none; }
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-head);
  line-height: 1.2;
  color: var(--clr-dark);
}
h1 { font-size: 2.4rem; font-weight: 700; }
h2 { font-size: 1.8rem; font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin-bottom: 1rem; }

/* ===== 站点包裹 ===== */
.site-wrap { min-height: 100vh; display: flex; flex-direction: column; }

/* ===== 通用容器 ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

/* ===== 底部固定导航条 ===== */
body::after {
  content: '';
  display: block;
  height: var(--nav-h);
}

/* 导航在 footer 内 —— 底部固定 */
.site-footer .footer-bottom {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--clr-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-md);
  z-index: 100;
  box-shadow: 0 -2px 12px rgba(38,23,26,0.25);
}

.site-footer .footer-bottom > span {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  font-family: var(--font-body);
  white-space: nowrap;
}

.site-footer .footer-bottom nav[aria-label="页脚导航"] {
  flex: 1;
  display: flex;
  justify-content: center;
}

.site-footer .footer-bottom nav dl {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
  justify-content: center;
}

.site-footer .footer-bottom nav dl dt,
.site-footer .footer-bottom nav dl dd {
  display: inline-flex;
}

.site-footer .footer-bottom nav dl a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 0.75rem;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-primary-light);
  background: rgba(235,135,156,0.12);
  border-radius: var(--radius-pill);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.site-footer .footer-bottom nav dl a:hover,
.site-footer .footer-bottom nav dl a:focus-visible {
  background: var(--clr-primary);
  color: var(--clr-white);
}

/* ===== 眉标 ===== */
.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-primary);
  background: rgba(235,135,156,0.15);
  padding: 0.2rem 0.8rem;
  border-radius: var(--radius-pill);
  margin-bottom: 0.75rem;
}

/* ===== Hero 首页 ===== */
.hero-header {
  position: relative;
  min-height: 100vh;
  background: var(--clr-dark);
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.hero-inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-sm);
  gap: var(--space-lg);
  position: relative;
  z-index: 2;
}

.hero-media {
  flex: 0 0 45%;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-card);
}

.hero-copy {
  flex: 1;
  text-align: left;
}

.hero-copy h1 {
  color: var(--clr-white);
  font-size: clamp(2rem, 5vw, 3.6rem);
  margin-bottom: var(--space-sm);
}

.hero-lead {
  color: rgba(255,255,255,0.75);
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

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

/* ===== 按钮 ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.6rem 1.6rem;
  background: var(--clr-primary);
  color: var(--clr-white);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn-primary:hover {
  background: #d96f87;
  color: var(--clr-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.6rem 1.6rem;
  background: transparent;
  color: var(--clr-primary-light);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid var(--clr-primary);
  border-radius: var(--radius-pill);
  transition: background var(--transition), color var(--transition);
}
.btn-ghost:hover {
  background: var(--clr-primary);
  color: var(--clr-white);
}

/* ===== 面包屑 ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: var(--space-sm) var(--space-sm);
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--clr-primary);
}
.breadcrumb span[aria-hidden] {
  color: var(--clr-border);
}

/* ===== 内容区（sidebar + main） ===== */
.page-content-section {
  display: flex;
  gap: var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-sm);
  align-items: flex-start;
}

/* 侧边栏在左侧 */
.sidebar-left {
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  position: sticky;
  top: var(--space-sm);
}

.sidebar-block {
  background: var(--clr-white);
  border-radius: var(--radius-card);
  padding: var(--space-sm);
  box-shadow: var(--shadow-soft);
}

.sidebar-block h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--clr-dark);
}

.sidebar-block p.subtitle {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  margin-bottom: 0.75rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.3rem 0.6rem;
  font-size: 0.875rem;
  color: var(--clr-text);
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}

.sidebar-nav li a:hover {
  background: var(--clr-primary-light);
  color: var(--clr-dark);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.2rem 0.8rem;
  background: rgba(235,135,156,0.15);
  color: var(--clr-dark-3);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: background var(--transition), color var(--transition);
}
.tag-pill:hover {
  background: var(--clr-primary);
  color: var(--clr-white);
}

/* ===== 主内容区 ===== */
.main-content {
  flex: 1;
  min-width: 0;
}

/* ===== 正文排版 ===== */
.prose {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--clr-text);
}
.prose h2 { margin: 1.5rem 0 0.75rem; font-size: 1.5rem; }
.prose h3 { margin: 1.25rem 0 0.6rem; font-size: 1.2rem; }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { margin: 0.75rem 0 1rem 1.5rem; }
.prose li { margin-bottom: 0.4rem; }
.prose a { color: var(--clr-primary); text-decoration: underline; }
.prose img { border-radius: var(--radius-card); margin: 1.5rem 0; }
.prose blockquote {
  border-left: 4px solid var(--clr-primary);
  padding: 0.5rem 1rem;
  background: rgba(235,135,156,0.08);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1rem 0;
  color: var(--clr-text-muted);
}
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.prose th, .prose td { padding: 0.5rem 0.75rem; border: 1px solid var(--clr-border); }
.prose th { background: var(--clr-primary-light); font-weight: 600; }

/* ===== 日期 ===== */
.date-published, .date-modified {
  font-size: 0.85rem;
  color: var(--clr-text-muted);
  display: inline-block;
  margin-right: 1rem;
}
.article-dates { margin-bottom: 1rem; }

/* ===== Channel Hero ===== */
.channel-hero, .tag-hero, .about-hero, .privacy-hero, .default-hero {
  position: relative;
  background: var(--clr-dark);
  overflow: hidden;
  padding: var(--space-xl) var(--space-sm) calc(var(--space-xl) + 40px);
}

.channel-hero-inner, .tag-hero-inner, .about-hero-inner, .privacy-hero-inner, .default-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.channel-hero-inner h1,
.tag-hero-inner h1,
.about-hero-inner h1,
.privacy-hero-inner h1,
.default-hero-inner h1 {
  color: var(--clr-white);
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 0.5rem;
}

.channel-slash, .about-slash {
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 60px;
  background: var(--clr-surface);
  clip-path: polygon(0 50%, 100% 0, 100% 100%, 0 100%);
  z-index: 1;
}

/* ===== Article Hero ===== */
.article-hero-section {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
  background: var(--clr-dark);
  padding: var(--space-lg) var(--space-sm);
  max-width: 100%;
  position: relative;
}

.article-hero-media {
  flex: 0 0 42%;
  border-radius: var(--radius-card);
  overflow: hidden;
}

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

.article-hero-copy {
  flex: 1;
  padding: var(--space-sm) 0;
}

.article-hero-copy h1 {
  color: var(--clr-white);
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  margin-bottom: 0.75rem;
}

/* ===== Section 区块通用 ===== */
.channels-section,
.recent-section,
.children-section,
.tag-articles-section,
.related-section,
.about-links-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-sm);
}

.channels-section h2,
.recent-section h2,
.children-section h2,
.tag-articles-section h2,
.related-section h2,
.about-links-section h2 {
  margin-bottom: 0.25rem;
}

.channels-section p.subtitle,
.recent-section p.subtitle,
.children-section p.subtitle,
.tag-articles-section p.subtitle,
.related-section p.subtitle,
.about-links-section p.subtitle {
  color: var(--clr-text-muted);
  margin-bottom: var(--space-md);
  font-size: 0.95rem;
}

/* ===== 卡片网格 ===== */
.channel-grid,
.card-grid,
.about-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.channel-card,
.content-card,
.related-card,
.nav-card {
  background: var(--clr-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
  display: flex;
  flex-direction: column;
}

.channel-card:hover,
.content-card:hover,
.related-card:hover,
.nav-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-media {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform var(--transition-slow);
}

.channel-card:hover .card-media img,
.content-card:hover .card-media img {
  transform: scale(1.04);
}

.card-body {
  padding: var(--space-sm);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
}

.card-body h3 {
  font-size: 1.1rem;
  line-height: 1.3;
}

.card-body h3 a {
  color: var(--clr-dark);
}
.card-body h3 a:hover { color: var(--clr-primary); }

.card-body p {
  font-size: 0.9rem;
  color: var(--clr-text-muted);
  flex: 1;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.3rem 1rem;
  background: var(--clr-primary);
  color: var(--clr-white);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  align-self: flex-start;
  transition: background var(--transition);
  margin-top: 0.5rem;
}
.card-cta:hover { background: #d96f87; color: var(--clr-white); }

/* ===== 文章列表 ===== */
.article-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.article-row {
  background: var(--clr-white);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.article-row:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.article-meta {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
}

.article-row h3 { font-size: 1.1rem; }
.article-row h3 a { color: var(--clr-dark); }
.article-row h3 a:hover { color: var(--clr-primary); }
.article-row p { font-size: 0.9rem; color: var(--clr-text-muted); margin-bottom: 0; }

/* ===== 页脚上半部分 ===== */
.site-footer {
  background: var(--clr-dark-2);
  color: var(--clr-text-light);
  margin-top: auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-sm) var(--space-lg);
}

.footer-brand strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--clr-primary);
  margin-bottom: 0.5rem;
}

.footer-brand p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
}

.footer-subscribe h3,
.footer-links-col h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-primary-light);
  margin-bottom: 0.75rem;
}

.subscribe-form {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.subscribe-form input[type="email"] {
  flex: 1;
  min-width: 160px;
  padding: 0.5rem 0.9rem;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(235,135,156,0.3);
  border-radius: var(--radius-pill);
  color: var(--clr-white);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
}

.subscribe-form input[type="email"]:focus {
  border-color: var(--clr-primary);
}

.subscribe-form input[type="email"]::placeholder { color: rgba(255,255,255,0.4); }

.subscribe-form button {
  padding: 0.5rem 1.2rem;
  min-height: 40px;
  background: var(--clr-primary);
  color: var(--clr-white);
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
}
.subscribe-form button:hover { background: #d96f87; }

.footer-subscribe address {
  font-style: normal;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
}
.footer-subscribe address a { color: var(--clr-primary-light); }

.footer-links-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-links-col ul li a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  transition: color var(--transition);
}
.footer-links-col ul li a:hover { color: var(--clr-primary); }

/* ===== About 联系 ===== */
.about-contact {
  font-style: normal;
  font-size: 0.9rem;
}
.about-contact a { color: var(--clr-primary); }

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

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

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .hero-inner {
    flex-direction: column;
    padding-top: calc(var(--space-xl) * 1.5);
  }
  .hero-media {
    flex: 0 0 auto;
    width: 100%;
  }
  .article-hero-section {
    flex-direction: column;
  }
  .article-hero-media {
    flex: 0 0 auto;
    width: 100%;
  }
  .page-content-section {
    flex-direction: column;
  }
  .sidebar-left {
    position: static;
    flex: 0 0 auto;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .sidebar-block {
    flex: 1 1 200px;
  }
}

@media (max-width: 600px) {
  html { font-size: 17px; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }

  .hero-inner { gap: var(--space-sm); }
  .hero-copy h1 { font-size: 1.9rem; }

  .footer-top {
    grid-template-columns: 1fr;
    padding: var(--space-lg) var(--space-sm);
  }

  .channel-grid,
  .card-grid,
  .about-nav-grid {
    grid-template-columns: 1fr;
  }

  .site-footer .footer-bottom {
    padding: 0 0.5rem;
  }

  .site-footer .footer-bottom nav dl {
    gap: 0.2rem;
  }

  .site-footer .footer-bottom nav dl a {
    font-size: 0.72rem;
    padding: 0 0.5rem;
  }

  .article-hero-section {
    padding: var(--space-sm);
  }

  .channels-section,
  .recent-section,
  .children-section,
  .tag-articles-section,
  .related-section,
  .about-links-section {
    padding: var(--space-md) var(--space-sm);
  }

  .page-content-section {
    padding: var(--space-md) var(--space-sm);
  }
}

/* 超窄屏防横滚 */
@media (max-width: 375px) {
  .subscribe-form { flex-direction: column; }
  .hero-actions { flex-direction: column; }
  .btn-primary, .btn-ghost { width: 100%; justify-content: center; }
}
