/* Convobeam brandkit v4 — components. Consumes tokens.css only (no raw hex except inside SVG art). */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; font-family: var(--font-sans); font-size: var(--fs-body); line-height: var(--lh-body); color: var(--c-text); background: var(--c-bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: 'cv11', 'ss03'; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 3px; border-radius: 6px; }
.dark :focus-visible { outline-color: var(--cb-white); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }

/* ── Type ───────────────────────────────── */
.t-display { font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: var(--tr-display); font-weight: var(--fw-bold); margin: 0; text-wrap: balance; }
.t-h2 { font-size: var(--fs-h2); line-height: var(--lh-snug); letter-spacing: var(--tr-h2); font-weight: var(--fw-bold); margin: 0; text-wrap: balance; }
.t-h3 { font-size: var(--fs-h3); line-height: 1.3; letter-spacing: var(--tr-h3); font-weight: var(--fw-semibold); margin: 0; }
.t-lead { font-size: var(--fs-lead); color: var(--c-text-2); max-width: 56ch; margin: 0; }
.t-body { margin: 0; }
.t-small { font-size: var(--fs-small); color: var(--c-text-2); }
.overline { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 var(--sp-4); font-size: var(--fs-over); font-weight: var(--fw-semibold); letter-spacing: var(--tr-over); text-transform: uppercase; color: var(--c-text-2); }
.overline::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--c-accent); }
.dark .t-lead, .dark .t-small, .dark .overline { color: var(--cb-grey-400); }
.dark .overline::before { background: var(--cb-violet-b); }

/* ── Surfaces: the white / black rhythm ──── */
.section { position: relative; padding-block: var(--section-y); background: var(--c-bg); color: var(--c-text); overflow: clip; }
.section.soft { background: var(--c-bg-soft); }
.section.dark { background: var(--c-bg-dark); color: var(--cb-white); }
.section.dark.pure { background: var(--cb-black); }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .t-lead { margin-inline: auto; }
.section-head .t-h2 + .t-lead { margin-top: var(--sp-4); }

/* ── Buttons: pill, black primary ───────── */
.btn { --h: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--h); padding: 0 24px; border: 1px solid transparent; border-radius: var(--r-pill); font: inherit; font-size: 15px; font-weight: var(--fw-semibold); letter-spacing: -.005em; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), background-color var(--dur-fast), opacity var(--dur-fast), border-color var(--dur-fast); -webkit-tap-highlight-color: transparent; }
.btn svg { width: 18px; height: 18px; transition: transform var(--dur-base) var(--ease-out); }
.btn:hover svg.arrow { transform: translateX(3px); }
.btn:active { transform: scale(.97); transition-duration: 80ms; }
.btn-primary { background: var(--cb-black); color: var(--cb-white); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--sh-btn); background: #1a1a1a; }
.btn-primary:active { transform: scale(.97); }
.btn-secondary { background: var(--cb-white); color: var(--cb-black); border-color: var(--cb-black); }
.btn-secondary:hover { transform: translateY(-1px); background: var(--cb-grey-50); box-shadow: var(--sh-1); }
.btn-text { background: none; padding-inline: 4px; color: inherit; font-weight: var(--fw-semibold); min-height: 44px; }
.btn-text:hover { opacity: .65; }
.btn-light { background: var(--cb-white); color: var(--cb-black); }
.btn-light:hover { transform: translateY(-1px); box-shadow: 0 10px 30px -10px rgb(255 255 255 / .35); }
.btn-outline-light { background: transparent; color: var(--cb-white); border-color: rgb(255 255 255 / .5); }
.btn-outline-light:hover { background: rgb(255 255 255 / .1); border-color: var(--cb-white); }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-sm { --h: 40px; padding: 0 18px; font-size: 14px; }
.btn-lg { --h: 56px; padding: 0 30px; font-size: 16px; }

/* ── Inputs ─────────────────────────────── */
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: var(--fw-semibold); }
.input { width: 100%; min-height: 48px; padding: 0 16px; border: 1px solid var(--c-border); border-radius: var(--r-ui-2); background: var(--cb-white); color: var(--cb-black); font: inherit; font-size: 16px; transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.input::placeholder { color: #9CA3AF; }
.input:hover { border-color: #D1D5DB; }
.input:focus { outline: none; border-color: var(--c-focus); box-shadow: 0 0 0 4px rgb(138 43 226 / .16); }
.input[aria-invalid='true'] { border-color: var(--c-err); box-shadow: 0 0 0 4px rgb(220 38 38 / .12); }
.input:disabled { background: var(--cb-grey-50); color: var(--cb-grey-500); cursor: not-allowed; }
.field-help { font-size: 13px; color: var(--c-text-2); margin: 0; }
.field-error { font-size: 13px; color: var(--c-err); margin: 0; }

/* URL row: the product's one input (hero + #demo). Pill that nests its button. */
.url-row { display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 20px; background: var(--cb-white); border: 1px solid var(--c-border); border-radius: var(--r-pill); box-shadow: var(--sh-2); transition: border-color var(--dur-fast), box-shadow var(--dur-base); }
.url-row:focus-within { border-color: var(--c-focus); box-shadow: 0 0 0 4px rgb(138 43 226 / .16), var(--sh-2); }
.url-row .prefix { color: var(--c-text-2); font-size: 16px; user-select: none; }
.url-row input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--cb-black); padding: 0 4px; }
.url-row input::placeholder { color: #9CA3AF; }
.url-row input:disabled { opacity: .6; }
.url-row .btn { --h: 44px; }
.url-status { min-height: 0; margin: 8px 4px 0; font-size: 14px; color: var(--c-text-2); }
.url-progress { height: 3px; margin: 8px 6px 0; border-radius: 3px; background: var(--cb-grey-200); overflow: hidden; }
.url-progress[hidden] { display: none; }
.url-progress span { display: block; width: 40%; height: 100%; background: var(--grad-sweep); border-radius: 3px; animation: cb-progress 1.3s var(--ease-out) infinite; }
.dark .url-status { color: rgb(255 255 255 / .8); }

/* ── Cards ──────────────────────────────── */
.card { position: relative; background: var(--cb-white); border: 1px solid var(--c-border); border-radius: var(--r-card-lg); padding: clamp(24px, 3vw, 36px); box-shadow: var(--sh-1); transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); }
.card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.card-dark { background: var(--cb-night-2); border: 1px solid var(--cb-line-dark); border-radius: var(--r-card-lg); padding: clamp(24px, 3vw, 36px); color: var(--cb-white); transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base); }
.card-dark:hover { transform: translateY(-3px); border-color: #3a3a42; }
.card-dark p, .card p { margin: 0; }
.card-dark p { color: var(--cb-grey-400); }
.card p { color: var(--c-text-2); }
.card .t-h3, .card-dark .t-h3 { margin-bottom: 8px; }
/* Full-bleed gradient feature card (the "magic" layer). Text sits on a scrim, never gradient-filled. */
.card-gradient { position: relative; isolation: isolate; clip-path: inset(0 round var(--r-card-lg)); border-radius: var(--r-card-lg); padding: clamp(28px, 4vw, 56px); color: var(--cb-white); background: var(--grad-magic); overflow: hidden; }
.card-gradient > * { position: relative; z-index: 2; }
.card-gradient > .lava { position: absolute; z-index: 0; }
.card-gradient::before { content: ''; position: absolute; inset: 0; z-index: 1; background: var(--scrim-on-gradient); }
.card-gradient.scrim-left::before { background: linear-gradient(90deg, rgb(0 0 0 / .5) 0%, rgb(0 0 0 / .42) 45%, rgb(0 0 0 / .08) 100%); }

/* ── Icon tile: monolinear, squircle, faint tint ── */
.icon-tile { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-squircle); background: var(--c-accent-tint); color: var(--cb-black); flex: none; }
.icon-tile svg { width: 24px; height: 24px; }
.icon-tile.tint-coral { background: rgb(255 77 0 / .09); }
.icon-tile.tint-cyan { background: rgb(0 210 255 / .12); }
.icon-tile.tint-magenta { background: rgb(255 0 255 / .08); }
.dark .icon-tile { background: rgb(255 255 255 / .08); color: var(--cb-white); }
.ico { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ── Navigation: sticky white bar ───────── */
.nav { position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / .86); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid transparent; transition: border-color var(--dur-base), box-shadow var(--dur-base); }
.nav.scrolled { border-bottom-color: var(--c-border); }
.nav-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 72px; }
.nav-links { display: flex; gap: 6px; }
.nav-links a { padding: 8px 14px; font-size: 15px; font-weight: var(--fw-medium); color: #374151; text-decoration: none; border-radius: var(--r-pill); transition: color var(--dur-fast), background-color var(--dur-fast); }
.nav-links a:hover { color: var(--cb-black); background: var(--cb-grey-100); }
.nav-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.nav-actions .link { padding: 8px 14px; font-size: 15px; font-weight: var(--fw-medium); color: #374151; text-decoration: none; border-radius: var(--r-pill); }
.nav-actions .link:hover { color: var(--cb-black); background: var(--cb-grey-100); }

/* ── Logo lockup ────────────────────────── */
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: var(--fw-bold); font-size: 21px; letter-spacing: -.045em; line-height: 1; color: var(--cb-black); }
.logo .mark { width: 32px; height: 32px; flex: none; }
.dark .logo, .logo.on-dark { color: var(--cb-white); }
.logo.sm .mark { width: 26px; height: 26px; } .logo.sm { font-size: 18px; }
.logo.lg .mark { width: 48px; height: 48px; } .logo.lg { font-size: 32px; gap: 14px; }

/* ── Chat bubbles + widget parts ────────── */
.chat { display: grid; gap: 10px; }
.bubble { max-width: 86%; padding: 11px 15px; font-size: 14.5px; line-height: 1.5; border-radius: 18px; }
.bubble.bot { justify-self: start; background: var(--cb-grey-100); color: var(--cb-black); border-bottom-left-radius: 6px; }
.bubble.user { justify-self: end; background: var(--cb-black); color: var(--cb-white); border-bottom-right-radius: 6px; }
.source-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 10px 4px 8px; background: var(--cb-white); border: 1px solid var(--c-border); border-radius: var(--r-pill); font-size: 12px; font-weight: var(--fw-medium); color: var(--c-text-2); }
.source-chip svg { width: 13px; height: 13px; }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; background: var(--cb-grey-100); border-radius: 18px; border-bottom-left-radius: 6px; justify-self: start; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #9CA3AF; animation: cb-dot 1.2s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 14px; border: 1px solid var(--c-border); border-radius: var(--r-pill); background: var(--cb-white); font: inherit; font-size: 13px; font-weight: var(--fw-medium); color: #374151; cursor: pointer; transition: border-color var(--dur-fast), background-color var(--dur-fast), transform var(--dur-fast); }
.chip:hover { border-color: var(--cb-black); background: var(--cb-grey-50); }
.chip:active { transform: scale(.96); }

.widget { display: flex; flex-direction: column; width: 100%; max-width: 380px; background: var(--cb-white); border: 1px solid var(--c-border); border-radius: var(--r-card-lg); box-shadow: var(--sh-3); overflow: hidden; color: var(--cb-black); }
.widget-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--c-border); }
.widget-head .who { display: grid; line-height: 1.25; }
.widget-head .who b { font-size: 14.5px; font-weight: var(--fw-semibold); }
.widget-head .who span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--c-text-2); }
.widget-head .who span::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c-ok); }
.widget-head .x { margin-left: auto; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--c-text-2); cursor: pointer; }
.widget-head .x:hover { background: var(--cb-grey-100); color: var(--cb-black); }
.widget-head .x svg { width: 18px; height: 18px; }
.widget-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.widget-input { display: flex; align-items: center; gap: 8px; margin: 0 12px 12px; padding: 6px 6px 6px 16px; border: 1px solid var(--c-border); border-radius: var(--r-pill); background: var(--cb-white); }
.widget-input input { flex: 1; min-width: 0; height: 36px; border: 0; outline: 0; font: inherit; font-size: 14px; background: transparent; }
.widget-input:focus-within { border-color: var(--c-focus); box-shadow: 0 0 0 3px rgb(138 43 226 / .14); }
.send { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--cb-black); color: var(--cb-white); cursor: pointer; transition: transform var(--dur-fast); }
.send:active { transform: scale(.92); }
.send svg { width: 18px; height: 18px; }
.launcher { display: grid; place-items: center; width: 60px; height: 60px; border: 0; border-radius: 50%; background: var(--cb-black); color: var(--cb-white); box-shadow: var(--sh-3); cursor: pointer; transition: transform var(--dur-base) var(--ease-spring); }
.launcher:hover { transform: scale(1.06); } .launcher:active { transform: scale(.94); }
.launcher svg { width: 26px; height: 26px; }

/* ── Gradient + lava blobs ──────────────── */
.lava { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.lava i { position: absolute; width: 46%; aspect-ratio: 1; border-radius: 50%; filter: blur(60px); opacity: .85; will-change: transform; animation: cb-lava var(--dur-lava) ease-in-out infinite alternate; }
.lava i:nth-child(1) { left: -6%; top: -10%; background: var(--grad-violet); }
.lava i:nth-child(2) { right: -8%; top: -6%; background: var(--grad-magenta); animation-duration: calc(var(--dur-lava) * 1.25); animation-delay: -9s; }
.lava i:nth-child(3) { right: 2%; bottom: -16%; background: var(--grad-coral); animation-duration: calc(var(--dur-lava) * .9); animation-delay: -17s; }
.lava i:nth-child(4) { left: 6%; bottom: -14%; background: var(--grad-cyan); animation-duration: calc(var(--dur-lava) * 1.1); animation-delay: -4s; }
.glow-behind { position: relative; isolation: isolate; }
.glow-behind::before { content: ''; position: absolute; inset: -8% -6%; z-index: -1; background: var(--grad-glow); filter: blur(48px); opacity: .7; border-radius: 50%; animation: cb-glow 12s ease-in-out infinite alternate; }

/* ── Scroll reveal ──────────────────────── */
.rv { opacity: 0; transform: translateY(var(--reveal-y)); transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out); transition-delay: var(--d, 0ms); }
.rv.in { opacity: 1; transform: none; }
.no-js .rv { opacity: 1; transform: none; }

/* ── Accordion (native button + aria-expanded) ─ */
.acc { border-top: 1px solid var(--c-border); }
.acc-item { border-bottom: 1px solid var(--c-border); }
.acc-item h3 { margin: 0; }
.acc-btn { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 22px 0; border: 0; background: none; font: inherit; font-size: 19px; font-weight: var(--fw-semibold); letter-spacing: -.012em; text-align: left; color: inherit; cursor: pointer; }
.acc-btn svg { width: 22px; height: 22px; flex: none; transition: transform var(--dur-base) var(--ease-out); color: var(--c-text-2); }
.acc-btn[aria-expanded='true'] svg { transform: rotate(180deg); color: var(--cb-black); }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-base) var(--ease-out); }
.acc-panel > div { overflow: hidden; }
.acc-panel p { margin: 0; padding: 0 40px 24px 0; color: var(--c-text-2); }
.acc-item.open .acc-panel { grid-template-rows: 1fr; }

@keyframes cb-lava { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(7%, 9%, 0) scale(1.12); } 100% { transform: translate3d(-6%, 4%, 0) scale(.94); } }
@keyframes cb-glow { from { transform: scale(1) rotate(0deg); opacity: .6; } to { transform: scale(1.06) rotate(6deg); opacity: .8; } }
@keyframes cb-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes cb-progress { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

/* Reduced motion: clean static state. Movement stops; colour/opacity feedback stays (120ms) so hover, focus and state changes still read. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-property: color, background-color, border-color, opacity, box-shadow !important; transition-duration: 120ms !important; transition-delay: 0ms !important; }
  .btn:hover, .btn:active, .btn-primary:active, .card:hover, .card-dark:hover, .launcher:hover, .launcher:active, .compare-col:hover { transform: none !important; }
  .rv { opacity: 1; transform: none; }
  .lava i { transform: none; }
}
@media (max-width: 960px) { .btn-sm { --h: 44px; } }
.card-gradient.scrim-strong::before { background: rgb(0 0 0 / .5); }
/* Chat player initial state (JS removes .no-js, then reveals step by step; reduced-motion shows all). */
html:not(.no-js) [data-chat-play] > * { opacity: 0; }
[data-chat-play] > .typing { display: none; }

/* Logo mark (inlined as <symbol id="mark"> on each page; colours from --mark-* so it inverts on dark) */
.mk-tile { fill: var(--mark-tile, #000); } .mk-bubble { fill: var(--mark-bubble, #fff); } .mk-ink { fill: var(--mark-ink, #000); } .mk-beam { stroke: var(--mark-ink, #000); fill: none; stroke-width: 1.8; stroke-linecap: round; }
.svg-sprite { position: absolute; width: 0; height: 0; }
.dark { --mark-tile: #fff; --mark-bubble: #000; --mark-ink: #fff; }
.no-js .acc-panel { grid-template-rows: 1fr; }
.no-js .acc-btn svg { display: none; }
