/* The Companion · 科学伴侣动物与萌宠生活志 CSS */
:root {
  --bg-body: #faf8f5;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-muted: #f1ede6;
  --border-light: #eae5de;
  --border-dark: #293830;
  --text-main: #233129;
  --text-muted: #64736b;
  --accent-sage: #38614d;
  --accent-sage-light: #eef4f0;
  --accent-terracotta: #cf683e;
  --accent-honey: #dfa04b;
  --font-display: "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  --font-serif: "Iowan Old Style", "Apple Garamond", "Songti SC", "Georgia", serif;
  --wrap-width: 1140px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-display);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-terracotta); }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--wrap-width); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}
.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-badge {
  background: var(--accent-sage);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}
.brand-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
}
.brand-sub {
  font-size: 13px;
  color: var(--text-muted);
  border-left: 1px solid var(--border-light);
  padding-left: 12px;
  margin-left: 4px;
}

.site-nav {
  display: flex;
  gap: 24px;
  font-size: 14px;
  font-weight: 600;
}
.site-nav a {
  padding: 6px 12px;
  border-radius: 20px;
  transition: all 0.2s;
}
.site-nav a:hover {
  background: var(--accent-sage-light);
  color: var(--accent-sage);
}
.site-nav a.active {
  background: var(--accent-sage);
  color: #fff;
}

/* Hero Section */
.hero-section {
  padding: 48px 0;
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-body) 100%);
  border-bottom: 1px solid var(--border-light);
}
.hero-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 36px;
  box-shadow: 0 4px 20px rgba(41, 56, 48, 0.04);
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-sage-light);
  color: var(--accent-sage);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.hero-excerpt {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}
.hero-cover {
  aspect-ratio: 16 / 11;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-muted);
}
.hero-cover img { width: 100%; height: 100%; object-fit: cover; }

/* Grid Section */
.section-block { padding: 48px 0; }
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 32px;
}
.section-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(41, 56, 48, 0.08);
}
.card-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-muted);
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.card-category {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-terracotta);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.card-title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 12px;
}
.card-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
  flex-grow: 1;
}
.card-meta {
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
}

/* Article Detail */
.article-header { padding: 48px 0 32px; text-align: center; }
.article-tag {
  display: inline-block;
  background: var(--accent-sage-light);
  color: var(--accent-sage);
  font-weight: 700;
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.article-title {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 800;
  line-height: 1.35;
  max-width: 860px;
  margin: 0 auto 20px;
}
.article-byline {
  font-size: 14px;
  color: var(--text-muted);
}
.article-cover-wrap {
  max-width: 900px;
  margin: 36px auto 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
}
.article-cover-wrap img { width: 100%; height: 100%; object-fit: cover; }

.article-content {
  max-width: 760px;
  margin: 48px auto;
  font-size: 17px;
  line-height: 1.85;
  color: #293830;
}
.article-content p { margin-bottom: 24px; }
.article-content h2 {
  font-family: var(--font-serif);
  font-size: 25px;
  font-weight: 800;
  margin: 40px 0 16px;
  color: var(--accent-sage);
  border-bottom: 2px solid var(--accent-sage-light);
  padding-bottom: 8px;
}
.article-content h3 {
  font-size: 19px;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--accent-terracotta);
}
.article-content ul, .article-content ol {
  margin: 16px 0 24px 28px;
}
.article-content li { margin-bottom: 8px; }
.article-content blockquote {
  background: var(--accent-sage-light);
  border-left: 4px solid var(--accent-sage);
  padding: 16px 20px;
  margin: 28px 0;
  border-radius: 0 8px 8px 0;
  font-family: var(--font-serif);
  font-size: 16px;
}

/* Takeaway Box */
.takeaway-box {
  background: #fdfbf7;
  border: 1px solid #ebd9c8;
  border-radius: 8px;
  padding: 20px 24px;
  margin: 28px 0;
}
.takeaway-title {
  font-weight: 800;
  color: var(--accent-terracotta);
  font-size: 14px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Footer */
.site-footer {
  background: #1e2d26;
  color: #e0e8e4;
  padding: 56px 0 32px;
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-brand {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}
.footer-desc { font-size: 14px; color: #a4b8af; line-height: 1.8; }
.footer-links h4 { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 16px; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; font-size: 14px; }
.footer-links a { color: #c4d4cc; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #2e443a;
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  color: #799488;
}

@media (max-width: 900px) {
  .hero-card { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
