/* ============================================================
   BessChat — design system
   ============================================================ */
:root {
  --bg:        #0a0b14;
  --bg-2:      #0f1120;
  --surface:   #14172a;
  --surface-2: #1b1f38;
  --line:      rgba(255,255,255,.08);
  --line-2:    rgba(255,255,255,.14);
  --text:      #eef0fb;
  --muted:     #a0a6c7;
  --muted-2:   #757aa0;
  --brand:     #7c5cff;
  --brand-2:   #22d3ee;
  --accent:    #ff5c9d;
  --good:      #34d399;
  --radius:    18px;
  --radius-sm: 12px;
  --maxw:      1140px;
  --shadow:    0 24px 60px -20px rgba(0,0,0,.6);
  --grad:      linear-gradient(120deg, var(--brand), var(--brand-2));
  --grad-2:    linear-gradient(120deg, var(--accent), var(--brand));
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1,h2,h3,.brand__name { font-family: 'Sora', sans-serif; line-height: 1.1; letter-spacing: -.02em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.grad  { background: var(--grad);   -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad--2 { background: var(--grad-2); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 600; font-family: 'Sora', sans-serif; font-size: .95rem;
  padding: .7rem 1.15rem; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .25s ease, background .2s ease, border-color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 12px 30px -10px rgba(124,92,255,.7); }
.btn--ghost { background: rgba(255,255,255,.04); border-color: var(--line-2); color: var(--text); }
.btn--ghost:hover { background: rgba(255,255,255,.09); }
.btn--lg { padding: .95rem 1.5rem; font-size: 1.02rem; }
.btn--sm { padding: .5rem .9rem; font-size: .85rem; }
.btn--block { width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10,11,20,.6);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.is-stuck { border-color: var(--line); background: rgba(10,11,20,.85); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; }
.brand__mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--grad);
  display: grid; place-items: center; font-family: 'Sora'; font-weight: 800; color: #fff;
  box-shadow: 0 6px 18px -6px rgba(124,92,255,.8);
}
.brand__name { font-size: 1.15rem; }
.brand__dot { color: var(--brand-2); }
.nav__links { display: flex; align-items: center; gap: 1.6rem; }
.nav__links a { color: var(--muted); font-weight: 500; font-size: .95rem; transition: color .2s; }
.nav__links a:hover { color: var(--text); }
.nav__links .btn { color: var(--text); }
.nav__toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 70px 0 60px; overflow: hidden; }
.hero__glow {
  position: absolute; inset: -30% 0 auto 0; height: 700px; z-index: 0; pointer-events: none;
  background:
    radial-gradient(600px 380px at 18% 20%, rgba(124,92,255,.35), transparent 60%),
    radial-gradient(600px 380px at 85% 10%, rgba(34,211,238,.28), transparent 60%),
    radial-gradient(500px 380px at 60% 60%, rgba(255,92,157,.18), transparent 60%);
  filter: blur(10px);
}
.hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center;
}
.pill {
  display: inline-block; font-size: .82rem; font-weight: 600; color: var(--text);
  background: rgba(255,255,255,.05); border: 1px solid var(--line-2);
  padding: .4rem .85rem; border-radius: 999px; margin-bottom: 1.4rem;
}
.hero__title { font-size: clamp(2.2rem, 5vw, 3.7rem); font-weight: 800; margin-bottom: 1.1rem; }
.hero__sub { font-size: 1.12rem; color: var(--muted); max-width: 42ch; margin-bottom: 1.8rem; }
.hero__cta { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 2.2rem; }
.hero__stats { display: flex; gap: 2rem; flex-wrap: wrap; }
.hero__stats div { display: flex; flex-direction: column; }
.hero__stats strong { font-family: 'Sora'; font-size: 1.5rem; }
.hero__stats span { color: var(--muted-2); font-size: .85rem; }

/* mock chat (hero) */
.mockchat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.mockchat__bar {
  display: flex; align-items: center; gap: .45rem; padding: .8rem 1rem;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot--r { background: #ff5f57; } .dot--y { background: #febc2e; } .dot--g { background: #28c840; }
.mockchat__title { margin-left: .6rem; font-size: .85rem; color: var(--muted); font-weight: 500; }
.mockchat__body { padding: 1.1rem; display: flex; flex-direction: column; gap: .7rem; min-height: 300px; max-height: 360px; overflow-y: auto; }
.mockchat--lg .mockchat__body { min-height: 380px; max-height: 440px; }

.msg { max-width: 80%; padding: .7rem .95rem; border-radius: 16px; font-size: .92rem; animation: pop .35s ease both; }
.msg--bot { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg--user { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 5px; }
.msg--rich { display: flex; flex-direction: column; gap: .55rem; }
.msg__card {
  display: flex; gap: .6rem; align-items: center; background: rgba(255,255,255,.04);
  border: 1px solid var(--line); border-radius: 12px; padding: .55rem .7rem;
}
.msg__card b { font-size: .9rem; } .msg__card span { font-size: .8rem; color: var(--muted); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

.typing { display: inline-flex; gap: 4px; align-items: center; padding: .8rem 1rem !important; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite both; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,60%,100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); background: var(--bg-2); overflow: hidden; padding: .9rem 0; }
.marquee__track { display: flex; gap: 1.6rem; white-space: nowrap; width: max-content; animation: scroll 32s linear infinite; color: var(--muted-2); font-weight: 600; letter-spacing: .04em; }
.marquee__track span { font-size: .95rem; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 86px 0; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .18em; font-size: .76rem; font-weight: 700; color: var(--brand-2); margin-bottom: .8rem; }
.section__head h2 { font-size: clamp(1.8rem, 3.5vw, 2.7rem); margin-bottom: .8rem; }
.section__head p { color: var(--muted); font-size: 1.05rem; }

/* ---------- Cards ---------- */
.cards { display: grid; gap: 22px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; position: relative; transition: transform .2s, border-color .2s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow); }
.card--hot { border-color: rgba(124,92,255,.5); background: linear-gradient(180deg, rgba(124,92,255,.08), var(--surface)); }
.card__icon { font-size: 2rem; margin-bottom: .9rem; }
.card h3 { font-size: 1.3rem; margin-bottom: .5rem; }
.card p { color: var(--muted); margin-bottom: 1rem; }
.badge {
  position: absolute; top: -11px; left: 1.6rem; background: var(--grad); color: #fff;
  font-size: .72rem; font-weight: 700; padding: .25rem .7rem; border-radius: 999px; font-family: 'Sora';
}

.ticks { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.ticks li { position: relative; padding-left: 1.6rem; color: var(--muted); font-size: .92rem; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--good); font-weight: 700; }
.ticks--big li { color: var(--text); font-size: 1rem; }

/* ---------- Tabs / Examples ---------- */
.tabs { display: flex; gap: .5rem; justify-content: center; margin-bottom: 36px; flex-wrap: wrap; }
.tab {
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  padding: .6rem 1.1rem; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .92rem; transition: .2s;
}
.tab:hover { color: var(--text); }
.tab.is-active { background: var(--grad); color: #fff; border-color: transparent; }
.tabpanel { display: none; animation: pop .4s ease; }
.tabpanel.is-active { display: block; }

.example { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .25s; }
.example:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: var(--shadow); }
.example__shot { height: 170px; display: grid; place-items: center; position: relative; }
.example__shot--food { background: linear-gradient(135deg,#2b1410,#7a2d1c 60%,#c2562f); }
.example__shot--saas { background: linear-gradient(135deg,#0e1b3a,#1d3a8a 60%,#3b82f6); }
.example__shot--folio { background: linear-gradient(135deg,#1a0f2e,#4c1d95 60%,#db2777); }
.example__tagline { font-family: 'Sora'; font-weight: 800; font-size: 1.6rem; color: #fff; text-shadow: 0 4px 20px rgba(0,0,0,.4); }
.example__meta { padding: 1.3rem 1.4rem 1.5rem; }
.example__meta h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.example__meta p { color: var(--muted); font-size: .92rem; margin-bottom: .9rem; }
.example__open { color: var(--brand-2); font-weight: 600; font-size: .9rem; }

/* ---------- Chatbot demo grid ---------- */
.botgrid { display: grid; grid-template-columns: 250px 1fr; gap: 22px; align-items: start; }
.botgrid__menu { display: flex; flex-direction: column; gap: .6rem; }
.botpick {
  text-align: left; background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  padding: .85rem 1rem; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: .94rem; transition: .2s;
}
.botpick:hover { color: var(--text); border-color: var(--line-2); }
.botpick.is-active { background: linear-gradient(180deg, rgba(124,92,255,.14), var(--surface)); color: var(--text); border-color: rgba(124,92,255,.5); }
.botgrid__chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }

.mockchat__input, .widget__input { display: flex; gap: .5rem; padding: .7rem; border-top: 1px solid var(--line); background: var(--surface-2); }
.mockchat__input input, .widget__input input {
  flex: 1; background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: .65rem 1rem; color: var(--text); font-size: .92rem; outline: none;
}
.mockchat__input input:focus, .widget__input input:focus { border-color: var(--brand); }
.mockchat__input button, .widget__input button {
  width: 42px; border: none; border-radius: 50%; background: var(--grad); color: #fff; cursor: pointer; font-size: 1rem;
}
.chip {
  background: rgba(255,255,255,.05); border: 1px solid var(--line-2); color: var(--muted);
  padding: .45rem .85rem; border-radius: 999px; cursor: pointer; font-size: .85rem; transition: .2s;
}
.chip:hover { color: var(--text); border-color: var(--brand); background: rgba(124,92,255,.12); }

/* ---------- Pricing ---------- */
.pricing { align-items: stretch; }
.price { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem 1.6rem; display: flex; flex-direction: column; position: relative; }
.price--featured { border-color: rgba(124,92,255,.55); background: linear-gradient(180deg, rgba(124,92,255,.1), var(--surface)); transform: scale(1.02); box-shadow: var(--shadow); }
.price h3 { font-size: 1.25rem; margin-bottom: .4rem; }
.price__amt { font-family: 'Sora'; font-weight: 800; font-size: 2.6rem; display: flex; align-items: flex-start; gap: .1rem; margin-bottom: .6rem; }
.price__amt span { font-size: 1.2rem; margin-top: .4rem; color: var(--muted); }
.price__amt small { font-size: .8rem; font-weight: 500; color: var(--muted-2); align-self: flex-end; margin-bottom: .55rem; margin-left: .35rem; font-family: 'Inter'; }
.price__desc { color: var(--muted); margin-bottom: 1.1rem; font-size: .94rem; }
.price .ticks { margin-bottom: 1.5rem; flex: 1; }
.price__note { text-align: center; color: var(--muted); margin-top: 28px; }

/* ---------- Steps ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: s; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; position: relative; }
.step__num { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--grad); color: #fff; font-family: 'Sora'; font-weight: 800; margin-bottom: .9rem; }
.step h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.step p { color: var(--muted); font-size: .92rem; }

/* ---------- Quotes ---------- */
.quote { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.quote p { font-size: 1.05rem; margin-bottom: 1rem; }
.quote figcaption { color: var(--muted); font-size: .9rem; }
.quote figcaption strong { color: var(--text); }

/* ---------- CTA / form ---------- */
.section--cta { background: var(--bg-2); border-top: 1px solid var(--line); }
.cta { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.cta__copy h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: .8rem; }
.cta__copy p { color: var(--muted); margin-bottom: 1.4rem; font-size: 1.05rem; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 1rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label { display: flex; flex-direction: column; gap: .4rem; font-size: .88rem; font-weight: 600; color: var(--muted); }
.form input, .form select, .form textarea {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .75rem .9rem; color: var(--text); font: inherit; font-size: .95rem; font-weight: 400; outline: none; transition: border-color .2s;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--brand); }
.form textarea { resize: vertical; }
.form__status { font-size: .9rem; text-align: center; min-height: 1.2em; }
.form__status.is-ok { color: var(--good); }
.form__status.is-err { color: var(--accent); }

/* ---------- Footer ---------- */
.footer { padding: 56px 0 40px; border-top: 1px solid var(--line); background: var(--bg); }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
.footer__tag { color: var(--muted); }
.footer__links { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
.footer__links a { color: var(--muted); font-size: .92rem; transition: color .2s; }
.footer__links a:hover { color: var(--text); }
.footer__copy { color: var(--muted-2); font-size: .82rem; }

/* ---------- Floating widget ---------- */
.fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--grad); color: #fff; font-size: 1.6rem; box-shadow: 0 14px 34px -10px rgba(124,92,255,.8);
  transition: transform .2s; display: grid; place-items: center;
}
.fab:hover { transform: scale(1.08); }
.fab__badge { position: absolute; top: -3px; right: -3px; background: var(--accent); font-size: .7rem; font-weight: 700; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; }
.fab.is-hidden { transform: scale(0); opacity: 0; pointer-events: none; }

.widget {
  position: fixed; right: 22px; bottom: 22px; z-index: 61;
  width: min(380px, calc(100vw - 32px)); height: min(560px, calc(100vh - 40px));
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 20px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(20px) scale(.96); opacity: 0; pointer-events: none; transform-origin: bottom right;
  transition: transform .25s ease, opacity .25s ease;
}
.widget.is-open { transform: none; opacity: 1; pointer-events: auto; }
.widget__head { display: flex; align-items: center; justify-content: space-between; padding: 1rem; background: var(--grad); }
.widget__id { display: flex; align-items: center; gap: .7rem; }
.widget__avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; font-family: 'Sora'; font-weight: 800; color: #fff; }
.widget__id strong { display: block; color: #fff; font-size: .98rem; }
.widget__id small { color: rgba(255,255,255,.85); font-size: .78rem; display: flex; align-items: center; gap: .35rem; }
.online { width: 8px; height: 8px; border-radius: 50%; background: #34ffa6; box-shadow: 0 0 0 0 rgba(52,255,166,.7); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,255,166,.6); } 70% { box-shadow: 0 0 0 7px rgba(52,255,166,0); } 100% { box-shadow: 0 0 0 0 rgba(52,255,166,0); } }
.widget__close { background: rgba(255,255,255,.18); border: none; color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: .9rem; }
.widget__body { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .7rem; }
.widget__chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 .8rem .4rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { max-width: 440px; }
  .cards--3 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .cta { grid-template-columns: 1fr; }
  .botgrid { grid-template-columns: 1fr; }
  .botgrid__menu { flex-direction: row; flex-wrap: wrap; }
  .price--featured { transform: none; }
}
@media (max-width: 640px) {
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .nav__links.is-open {
    display: flex; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 1rem 22px; gap: 1rem;
  }
  .cards--3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .hero__stats { gap: 1.2rem; }
  .section { padding: 64px 0; }
}
