/* ===================== Tokens ===================== */
:root {
  --bg: #ffffff;
  --bg-alt: #fafaf9;
  --surface: #ffffff;
  --text: #0a0a0a;
  --muted: #6b6b6b;
  --border: #ececec;
  --dark: #0a0a0a;
  --accent-1: #ff7a18;
  --accent-2: #ff3d77;
  --accent-3: #7b5cff;
  --gradient: linear-gradient(100deg, var(--accent-1), var(--accent-2) 50%, var(--accent-3));
  --green: #15803d;
  --green-bg: #e8f8ee;
  --amber: #b45309;
  --amber-bg: #fdf3e2;
  --violet: #5b3fd6;
  --violet-bg: #f1edff;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.12);
  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ===================== Base ===================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent-3); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; }
.muted { color: var(--muted); }
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Icons */
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.i-sm { width: 16px; height: 16px; }
.i-xs { width: 13px; height: 13px; }
.i-fill { fill: currentColor; stroke: none; }

/* Scroll reveal (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; transition: transform .15s, background .2s, box-shadow .2s, border-color .2s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #222; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.btn-outline { background: #fff; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: #cfcfcf; background: var(--bg-alt); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: #f3f3f3; }
.btn-light { background: #fff; color: var(--dark); }
.btn-ghost-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }
.btn-ghost-light:hover { background: rgba(255,255,255,.2); }
.link-btn { background: none; border: 0; padding: 0; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ===================== Announcement ===================== */
.announce { background: var(--dark); color: #fff; font-size: 13.5px; }
.announce-inner { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; padding-right: 48px; padding-left: 48px; flex-wrap: wrap; text-align: center; }
.announce-tag { background: var(--gradient); padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.announce-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.announce-close { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: rgba(255,255,255,.6); width: 28px; height: 28px; border-radius: 6px; }
.announce-close:hover { color: #fff; background: rgba(255,255,255,.1); }

/* ===================== Nav ===================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.02em; }
.logo-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--gradient); position: relative; flex-shrink: 0; }
.logo-mark::after { content: ""; position: absolute; inset: 8px 7px 9px; border-radius: 4px 4px 4px 1px; background: #fff; }
.nav-links { display: flex; gap: 28px; font-size: 15px; font-weight: 500; color: #3a3a3a; }
.nav-links a { transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; position: relative; }
.nav-toggle span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, top .2s; }
.nav-toggle span:first-child { top: 15px; }
.nav-toggle span:last-child { top: 23px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 19px; transform: rotate(-45deg); }

/* ===================== Hero ===================== */
.hero { position: relative; padding: 72px 0 32px; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -200px -10% auto; height: 760px; pointer-events: none;
  background:
    radial-gradient(40% 50% at 70% 40%, rgba(255,122,24,.18), transparent 70%),
    radial-gradient(35% 45% at 85% 30%, rgba(255,61,119,.16), transparent 70%),
    radial-gradient(40% 50% at 60% 60%, rgba(123,92,255,.14), transparent 70%);
  filter: blur(10px);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px;
  font-size: 13px; font-weight: 500; border: 1px solid var(--border); border-radius: 999px; background: #fff;
  box-shadow: var(--shadow); margin-bottom: 24px; transition: border-color .2s;
}
.pill:hover { border-color: #d6d6d6; }
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gradient); flex-shrink: 0; }
.hero h1 { font-size: clamp(40px, 5.6vw, 68px); font-weight: 800; letter-spacing: -0.035em; }
.lead { margin-top: 20px; font-size: 19px; color: var(--muted); max-width: 540px; }
.hero-actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero-actions.center { justify-content: center; }
.hero-proof { display: flex; align-items: center; gap: 14px; margin-top: 32px; }
.hero-proof small { font-size: 13px; color: var(--muted); }
.avatars { display: flex; }
.avatars span, .avatar[style] {
  background: hsl(var(--h) 85% 92%); color: hsl(var(--h) 55% 32%);
}
.avatars span {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700;
  border: 2px solid #fff; margin-left: -10px;
}
.avatars span:first-child { margin-left: 0; }
.stars { display: flex; gap: 2px; color: #f5a524; }
.stars .i { width: 15px; height: 15px; }

/* Hero demo */
.hero-demo { position: relative; }
.demo-window {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden; max-width: 420px; margin-left: auto;
}
.demo-head, .wp-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.demo-title { font-weight: 700; font-size: 15px; }
.demo-sub { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.online { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18); flex-shrink: 0; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; background: #f1f1f1; color: #333; flex-shrink: 0;
}
.avatar-bot { background: var(--gradient); color: #fff; }
.avatar-bot .i { width: 18px; height: 18px; }
.demo-body { height: 340px; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; overflow: hidden; }
.demo-input {
  margin: 0 14px 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px;
  display: flex; justify-content: space-between; align-items: center; color: #a3a3a3; font-size: 14px;
}
.send-icon { color: var(--text); }

.msg { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; animation: pop .3s ease both; overflow-wrap: anywhere; }
.msg.bot { background: #f4f4f5; border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.user { background: var(--dark); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg a { text-decoration: underline; text-underline-offset: 2px; }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: #9a9a9a; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }

.float-card {
  position: absolute; background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow); padding: 12px 14px; font-size: 13px; animation: float 6s ease-in-out infinite;
}
.float-a { right: -28px; top: -26px; width: 170px; }
.float-b { left: -8px; bottom: -34px; animation-delay: -3s; }
.fc-label { color: var(--muted); font-size: 12px; }
.fc-value { font-weight: 800; font-size: 24px; letter-spacing: -0.02em; }
.fc-bar { height: 6px; background: #f1f1f1; border-radius: 99px; margin-top: 6px; overflow: hidden; }
.fc-bar span { display: block; height: 100%; background: var(--gradient); border-radius: 99px; }
.fc-row { display: flex; align-items: center; gap: 10px; }
.fc-row b { display: block; font-size: 13px; }
.fc-row small { color: var(--muted); font-size: 12px; }
.fc-ic { width: 32px; height: 32px; border-radius: 10px; background: var(--violet-bg); color: var(--violet); display: grid; place-items: center; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.tag-green { background: var(--green-bg); color: var(--green); }
.tag-amber { background: var(--amber-bg); color: var(--amber); }
.tag-violet { background: var(--violet-bg); color: var(--violet); }

/* Logos */
.logos { margin-top: 88px; text-align: center; }
.logos p { font-size: 13px; color: var(--muted); font-weight: 500; }
.logo-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 48px; margin-top: 20px;
  font-weight: 800; font-size: 21px; letter-spacing: -0.03em; color: #a8a8a8;
}
.logo-row span { display: inline-flex; align-items: center; gap: 8px; transition: color .2s; }
.logo-row span:hover { color: #555; }
.logo-row svg { width: 22px; height: 22px; fill: currentColor; }

/* ===================== Product preview ===================== */
.product { padding: 40px 0 24px; position: relative; }
.browser { background: #fff; border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-lg), 0 0 0 8px rgba(0,0,0,.02); overflow: hidden; }
.browser-bar { display: grid; grid-template-columns: 80px 1fr 80px; align-items: center; height: 44px; padding: 0 16px; background: #f7f7f7; border-bottom: 1px solid var(--border); }
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.dots.ghost { visibility: hidden; }
.url { justify-self: center; display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 4px 14px; font-size: 12px; color: var(--muted); max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.app { display: grid; grid-template-columns: 210px 300px 1fr; height: 520px; text-align: left; }
.app-side { border-right: 1px solid var(--border); padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; background: #fcfcfc; }
.app-side a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 14px; color: var(--muted); font-weight: 500; }
.app-side a .i { width: 17px; height: 17px; }
.app-side a.active { background: #fff; color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 0 0 1px var(--border); }
.ws { display: flex; align-items: center; gap: 10px; padding: 4px 6px 16px; font-size: 14px; }
.ws-ic { width: 28px; height: 28px; border-radius: 8px; background: var(--gradient); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.usage { margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid var(--border); }
.usage small { display: block; font-size: 12px; font-weight: 600; }
.usage small.muted { font-weight: 400; margin-top: 6px; }
.app-list { border-right: 1px solid var(--border); overflow: hidden; }
.app-h { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.chip { font-size: 12px; border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; color: var(--muted); }
.log { padding: 13px 16px; border-bottom: 1px solid var(--border); }
.log.active { background: #fafafa; box-shadow: inset 3px 0 0 var(--accent-2); }
.log-top { display: flex; justify-content: space-between; font-size: 14px; }
.log time { font-size: 12px; color: var(--muted); }
.log p { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 2px 0 6px; }
.app-chat { display: flex; flex-direction: column; min-width: 0; }
.app-chat-h { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 14px; }
.app-chat-h small { display: block; color: var(--muted); font-size: 12px; }
.app-chat-h .tag { margin-left: auto; }
.app-chat-body { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; background: #fcfcfc; }
.app-chat-body .msg { animation: none; }
.app-chat-body .af-step { align-self: flex-start; }
.cite { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 11px; background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 2px 8px; color: var(--muted); width: max-content; max-width: 100%; }
.msg .cite { display: flex; }
.app-chat-f { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--border); font-size: 12px; }
.sent { border-radius: 999px; padding: 3px 10px; font-weight: 600; }
.sent-pos { background: var(--green-bg); color: var(--green); }

/* ===================== Sections ===================== */
.section { padding: 104px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; letter-spacing: -0.03em; }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 18px; }
.center-link { text-align: center; margin-top: 36px; font-size: 15px; color: var(--muted); }
.center-link a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text); }
.center-link a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Tabs */
.tabs {
  display: flex; gap: 4px; width: max-content; max-width: 100%; margin: 0 auto 40px; padding: 4px;
  background: #f4f4f5; border-radius: 999px; overflow-x: auto;
}
.tab { border: 0; background: transparent; padding: 10px 22px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--muted); transition: all .2s; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.tab-panel {
  display: none; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center;
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 48px;
}
.tab-panel.active { display: grid; animation: pop .35s ease both; }
.panel-copy h3 { font-size: 30px; font-weight: 800; letter-spacing: -0.025em; }
.panel-copy p { margin-top: 14px; color: var(--muted); font-size: 17px; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 28px; font-size: 15px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--dark) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.panel-visual { min-width: 0; }

.sources { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); }
.source { display: flex; align-items: center; gap: 12px; padding: 12px; }
.source + .source { border-top: 1px solid var(--border); }
.source > div { flex: 1; min-width: 0; }
.source b { display: block; font-size: 14px; }
.source small { color: var(--muted); font-size: 12px; }
.src-ic { width: 36px; height: 36px; border-radius: 10px; background: #f4f4f5; display: grid; place-items: center; color: #444; }
.sync { width: 140px; height: 4px; border-radius: 99px; background: #f1f1f1; margin-top: 6px; overflow: hidden; }
.sync span { display: block; height: 100%; width: 40%; background: var(--gradient); border-radius: 99px; animation: sync 1.6s ease-in-out infinite; }
@keyframes sync { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.retrain { margin: 8px; padding: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--dark); color: #fff; border-radius: 10px; font-weight: 600; font-size: 14px; }

.action-flow { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.af-msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 14px; }
.af-msg.user { align-self: flex-end; background: var(--dark); color: #fff; border-bottom-right-radius: 4px; }
.af-msg.bot { align-self: flex-start; background: #f4f4f5; border-bottom-left-radius: 4px; }
.af-step { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #fafafa; border: 1px dashed #e2e2e2; border-radius: 10px; }
.af-step.done { color: var(--green); background: var(--green-bg); border-color: transparent; font-weight: 500; }
.spin { width: 12px; height: 12px; border: 2px solid #ddd; border-top-color: var(--accent-2); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.code-wrap { background: #0f0f10; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.code-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid #222; color: #8a8a8a; font-size: 12px; }
.copy { background: #222; color: #ddd; border: 0; border-radius: 6px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.copy:hover { background: #2e2e2e; }
.code { margin: 0; color: #e7e7e7; padding: 20px; font: 13px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-x: auto; }
.code .c { color: #6b7280; } .code .t { color: #ff7aa2; } .code .a { color: #ffb86b; } .code .s { color: #a5e3a1; }
.channel-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.channel-chips span { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--border); font-size: 13px; font-weight: 500; }

.mini-dash { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.md-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.md-stats small { display: block; color: var(--muted); font-size: 12px; }
.md-stats b { font-size: 22px; letter-spacing: -0.02em; }
.md-stats em { font-style: normal; font-size: 12px; font-weight: 600; margin-left: 6px; }
.up { color: var(--green); }
.md-chart { display: flex; align-items: flex-end; gap: 10px; height: 140px; margin-top: 20px; }
.md-chart span { flex: 1; border-radius: 6px 6px 2px 2px; background: var(--gradient); transform-origin: bottom; animation: grow .7s cubic-bezier(.2,.8,.2,1) both; }
.md-days { display: flex; gap: 10px; margin-top: 8px; }
.md-days span { flex: 1; text-align: center; font-size: 11px; color: var(--muted); }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Stats */
.stats { padding: 24px 0 72px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { text-align: center; padding: 8px 16px; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat b { display: block; font-size: clamp(32px, 4vw, 46px); font-weight: 800; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 15px; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bento-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; transition: transform .2s, box-shadow .2s, opacity .6s ease; }
.bento-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.bento-card.big { grid-column: span 2; }
.bento-card h3 { font-size: 19px; font-weight: 700; margin-top: 18px; }
.bento-card p { color: var(--muted); margin-top: 8px; font-size: 15px; }
.b-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--dark); color: #fff; display: grid; place-items: center; }
.model-list, .badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.model-list span, .badges span { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); font-size: 13px; font-weight: 600; background: var(--bg-alt); }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps li { position: relative; padding: 32px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; }
.step-n { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-size: 14px; font-weight: 800; color: #fff; background: var(--gradient); }
.steps h3 { font-size: 21px; margin-top: 20px; }
.steps p { color: var(--muted); margin-top: 8px; }

/* Integrations */
.int-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.int {
  display: flex; align-items: center; gap: 14px; padding: 16px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); transition: transform .2s, box-shadow .2s, opacity .6s ease;
}
.int:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.int-ic { width: 42px; height: 42px; border-radius: 11px; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; flex-shrink: 0; }
.int b { display: block; font-size: 15px; }
.int small { color: var(--muted); font-size: 13px; }

/* Quotes */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quote { margin: 0; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: #fff; display: flex; flex-direction: column; gap: 20px; }
.q-metric { padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.q-metric b { display: block; font-size: 34px; font-weight: 800; letter-spacing: -0.03em; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; width: max-content; }
.q-metric span { color: var(--muted); font-size: 13px; }
.quote blockquote { margin: 0; font-size: 16.5px; line-height: 1.6; font-weight: 500; flex: 1; }
.quote figcaption { display: flex; align-items: center; gap: 12px; }
.quote figcaption b { display: block; font-size: 14px; }
.quote figcaption small { color: var(--muted); font-size: 13px; }

/* Book a demo */
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.demo-copy h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -0.03em; }
.demo-copy > p { margin-top: 16px; color: var(--muted); font-size: 18px; }
.demo-copy .checks { margin-top: 28px; }
.demo-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.demo-meta span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--border); font-size: 14px; font-weight: 500; }
.demo-form { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-lg); }
.demo-form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.demo-form input, .demo-form select, .demo-form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px;
  font: inherit; font-size: 15px; font-weight: 400; color: var(--text); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
.demo-form textarea { resize: vertical; min-height: 84px; }
.demo-form input:focus, .demo-form select:focus, .demo-form textarea:focus { border-color: var(--accent-3); box-shadow: 0 0 0 3px rgba(123,92,255,.15); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opt { color: var(--muted); font-weight: 400; }
.demo-form .btn { margin-top: 8px; }
.form-note { margin-top: 12px; text-align: center; font-size: 13px; color: var(--muted); }
.form-success { text-align: center; padding: 48px 8px; }
.form-success[hidden], #demoFields[hidden] { display: none; }
.success-ic { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--green-bg); color: var(--green); }
.success-ic .i { width: 26px; height: 26px; stroke-width: 2.4; }
.form-success h3 { font-size: 24px; margin-top: 16px; }
.form-success p { margin-top: 8px; color: var(--muted); }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; padding: 0 22px; transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 0; font-weight: 600; font-size: 17px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 20px; color: var(--muted); }

/* CTA */
.cta { padding: 24px; }
.cta-inner { background: var(--dark); color: #fff; border-radius: 32px; padding: 96px 24px; text-align: center; position: relative; overflow: hidden; }
.cta-inner::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 120%;
  background: radial-gradient(40% 60% at 30% 30%, rgba(255,122,24,.35), transparent 70%),
              radial-gradient(40% 60% at 70% 20%, rgba(123,92,255,.4), transparent 70%);
  pointer-events: none;
}
.cta-inner > * { position: relative; }
.cta h2 { font-size: clamp(32px, 4.5vw, 52px); font-weight: 800; letter-spacing: -0.03em; }
.cta p { margin-top: 14px; color: rgba(255,255,255,.72); font-size: 18px; }
.cta .cta-note { font-size: 13px; color: rgba(255,255,255,.55); margin-top: 24px; }

/* Footer */
.footer { padding: 72px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2.2fr repeat(4, 1fr); gap: 32px; }
.footer-brand p { margin-top: 12px; font-size: 14px; }
.footer h4 { font-size: 14px; margin-bottom: 14px; }
.footer-grid > div:not(.footer-brand) a { display: block; color: var(--muted); font-size: 14px; padding: 4px 0; }
.footer-grid > div:not(.footer-brand) a:hover { color: var(--text); }
.newsletter { display: flex; gap: 8px; margin-top: 20px; max-width: 360px; }
.newsletter input { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 999px; padding: 10px 16px; font: inherit; font-size: 14px; outline: none; }
.newsletter input:focus { border-color: #bdbdbd; }
.nl-msg { font-size: 13px; color: var(--green); min-height: 20px; margin-top: 6px !important; }
.socials { display: flex; gap: 8px; margin-top: 8px; }
.socials a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted); transition: color .2s, border-color .2s; }
.socials a:hover { color: var(--text); border-color: #cfcfcf; }
.socials .i { width: 16px; height: 16px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.status { display: inline-flex; align-items: center; gap: 8px; }
.status:hover { color: var(--text); }

/* ===================== Chat widget ===================== */
.widget { position: fixed; right: 24px; bottom: 24px; z-index: 100; }
.widget-btn {
  position: relative; width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--dark); color: #fff;
  display: grid; place-items: center; box-shadow: var(--shadow-lg); transition: transform .2s;
}
.widget-btn:hover { transform: scale(1.06); }
.widget-btn .ic-close { display: none; }
.widget.open .widget-btn .ic-open { display: none; }
.widget.open .widget-btn .ic-close { display: block; }
.badge-dot { position: absolute; top: -2px; right: -2px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-2); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.badge-dot[hidden] { display: none; }
.teaser { position: absolute; right: 0; bottom: 76px; width: 270px; animation: pop .35s ease both; }
.teaser[hidden] { display: none; }
.teaser-body { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--border); border-radius: 16px 16px 4px 16px; box-shadow: var(--shadow-lg); padding: 14px 16px; font-size: 14px; line-height: 1.5; }
.teaser-close { position: absolute; top: -10px; left: -10px; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1px solid var(--border); font-size: 10px; color: var(--muted); box-shadow: var(--shadow); }
.widget-panel {
  position: absolute; right: 0; bottom: 76px; width: 380px; height: min(620px, calc(100vh - 120px));
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(12px) scale(.98); transform-origin: bottom right; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.widget.open .widget-panel { opacity: 1; transform: none; pointer-events: auto; }
.wp-close { background: none; border: 0; font-size: 15px; color: var(--muted); width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; }
#widgetReset { margin-left: auto; }
.wp-close:hover { background: #f4f4f5; color: var(--text); }
.wp-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.wp-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.wp-suggest button { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 500; }
.wp-suggest button:hover { border-color: #cfcfcf; background: var(--bg-alt); }
.wp-input { display: flex; gap: 8px; margin: 0 14px; padding: 6px 6px 6px 14px; border: 1px solid var(--border); border-radius: 14px; }
.wp-input:focus-within { border-color: #bdbdbd; }
.wp-input input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 14px; background: transparent; min-width: 0; }
.wp-input button { border: 0; background: var(--dark); color: #fff; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.wp-foot { text-align: center; font-size: 11px; color: #a3a3a3; padding: 10px 0 12px; }
.feedback { display: flex; gap: 4px; margin-top: -4px; }
.feedback button { border: 0; background: none; font-size: 12px; color: #a3a3a3; padding: 2px 6px; border-radius: 6px; }
.feedback button:hover { background: #f4f4f5; color: var(--text); }
.feedback button[aria-pressed="true"] { color: var(--text); background: #f4f4f5; }

/* ===================== Responsive ===================== */
@media (max-width: 1100px) {
  .app { grid-template-columns: 280px 1fr; }
  .app-side { display: none; }
}
@media (max-width: 1024px) {
  .int-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .nav-links {
    position: fixed; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; background: #fff;
    border-bottom: 1px solid var(--border); padding: 8px 24px 16px; display: none; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: block; }
  .nav-cta .btn-ghost { display: none; }
  .hero-grid, .tab-panel { grid-template-columns: 1fr; }
  .hero-demo { max-width: 420px; margin: 24px auto 0; width: 100%; }
  .tab-panel { padding: 28px; gap: 32px; }
  .demo-window { margin: 0 auto; }
  .float-a { right: -12px; }
  .bento, .steps, .quotes { grid-template-columns: 1fr; }
  .bento-card.big { grid-column: auto; }
  .section { padding: 80px 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .stat:nth-child(3) { border-left: 0; }
  .demo-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 700px) {
  .app { grid-template-columns: 1fr; height: auto; }
  .app-list { display: none; }
  .app-chat-body { min-height: 380px; }
  .browser-bar { grid-template-columns: 50px 1fr 0; }
  .dots i { width: 9px; height: 9px; }
}
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .announce-inner { padding: 8px 40px 8px 16px; justify-content: flex-start; text-align: left; font-size: 13px; }
  .announce-close { right: 8px; }
  .announce-tag { display: none; }
  .demo-body { height: 410px; }
  .hero { padding-top: 40px; }
  .nav-cta .btn-dark { padding: 8px 14px; font-size: 14px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .demo-form { padding: 22px; }
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .tab { padding: 8px 12px; font-size: 14px; }
  .int-grid { grid-template-columns: 1fr 1fr; }
  .int { padding: 12px; gap: 10px; }
  .int-ic { width: 36px; height: 36px; font-size: 15px; }
  .float-card { display: none; }
  .logo-row { gap: 14px 28px; font-size: 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .newsletter { flex-direction: column; }
  .widget { right: 16px; bottom: 16px; }
  .widget-panel { width: calc(100vw - 32px); height: calc(100dvh - 110px); }
  .teaser { width: min(270px, calc(100vw - 32px)); }
  .cta { padding: 12px; }
  .cta-inner { padding: 64px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}
