/* === 无忧睡眠 - 自有内容中枢 === */
/* 设计方向：温暖、安静、可信赖 */
/* 字体策略：使用国内系统字体栈，避免 Google Fonts 国内加载失败导致首屏慢/字体降级 */

:root {
  --bg: #faf8f5;
  --bg-warm: #f5f0e8;
  --card: #ffffff;
  --text: #2c2416;
  --text-mid: #5c5344;
  --text-light: #8a8070;
  --accent: #7a9e7e;
  --accent-dark: #5a7a5e;
  --accent-light: #e8f0e9;
  --warm: #c4885a;
  --warm-dark: #a66a3e;
  --warm-light: #fdf5ee;
  --night: #2a3a4a;
  --night-light: #e8edf2;
  --border: #e8e2d8;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow: 0 4px 16px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  --max-w: 780px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent-dark); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }

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

/* === Header === */
.site-header {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 24px;
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
}
.logo {
  font-family: "Noto Serif SC", serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.logo .dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
  margin: 0 2px;
}
.logo span { color: var(--accent-dark); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mid);
  letter-spacing: 0.3px;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent-dark); }
.nav-links .nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}
.nav-links .nav-cta:hover { background: var(--accent-dark); color: #fff; }

/* === Hero === */
.hero {
  padding: 72px 0 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(122,158,126,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  background: var(--warm-light);
  color: var(--warm-dark);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}
.hero h1 {
  font-family: "Noto Serif SC", serif;
  font-size: 38px;
  line-height: 1.45;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  position: relative;
}
.hero h1 .hl {
  display: inline;
  background: linear-gradient(180deg, transparent 55%, rgba(122,158,126,0.2) 55%);
  padding: 0 4px;
}
.hero h1 .hl-warm {
  display: inline;
  background: linear-gradient(180deg, transparent 55%, rgba(196,136,90,0.2) 55%);
  padding: 0 4px;
}
.hero .sub {
  font-size: 17px;
  color: var(--text-mid);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 32px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.25s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(122,158,126,0.3);
}
.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 6px 20px rgba(122,158,126,0.35);
  transform: translateY(-1px);
  color: #fff;
}
.btn-outline {
  background: var(--card);
  color: var(--accent-dark);
  border: 2px solid var(--accent);
}
.btn-outline:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}
.btn-warm {
  background: var(--warm);
  color: #fff;
  box-shadow: 0 4px 14px rgba(196,136,90,0.3);
}
.btn-warm:hover { background: var(--warm-dark); transform: translateY(-1px); color: #fff; }

/* === Trust Section === */
.trust-section {
  padding: 48px 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.trust-section .container { text-align: center; }
.trust-section h2 {
  font-family: "Noto Serif SC", serif;
  font-size: 24px;
  margin-bottom: 8px;
}
.trust-section .sec-desc {
  font-size: 15px;
  color: var(--text-mid);
  margin-bottom: 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.trust-item {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 28px 16px 20px;
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
  border: 1px solid transparent;
}
.trust-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--border);
}
.trust-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 24px;
}
.trust-icon.green { background: var(--accent-light); }
.trust-icon.warm { background: var(--warm-light); }
.trust-icon.night { background: var(--night-light); }
.trust-item h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.trust-item p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.6;
}

/* === Section === */
.section { padding: 56px 0; }
.section-title {
  font-family: "Noto Serif SC", serif;
  font-size: 24px;
  margin-bottom: 8px;
  text-align: center;
}
.section-desc {
  font-size: 15px;
  color: var(--text-mid);
  text-align: center;
  margin-bottom: 36px;
}

/* === Article Grid === */
.article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.article-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s;
  display: block;
  color: var(--text);
}
.article-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--text);
}
.article-card .card-icon {
  font-size: 22px;
  margin-bottom: 10px;
}
.article-card h4 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 6px;
  color: var(--text);
}
.article-card .card-date {
  font-size: 12px;
  color: var(--text-light);
}
.article-card .card-tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 10px;
  margin-top: 8px;
}

/* === CTA Box === */
.cta-box {
  background: linear-gradient(135deg, var(--night) 0%, #3a4e62 100%);
  border-radius: var(--radius);
  padding: 40px 32px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  border-radius: 50%;
}
.cta-box h3 {
  font-family: "Noto Serif SC", serif;
  font-size: 22px;
  margin-bottom: 8px;
  position: relative;
}
.cta-box p {
  font-size: 15px;
  opacity: 0.8;
  margin-bottom: 24px;
  position: relative;
}
.cta-box .btn { position: relative; }

/* === Footer === */
.site-footer {
  background: var(--night);
  color: rgba(255,255,255,0.7);
  padding: 40px 24px 28px;
  text-align: center;
  font-size: 14px;
  line-height: 2;
}
.site-footer .footer-brand {
  font-family: "Noto Serif SC", serif;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.site-footer .footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin: 12px 0;
}
.site-footer .footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 13px;
}
.site-footer .footer-links a:hover { color: #fff; }
.site-footer .footer-copy {
  font-size: 12px;
  opacity: 0.5;
  margin-top: 8px;
}

/* === Article Page === */
.article-page { padding: 48px 0 64px; }
.article-page h1 {
  font-family: "Noto Serif SC", serif;
  font-size: 30px;
  line-height: 1.5;
  margin-bottom: 12px;
}
.article-page .article-meta {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--accent-light);
  display: flex;
  gap: 16px;
  align-items: center;
}
.article-page .content { font-size: 16px; line-height: 1.9; }
.article-page .content h2 {
  font-family: "Noto Serif SC", serif;
  font-size: 22px;
  margin: 40px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.article-page .content h3 {
  font-family: "Noto Serif SC", serif;
  font-size: 18px;
  margin: 28px 0 12px;
  color: var(--accent-dark);
}
.article-page .content p { margin-bottom: 18px; }
.article-page .content ul, .article-page .content ol {
  margin: 14px 0 18px 28px;
}
.article-page .content li { margin-bottom: 8px; }
.article-page .content strong { color: var(--warm-dark); font-weight: 600; }
.article-page .content blockquote {
  background: var(--warm-light);
  border-left: 4px solid var(--warm);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--warm-dark);
  font-style: italic;
}
.article-page .content a { text-decoration: underline; text-underline-offset: 3px; }

/* Back link on article page */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 24px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--accent-dark); }

/* Article bottom CTA */
.article-cta {
  background: var(--accent-light);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  margin-top: 48px;
}
.article-cta h3 { font-size: 18px; margin-bottom: 8px; }
.article-cta p { font-size: 14px; color: var(--text-mid); margin-bottom: 16px; }

/* === Blog List Page === */
.blog-page { padding: 48px 0; }
.blog-page h1 {
  font-family: "Noto Serif SC", serif;
  font-size: 28px;
  text-align: center;
  margin-bottom: 8px;
}
.blog-page .blog-desc {
  text-align: center;
  color: var(--text-mid);
  font-size: 15px;
  margin-bottom: 40px;
}
.blog-list { list-style: none; }
.blog-list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.blog-list li:last-child { border-bottom: none; }
.blog-list .list-num {
  font-family: "Noto Serif SC", serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  min-width: 36px;
  opacity: 0.6;
}
.blog-list a {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  flex: 1;
}
.blog-list a:hover { color: var(--accent-dark); }
.blog-list .list-date {
  font-size: 13px;
  color: var(--text-light);
  white-space: nowrap;
}

/* === Responsive === */
@media (max-width: 640px) {
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 26px; }
  .hero .sub { font-size: 15px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; justify-content: center; max-width: 280px; }

  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .article-grid { grid-template-columns: 1fr; }

  .nav-links { gap: 14px; }
  .nav-links a { font-size: 13px; }
  .nav-links .nav-cta { display: none; }

  .article-page h1 { font-size: 24px; }
  .blog-list li { flex-direction: column; gap: 4px; }

  .cta-box { padding: 28px 20px; }
  .cta-box h3 { font-size: 18px; }
  .section-title { font-size: 20px; }
}
