/* =============================================
   KARYAWANROBOT — Main Stylesheet
   ============================================= */

/* --- RESET & BASE --- */
*, *::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;
  background: #0b1120;
  color: #e2e8f0;
  line-height: 1.6;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 30px; font-weight: 700; }
.section-title h2 span { color: #38bdf8; }
.section-title p { color: #64748b; margin-top: 8px; font-size: 15px; max-width: 500px; margin-left: auto; margin-right: auto; }

/* --- NAVBAR --- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(11, 17, 32, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #1e293b;
}
.navbar .container {
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.logo { font-size: 20px; font-weight: 700; }
.logo span { color: #38bdf8; }
.nav-links { display: flex; align-items: center; gap: 24px; list-style: none; }
.nav-links a { font-size: 14px; color: #94a3b8; transition: color .2s; }
.nav-links a:hover { color: #38bdf8; }
.btn-nav {
  display: inline-block; padding: 8px 16px; background: #16a34a; color: white !important;
  border-radius: 8px; font-weight: 600; font-size: 13px !important;
}
.btn-nav:hover { background: #15803d !important; }
.hamburger { display: none; font-size: 24px; cursor: pointer; color: #94a3b8; }

/* --- HERO --- */
.hero {
  padding: 120px 0 80px;
  background: linear-gradient(180deg, #0b1120 0%, #0f172a 50%, #0b1120 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(ellipse at 30% 40%, rgba(37,99,235,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.hero .container {
  display: flex; align-items: center; gap: 60px; position: relative; z-index: 1;
}
.hero-content { flex: 1; }
.hero-badge {
  display: inline-block; padding: 4px 14px; background: rgba(37,99,235,0.15);
  color: #38bdf8; border-radius: 20px; font-size: 12px; font-weight: 600;
  margin-bottom: 16px; border: 1px solid rgba(37,99,235,0.3);
}
.hero h1 { font-size: 42px; line-height: 1.2; margin-bottom: 16px; }
.hero h1 span { color: #38bdf8; background: linear-gradient(135deg, #38bdf8, #818cf8); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { color: #64748b; font-size: 16px; max-width: 480px; margin-bottom: 28px; }
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary {
  display: inline-block; padding: 12px 28px; background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white; border-radius: 10px; font-weight: 600; font-size: 15px; transition: all .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,99,235,0.3); }
.btn-secondary {
  display: inline-block; padding: 12px 28px; background: transparent;
  color: #94a3b8; border-radius: 10px; font-weight: 600; font-size: 15px;
  border: 1px solid #334155; transition: all .2s;
}
.btn-secondary:hover { border-color: #2563eb; color: #38bdf8; }
.btn-large { padding: 16px 40px; font-size: 17px; }
.hero-stats { display: flex; gap: 32px; margin-top: 32px; }
.hero-stats strong { display: block; font-size: 22px; color: #38bdf8; }
.hero-stats span { font-size: 12px; color: #64748b; }

.hero-visual { flex: 1; max-width: 360px; }
.hero-card {
  background: #1e293b; border-radius: 16px; padding: 20px;
  border: 1px solid #334155; display: flex; flex-direction: column; gap: 10px;
}
.chat-bubble {
  padding: 10px 14px; border-radius: 12px; font-size: 13px; max-width: 85%;
}
.chat-bubble.bot {
  background: #2563eb; color: white; align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-bubble.user {
  background: #334155; color: #e2e8f0; align-self: flex-end;
  border-bottom-right-radius: 4px;
}

/* --- AGENTS --- */
.agents { padding: 80px 0; background: #0f172a; }
.agent-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.agent-card {
  background: #1e293b; border-radius: 16px; padding: 24px;
  border: 1px solid #334155; cursor: pointer;
  transition: all .3s; position: relative; overflow: hidden;
}
.agent-card:hover { transform: translateY(-6px); border-color: #2563eb; box-shadow: 0 12px 40px rgba(0,0,0,0.3); }
.agent-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #2563eb, #38bdf8); opacity: 0; transition: opacity .3s;
}
.agent-card:hover::before { opacity: 1; }
.agent-icon { font-size: 40px; margin-bottom: 12px; }
.agent-card h3 { font-size: 18px; margin-bottom: 2px; }
.agent-name { color: #38bdf8; font-size: 13px; margin-bottom: 10px; }
.agent-card p { color: #64748b; font-size: 13px; margin-bottom: 12px; }
.agent-card ul { list-style: none; margin-bottom: 16px; }
.agent-card ul li { font-size: 12px; color: #94a3b8; padding: 3px 0; }
.btn-card {
  display: inline-block; color: #38bdf8; font-size: 13px; font-weight: 600;
  transition: gap .2s; display: inline-flex; align-items: center; gap: 4px;
}
.btn-card:hover { gap: 8px; }

/* --- HOW IT WORKS --- */
.how-it-works { padding: 80px 0; background: #0b1120; }
.steps {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; flex-wrap: wrap;
}
.step {
  background: #1e293b; border-radius: 16px; padding: 28px 24px;
  text-align: center; flex: 1; min-width: 180px; max-width: 260px;
  border: 1px solid #334155; position: relative;
}
.step-num {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: #2563eb; color: white; width: 24px; height: 24px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}
.step-icon { font-size: 36px; margin-bottom: 10px; }
.step h3 { font-size: 15px; margin-bottom: 6px; }
.step p { font-size: 12px; color: #64748b; }
.step-arrow { font-size: 24px; color: #334155; }

/* --- WHY US --- */
.why-us { padding: 80px 0; background: #0f172a; }
.benefits {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px;
}
.benefit {
  background: #1e293b; border-radius: 12px; padding: 20px;
  border: 1px solid #334155; transition: all .3s;
}
.benefit:hover { border-color: #2563eb; }
.benefit-icon { font-size: 28px; margin-bottom: 8px; }
.benefit h3 { font-size: 15px; margin-bottom: 4px; }
.benefit p { font-size: 12px; color: #64748b; }

/* --- PRICING SNEAK --- */
.pricing-sneak {
  padding: 60px 0; text-align: center;
  background: linear-gradient(180deg, #0f172a, #0b1120);
}

/* --- FAQ --- */
.faq { padding: 80px 0; background: #0b1120; }
.faq-list { max-width: 640px; margin: 0 auto; }
.faq-item {
  background: #1e293b; border-radius: 12px; padding: 16px 20px;
  margin-bottom: 10px; border: 1px solid #334155; cursor: pointer;
  transition: all .3s;
}
.faq-item:hover { border-color: #334155; }
.faq-item h4 { font-size: 14px; color: #cbd5e1; }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height .3s, padding .3s;
  font-size: 13px; color: #64748b; padding-top: 0;
}
.faq-item.open .faq-answer {
  max-height: 200px; padding-top: 10px;
}

/* --- CTA --- */
.cta {
  padding: 80px 0; text-align: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-top: 1px solid #1e293b; border-bottom: 1px solid #1e293b;
}
.cta h2 { font-size: 28px; margin-bottom: 10px; }
.cta h2 span { color: #38bdf8; }
.cta p { color: #64748b; margin-bottom: 24px; }

/* --- FOOTER --- */
footer { padding: 60px 0 30px; background: #0b1120; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
}
.footer-brand h3 { font-size: 18px; margin-bottom: 8px; }
.footer-brand p { font-size: 13px; color: #64748b; }
.footer-links h4 { font-size: 14px; margin-bottom: 12px; color: #94a3b8; }
.footer-links a {
  display: block; font-size: 13px; color: #475569; margin-bottom: 6px;
  transition: color .2s;
}
.footer-links a:hover { color: #38bdf8; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .nav-links { 
    display: none; position: fixed; top: 64px; left: 0; right: 0;
    background: #0b1120; border-bottom: 1px solid #1e293b;
    flex-direction: column; padding: 20px; gap: 16px;
  }
  .nav-links.active { display: flex; }
  .hamburger { display: block; }
  .hero .container { flex-direction: column; gap: 40px; }
  .hero h1 { font-size: 30px; }
  .hero-visual { max-width: 100%; }
  .hero-stats { gap: 20px; }
  .steps { flex-direction: column; }
  .step-arrow { transform: rotate(90deg); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 26px; }
  .hero-buttons { flex-direction: column; }
  .hero-stats { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ==============================
   Chat Demo Section (Homepage)
   ============================== */
.chat-demo-section {
  padding: 80px 0; background: #0f172a;
}
.demo-wrapper {
  display: flex; gap: 30px; align-items: flex-start;
  max-width: 800px; margin: 0 auto;
}
.demo-selector {
  display: flex; flex-direction: column; gap: 6px;
  min-width: 140px;
}
.agent-select-btn {
  background: #1e293b; border: 1px solid #334155;
  color: #94a3b8; padding: 10px 14px; border-radius: 10px;
  cursor: pointer; text-align: left; transition: all .2s;
  font-size: 12px; line-height: 1.4;
}
.agent-select-btn:hover { border-color: #475569; background: #263548; }
.agent-select-btn.active {
  background: #2563eb22; border-color: #2563eb; color: #60a5fa;
  box-shadow: 0 0 0 1px #2563eb33;
}
.agent-select-btn small {
  display: block; font-size: 10px; color: #64748b; font-weight: 400;
}
.agent-select-btn.active small { color: #93c5fd; }
.chat-demo-widget-inline {
  flex: 1; background: #1e293b; border-radius: 16px;
  border: 1px solid #334155; overflow: hidden;
}
.chat-demo-widget-inline .chat-demo-body {
  min-height: 300px; max-height: 380px;
}

@media (max-width: 640px) {
  .demo-wrapper { flex-direction: column; }
  .demo-selector { flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .agent-select-btn { flex: 1; min-width: 80px; font-size: 11px; padding: 8px 10px; text-align: center; }
}
