:root {
  --color-bg: #f5f6f7;
  --color-surface: #ffffff;
  --color-text: #1c1e21;
  --color-text-muted: #555757;
  --color-brand: #25d366;
  --color-brand-hover: #1da851;
  --color-border: #e0e0e0;
  --font-main: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 32px;
  --spacing-lg: 64px;
  --spacing-xl: 96px;
  --container-max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 100%; }
body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color 0.2s; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* Typography */
h1, h2, h3, h4 { line-height: 1.3; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 1.6rem + 2.5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2rem); font-weight: 600; margin-bottom: var(--spacing-md); }
h3 { font-size: clamp(1.15rem, 1rem + 0.8vw, 1.35rem); font-weight: 600; }
p { font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem); color: var(--color-text-muted); margin-bottom: 1rem; }
.text-accent { color: var(--color-brand); }

/* Header & Nav */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--color-border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand span { font-weight: 600; font-size: 1.1rem; }
nav ul { display: flex; gap: var(--spacing-sm); }
nav a { padding: 8px 12px; border-radius: var(--radius-sm); font-size: 0.95rem; font-weight: 500; transition: background 0.2s, color 0.2s; }
nav a:hover, nav a[aria-current="page"] { background: #f0f0f0; color: var(--color-brand-dark); }

/* Sections */
.section { padding: var(--spacing-lg) 0; }
.section-alt { background: var(--color-surface); }
.section-split { display: grid; grid-template-columns: 1fr; gap: var(--spacing-md); align-items: center; }
@media(min-width:900px) { .section-split { grid-template-columns: 1.2fr 1fr; } }
.hero-content { max-width: 680px; }
.hero-svg { width: 100%; max-width: 500px; margin-top: 20px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 24px; border-radius: var(--radius-md); font-weight: 600; font-size: 1rem; transition: transform 0.2s, box-shadow 0.2s, background 0.2s; }
.btn:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.btn-primary { background: var(--color-brand); color: #fff; box-shadow: 0 4px 12px rgba(37,211,102,0.25); }
.btn-primary:hover { background: var(--color-brand-hover); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(37,211,102,0.35); }

/* Cards & Gallery */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--spacing-md); }
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--spacing-md); transition: transform 0.2s, border-color 0.2s; }
.card:hover { transform: translateY(-2px); border-color: var(--color-brand); }
.card-icon { width: 40px; height: 40px; margin-bottom: 12px; color: var(--color-brand); }
.card-title { margin-bottom: 8px; }

.gallery-scroll { display: flex; gap: var(--spacing-md); overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.gallery-item { flex: 0 0 320px; scroll-snap-align: start; }
.news-card { border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; background: var(--color-surface); display: flex; flex-direction: column; }
.news-body { padding: var(--spacing-md); flex: 1; display: flex; flex-direction: column; }
.news-date { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 8px; }
.btn-link { align-self: flex-start; margin-top: auto; padding: 8px 16px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: 0.9rem; transition: all 0.2s; }
.btn-link:hover { border-color: var(--color-brand); color: var(--color-brand); }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--color-border); font-size: 0.95rem; }
th { background: #fafafa; font-weight: 600; }
tr:last-child td { border-bottom: none; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
details { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 16px; transition: border-color 0.2s; }
details[open] { border-color: var(--color-brand); }
summary { cursor: pointer; font-weight: 600; padding: 4px 0; list-style: none; display: flex; align-items: center; justify-content: space-between; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; color: var(--color-text-muted); transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin-top: 12px; font-size: 0.95rem; }

/* Footer */
.site-footer { background: #111; color: #ccc; padding: var(--spacing-lg) 0 var(--spacing-md); margin-top: var(--spacing-lg); }
.footer-inner { display: flex; flex-direction: column; gap: var(--spacing-md); align-items: center; text-align: center; }
.footer-links { display: flex; gap: var(--spacing-md); flex-wrap: wrap; justify-content: center; }
.footer-copy { font-size: 0.85rem; color: #888; margin-top: var(--spacing-sm); }

/* SVG Animations */
.draw-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.float-node { fill: currentColor; }
.animate-draw { animation: drawAnim 4s ease-in-out infinite alternate; }
.animate-float { animation: floatAnim 3s ease-in-out infinite; }
@keyframes drawAnim {
  0%, 100% { stroke-dashoffset: 1; opacity: 0.6; }
  50% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes floatAnim {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
svg .draw-path:nth-child(odd) { animation-delay: 0.2s; }
svg .draw-path:nth-child(even) { animation-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
  .animate-draw, .animate-float { animation: none !important; }
  html { scroll-behavior: auto; }
}
