:root {
  --primary: #5b95ef;
  --secondary: #2563eb;
  --accent: #b771e8;
  --purple: #7c3aed;
  --background: #ffffff;
  --surface: #f6f7fb;
  --text: #222222;
  --muted: #6f6f6f;
  --border: #e3e6ee;
  --heading: Inter, system-ui, sans-serif;
  --body: Inter, system-ui, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 32px rgba(37, 99, 235, 0.10);
  --shadow-lg: 0 24px 60px rgba(124, 58, 237, 0.14);
  --sidebar-w: 248px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface);
}
img { max-width: 100%; display: block; }
a { color: var(--secondary); text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--heading); line-height: 1.15; letter-spacing: -0.03em; margin: 0 0 0.55em; }
h1 { font-size: clamp(2.2rem, 4.2vw, 3.5rem); }
h2 { font-size: clamp(1.65rem, 2.8vw, 2.25rem); }
h3 { font-size: 1.1rem; }
.muted { color: var(--muted); }

/* ─── Layout: sidebar + content (matches ca-dashboard) ─── */
.ca-layout { display: flex; min-height: 100vh; }
.ca-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  gap: 18px;
  z-index: 60;
  overflow-y: auto;
  transition: transform 0.28s ease;
}
.ca-brand { padding: 4px 10px 14px; border-bottom: 1px solid var(--border); }
.ca-brand img { height: 40px; width: auto; }
.ca-nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ca-nav-list a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: #3d4150;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.ca-nav-list a:hover { background: var(--surface); color: var(--text); transform: translateX(2px); }
.ca-nav-list a.is-active { background: linear-gradient(90deg, rgba(124,58,237,0.10), rgba(91,149,239,0.10)); color: var(--purple); }
.ca-nav-icon { display: inline-flex; width: 18px; height: 18px; flex: 0 0 18px; }
.ca-nav-sep { height: 1px; background: var(--border); margin: 10px 6px; }
.ca-sidebar-cta { margin-top: auto; padding: 0 6px 4px; display: flex; flex-direction: column; gap: 8px; }
.ca-sidebar-cta .btn { width: 100%; }
.ca-sidebar-foot { font-size: 0.75rem; color: var(--muted); padding: 10px 6px 0; }

.ca-sidebar-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,0.45);
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease; z-index: 55;
}
.ca-sidebar-overlay.is-visible { opacity: 1; pointer-events: auto; }

.ca-content { flex: 1; margin-left: var(--sidebar-w); min-width: 0; }

/* Topbar (mobile) */
.ca-topbar {
  display: none;
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 12px 18px;
  align-items: center;
  gap: 12px;
}
.ca-topbar img { height: 30px; }
.ca-menu-toggle {
  background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px; cursor: pointer; display: inline-flex; color: var(--text);
}

.wrap { width: min(1080px, calc(100% - 48px)); margin: 0 auto; }
.section { padding: 84px 0; }
.section-white { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--purple); margin-bottom: 12px;
}
.eyebrow svg { width: 16px; height: 16px; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; font-family: inherit; font-weight: 600; font-size: 0.95rem;
  padding: 12px 20px; border-radius: 999px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
  background-size: 160% 160%;
  box-shadow: 0 10px 24px rgba(183, 113, 232, 0.28);
  animation: gradientShift 7s ease infinite;
}
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }
.cta-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 16px; }

/* ─── Hero ─── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 72px;
  background:
    radial-gradient(820px 420px at 88% -12%, rgba(183,113,232,0.20), transparent 60%),
    radial-gradient(700px 400px at -4% 24%, rgba(91,149,239,0.22), transparent 55%),
    linear-gradient(180deg, #fff 0%, var(--surface) 100%);
}
.hero::before {
  content: "";
  position: absolute; inset: -50%;
  background: conic-gradient(from 90deg at 60% 40%, rgba(124,58,237,0.05), rgba(37,99,235,0.07), rgba(183,113,232,0.05), rgba(124,58,237,0.05));
  animation: slowSpin 30s linear infinite;
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.12fr 0.88fr; gap: 48px; align-items: center; }
.hero p.lead { font-size: 1.14rem; color: var(--muted); max-width: 37rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 26px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 28px; }
.hero-stat .num { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.04em; background: linear-gradient(120deg, var(--secondary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stat .lbl { font-size: 0.82rem; color: var(--muted); }

/* Hero orbit of connector logos */
.hero-orbit { position: relative; height: 420px; }
.orbit-core {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 128px; height: 128px; border-radius: 32px;
  background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  display: grid; place-items: center; z-index: 3;
  animation: corePulse 4s ease-in-out infinite;
}
.orbit-core img { width: 84px; }
.orbit-ring {
  position: absolute; top: 50%; left: 50%;
  border: 1.5px dashed rgba(124,58,237,0.22); border-radius: 50%;
}
.orbit-ring.r1 { width: 250px; height: 250px; margin: -125px 0 0 -125px; animation: slowSpin 26s linear infinite; }
.orbit-ring.r2 { width: 390px; height: 390px; margin: -195px 0 0 -195px; animation: slowSpinRev 40s linear infinite; }
.orbit-chip {
  position: absolute;
  width: 54px; height: 54px; border-radius: 16px;
  background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-md);
  display: grid; place-items: center;
  animation: floatY 5s ease-in-out infinite;
}
.orbit-chip img { width: 30px; height: 30px; object-fit: contain; }

/* ─── Marquee ─── */
.marquee-band { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 22px 0; overflow: hidden; }
.marquee-label { text-align: center; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.marquee { display: block; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-inner { display: flex; width: max-content; animation: marquee 42s linear infinite; will-change: transform; }
.marquee:hover .marquee-inner { animation-play-state: paused; }
.marquee-track { display: flex; gap: 40px; align-items: center; padding-right: 40px; flex-shrink: 0; }
.marquee-track img { height: 28px; width: auto; flex-shrink: 0; opacity: 0.85; filter: grayscale(18%); }
.marquee-track img:hover { opacity: 1; filter: none; }

/* ─── Cards & grids ─── */
.grid-2, .grid-3 { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 24px; box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(124,58,237,0.35); }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 0.94rem; }
.card-icon {
  width: 42px; height: 42px; border-radius: 12px; margin-bottom: 14px;
  display: grid; place-items: center; color: var(--purple);
  background: linear-gradient(135deg, rgba(124,58,237,0.10), rgba(91,149,239,0.12));
  transition: transform 0.25s ease;
}
.card:hover .card-icon { transform: rotate(-6deg) scale(1.08); }

/* Workflow steps */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.flow-card { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-sm); }
.flow-card::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%; margin-bottom: 12px;
  color: #fff; font-weight: 700; font-size: 0.9rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.flow-card h3 { font-size: 1rem; }
.flow-card p { margin: 0; color: var(--muted); font-size: 0.88rem; }

/* Success story */
.story { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 28px; align-items: stretch; }
.stat-panel {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--secondary), var(--purple) 55%, var(--accent));
  background-size: 180% 180%;
  animation: gradientShift 10s ease infinite;
  color: #fff; border-radius: var(--radius-lg); padding: 40px;
  display: flex; flex-direction: column; justify-content: center;
}
.stat-panel .num { font-size: 4.4rem; font-weight: 700; letter-spacing: -0.05em; line-height: 1; }
.stat-panel p { color: rgba(255,255,255,0.92); }

/* Personas */
.persona-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.pill {
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 9px 16px; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.pill:hover { transform: translateY(-2px); border-color: rgba(124,58,237,0.4); box-shadow: var(--shadow-sm); }
.pill svg { width: 14px; height: 14px; color: var(--purple); }

/* ─── Integrations catalog ─── */
.cat-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 26px 0 8px; }
.cat-search {
  flex: 1 1 240px; max-width: 340px;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 10px 18px; font: inherit; background: #fff;
}
.cat-search:focus { outline: 2px solid rgba(124,58,237,0.35); outline-offset: 1px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--border); background: #fff; color: var(--muted);
  border-radius: 999px; padding: 8px 15px; font: inherit; font-size: 0.85rem; font-weight: 500;
  cursor: pointer; transition: all 0.15s ease;
}
.chip:hover { color: var(--text); border-color: rgba(124,58,237,0.4); }
.chip.is-active { background: linear-gradient(135deg, var(--secondary), var(--accent)); border-color: transparent; color: #fff; }
.cat-count { font-size: 0.85rem; color: var(--muted); margin: 8px 0 18px; }

.cat-group { margin: 30px 0 6px; }
.cat-group-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.cat-group-head h3 { margin: 0; font-size: 1.05rem; }
.cat-group-head .n {
  font-size: 0.75rem; font-weight: 600; color: var(--purple);
  background: rgba(124,58,237,0.10); border-radius: 999px; padding: 2px 10px;
}
.cat-group-head .blurb { font-size: 0.85rem; color: var(--muted); }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.int-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.int-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: rgba(37,99,235,0.35); }
.int-card-top { display: flex; align-items: center; justify-content: space-between; }
.int-logo { width: 36px; height: 36px; display: grid; place-items: center; }
.int-logo img { width: 32px; height: 32px; object-fit: contain; }
.int-logo.letter {
  border-radius: 10px; font-weight: 700; font-size: 1rem; color: #fff;
  background: linear-gradient(135deg, var(--secondary), var(--accent));
}
.badge {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  border-radius: 999px; padding: 3px 10px;
}
.badge-available { background: rgba(22, 163, 74, 0.12); color: #15803d; }
.badge-beta { background: rgba(217, 119, 6, 0.14); color: #b45309; }
.int-card h4 { margin: 0; font-size: 0.98rem; letter-spacing: -0.01em; }
.int-card .vendor { font-size: 0.74rem; color: var(--muted); margin: -4px 0 0; }
.int-card p.blurb { margin: 0; font-size: 0.82rem; color: var(--muted); line-height: 1.5; flex: 1; }
.cat-empty { color: var(--muted); padding: 26px 0; }

/* ─── Form ─── */
.form-card {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 32px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 34px;
}
form { display: grid; gap: 14px; }
label { font-size: 0.85rem; font-weight: 600; }
input, textarea {
  width: 100%; margin-top: 6px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px; font: inherit; background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(124,58,237,0.14); }
textarea { min-height: 110px; resize: vertical; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; }
.form-status { min-height: 1.4em; font-size: 0.92rem; margin: 0; }
.form-status.ok { color: #157a3a; }
.form-status.err { color: #b42318; }

/* Recorded demo player */
#recorded-demo { scroll-margin-top: 80px; }
.demo-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 28px 0 20px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0b1220;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.demo-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ─── Footer (matches ca-site-footer) ─── */
.ca-site-footer { background: #fff; border-top: 1px solid var(--border); padding: 26px 0; }
.ca-site-footer__inner { width: min(1080px, calc(100% - 48px)); margin: 0 auto; }
.ca-site-footer__legal {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px;
  font-size: 0.84rem; color: var(--muted);
}
.ca-site-footer__link { color: var(--muted); transition: color 0.15s ease; }
.ca-site-footer__link:hover { color: var(--text); }
.ca-site-footer__sep { color: var(--border); }

/* ─── Scroll reveal & keyframes ─── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }

@keyframes gradientShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes slowSpin { to { transform: rotate(360deg); } }
@keyframes slowSpinRev { to { transform: rotate(-360deg); } }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes corePulse {
  0%,100% { box-shadow: 0 24px 60px rgba(124,58,237,0.14), 0 0 0 0 rgba(124,58,237,0.18); }
  50% { box-shadow: 0 24px 60px rgba(124,58,237,0.20), 0 0 0 18px rgba(124,58,237,0); }
}
@keyframes marquee { to { transform: translate3d(-25%, 0, 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ─── Responsive ─── */
@media (max-width: 1100px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .flow { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .ca-sidebar { transform: translateX(-100%); }
  .ca-sidebar.is-open { transform: none; box-shadow: 0 0 60px rgba(15,23,42,0.25); }
  .ca-content { margin-left: 0; }
  .ca-topbar { display: flex; }
  .hero-grid, .story, .form-card, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero-orbit { height: 360px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .cat-grid { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
}
