/* ==========================================================================
   花云 (Huayun) - Official Landing Page Design System
   Aesthetic: 极简柔和风 (Minimalist, Soft, Warm, Friendly & Modern)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & CSS Variables
   -------------------------------------------------------------------------- */
:root {
  /* Brand Palette: Soft Blossom Rose & Pastel Indigo/Cloud Teal */
  --primary: #8b5cf6;
  --primary-hover: #7c3aed;
  --primary-light: #f5f3ff;
  --accent-rose: #f43f5e;
  --accent-rose-light: #fff1f2;
  --accent-teal: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;

  /* Neutral Soft Tones */
  --bg-main: #fcfbf9;
  --bg-surface: #ffffff;
  --bg-subtle: #f4f5f8;
  --bg-card: rgba(255, 255, 255, 0.85);

  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --border-light: #f1f5f9;
  --border-subtle: #e2e8f0;
  --border-brand: rgba(139, 92, 246, 0.2);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(148, 163, 184, 0.08);
  --shadow-md: 0 10px 25px -5px rgba(139, 92, 246, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 20px 35px -10px rgba(139, 92, 246, 0.12), 0 10px 15px -8px rgba(0, 0, 0, 0.03);
  --shadow-glow: 0 0 25px rgba(244, 63, 94, 0.2);

  /* Typography */
  --font-rounded: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Yu Gothic UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Layout & Spacing */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --container-max: 1200px;
  --header-height: 72px;

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   2. Base Reset & Typography
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-rounded);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(244, 63, 94, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.04) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Rounded Bold Heading Style */
h1, h2, h3, h4, .brand-title {
  font-family: var(--font-rounded);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

h1 { font-size: clamp(2rem, 4vw + 1rem, 3.25rem); }
h2 { font-size: clamp(1.5rem, 2.5vw + 0.5rem, 2.25rem); }
h3 { font-size: clamp(1.2rem, 1.5vw + 0.2rem, 1.5rem); }

p {
  color: var(--text-secondary);
  font-size: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --------------------------------------------------------------------------
   3. Common Container & Layout Components
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 4.5rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem auto;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
  border: 1px solid rgba(139, 92, 246, 0.15);
}

.section-title {
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.125rem;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--transition-smooth);
  text-decoration: none;
  min-height: 48px;
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 50%, #3b82f6 100%);
  color: #ffffff !important;
  box-shadow: 0 8px 20px -4px rgba(236, 72, 153, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px -4px rgba(236, 72, 153, 0.45);
  color: #ffffff;
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary) !important;
  border: 2px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  min-height: 38px;
}

/* Accessibility Focus Outline */
.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   4. Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(253, 251, 247, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition-smooth);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-img {
  height: 42px;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
  padding: 0.5rem;
}

/* --------------------------------------------------------------------------
   5. Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 3rem 0 5rem 0;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-title {
  margin-bottom: 1.25rem;
  font-size: clamp(2.2rem, 3.5vw + 1rem, 3.5rem);
}

.text-gradient {
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 60%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-features-strip {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
}

.strip-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.strip-icon {
  color: var(--accent-emerald);
  font-size: 1.1rem;
}

.hero-visual {
  position: relative;
}

.hero-card-box {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  transform: perspective(1000px) rotateY(-4deg) rotateX(2deg);
  transition: transform var(--transition-smooth);
}

.hero-card-box:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

/* --------------------------------------------------------------------------
   6. Core Features Section
   -------------------------------------------------------------------------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 2.25rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-brand);
}

.feature-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  background: var(--primary-light);
  color: var(--primary);
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.feature-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   7. Streaming & AI Support Section
   -------------------------------------------------------------------------- */
.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.support-block {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.support-block-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 1.35rem;
}

.support-icons-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.support-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.support-notice {
  font-size: 0.85rem;
  color: var(--text-light);
  background: var(--bg-main);
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}

/* --------------------------------------------------------------------------
   8. Pricing / Plans Section
   -------------------------------------------------------------------------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.pricing-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  border: 2px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-smooth);
}

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

.pricing-card.featured {
  border-color: var(--primary);
  background: linear-gradient(180deg, #ffffff 0%, var(--primary-light) 100%);
  box-shadow: var(--shadow-md);
}

.badge-featured {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #ffffff;
  padding: 0.3rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.plan-name {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.plan-price-box {
  margin: 1.25rem 0 1.5rem 0;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.plan-currency {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.plan-price {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.plan-cycle {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.plan-specs {
  list-style: none;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.plan-spec-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0;
  border-bottom: 1px dashed var(--border-light);
  font-size: 0.925rem;
  color: var(--text-secondary);
}

.spec-icon {
  color: var(--accent-emerald);
  font-size: 1rem;
}

/* --------------------------------------------------------------------------
   9. FAQ Section
   -------------------------------------------------------------------------- */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: var(--font-rounded);
}

.faq-icon {
  font-size: 1.25rem;
  transition: transform var(--transition-smooth);
  color: var(--primary);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.5rem 1.25rem 1.5rem;
  color: var(--text-secondary);
  font-size: 0.975rem;
  line-height: 1.7;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

/* --------------------------------------------------------------------------
   10. Knowledge / Articles Grid
   -------------------------------------------------------------------------- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
}

.article-card {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-smooth);
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-brand);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.article-tag {
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.article-title {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.article-title a {
  color: var(--text-primary);
}

.article-title a:hover {
  color: var(--primary);
}

.article-excerpt {
  font-size: 0.925rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-footer-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* --------------------------------------------------------------------------
   11. Right Side Section Navigation Arrows Widget
   -------------------------------------------------------------------------- */
.section-nav-widget {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 99;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  padding: 0.5rem;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  transition: opacity var(--transition-smooth);
}

.section-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.section-nav-btn:hover:not(:disabled) {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: scale(1.08);
}

.section-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: var(--border-light);
}

/* --------------------------------------------------------------------------
   12. Footer (Exactly 4 mandatory pages)
   -------------------------------------------------------------------------- */
.site-footer {
  background: #111827;
  color: #9ca3af;
  padding: 4rem 0 2.5rem 0;
  border-top: 1px solid #1f2937;
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.footer-brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
}

.footer-desc {
  max-width: 500px;
  font-size: 0.95rem;
  color: #9ca3af;
}

/* Mandatory 4 footer links */
.footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  list-style: none;
  flex-wrap: wrap;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #1f2937;
}

.footer-nav-link {
  color: #e5e7eb;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-nav-link:hover {
  color: #f43f5e;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  font-size: 0.875rem;
  color: #6b7280;
  flex-wrap: wrap;
  gap: 1rem;
}

/* --------------------------------------------------------------------------
   13. Responsive & Mobile Rules
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .hero-content {
    align-items: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-features-strip {
    justify-content: center;
  }

  .support-grid {
    grid-template-columns: 1fr;
  }

  .section-nav-widget {
    right: 0.5rem;
    padding: 0.35rem;
  }

  .section-nav-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--border-light);
    display: none;
  }

  .nav-menu.active {
    display: flex;
  }

  .mobile-toggle {
    display: block;
  }

  .header-cta .btn {
    display: none;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .footer-nav {
    gap: 1.25rem;
  }
}

/* Respect Reduced Motion */
@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;
  }
}
