/* 
 * WhatsApp 官网共享样式 (style.css)
 * 品牌视觉：莫兰迪低饱和色系 + 大面积留白
 * 字体搭配：衬线标题 (Playfair Display) + 无衬线正文 (Inter / system-ui)
 */

/* ================= 基础变量与重置 ================= */
:root {
  /* 莫兰迪配色系统 */
  --color-bg: #F7F6F4;       /* 暖调灰白背景 */
  --color-surface: #FFFFFF;  /* 卡片表面 */
  --color-text-primary: #3A3A3A;   /* 深炭文字 */
  --color-text-secondary: #6B6B6B; /* 辅助说明文字 */
  --color-accent: #8DA399;     /* 莫兰迪鼠尾草绿（主色） */
  --color-accent-hover: #728A7F;
  --color-border: #E5E3DF;
  --color-highlight: #D4C5B9;  /* 浅米金点缀 */
  
  /* 尺寸与间距 */
  --container-max: 1120px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-btn: 999px;
  
  /* 字体栈 */
  --font-serif: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
  --font-sans: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ================= 通用排版 ================= */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--color-text-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1.5rem;
  color: var(--color-text-secondary);
  font-size: 1.05rem;
}

.section-padding {
  padding: clamp(4rem, 8vh, 8rem) 0;
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* ================= 导航栏 ================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(247, 246, 244, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: all 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo img {
  height: 32px;
  width: auto;
}

.brand-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.25rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover, .nav-link[aria-current="page"] {
  color: var(--color-text-primary);
}

.nav-link[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-accent);
  border-radius: 2px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

/* ================= 按钮与表单 ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(141, 163, 153, 0.4);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(141, 163, 153, 0.5);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-border);
  color: var(--color-text-primary);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(141, 163, 153, 0.05);
}

/* ================= 组件库：卡片 ================= */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.04);
  border-color: var(--color-highlight);
}

.icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: rgba(141, 163, 153, 0.1);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.icon-box svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

/* ================= 组件库：表格 ================= */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  margin-top: 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th, td {
  padding: 1rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  background-color: rgba(0,0,0,0.02);
  font-weight: 600;
  color: var(--color-text-primary);
  font-family: var(--font-serif);
}

td {
  color: var(--color-text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

/* ================= 组件库：FAQ (Details/Summary) ================= */
.faq-list {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.3s ease;
}

details[open] {
  border-color: var(--color-accent);
}

summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--color-accent);
  transition: transform 0.3s ease;
}

details[open] summary::after {
  transform: rotate(45deg);
}

details > p {
  padding: 0 1.5rem 1.25rem 1.5rem;
  margin: 0;
  border-top: 1px solid var(--color-border);
}

/* ================= SVG 动效 ================= */
.svg-flow-path {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 2;
  stroke-linecap: round;
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: flowDash 6s linear infinite;
}

@keyframes flowDash {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

.flow-dot {
  fill: var(--color-accent);
  opacity: 0;
  animation: dotFlow 6s linear infinite;
}

@keyframes dotFlow {
  0% { offset-distance: 0%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}

/* 减少动态效果偏好设置 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .svg-flow-path, .flow-dot { animation: none; }
}

/* ================= 页脚 ================= */
.site-footer {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 4rem 0 2rem 0;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  font-family: var(--font-serif);
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-accent);
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 0.85rem;
}

/* ================= 响应式适配 ================= */
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--color-surface);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--color-border);
  }
  
  .nav-links.is-active {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
