/* =========================================
   WhatsApp 品牌站全局样式 (style.css)
   配色：冷蓝科技底色 + 霓虹青点缀
   字体：苹方/微软雅黑圆体变体 + 宽松行距
   版式：模块化拼贴 + 色块分区
   ========================================= */

:root {
  --color-bg-deep: #0a192f;
  --color-bg-surface: #112240;
  --color-bg-card: #172a46;
  --color-border-subtle: #233554;
  --color-border-accent: #00d4ff;
  --color-text-primary: #e6f1ff;
  --color-text-secondary: #8892b0;
  --color-text-muted: #5a6a8a;
  --color-accent-cyan: #00d4ff;
  --color-accent-hover: #00b8db;
  --color-accent-glow: rgba(0, 212, 255, 0.25);
  --color-danger: #ff6b6b;
  --color-success: #64ffda;

  --font-stack: "PingFang SC", "Microsoft YaHei", "Segoe UI Variable", system-ui, -apple-system, sans-serif;
  --line-height-base: 1.75;
  --line-height-tight: 1.35;
  --line-height-heading: 1.25;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --shadow-card: 0 8px 24px rgba(2, 12, 27, 0.6);
  --shadow-hover: 0 12px 32px rgba(0, 212, 255, 0.15);

  --container-max: 1200px;
  --spacing-section: clamp(3.5rem, 8vw, 6.5rem);
  --spacing-block: clamp(1.5rem, 4vw, 2.5rem);
  --font-size-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --font-size-h1: clamp(2.2rem, 1.8rem + 1.5vw, 3.5rem);
  --font-size-h2: clamp(1.6rem, 1.4rem + 0.8vw, 2.2rem);
  --font-size-h3: clamp(1.2rem, 1.1rem + 0.4vw, 1.5rem);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-stack);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text-secondary);
  background-color: var(--color-bg-deep);
  -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 ease, background-color 0.2s ease;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--color-accent-cyan);
  outline-offset: 4px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--color-text-primary);
  line-height: var(--line-height-heading);
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); margin-bottom: calc(var(--spacing-block) * 0.6); }
h3 { font-size: var(--font-size-h3); margin-bottom: 0.5rem; }

.section-intro {
  max-width: 720px;
  margin-bottom: var(--spacing-block);
  color: var(--color-text-secondary);
  font-size: clamp(1.05rem, 1rem + 0.2vw, 1.2rem);
}

.text-accent { color: var(--color-accent-cyan); }
.text-mono { font-family: "SF Mono", Consolas, monospace; font-size: 0.9em; }

/* Header & Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 25, 47, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border-subtle);
  padding: 1rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text-primary);
}

.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px var(--color-accent-glow));
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-link {
  position: relative;
  padding: 0.5rem 0;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.nav-link:hover, .nav-link[aria-current="page"] {
  color: var(--color-accent-cyan);
}

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-accent-cyan);
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent-cyan), #009ef7);
  color: #041024;
  box-shadow: 0 4px 14px var(--color-accent-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-accent-hover), #008de6);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--color-accent-glow);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-accent-cyan);
  color: var(--color-accent-cyan);
}

.btn-outline:hover {
  background: rgba(0, 212, 255, 0.1);
  color: var(--color-text-primary);
}

/* Cards & Modules */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-block);
}

.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--color-accent-cyan);
}

.card-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--color-accent-cyan);
}

.card-icon svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.feature-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  background: var(--color-accent-cyan);
  border-radius: 50%;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}

.data-table th, .data-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border-subtle);
}

.data-table th {
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  font-weight: 600;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: rgba(0, 212, 255, 0.05);
}

/* FAQs */
.faq-item {
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  background: var(--color-bg-surface);
}

.faq-summary {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 500;
  color: var(--color-text-primary);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-summary::-webkit-details-marker { display: none; }

.faq-summary::after {
  content: "+";
  color: var(--color-accent-cyan);
  font-weight: 400;
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-summary::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* News & Related */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.news-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-date {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.6rem;
}

.news-title {
  font-size: 1.1rem;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.news-excerpt {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  flex-grow: 1;
  margin-bottom: 1rem;
}

.related-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.related-list li a {
  display: block;
  padding: 0.8rem 1rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, background 0.2s;
}

.related-list li a:hover {
  border-color: var(--color-accent-cyan);
  background: rgba(0, 212, 255, 0.05);
}

.related-title {
  color: var(--color-text-primary);
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.related-desc {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border-subtle);
  padding: 3rem 0;
  margin-top: var(--spacing-section);
  background: var(--color-bg-surface);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.footer-brand img {
  width: 28px;
  height: 28px;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.copyright {
  width: 100%;
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border-subtle);
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* SVG Animation Classes */
.grid-node {
  transition: fill 0.3s ease, filter 0.3s ease;
}

@keyframes node-pulse {
  0%, 100% { fill: var(--color-border-subtle); opacity: 0.4; }
  50% { fill: var(--color-accent-cyan); opacity: 1; filter: drop-shadow(0 0 4px var(--color-accent-glow)); }
}

.grid-node-light { animation: node-pulse 6s infinite ease-in-out; }

.stroke-draw {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

@keyframes draw-stroke {
  0% { stroke-dashoffset: 1; }
  20% { stroke-dashoffset: 0; }
  80% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1; }
}

.draw-animate { animation: draw-stroke 5s infinite ease-in-out; }

.node-delay-1 { animation-delay: 0.2s; }
.node-delay-2 { animation-delay: 0.4s; }
.node-delay-3 { animation-delay: 0.6s; }
.node-delay-4 { animation-delay: 0.8s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .grid-node-light, .draw-animate {
    animation: none !important;
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; align-items: stretch; }
  .nav-list { justify-content: center; gap: 1rem; flex-wrap: wrap; }
  .card-grid, .news-grid, .related-list { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}
