/* ===== CSS Variables ===== */
:root {
  --primary: #4a6cf7;
  --primary-dark: #3b5de7;
  --gradient: linear-gradient(135deg, #4a6cf7 0%, #6c5ce7 100%);
  --gradient-light: linear-gradient(135deg, rgba(74,108,247,.08) 0%, rgba(108,92,231,.08) 100%);
  --bg-light: #f5f5f5;
  --bg-white: #fff;
  --text-primary: #1a1a2e;
  --text-secondary: #555;
  --text-muted: #888;
  --footer-bg: #1a1a2e;
  --footer-text: #b0b0c0;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.12);
  --container: 1140px;
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-primary);
  background: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== Container ===== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 5%;
}

/* ===== Section ===== */
.section {
  padding: 80px 0;
}
.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 12px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: clamp(.9rem, 1.5vw, 1.05rem);
  margin-bottom: 48px;
}

/* ===== Header ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0 5%;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  transition: background .3s, box-shadow .3s;
}
.site-header.scrolled {
  background: rgba(255,255,255,.96);
  box-shadow: 0 1px 8px rgba(0,0,0,.08);
  backdrop-filter: blur(8px);
}
.site-header .brand {
  font-size: 20px; font-weight: 700; color: #fff;
  transition: color .3s;
}
.site-header.scrolled .brand { color: var(--text-primary); }

.nav-links {
  display: flex; align-items: center; gap: 28px;
}
.nav-links a {
  color: rgba(255,255,255,.85); font-size: 15px; font-weight: 500;
  transition: color .2s;
}
.nav-links a:hover { color: #fff; }
.site-header.scrolled .nav-links a { color: var(--text-secondary); }
.site-header.scrolled .nav-links a:hover { color: var(--primary); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px;
}
.hamburger span {
  display: block; width: 24px; height: 2px; background: #fff;
  border-radius: 2px; transition: all .3s;
}
.site-header.scrolled .hamburger span { background: var(--text-primary); }

/* Mobile nav */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: #fff; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    color: var(--text-primary) !important;
    padding: 14px 5%; border-bottom: 1px solid #f0f0f0;
    width: 100%;
  }
  .nav-links a:hover { background: var(--bg-light); }
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient);
  text-align: center; color: #fff;
  padding: 80px 5% 60px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  opacity: .9;
  max-width: 600px; margin: 0 auto 36px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; border-radius: 8px;
  font-size: 15px; font-weight: 600;
  cursor: pointer; border: 2px solid transparent;
  transition: all .25s;
}
.btn-primary { background: #fff; color: var(--primary); }
.btn-primary:hover { background: rgba(255,255,255,.9); transform: translateY(-2px); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.btn-solid { background: var(--primary); color: #fff; }
.btn-solid:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ===== Product Cards ===== */
.product-grid {
  display: flex; flex-wrap: wrap; gap: 24px;
  justify-content: center;
}
.product-card {
  flex: 0 0 calc(33.333% - 16px);
  background: var(--bg-white);
  border: 1px solid #eaeaea;
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: transform .3s, box-shadow .3s;
  display: flex; flex-direction: column; align-items: center;
  color: var(--text-primary);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.product-card .card-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: var(--gradient-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin-bottom: 20px;
}
.product-card h3 { font-size: 18px; margin-bottom: 8px; }
.product-card p { color: var(--text-secondary); font-size: 14px; margin-bottom: 16px; line-height: 1.6; }
.product-card .tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 18px; }
.product-card .tag {
  padding: 3px 10px; border-radius: 20px;
  font-size: 12px; background: var(--bg-light); color: var(--text-secondary);
}
.product-card .card-link {
  color: var(--primary); font-size: 14px; font-weight: 600;
}
.product-card .card-try {
  color: #fff; background: var(--primary); padding: 4px 14px; border-radius: 16px;
  font-size: 13px; transition: background .2s;
}
.product-card .card-try:hover { background: var(--primary-dark); }
.product-card.placeholder {
  border: 2px dashed #ddd; background: #fafafa;
  opacity: .6; pointer-events: none;
}
.product-card.placeholder .card-icon { background: #f0f0f0; }

@media (max-width: 1024px) { .product-card { flex: 0 0 calc(50% - 12px); } }
@media (max-width: 768px)  { .product-card { flex: 0 0 100%; } }

/* ===== Feature Cards (why us) ===== */
.feature-grid {
  display: flex; flex-wrap: wrap; gap: 24px;
}
.feature-card {
  flex: 0 0 calc(50% - 12px);
  padding: 28px;
  border-radius: var(--radius);
  background: var(--bg-white);
  border: 1px solid #eaeaea;
  transition: transform .3s, box-shadow .3s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-card .feat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--gradient-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.feature-card h3 { font-size: 17px; margin-bottom: 6px; }
.feature-card p { color: var(--text-secondary); font-size: 14px; }

@media (max-width: 768px) { .feature-card { flex: 0 0 100%; } }

/* ===== About / Stats ===== */
.about-section { background: var(--bg-light); }
.about-text {
  max-width: 720px; margin: 0 auto 40px;
  text-align: center;
  color: var(--text-secondary); font-size: 15px; line-height: 1.8;
}
.stats-row {
  display: flex; justify-content: center; gap: 48px; flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-item .num {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--primary);
}
.stat-item .label { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

/* ===== CTA Banner ===== */
.cta-banner {
  background: var(--gradient);
  padding: 60px 5%;
  text-align: center; color: #fff;
}
.cta-banner h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 20px; }

/* ===== Footer ===== */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 48px 5% 24px;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 32px;
}
.footer-brand .brand-name { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.footer-brand p { font-size: 13px; line-height: 1.6; }
.footer-links h4 { color: #fff; font-size: 14px; margin-bottom: 12px; }
.footer-links a { display: block; font-size: 13px; color: var(--footer-text); margin-bottom: 8px; }
.footer-links a:hover { color: #fff; }
.footer-contact h4 { color: #fff; font-size: 14px; margin-bottom: 12px; }
.footer-contact p { font-size: 13px; margin-bottom: 6px; }
.footer-contact a { color: var(--footer-text); }
.footer-contact a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--container); margin: 32px auto 0;
  padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1);
  text-align: center; font-size: 12px; color: rgba(255,255,255,.4);
}

@media (max-width: 768px) {
  .footer-inner { flex-direction: column; gap: 24px; }
}

/* ===== Chat Bubble ===== */
.chat-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff; border: none; cursor: pointer;
  font-size: 24px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(74,108,247,.4);
  transition: transform .3s, box-shadow .3s;
}
.chat-fab:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(74,108,247,.5); }

.chat-window {
  position: fixed; bottom: 92px; right: 24px; z-index: 9998;
  width: 380px; height: 520px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(.95);
  opacity: 0; pointer-events: none;
  transition: transform .3s ease, opacity .3s ease;
}
.chat-window.open {
  transform: translateY(0) scale(1);
  opacity: 1; pointer-events: auto;
}
.chat-window iframe {
  width: 100%; height: 100%; border: none;
}
.chat-close {
  position: absolute; top: 8px; right: 8px; z-index: 1;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,.3); color: #fff; border: none;
  cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.chat-close:hover { background: rgba(0,0,0,.5); }

@media (max-width: 768px) {
  .chat-window {
    width: 100%; height: 100%;
    bottom: 0; right: 0;
    border-radius: 0;
  }
  .chat-fab { bottom: 16px; right: 16px; }
}

/* ===== Scroll Animations ===== */
[data-animate] {
  opacity: 0; transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
[data-animate].visible {
  opacity: 1; transform: translateY(0);
}

/* ===== Product Detail Page ===== */
.product-hero {
  padding: 120px 5% 60px;
  background: var(--gradient);
  color: #fff; text-align: center;
}
.product-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800; margin-bottom: 12px;
}
.product-hero p {
  font-size: clamp(.95rem, 1.8vw, 1.15rem);
  opacity: .9; max-width: 640px; margin: 0 auto 28px;
}

/* Demo hint */
.demo-hint {
  margin-top: 16px; font-size: 14px; opacity: .8;
  background: rgba(255,255,255,.15); display: inline-block;
  padding: 6px 18px; border-radius: 20px;
}
.demo-hint strong { font-weight: 700; }

/* Pain points */
.pain-grid {
  display: flex; flex-wrap: wrap; gap: 24px;
}
.pain-card {
  flex: 0 0 calc(50% - 12px);
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid #eaeaea;
  display: flex; align-items: flex-start; gap: 16px;
  transition: transform .3s, box-shadow .3s;
}
.pain-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pain-card .pain-icon { font-size: 32px; flex-shrink: 0; }
.pain-card .pain-before { color: var(--text-muted); font-size: 13px; }
.pain-card .pain-after { font-weight: 600; font-size: 15px; margin-top: 4px; }
.pain-card .pain-arrow { color: var(--primary); margin: 0 2px; }

@media (max-width: 768px) { .pain-card { flex: 0 0 100%; } }

/* Core features grid */
.core-grid {
  display: flex; flex-wrap: wrap; gap: 24px;
}
.core-card {
  flex: 0 0 calc(33.333% - 16px);
  background: var(--bg-white);
  border: 1px solid #eaeaea;
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: transform .3s, box-shadow .3s;
}
.core-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.core-card .core-icon {
  width: 56px; height: 56px;
  border-radius: 14px; background: var(--gradient-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin: 0 auto 16px;
}
.core-card h3 { font-size: 16px; margin-bottom: 8px; }
.core-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

@media (max-width: 1024px) { .core-card { flex: 0 0 calc(50% - 12px); } }
@media (max-width: 768px)  { .core-card { flex: 0 0 100%; } }

/* Architecture dual columns */
.arch-columns {
  display: flex; gap: 32px; flex-wrap: wrap;
}
.arch-col {
  flex: 1; min-width: 280px;
  background: var(--bg-white);
  border: 1px solid #eaeaea;
  border-radius: var(--radius);
  padding: 28px;
}
.arch-col h3 {
  font-size: 17px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.arch-col ul li {
  padding: 6px 0; font-size: 14px; color: var(--text-secondary);
  display: flex; align-items: center; gap: 8px;
}
.arch-col ul li::before {
  content: ""; width: 6px; height: 6px;
  border-radius: 50%; background: var(--primary); flex-shrink: 0;
}

/* Scenario tags */
.scenario-tags {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}
.scenario-tag {
  padding: 10px 24px;
  border-radius: 30px;
  background: var(--gradient-light);
  color: var(--primary); font-weight: 600; font-size: 15px;
  transition: transform .2s;
}
.scenario-tag:hover { transform: scale(1.05); }
