/* Babuba — chaya.in landing · x.ai-inspired dark theme */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #000;
  --panel: #0a0a0a;
  --border: #1f1f1f;
  --text: #f5f5f5;
  --muted: #8a8a8a;
  --accent: #ffffff;
  --grad1: #ffffff;
  --grad2: #9a9a9a;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Background ─────────────────────────────── */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 30%, transparent 75%);
}
.bg-glow {
  position: fixed; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 55% 40% at 50% -5%, rgba(255,255,255,.10), transparent 70%);
}

/* ── Nav ────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 48px;
  backdrop-filter: blur(12px);
  background: rgba(0,0,0,.6);
  border-bottom: 1px solid var(--border);
}
.logo { font-weight: 700; font-size: 18px; letter-spacing: 2px; text-decoration: none; color: var(--text); }
.logo-dot { color: #fff; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 14px;
  margin: 0 18px; transition: color .2s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  color: #000; background: #fff; text-decoration: none; font-size: 13px; font-weight: 600;
  padding: 9px 18px; border-radius: 999px; transition: opacity .2s;
}
.nav-cta:hover { opacity: .8; }

/* ── Hero ───────────────────────────────────── */
.hero { padding: 130px 24px 80px; text-align: center; max-width: 900px; margin: 0 auto; }
.hero-badge {
  display: inline-block; font-size: 12px; letter-spacing: 2px; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 7px 16px; margin-bottom: 28px;
}
.hero-title { font-size: clamp(42px, 7vw, 76px); font-weight: 600; line-height: 1.05; letter-spacing: -2px; }
.grad {
  background: linear-gradient(90deg, var(--grad1), var(--grad2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { color: var(--muted); font-size: 18px; max-width: 640px; margin: 26px auto 0; font-weight: 300; }
.hero-ctas { margin-top: 38px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 13px 28px; border-radius: 999px; font-size: 14px;
  font-weight: 600; text-decoration: none; transition: all .2s; border: 1px solid transparent;
}
.btn-primary { background: #fff; color: #000; }
.btn-primary:hover { opacity: .85; }
.btn-ghost { color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: #555; }

.hero-stats {
  display: flex; justify-content: center; gap: 48px; margin-top: 72px; flex-wrap: wrap;
  border-top: 1px solid var(--border); padding-top: 36px;
}
.stat { text-align: center; }
.stat-num { font-size: 30px; font-weight: 600; letter-spacing: -1px; }
.stat-label { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ── Sections ───────────────────────────────── */
.section { padding: 100px 24px; max-width: 1080px; margin: 0 auto; }
.section-label { font-size: 12px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; }
.section-title { font-size: clamp(30px, 4.5vw, 46px); font-weight: 600; letter-spacing: -1px; margin-top: 14px; }
.section-sub { color: var(--muted); font-size: 16px; max-width: 620px; margin-top: 14px; font-weight: 300; }

/* ── Bot demo ───────────────────────────────── */
.bot-demo {
  margin-top: 40px; border: 1px solid var(--border); border-radius: 18px;
  background: var(--panel); overflow: hidden;
}
.demo-chat {
  height: 340px; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 12px;
}
.msg {
  max-width: 78%; padding: 12px 16px; border-radius: 14px; font-size: 14px; line-height: 1.55;
  animation: fadeUp .3s ease;
}
.msg-bot { background: #141414; color: var(--text); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-user { background: #fff; color: #000; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.typing { color: var(--muted); font-style: italic; }
.demo-input { display: flex; border-top: 1px solid var(--border); padding: 12px; gap: 10px; }
.demo-input input, .widget-input input {
  flex: 1; background: #0f0f0f; border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); padding: 12px 16px; font-size: 14px; outline: none; font-family: inherit;
}
.demo-input input:focus, .widget-input input:focus { border-color: #444; }
.demo-input button, .widget-input button {
  background: #fff; color: #000; border: none; border-radius: 10px; width: 46px;
  font-size: 16px; cursor: pointer; transition: opacity .2s;
}
.demo-input button:hover, .widget-input button:hover { opacity: .85; }

/* ── Features ───────────────────────────────── */
.features {
  margin-top: 46px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px;
}
.feature {
  border: 1px solid var(--border); border-radius: 16px; padding: 28px;
  background: linear-gradient(180deg, #0b0b0b, #070707); transition: border-color .2s, transform .2s;
}
.feature:hover { border-color: #3a3a3a; transform: translateY(-3px); }
.feat-icon { color: var(--muted); font-size: 18px; margin-bottom: 14px; }
.feature h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 14px; font-weight: 300; }

/* ── Contact ────────────────────────────────── */
.contact-row { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ── Footer ─────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 28px 24px; }
.footer-inner {
  max-width: 1080px; margin: 0 auto; display: flex; justify-content: space-between;
  color: var(--muted); font-size: 13px; flex-wrap: wrap; gap: 8px;
}

/* ── Floating widget ────────────────────────── */
.fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 100;
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  background: #fff; color: #000; font-size: 20px; box-shadow: 0 8px 30px rgba(255,255,255,.15);
  transition: transform .2s;
}
.fab:hover { transform: scale(1.08); }
.widget {
  position: fixed; bottom: 92px; right: 24px; z-index: 100;
  width: 360px; max-width: calc(100vw - 32px);
  border: 1px solid var(--border); border-radius: 18px; background: var(--panel);
  box-shadow: 0 20px 60px rgba(0,0,0,.7); overflow: hidden;
  display: flex; flex-direction: column;
}
.widget[hidden] { display: none !important; }
.widget-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--border); background: #0d0d0d;
}
.widget-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: #4ade80;
  box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(74,222,128,.6); }
  70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); }
  100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
}
.widget-close { background: none; border: none; color: var(--muted); font-size: 14px; cursor: pointer; }
.widget-body { height: 320px; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.widget-input { display: flex; padding: 12px; gap: 10px; border-top: 1px solid var(--border); }
.widget-input input { padding: 10px 14px; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
  .nav { padding: 16px 20px; }
  .nav-links { display: none; }
  .hero { padding: 90px 20px 60px; }
  .hero-stats { gap: 28px; }
  .widget { bottom: 80px; right: 16px; }
}

/* ── New sections: video, what-is, use cases, steps ── */
.video-wrap { max-width: 860px; margin: 48px auto 0; }
.video {
  width: 100%; border-radius: 16px; border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0,0,0,.6); background: #000; display: block;
}
.video-caption { color: var(--muted); font-size: 13px; margin-top: 14px; text-align: center; font-weight: 300; }

.whatis { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; max-width: 1000px; margin: 48px auto 0; text-align: left; align-items: start; }
.whatis-text p { color: var(--muted); font-size: 16px; font-weight: 300; margin-bottom: 18px; }
.whatis-text b { color: var(--text); font-weight: 500; }
.whatis-list { display: flex; flex-direction: column; gap: 18px; }
.hi { display: flex; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel); }
.hi-ic { font-size: 20px; line-height: 1.4; }
.hi b { font-size: 14px; }
.hi p { color: var(--muted); font-size: 13px; font-weight: 300; margin-top: 2px; }

.usecases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 1000px; margin: 48px auto 0; }
.ucase { padding: 24px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); text-align: left; transition: border-color .2s; }
.ucase:hover { border-color: #3a3a3a; }
.uc-ic { font-size: 24px; }
.ucase h3 { font-size: 16px; margin: 12px 0 6px; font-weight: 600; }
.ucase p { color: var(--muted); font-size: 13.5px; font-weight: 300; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 1000px; margin: 48px auto 0; }
.step { padding: 28px 24px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); text-align: left; position: relative; }
.step-num {
  width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #000;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; margin-bottom: 16px;
}
.step h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 13.5px; font-weight: 300; }

@media (max-width: 760px) {
  .whatis { grid-template-columns: 1fr; gap: 28px; }
  .usecases { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}
