/* ============================================================
   桐庐德扑网 0057 - Emerald Theme · style.css
   Sections: CSS Variables (Emerald), Base, Navbar, Hero,
   Buttons, Feature Cards, Stats, Testimonials, FAQ,
   CTA, Footer, Animations, Responsive
   ============================================================ */

/* ---------- CSS VARIABLES (Emerald Palette) ---------- */
:root {
  --primary: #059669;
  --primary-dark: #047857;
  --primary-light: #34d399;
  --secondary: #0d9488;
  --accent: #22c55e;
  --surface: #ffffff;
  --surface-alt: #ecfdf5;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #a7f3d0;
  --radius: 20px;
  --shadow-sm: 0 1px 3px rgba(5, 150, 105, 0.05);
  --shadow-md: 0 6px 20px rgba(5, 150, 105, 0.12);
  --shadow-lg: 0 14px 50px rgba(5, 150, 105, 0.16);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- BASE RESETS ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ---------- GLASS NAVBAR (Emerald) ---------- */
#navbar {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(167, 243, 208, 0.3);
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 24px rgba(5, 150, 105, 0.08);
}

.nav-link {
  position: relative;
  border-radius: 0.5rem;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  transition: all var(--transition);
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 65%;
}

/* ---------- HERO (Emerald) ---------- */
.hero-gradient-text {
  background: linear-gradient(135deg, #059669 0%, #0d9488 50%, #22c55e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- BUTTONS ---------- */
.btn-primary,
.btn-secondary,
.btn-cta,
.btn-cta-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary:active,
.btn-cta:active {
  transform: scale(0.97);
}

/* ---------- FEATURE CARDS (Emerald) ---------- */
.feature-card-emerald {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card-emerald::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  border-radius: 0 0 var(--radius) var(--radius);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.45s ease;
}

.feature-card-emerald:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.feature-card-emerald:hover::after {
  transform: scaleX(1);
}

.feature-icon {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card-emerald:hover .feature-icon {
  transform: scale(1.12) rotate(3deg);
  box-shadow: 0 10px 28px rgba(5, 150, 105, 0.25);
}

/* ---------- STATS BAR (Emerald) ---------- */
.stat-item-emerald {
  animation: fadeInUpEmerald 0.55s ease forwards;
  opacity: 0;
}

.stat-item-emerald:nth-child(1) { animation-delay: 0.1s; }
.stat-item-emerald:nth-child(2) { animation-delay: 0.2s; }
.stat-item-emerald:nth-child(3) { animation-delay: 0.3s; }
.stat-item-emerald:nth-child(4) { animation-delay: 0.4s; }

/* ---------- TESTIMONIAL CARDS (Emerald) ---------- */
.testimonial-card-emerald {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.testimonial-card-emerald:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

/* ---------- FAQ ACCORDION (Emerald) ---------- */
.faq-item-emerald {
  transition: all var(--transition);
}

.faq-item-emerald:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
}

.faq-item-emerald .faq-btn i {
  transition: transform var(--transition);
}

.faq-item-emerald.active .faq-btn i {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-item-emerald.active {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  background: #ecfdf5;
}

.faq-item-emerald .faq-answer {
  animation: slideDownEmerald 0.35s ease forwards;
}

/* ---------- CTA SECTION ---------- */
#cta {
  background-image: radial-gradient(ellipse at 70% 30%, rgba(255, 255, 255, 0.12) 0%, transparent 50%),
                    radial-gradient(ellipse at 30% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

/* ---------- FOOTER ---------- */

/* ---------- ANIMATIONS / KEYFRAMES ---------- */
@keyframes fadeInUpEmerald {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDownEmerald {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    max-height: 600px;
    transform: translateY(0);
  }
}

@keyframes softBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(5, 150, 105, 0.2); }
  50% { box-shadow: 0 0 25px rgba(5, 150, 105, 0.4); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---------- MOBILE MENU ---------- */
#mobile-menu {
  animation: slideDownEmerald 0.3s ease forwards;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1023px) {
  .feature-card-emerald {
    padding: 1.5rem 1.25rem;
  }
}

@media (max-width: 767px) {
  h1 {
    font-size: 2rem !important;
  }
  h2 {
    font-size: 1.75rem !important;
  }
  #hero {
    padding-top: 6rem;
    padding-bottom: 3rem;
  }
  .stat-number {
    font-size: 2rem !important;
  }
  .feature-card-emerald {
    margin-bottom: 1rem;
  }
}

@media (max-width: 639px) {
  .btn-primary,
  .btn-secondary,
  .btn-cta,
  .btn-cta-outline {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- CUSTOM SCROLLBAR (Emerald) ---------- */
::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: #ecfdf5;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
}