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

/* ===== 基础变量 ===== */
:root {
  --c-primary: #5cc6b0;
  --c-secondary: #d4c4a8;
  --c-dark: #172623;
  --c-accent: #c67b5c;
  --c-sand: #e8dcc8;
  --c-mint-light: #a8e6dc;
  --c-text: #2a3d3a;
  --c-text-light: #5a6e6a;
  --c-bg: #f5efe4;
  --c-card-bg: #fffaf4;
  --c-border: #d4c4a8;
  --radius-card: 10px;
  --radius-sm: 6px;
  --radius-lg: 18px;
  --shadow-soft: 0 4px 20px rgba(23, 38, 35, 0.10);
  --shadow-card: 0 2px 12px rgba(23, 38, 35, 0.08);
  --font-main: 'Nunito Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-brand: 'Varela Round', 'Nunito Sans', sans-serif;
  --max-w: 1100px;
  --sidebar-w: 260px;
  --transition: 0.25s ease-out;
}

/* ===== 重置与基础 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 17px; scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--c-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--c-accent); }

/* ===== 通用粒状纹理叠加 ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-dark);
  border-bottom: 3px solid var(--c-primary);
  box-shadow: 0 2px 16px rgba(23, 38, 35, 0.35);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 60px;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--font-brand);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-primary) !important;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0.5rem 0;
}
.brand:hover { color: var(--c-mint-light) !important; }

.main-nav { flex: 1; overflow-x: auto; }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.05rem;
  align-items: center;
  margin: 0;
  padding: 0.5rem 0;
}

.nav-links a {
  color: var(--c-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: background var(--transition), color var(--transition);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  background: rgba(92, 198, 176, 0.15);
  color: var(--c-primary);
}

/* ===== Hero 区域 ===== */
.hero {
  position: relative;
  min-height: 45vh;
  background: linear-gradient(145deg, var(--c-dark) 0%, #1e3530 55%, #243d38 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 3rem 1.25rem 5rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-bg .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
}

.hero-body {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 720px;
}

.hero-body h1 {
  font-family: var(--font-brand);
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.hero-sub {
  color: var(--c-secondary);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.hero-date {
  color: var(--c-mint-light);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

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

/* 内页 Hero */
.page-hero {
  position: relative;
  padding: 2.5rem 1.25rem 4.5rem;
  background: linear-gradient(135deg, var(--c-dark) 0%, #1e3530 100%);
  overflow: hidden;
  min-height: 200px;
  display: flex;
  align-items: center;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.page-hero-bg .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.12;
}

.page-hero-body {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  width: 100%;
}

.page-hero-body h1 {
  font-family: var(--font-brand);
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.06em;
  color: var(--c-primary);
  margin-bottom: 0.5rem;
  background: rgba(92, 198, 176, 0.15);
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  border: 1px solid rgba(92, 198, 176, 0.3);
}

/* ===== 按钮 ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  background: var(--c-primary);
  color: var(--c-dark) !important;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 16px rgba(92, 198, 176, 0.35);
  min-height: 48px;
  text-decoration: none;
}
.btn-primary:hover {
  background: #4db89f;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(92, 198, 176, 0.45);
  color: var(--c-dark) !important;
}

/* ===== 主内容布局 ===== */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  position: relative;
  z-index: 1;
}

/* 带侧边栏的 section 布局 */
.content-section,
.feature-section,
.pricing-section,
.faq-section,
.about-section,
.contact-section,
.privacy-section,
.default-section {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-w);
  gap: 2rem;
  align-items: start;
  margin-bottom: 3rem;
}

/* figure 作为主内容区 */
.feature-figure,
.pricing-figure,
.faq-figure,
.about-figure,
.contact-figure,
.privacy-figure,
.content-figure,
.default-figure {
  min-width: 0;
}

/* ===== 侧边栏 ===== */
.sidebar {
  background: var(--c-card-bg);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  border: 1px solid var(--c-border);
  border-bottom: 4px solid var(--c-primary);
  box-shadow: var(--shadow-card);
  position: sticky;
  top: 80px;
}

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

.sidebar-link {
  display: block;
  color: var(--c-text);
  font-size: 0.88rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.2rem;
  transition: background var(--transition), color var(--transition), padding-left var(--transition);
  border-left: 2px solid transparent;
  min-height: 40px;
  display: flex;
  align-items: center;
}
.sidebar-link:hover {
  background: rgba(92, 198, 176, 0.1);
  color: var(--c-primary);
  border-left-color: var(--c-primary);
  padding-left: 1rem;
}

/* ===== 正文排版 ===== */
.prose {
  color: var(--c-text);
  font-size: 1rem;
  line-height: 1.8;
}
.prose h2 { font-size: 1.4rem; font-weight: 700; color: var(--c-dark); margin: 2rem 0 0.5rem; }
.prose h3 { font-size: 1.15rem; font-weight: 600; color: var(--c-dark); margin: 1.5rem 0 0.4rem; }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.prose li { margin-bottom: 0.35rem; }
.prose a { color: var(--c-primary); border-bottom: 1px solid rgba(92,198,176,0.3); }
.prose a:hover { color: var(--c-accent); border-bottom-color: var(--c-accent); }
.prose blockquote {
  border-left: 4px solid var(--c-primary);
  padding: 0.75rem 1.25rem;
  background: rgba(92, 198, 176, 0.08);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.25rem 0;
  font-style: italic;
  color: var(--c-text-light);
}
.prose table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.92rem; }
.prose th { background: var(--c-dark); color: var(--c-secondary); padding: 0.65rem 0.85rem; text-align: left; }
.prose td { padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--c-border); }
.prose tr:nth-child(even) td { background: rgba(212, 196, 168, 0.15); }

/* ===== 副标题 ===== */
.subtitle {
  color: var(--c-text-light);
  font-size: 0.92rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* ===== 文章元数据 ===== */
.article-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--c-text-light);
  margin-bottom: 1.5rem;
  padding: 0.65rem 1rem;
  background: rgba(212, 196, 168, 0.2);
  border-radius: var(--radius-sm);
}
.article-meta time { color: var(--c-primary); font-weight: 600; }

.update-note {
  font-size: 0.85rem;
  color: var(--c-text-light);
  margin-bottom: 1.5rem;
  padding: 0.5rem 0.85rem;
  background: rgba(92, 198, 176, 0.08);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--c-primary);
}

/* ===== 首页专区 ===== */
.home-intro { margin-bottom: 2.5rem; }

/* 子页卡片区 */
.child-section {
  margin-bottom: 3rem;
}
.child-section > h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: 0.25rem;
}

/* div 卡片 */
.card {
  background: var(--c-card-bg);
  border-radius: var(--radius-card);
  border: 1px solid var(--c-border);
  border-bottom: 4px solid var(--c-primary);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
  overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }

.card-link {
  display: block;
  padding: 1.25rem 1.35rem;
  color: var(--c-text) !important;
}
.card-link:hover { color: var(--c-text) !important; }
.card-link h3 { font-size: 1.05rem; font-weight: 700; color: var(--c-dark); margin-bottom: 0.4rem; line-height: 1.4; }
.card-link time { font-size: 0.78rem; color: var(--c-primary); margin-top: 0.5rem; display: block; }
.card-desc { font-size: 0.875rem; color: var(--c-text-light); line-height: 1.55; }

/* 导航卡片区 */
.nav-section { margin-bottom: 2rem; }
.nav-section > h2 { font-size: 1.5rem; font-weight: 700; color: var(--c-dark); margin-bottom: 0.25rem; }

.nav-figure { margin: 1rem 0 0; }
.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.nav-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: var(--c-card-bg);
  border: 1px solid var(--c-border);
  border-bottom: 3px solid var(--c-secondary);
  border-radius: var(--radius-card);
  padding: 1rem 1.15rem;
  color: var(--c-text);
  transition: border-bottom-color var(--transition), transform var(--transition), box-shadow var(--transition);
  min-height: 44px;
}
.nav-card:hover {
  border-bottom-color: var(--c-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  color: var(--c-text);
}
.nav-card-title { font-size: 0.9rem; font-weight: 700; color: var(--c-dark); line-height: 1.4; }
.nav-card-desc { font-size: 0.78rem; color: var(--c-text-light); line-height: 1.4; }

/* ===== 首页卡片网格（子页） ===== */
.child-section {
  display: block;
}
.child-section > .subtitle { margin-bottom: 1.25rem; }
.child-section > div,
.child-section div {
  display: block;
}
/* 使用 CSS grid 包住 div（在 section 内不套 article） */
.child-section {
  container-type: inline-size;
}

/* 给 child-section 里的 div 做网格（section > div×n） */
.child-section {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.15rem;
  align-items: start;
}
.child-section > h2,
.child-section > .subtitle {
  grid-column: 1 / -1;
}

/* ===== 定价页 ===== */
.pricing-compare { margin-top: 2.5rem; }
.pricing-compare > h2 { font-size: 1.4rem; font-weight: 700; color: var(--c-dark); margin-bottom: 0.25rem; }

.compare-figure {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.15rem;
  margin-top: 1rem;
}

.price-card {
  background: var(--c-card-bg);
  border: 1px solid var(--c-border);
  border-bottom: 4px solid var(--c-secondary);
  border-radius: var(--radius-card);
  padding: 1.5rem 1.35rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition);
}
.price-card:hover { transform: translateY(-4px); }
.price-card--highlight { border-bottom-color: var(--c-primary); background: linear-gradient(135deg, rgba(92,198,176,0.08) 0%, var(--c-card-bg) 100%); }
.price-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--c-dark); margin-bottom: 0.5rem; }
.price-tag { font-size: 1.4rem; font-weight: 700; color: var(--c-primary); margin-bottom: 0.75rem; }
.price-card p:last-child { font-size: 0.875rem; color: var(--c-text-light); }

/* ===== 关于页价值观卡片 ===== */
.about-values { margin-top: 2rem; }
.about-values > h2 { font-size: 1.4rem; font-weight: 700; color: var(--c-dark); margin-bottom: 0.25rem; }
.values-figure {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.15rem;
  margin-top: 1rem;
}
.value-card {
  background: var(--c-card-bg);
  border: 1px solid var(--c-border);
  border-bottom: 4px solid var(--c-primary);
  border-radius: var(--radius-card);
  padding: 1.35rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition);
}
.value-card:hover { transform: translateY(-3px); }
.value-card h3 { font-size: 1rem; font-weight: 700; color: var(--c-dark); margin-bottom: 0.5rem; }
.value-card p { font-size: 0.875rem; color: var(--c-text-light); line-height: 1.6; }

/* ===== 联系页表单 ===== */
.contact-form-wrap { margin-top: 2rem; }
.contact-form-wrap > h2 { font-size: 1.3rem; font-weight: 700; color: var(--c-dark); margin-bottom: 0.25rem; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}
.contact-form label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-dark);
  margin-bottom: -0.5rem;
}
.contact-form input,
.contact-form textarea {
  font-family: var(--font-main);
  font-size: 0.95rem;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: var(--c-card-bg);
  color: var(--c-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  min-height: 44px;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(92, 198, 176, 0.18);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form button { align-self: flex-start; }

/* ===== 页脚 ===== */
.site-footer {
  background: var(--c-dark);
  text-align: center;
  padding: 2.5rem 1.25rem 1.75rem;
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}

.footer-brand {
  font-family: var(--font-brand);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  color: var(--c-primary);
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  opacity: 0.92;
}

.footer-copy {
  display: block;
  font-size: 0.82rem;
  color: rgba(212, 196, 168, 0.65);
  line-height: 1.7;
}
.footer-copy a { color: var(--c-secondary); opacity: 0.8; }
.footer-copy a:hover { color: var(--c-primary); opacity: 1; }

/* ===== 滚动动画 ===== */
@media (prefers-reduced-motion: no-preference) {
  .card,
  .nav-card,
  .price-card,
  .value-card,
  .sidebar {
    opacity: 0;
    transform: translateY(18px);
    animation: fadeUp 0.5s ease-out forwards;
  }
  .card:nth-child(2) { animation-delay: 0.08s; }
  .card:nth-child(3) { animation-delay: 0.16s; }
  .card:nth-child(4) { animation-delay: 0.24s; }
  .card:nth-child(5) { animation-delay: 0.32s; }
  .card:nth-child(6) { animation-delay: 0.40s; }
  .nav-card:nth-child(n+2) { animation-delay: calc((var(--i, 1)) * 0.07s); }
  .price-card:nth-child(2) { animation-delay: 0.1s; }
  .price-card:nth-child(3) { animation-delay: 0.2s; }
  .value-card:nth-child(2) { animation-delay: 0.1s; }
  .value-card:nth-child(3) { animation-delay: 0.2s; }

  @keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== 响应式 ===== */
@media (max-width: 860px) {
  :root { --sidebar-w: 220px; }

  .content-section,
  .feature-section,
  .pricing-section,
  .faq-section,
  .about-section,
  .contact-section,
  .privacy-section,
  .default-section {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    order: -1;
  }

  .hero { min-height: 40vh; padding-bottom: 4rem; }
}

@media (max-width: 600px) {
  html { font-size: 16px; }

  .header-inner { gap: 0.75rem; min-height: 56px; }
  .brand { font-size: 1rem; }

  .nav-links { gap: 0.1rem; }
  .nav-links a { font-size: 0.76rem; padding: 0.5rem 0.5rem; }

  .hero-body h1 { font-size: 1.55rem; }
  .page-hero-body h1 { font-size: 1.35rem; }

  .hero-skew { height: 45px; }

  main { padding: 1.5rem 1rem 2.5rem; }

  .child-section {
    grid-template-columns: 1fr;
  }

  .compare-figure,
  .values-figure {
    grid-template-columns: 1fr;
  }

  .nav-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand { font-size: 2rem; }

  .btn-primary { width: 100%; justify-content: center; }
}

@media (max-width: 380px) {
  .nav-grid { grid-template-columns: 1fr; }
  .nav-links a { font-size: 0.72rem; padding: 0.45rem 0.4rem; }
}
