/* ==================== AllSoft.asia - Global Stylesheet ==================== */
/* Designed for performance, accessibility, and SEO. No frameworks. */

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

:root {
  --c-primary: #2563eb;
  --c-primary-dark: #1d4ed8;
  --c-primary-light: #3b82f6;
  --c-accent: #06b6d4;
  --c-accent-dark: #0891b2;
  --c-bg: #ffffff;
  --c-bg-alt: #f8fafc;
  --c-bg-dark: #0f172a;
  --c-text: #1e293b;
  --c-text-light: #64748b;
  --c-text-lighter: #94a3b8;
  --c-border: #e2e8f0;
  --c-success: #10b981;
  --c-warning: #f59e0b;
  --c-danger: #ef4444;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.03);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --max-w: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
}

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

body {
  font-family: var(--font);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--c-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--c-primary-dark); text-decoration: underline; }

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

ul, ol { padding-left: 1.5rem; }

/* ---------- Container ---------- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-brand { display: flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 800; color: var(--c-text); text-decoration: none; }
.nav-brand:hover { text-decoration: none; }
.nav-brand .logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem; font-weight: 800;
}
.nav-brand .brand-text { background: linear-gradient(135deg, var(--c-primary), var(--c-accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; padding: 0; }
.nav-links a {
  padding: 8px 14px; border-radius: var(--radius-sm);
  color: var(--c-text); font-size: .9rem; font-weight: 500;
  transition: all .2s;
}
.nav-links a:hover { background: var(--c-bg-alt); color: var(--c-primary); text-decoration: none; }
.nav-links a.active { color: var(--c-primary); font-weight: 700; }
.nav-cta { margin-left: 12px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--c-text); margin: 5px 0; transition: .3s; }

@media (max-width: 768px) {
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--c-border);
    padding: 12px; gap: 4px; box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 16px; }
  .nav-toggle { display: block; }
  .nav-cta { margin-left: 0; margin-top: 8px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 24px; border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 600; cursor: pointer;
  border: none; transition: all .2s; text-decoration: none;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); color: #fff; box-shadow: var(--shadow-lg); }
.btn-accent { background: var(--c-accent); color: #fff; }
.btn-accent:hover { background: var(--c-accent-dark); color: #fff; box-shadow: var(--shadow-lg); }
.btn-outline { background: transparent; border: 2px solid var(--c-border); color: var(--c-text); }
.btn-outline:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-sm { padding: 6px 14px; font-size: .8rem; }

/* ---------- Hero ---------- */
.hero { padding: 80px 0 60px; background: linear-gradient(180deg, #f0f9ff 0%, #fff 100%); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #eff6ff; border: 1px solid #bfdbfe;
  color: var(--c-primary); font-size: .8rem; font-weight: 600;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 24px;
}
.hero h1 { font-size: 2.8rem; line-height: 1.2; font-weight: 800; margin-bottom: 20px; color: var(--c-bg-dark); }
.hero h1 .grad { background: linear-gradient(135deg, var(--c-primary), var(--c-accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p.lead { font-size: 1.15rem; color: var(--c-text-light); margin-bottom: 32px; max-width: 520px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-visual { position: relative; }
.hero-visual .hero-card {
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); padding: 28px;
  box-shadow: var(--shadow-xl);
}
.hero-visual .hero-card .hero-stat { text-align: center; }
.hero-visual .hero-card .hero-stat .num { font-size: 2.2rem; font-weight: 800; color: var(--c-primary); }
.hero-visual .hero-card .hero-stat .label { font-size: .85rem; color: var(--c-text-light); }

@media (max-width: 768px) {
  .hero { padding: 48px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 2rem; }
  .hero p.lead { font-size: 1rem; }
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--c-bg-alt); }
.section-dark { background: var(--c-bg-dark); color: #cbd5e1; }
.section-dark h2 { color: #fff; }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-header h2 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; color: var(--c-bg-dark); }
.section-dark .section-header h2 { color: #fff; }
.section-header p { font-size: 1.05rem; color: var(--c-text-light); }
.section-dark .section-header p { color: #94a3b8; }

@media (max-width: 768px) {
  .section { padding: 48px 0; }
  .section-header h2 { font-size: 1.6rem; }
}

/* ---------- Feature Cards ---------- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 32px 24px;
  transition: all .3s; position: relative; overflow: hidden;
}
.feature-card:hover { border-color: var(--c-primary); box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.feature-card .icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff, #e0f2fe);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 20px;
}
.feature-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; color: var(--c-bg-dark); }
.feature-card p { font-size: .9rem; color: var(--c-text-light); line-height: 1.65; }

@media (max-width: 768px) { .features-grid { grid-template-columns: 1fr; } }

/* ---------- Product Cards ---------- */
.products-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.product-card {
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); padding: 0; overflow: hidden;
  transition: all .3s;
}
.product-card:hover { box-shadow: var(--shadow-xl); transform: translateY(-4px); }
.product-card .product-head { padding: 28px 28px 0; }
.product-card .product-tag {
  display: inline-block; font-size: .75rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; margin-bottom: 12px;
}
.tag-live { background: #d1fae5; color: #065f46; }
.tag-new { background: #dbeafe; color: #1e40af; }
.tag-beta { background: #fef3c7; color: #92400e; }
.product-card h3 { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; }
.product-card .product-desc { font-size: .95rem; color: var(--c-text-light); margin-bottom: 20px; }
.product-card .product-body { padding: 0 28px 28px; }
.product-card .product-features { list-style: none; padding: 0; margin-bottom: 24px; }
.product-card .product-features li { padding: 6px 0; font-size: .9rem; color: var(--c-text); display: flex; align-items: center; gap: 8px; }
.product-card .product-features li::before { content: "\2713"; color: var(--c-success); font-weight: 700; }

@media (max-width: 768px) { .products-grid { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pricing-card {
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); padding: 32px 28px;
  text-align: center; transition: all .3s; position: relative;
}
.pricing-card:hover { box-shadow: var(--shadow-xl); }
.pricing-card.featured { border-color: var(--c-primary); border-width: 2px; }
.pricing-card.featured::before {
  content: "\u6700\u53d7\u6b22\u8fce"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--c-primary); color: #fff; font-size: .75rem; font-weight: 700;
  padding: 4px 14px; border-radius: 999px;
}
.pricing-card .plan-name { font-size: 1.1rem; font-weight: 700; color: var(--c-text-light); margin-bottom: 12px; }
.pricing-card .plan-price { font-size: 2.5rem; font-weight: 800; color: var(--c-bg-dark); margin-bottom: 4px; }
.pricing-card .plan-price .unit { font-size: 1rem; font-weight: 500; color: var(--c-text-light); }
.pricing-card .plan-desc { font-size: .85rem; color: var(--c-text-light); margin-bottom: 24px; }
.pricing-card .plan-features { list-style: none; padding: 0; margin-bottom: 28px; text-align: left; }
.pricing-card .plan-features li { padding: 8px 0; font-size: .9rem; border-bottom: 1px solid var(--c-border); }
.pricing-card .plan-features li:last-child { border-bottom: none; }

@media (max-width: 768px) { .pricing-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border: 1px solid var(--c-border); border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden; }
.faq-question {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; cursor: pointer; font-weight: 600; font-size: 1rem;
  color: var(--c-bg-dark); background: #fff; border: none; width: 100%;
  text-align: left; transition: background .2s;
}
.faq-question:hover { background: var(--c-bg-alt); }
.faq-question .faq-icon { font-size: 1.3rem; color: var(--c-primary); transition: transform .3s; }
.faq-item.open .faq-question .faq-icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-item.open .faq-answer { max-height: 500px; }
.faq-answer-inner { padding: 0 24px 20px; color: var(--c-text-light); font-size: .95rem; line-height: 1.7; }

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.blog-card {
  background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--radius); overflow: hidden; transition: all .3s;
  display: flex; flex-direction: column;
}
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.blog-card .blog-img {
  width: 100%; height: 200px; object-fit: cover;
  background: linear-gradient(135deg, #e0f2fe, #f0f9ff);
}
.blog-card .blog-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.blog-card .blog-meta { font-size: .8rem; color: var(--c-text-lighter); margin-bottom: 10px; }
.blog-card .blog-cat {
  display: inline-block; font-size: .75rem; font-weight: 600;
  color: var(--c-primary); margin-bottom: 8px;
}
.blog-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; color: var(--c-bg-dark); }
.blog-card p { font-size: .9rem; color: var(--c-text-light); flex: 1; }
.blog-card .blog-read { margin-top: 16px; font-size: .85rem; font-weight: 600; color: var(--c-primary); }

@media (max-width: 768px) { .blog-grid { grid-template-columns: 1fr; } }

/* ---------- Article ---------- */
.article { max-width: 760px; margin: 0 auto; padding: 48px 0; }
.article-header { margin-bottom: 32px; }
.article-header h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 12px; color: var(--c-bg-dark); }
.article-meta { font-size: .9rem; color: var(--c-text-light); display: flex; gap: 16px; align-items: center; }
.article-body { font-size: 1.05rem; line-height: 1.85; color: var(--c-text); }
.article-body h2 { font-size: 1.5rem; font-weight: 700; margin: 36px 0 16px; color: var(--c-bg-dark); }
.article-body h3 { font-size: 1.2rem; font-weight: 700; margin: 28px 0 12px; color: var(--c-bg-dark); }
.article-body p { margin-bottom: 18px; }
.article-body ul, .article-body ol { margin-bottom: 18px; }
.article-body li { margin-bottom: 8px; }
.article-body blockquote {
  border-left: 4px solid var(--c-primary); padding: 12px 20px;
  margin: 24px 0; background: var(--c-bg-alt); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--c-text-light); font-style: italic;
}
.article-body code { font-family: var(--mono); background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.article-body pre { background: #1e293b; color: #e2e8f0; padding: 20px; border-radius: var(--radius-sm); overflow-x: auto; margin: 24px 0; }
.article-body pre code { background: none; padding: 0; }
.article-body table { width: 100%; border-collapse: collapse; margin: 24px 0; }
.article-body th, .article-body td { border: 1px solid var(--c-border); padding: 12px 16px; text-align: left; }
.article-body th { background: var(--c-bg-alt); font-weight: 700; }

@media (max-width: 768px) {
  .article-header h1 { font-size: 1.6rem; }
  .article-body { font-size: 1rem; }
}

/* ---------- Chat Embed ---------- */
.chat-embed-wrapper {
  width: 100%; height: calc(100vh - 64px); min-height: 600px;
  position: relative; overflow: hidden;
}
.chat-embed-wrapper iframe { width: 100%; height: 100%; border: none; }

/* ---------- Stats ---------- */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat-item .stat-num { font-size: 2.5rem; font-weight: 800; color: var(--c-primary); margin-bottom: 4px; }
.stat-item .stat-label { font-size: .9rem; color: var(--c-text-light); }

@media (max-width: 768px) { .stats-row { grid-template-columns: repeat(2, 1fr); } }

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  border-radius: var(--radius-lg); padding: 48px;
  text-align: center; color: #fff;
}
.cta-banner h2 { font-size: 1.8rem; font-weight: 800; margin-bottom: 12px; color: #fff; }
.cta-banner p { font-size: 1.05rem; margin-bottom: 28px; opacity: .9; }
.cta-banner .btn { background: #fff; color: var(--c-primary); }
.cta-banner .btn:hover { background: #f8fafc; }

@media (max-width: 768px) { .cta-banner { padding: 32px 20px; } .cta-banner h2 { font-size: 1.4rem; } }

/* ---------- Contact Form ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 48px; }
.contact-info h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 16px; }
.contact-info p { color: var(--c-text-light); margin-bottom: 12px; }
.contact-form .form-group { margin-bottom: 20px; }
.contact-form label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px 16px; border: 1px solid var(--c-border);
  border-radius: var(--radius-sm); font-size: .95rem; font-family: var(--font);
  transition: border-color .2s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.contact-form textarea { resize: vertical; min-height: 120px; }

@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--c-bg-dark); color: #94a3b8; padding: 60px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand { font-size: 1.2rem; font-weight: 800; color: #fff; margin-bottom: 12px; }
.footer-desc { font-size: .85rem; line-height: 1.7; max-width: 280px; }
.footer-col h4 { font-size: .9rem; font-weight: 700; color: #fff; margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #94a3b8; font-size: .85rem; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 24px; display: flex; justify-content: space-between; align-items: center; font-size: .8rem; }
.footer-bottom a { color: #94a3b8; }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { padding: 16px 0; font-size: .85rem; color: var(--c-text-light); }
.breadcrumb a { color: var(--c-text-light); }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb span.sep { margin: 0 8px; }

/* ---------- Page Header ---------- */
.page-header { padding: 48px 0 32px; background: linear-gradient(180deg, #f0f9ff, #fff); }
.page-header h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 8px; color: var(--c-bg-dark); }
.page-header p { font-size: 1.05rem; color: var(--c-text-light); }

@media (max-width: 768px) { .page-header h1 { font-size: 1.6rem; } }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.hidden { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
