/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
  --color-primary: #1e3a5f;
  --color-primary-light: #2a4a7f;
  --color-accent: #00b4d8;
  --color-accent-hover: #0096b7;
  --color-bg-alt: #f5f7fa;
  --color-text: #1a1a2e;
  --color-text-muted: #6b7280;
  --color-white: #ffffff;
  --font-stack: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

/* ============================================================
   Base
   ============================================================ */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-stack);
  color: var(--color-text);
}

/* ============================================================
   Hero Gradient
   ============================================================ */
.hero-gradient {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-primary-light) 50%,
    var(--color-accent) 100%
  );
}

/* ============================================================
   Floating Animation (Hero decorations)
   ============================================================ */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes pulse {
  0% { opacity: 0.3; transform: scale(1); }
  100% { opacity: 0.6; transform: scale(1.1); }
}

/* ============================================================
   Scroll Reveal Animation
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Modal
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--color-white);
  border-radius: 12px;
  padding: 2rem;
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.25s ease forwards;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--color-text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.modal-close:hover {
  color: var(--color-text);
  background-color: var(--color-bg-alt);
}

/* ============================================================
   FAQ Accordion
   ============================================================ */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-answer.open {
  max-height: 500px;
}

.faq-toggle {
  display: inline-block;
  transition: transform 0.3s ease;
}

.faq-toggle.open {
  transform: rotate(180deg);
}

/* ============================================================
   WeChat Floating Button
   ============================================================ */
.wechat-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background-color: #07c160;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(7, 193, 96, 0.45);
  cursor: pointer;
  z-index: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wechat-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(7, 193, 96, 0.55);
}

/* ============================================================
   Counter (tabular numbers)
   ============================================================ */
.counter {
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Mobile Menu
   ============================================================ */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.mobile-menu.open {
  max-height: 400px;
}
