/* =========================================
   Design Tokens & Reset
   ========================================= */
:root {
  --color-bg: #F9FAFB;
  --color-surface: #FFFFFF;
  --color-text-primary: #111827;
  --color-text-secondary: #4B5563;
  --color-text-muted: #6B7280;
  --color-accent: #0F766E;
  --color-accent-hover: #0D5E56;
  --color-border: #E5E7EB;
  --color-highlight: #ECFDF5;
  
  --font-serif: "Georgia", "Noto Serif SC", serif;
  --font-sans: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.025);
  
  --container-max: 1200px;
  --header-height: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--color-accent); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--color-accent-hover); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 2px; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* =========================================
   Layout & Typography
   ========================================= */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

section {
  padding: var(--space-3xl) 0;
  position: relative;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.1; margin-bottom: var(--space-lg); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); line-height: 1.2; margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.3; margin-bottom: var(--space-sm); }
p { margin-bottom: var(--space-md); color: var(--color-text-secondary); }
p:last-child { margin-bottom: 0; }

.grid-auto {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}

/* =========================================
   Header & Navigation
   ========================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
  display: flex;
  align-items: center;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text-primary);
  text-decoration: none;
}
.brand img { width: 32px; height: 32px; object-fit: contain; }

.nav-links { display: flex; gap: var(--space-lg); align-items: center; }
.nav-links a {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: var(--space-xs) 0;
  position: relative;
}
.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--color-accent);
  text-decoration: none;
}
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

.mobile-toggle { display: none; }

/* =========================================
   Components: Buttons
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  font-size: 1rem;
  text-align: center;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border: 1px solid transparent;
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: #fff;
}
.btn-outline {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}
.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.btn-sm { padding: 0.5rem 1rem; font-size: 0.9rem; }

/* =========================================
   Components: Cards & Tables
   ========================================= */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.table-wrapper { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.95rem; }
th, td { padding: var(--space-md); border-bottom: 1px solid var(--color-border); }
th { background: var(--color-bg); font-weight: 600; color: var(--color-text-primary); }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--color-highlight); }

/* =========================================
   Components: FAQ
   ========================================= */
.faq-list { max-width: 800px; margin: 0 auto; }
details {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  transition: border-color 0.2s ease;
}
details[open] { border-color: var(--color-accent); }
summary {
  padding: var(--space-lg);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--color-text-muted);
  transition: transform 0.2s ease;
}
details[open] summary::after { content: "−"; transform: rotate(180deg); }
.details-content { padding: 0 var(--space-lg) var(--space-lg); color: var(--color-text-secondary); }

/* =========================================
   SVG Motion Styles
   ========================================= */
.svg-motion-container { position: relative; width: 100%; overflow: hidden; }
.flow-path {
  fill: none;
  stroke: var(--color-accent);
  stroke-opacity: 0.15;
  stroke-width: 2;
  stroke-dasharray: 0.1 0.3;
  pathLength: 1;
  stroke-dashoffset: 0;
}
@keyframes flow-lines {
  0%, 100% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
}
.animated-flow { animation: flow-lines 5s linear infinite; }
.delay-1 { animation-delay: 0.8s; }
.delay-2 { animation-delay: 1.6s; }

.wave-circle {
  fill: none;
  stroke: var(--color-accent);
  stroke-opacity: 0.2;
  stroke-width: 1.5;
}
@keyframes wave-expand {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}
.anim-wave { animation: wave-expand 3s ease-out infinite; transform-origin: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .animated-flow, .anim-wave { animation: none; }
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .grid-auto { grid-template-columns: 1fr; }
  section { padding: var(--space-2xl) 0; }
}
