/* ==========================================
   WhatsApp 官网共享样式 - style.css
   设计系统：暖调渐变 + 柔和弥散光 / 精致克制
   字体：几何无衬线为主，等宽为点缀
   ========================================== */

:root {
  --color-primary: #e8734a;
  --color-primary-dark: #c95a32;
  --color-secondary: #f9a87d;
  --color-accent: #5b7c8a;
  --color-bg: #faf8f5;
  --color-surface: #ffffff;
  --color-text: #2c2a26;
  --color-text-muted: #6b665e;
  --color-border: rgba(0, 0, 0, 0.06);
  --color-shadow: rgba(0, 0, 0, 0.08);
  --color-focus: #e8734a;

  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --transition-base: 0.2s ease;
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.08);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

button, [role="button"] {
  cursor: pointer;
  font-family: inherit;
}

/* ==========================================
   排版与流体尺寸
   ========================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }
small, .text-sm { font-size: 0.875rem; }
.text-muted { color: var(--color-text-muted); }
.mono { font-family: var(--font-mono); letter-spacing: -0.03em; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

section {
  padding: var(--space-3xl) 0;
  position: relative;
}

.section-header {
  margin-bottom: var(--space-xl);
  max-width: 720px;
}

.section-header h2 { margin-bottom: var(--space-sm); }
.section-header p { color: var(--color-text-muted); font-size: 1.125rem; }

/* ==========================================
   布局组件
   ========================================== */
.grid-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-lg);
}

.bento-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  position: relative;
  overflow: hidden;
}

.bento-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.bento-item.span-4 { grid-column: span 4; }
.bento-item.span-6 { grid-column: span 6; }
.bento-item.span-8 { grid-column: span 8; }
.bento-item.span-12 { grid-column: span 12; }

@media (max-width: 1024px) {
  .bento-item.span-4, .bento-item.span-6 { grid-column: span 6; }
  .bento-item.span-8 { grid-column: span 12; }
}
@media (max-width: 640px) {
  .bento-item.span-4, .bento-item.span-6, .bento-item.span-8 { grid-column: span 12; }
}

/* ==========================================
   导航与页头页脚
   ========================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.brand img {
  height: 28px;
  width: auto;
}

nav ul {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
}

nav a {
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.25rem 0;
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition-base);
}

nav a:hover::after,
nav a[aria-current="page"]::after {
  width: 100%;
}

nav a[aria-current="page"] {
  color: var(--color-primary);
}

@media (max-width: 768px) {
  nav ul { gap: var(--space-md); font-size: 0.875rem; }
  .brand span { display: none; }
}

.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-2xl) 0 var(--space-xl);
  margin-top: var(--space-2xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-col h4 {
  font-size: 0.9375rem;
  margin-bottom: var(--space-md);
  color: var(--color-text-muted);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: var(--space-sm);
}

.footer-col a:hover {
  color: var(--color-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
  gap: var(--space-md);
}

/* ==========================================
   按钮与交互组件
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  box-shadow: 0 4px 12px rgba(232, 115, 74, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(232, 115, 74, 0.35);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn-secondary:hover {
  background: rgba(0,0,0,0.03);
  border-color: var(--color-text-muted);
}

.btn-link {
  background: none;
  color: var(--color-primary);
  padding: 0;
  border: none;
  font-weight: 600;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
}

/* ==========================================
   表格样式
   ========================================== */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th, td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  background: rgba(0,0,0,0.02);
  font-weight: 600;
  white-space: nowrap;
}

td:first-child {
  font-weight: 500;
}

tr:last-child td {
  border-bottom: none;
}

/* ==========================================
   FAQ 折叠面板
   ========================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--transition-base);
}

details:hover {
  box-shadow: var(--shadow-card);
}

summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

summary::-webkit-details-marker { display: none; }
summary::marker { display: none; content: ""; }

summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 300;
  transition: transform var(--transition-base);
  color: var(--color-text-muted);
}

details[open] summary::after {
  transform: rotate(45deg);
}

details > div {
  padding: 0 1.25rem 1.25rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  border-top: 1px solid var(--color-border);
  margin-top: 0;
  padding-top: 1rem;
}

/* ==========================================
   卡片（最新动态）
   ========================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.content-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transition: transform var(--transition-base);
}

.content-card:hover {
  transform: translateY(-2px);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.card-title {
  font-weight: 600;
  margin: 0;
}

.card-excerpt {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  flex-grow: 1;
}

/* ==========================================
   SVG 动效系统
   ========================================== */
.svg-animation {
  width: 100%;
  height: auto;
  overflow: visible;
}

.svg-contour path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: contour-flow 6s ease-in-out infinite;
}

@keyframes contour-flow {
  0%, 100% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: 1; }
}

.svg-wave path {
  animation: wave-drift 8s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes wave-drift {
  0% { transform: translateX(0) scaleY(1); }
  50% { transform: translateX(2px) scaleY(1.02); }
  100% { transform: translateX(0) scaleY(1); }
}

.pulse-dot {
  animation: dot-pulse 3s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes dot-pulse {
  0%, 100% { opacity: 0.6; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .svg-contour path,
  .svg-wave path,
  .pulse-dot {
    animation: none;
  }
}

/* ==========================================
   无障碍与焦点
   ========================================== */
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
