/* ========================================
   汇付天下传统大机 - CSS Design System
   深红2便正风
   ======================================== */

/* CSS Variables */
:root {
  /* Brand Colors */
  --hf-crimson: #BE123C;
  --hf-crimson-light: #E11D48;
  --port-cyan: #06B6D4;
  --reg-blue: #3B82F6;
  
  /* Background Colors */
  --bg-page: #FFF1F2;
  --bg-card: #FFFFFF;
  --bg-hero: linear-gradient(135deg, #BE123C 0%, #E11D48 100%);
  --bg-cyan: linear-gradient(135deg, #0891B2 0%, #06B6D4 100%);
  --bg-blue: linear-gradient(135deg, #1D4ED8 0%, #3B82F6 100%);
  
  /* Text Colors */
  --text-dark: #4C0519;
  --text-body: #334155;
  --text-light: #64748B;
  --text-white: #FFFFFF;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(190, 18, 60, 0.05);
  --shadow-md: 0 4px 6px rgba(190, 18, 60, 0.1);
  --shadow-lg: 0 10px 15px rgba(190, 18, 60, 0.1);
  --shadow-nav: 0 2px 8px rgba(190, 18, 60, 0.15);
  
  /* Typography */
  --font-cn: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-en: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-cn);
  color: var(--text-body);
  background-color: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

.text-en {
  font-family: var(--font-en);
}

/* ========================================
   Layout
   ======================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-3xl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-title h2 {
  margin-bottom: var(--space-sm);
}

.section-title p {
  color: var(--text-light);
  font-size: 1.125rem;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  z-index: 1000;
  transition: box-shadow var(--transition-normal);
}

.navbar.scrolled {
  box-shadow: var(--shadow-nav);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--hf-crimson);
}

.navbar-logo svg {
  width: 32px;
  height: 32px;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.navbar-nav a {
  font-weight: 500;
  color: var(--text-body);
  padding: var(--space-sm) 0;
  position: relative;
}

.navbar-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--hf-crimson);
  transition: width var(--transition-normal);
}

.navbar-nav a:hover::after,
.navbar-nav a.active::after {
  width: 100%;
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--hf-crimson);
}

.btn-cta {
  background: var(--port-cyan);
  color: var(--text-white);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
  font-family: var(--font-cn);
  font-size: 1rem;
}

.btn-cta:hover {
  background: #0891B2;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Mobile Menu */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-sm);
  background: none;
  border: none;
  cursor: pointer;
}

.navbar-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  transition: all var(--transition-fast);
}

@media (max-width: 768px) {
  .navbar-toggle {
    display: flex;
  }
  
  .navbar-nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-md);
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
  }
  
  .navbar-nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  background: var(--bg-hero);
  padding: 140px 0 80px;
  color: var(--text-white);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  padding: var(--space-xs) var(--space-md);
  border-radius: 50px;
  font-size: 0.875rem;
  margin-bottom: var(--space-lg);
  backdrop-filter: blur(10px);
}

.hero h1 {
  color: var(--text-white);
  font-size: 3rem;
  margin-bottom: var(--space-md);
  animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.btn-hero-primary {
  background: var(--port-cyan);
  color: var(--text-white);
  padding: var(--space-md) var(--space-2xl);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1.125rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-hero-primary:hover {
  background: #0891B2;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(6, 182, 212, 0.3);
}

.btn-hero-secondary {
  background: transparent;
  color: var(--text-white);
  padding: var(--space-md) var(--space-2xl);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1.125rem;
  border: 2px solid var(--text-white);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Hero Cyan Variant */
.hero-cyan {
  background: var(--bg-cyan);
}

.hero-cyan::before {
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Hero Blue Variant */
.hero-blue {
  background: var(--bg-blue);
}

/* ========================================
   Cards
   ======================================== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.card-icon.cyan {
  background: linear-gradient(135deg, #0891B2 0%, #06B6D4 100%);
}

.card-icon.blue {
  background: linear-gradient(135deg, #1D4ED8 0%, #3B82F6 100%);
}

.card-icon.crimson {
  background: linear-gradient(135deg, #BE123C 0%, #E11D48 100%);
}

.card-icon svg {
  width: 28px;
  height: 28px;
  color: var(--text-white);
}

.card h3 {
  margin-bottom: var(--space-sm);
}

.card p {
  color: var(--text-light);
}

/* ========================================
   Feature Sections
   ======================================== */
.feature-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.feature-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.feature-image img {
  width: 100%;
  height: auto;
}

.feature-content h2 {
  margin-bottom: var(--space-md);
}

.feature-content p {
  font-size: 1.125rem;
  color: var(--text-body);
  margin-bottom: var(--space-lg);
}

.highlight {
  color: var(--port-cyan);
  font-weight: 700;
}

.highlight-blue {
  color: var(--reg-blue);
  font-weight: 700;
}

/* ========================================
   Stats Cards (Asymmetric)
   ======================================== */
.stats-grid {
  display: grid;
  grid-template-columns: 55% 43%;
  gap: var(--space-lg);
}

.stats-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.stats-card:first-child {
  grid-row: span 1;
}

.stats-number {
  font-family: var(--font-en);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--hf-crimson);
  line-height: 1;
  margin-bottom: var(--space-sm);
}

.stats-unit {
  font-size: 1.5rem;
  color: var(--text-light);
}

.stats-label {
  font-size: 1.125rem;
  color: var(--text-body);
}

/* ========================================
   Comparison Tables
   ======================================== */
.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.compare-table th,
.compare-table td {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
}

.compare-table th {
  background: var(--hf-crimson);
  color: var(--text-white);
  font-weight: 600;
}

.compare-table th:first-child {
  border-radius: var(--radius-lg) 0 0 0;
}

.compare-table th:last-child {
  border-radius: 0 var(--radius-lg) 0 0;
}

.compare-table tr:nth-child(even) {
  background: rgba(255, 241, 242, 0.5);
}

.compare-table td {
  border-bottom: 1px solid rgba(190, 18, 60, 0.1);
}

.compare-table tr:last-child td:first-child {
  border-radius: 0 0 0 var(--radius-lg);
}

.compare-table tr:last-child td:last-child {
  border-radius: 0 0 var(--radius-lg) 0;
}

.check-icon {
  color: #10B981;
  font-weight: bold;
}

.x-icon {
  color: #EF4444;
  font-weight: bold;
}

/* Three-way comparison */
.compare-table.three-col th {
  background: var(--hf-crimson);
}

.compare-table.three-col th:nth-child(2) {
  background: var(--port-cyan);
}

.compare-table.three-col th:nth-child(3) {
  background: var(--reg-blue);
}

/* ========================================
   FAQ Section
   ======================================== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  padding: var(--space-lg);
  background: none;
  border: none;
  text-align: left;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-cn);
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--hf-crimson);
  transition: transform var(--transition-fast);
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal);
}

.faq-item.active .faq-answer {
  max-height: 300px;
}

.faq-answer-content {
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--text-body);
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
  background: var(--bg-hero);
  padding: var(--space-3xl) 0;
  text-align: center;
  color: var(--text-white);
}

.cta-section h2 {
  color: var(--text-white);
  margin-bottom: var(--space-md);
}

.cta-section p {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: var(--space-xl);
}

.cta-section .btn-hero-primary {
  background: var(--bg-card);
  color: var(--hf-crimson);
}

.cta-section .btn-hero-primary:hover {
  background: var(--text-white);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--bg-hero);
  padding: var(--space-3xl) 0 var(--space-xl);
  color: var(--text-white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.footer-brand h3 {
  color: var(--text-white);
  margin-bottom: var(--space-md);
}

.footer-brand p {
  opacity: 0.8;
  line-height: 1.8;
}

.footer-links h4 {
  color: var(--text-white);
  margin-bottom: var(--space-md);
}

.footer-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-links a {
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.footer-links a:hover {
  opacity: 1;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.7;
  font-size: 0.875rem;
}

/* ========================================
   One-Clear Explanation Box
   ======================================== */
.explain-box {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
  border: 2px solid var(--reg-blue);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  margin-top: var(--space-2xl);
}

.explain-box h3 {
  color: var(--reg-blue);
  margin-bottom: var(--space-lg);
  text-align: center;
}

.explain-flow {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.flow-step {
  background: var(--bg-card);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  text-align: center;
  min-width: 150px;
}

.flow-step .label {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: var(--space-xs);
}

.flow-step .value {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-dark);
}

.flow-step.positive .value {
  color: #10B981;
}

.flow-step.negative .value {
  color: #EF4444;
}

.flow-arrow {
  color: var(--text-light);
  font-size: 1.5rem;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
  .feature-split {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  
  .feature-split .feature-image {
    order: -1;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  
  .hero {
    padding: 120px 0 60px;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn-hero-primary,
  .btn-hero-secondary {
    width: 100%;
    max-width: 280px;
  }
  
  .section {
    padding: var(--space-2xl) 0;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .compare-table th,
  .compare-table td {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
  }
  
  .stats-number {
    font-size: 2.5rem;
  }
}

/* ========================================
   Utility Classes
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
