/* ===================================================================
   AgentFabric · Visual multi-agent builder — stylesheet
   (dark violet "woven fabric" theme)
   =================================================================== */

:root {
  --violet-300: #c4b5fd;
  --violet-400: #a78bfa;
  --violet-500: #8b5cf6;
  --purple-400: #c084fc;
  --purple-500: #a855f7;
  --pink-400: #f472b6;
  --amber: #fbbf24;

  --bg: #0c0a14;
  --bg-2: #0f0c1a;
  --surface: #151021;
  --surface-2: #1a1429;
  --surface-3: #201936;
  --border: rgba(255, 255, 255, .08);
  --border-2: rgba(255, 255, 255, .13);

  --text: #ede9fe;
  --text-2: #b8b2cc;
  --text-dim: #948dab;
  --text-mute: #6f6887;

  --grad: linear-gradient(120deg, #c084fc 0%, #a855f7 45%, #f472b6 100%);

  --radius: 14px;
  --radius-lg: 20px;
  --container: 1180px;

  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7);
  --shadow-violet: 0 0 0 1px rgba(168, 85, 247, .22), 0 24px 60px -22px rgba(168, 85, 247, .4);

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--text-2);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
.mono { font-family: var(--font-mono); font-size: .92em; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }

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

/* ---------- Buttons ---------- */
.btn {
  --pad: 10px 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: var(--pad); border-radius: 11px;
  font-weight: 600; font-size: 14.5px; letter-spacing: -.1px;
  transition: transform .18s ease, box-shadow .25s ease, background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn--lg { --pad: 14px 26px; font-size: 15.5px; border-radius: 13px; }
.btn--block { width: 100%; }
.btn--primary {
  background: var(--grad); color: #14081f;
  box-shadow: 0 8px 22px -8px rgba(168, 85, 247, .65);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(168, 85, 247, .75); }
.btn--ghost { background: rgba(255,255,255,.04); color: var(--text); border: 1px solid var(--border-2); }
.btn--ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(168,85,247,.45); transform: translateY(-2px); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Navbar ---------- */
.nav { position: sticky; top: 0; z-index: 100; transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(12, 10, 20, .82); backdrop-filter: saturate(180%) blur(14px); border-bottom-color: var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { flex-shrink: 0; }
.brand__name { font-weight: 800; font-size: 19px; letter-spacing: -.5px; color: var(--text); }

.nav__links { display: flex; gap: 28px; }
.nav__links a { font-size: 14.5px; font-weight: 500; color: var(--text-dim); transition: color .2s; }
.nav__links a:hover { color: var(--text); }
.nav__cta { display: flex; align-items: center; gap: 16px; }
.nav__signin { font-size: 14.5px; font-weight: 500; color: var(--text-dim); transition: color .2s; }
.nav__signin:hover { color: var(--text); }
.nav__cta .btn { --pad: 9px 16px; font-size: 14px; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile { display: none; flex-direction: column; gap: 2px; background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 10px 24px 20px; }
.nav__mobile a { padding: 12px 6px; font-weight: 500; color: var(--text-2); border-bottom: 1px solid var(--border); }
.nav__mobile .btn { margin-top: 12px; }
.nav__mobile.open { display: flex; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 92px 0 84px; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; }
.hero__weave {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(168,85,247,.05) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(-45deg, rgba(244,114,182,.04) 0 1px, transparent 1px 26px);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 5%, #000 30%, transparent 85%);
}
.hero__glow { position: absolute; border-radius: 50%; filter: blur(70px); }
.hero__glow--1 { width: 640px; height: 560px; top: -220px; left: -140px; background: radial-gradient(circle, rgba(168,85,247,.26), transparent 65%); }
.hero__glow--2 { width: 600px; height: 560px; top: -120px; right: -160px; background: radial-gradient(circle, rgba(244,114,182,.18), transparent 62%); }

.hero__inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1fr 1.05fr; gap: 52px; align-items: center; }
.hero__copy { max-width: 560px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 100px;
  background: rgba(168,85,247,.1); border: 1px solid rgba(168,85,247,.3);
  color: var(--purple-400); font-size: 13px; font-weight: 500; margin-bottom: 26px;
}
.pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pink-400); box-shadow: 0 0 0 4px rgba(244,114,182,.2); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

.hero__title { font-weight: 900; font-size: clamp(36px, 5vw, 58px); line-height: 1.07; letter-spacing: -1.6px; color: var(--text); margin-bottom: 22px; }
.hero__sub { font-size: clamp(16px, 2vw, 18px); color: var(--text-dim); line-height: 1.72; margin-bottom: 32px; }
.hero__sub strong { color: var(--text-2); font-weight: 600; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 42px; }

.hero__trust { display: flex; align-items: center; gap: 24px; }
.hero__stat { display: flex; flex-direction: column; }
.hero__stat strong { font-size: 23px; font-weight: 800; color: var(--text); letter-spacing: -.5px; }
.hero__stat span { font-size: 12.5px; color: var(--text-mute); }
.hero__divider { width: 1px; height: 32px; background: var(--border-2); }

/* ---------- Fabric canvas card ---------- */
.fabric {
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-violet);
}
.fabric__head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-2); border-bottom: 1px solid var(--border); }
.fabric__dots { display: flex; gap: 6px; }
.fabric__dots span { width: 11px; height: 11px; border-radius: 50%; }
.fabric__dots span:nth-child(1) { background: #ff5f56; }
.fabric__dots span:nth-child(2) { background: #ffbd2e; }
.fabric__dots span:nth-child(3) { background: #27c93f; }
.fabric__title { flex: 1; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-mute); }
.fabric__badge { font-family: var(--font-mono); font-size: 12px; color: var(--pink-400); }
.fabric__badge.busy { color: var(--amber); }

.fabric__canvas { background:
  radial-gradient(ellipse 70% 80% at 50% 30%, rgba(168,85,247,.07), transparent 70%),
  repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 28px),
  repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 28px);
  padding: 8px 6px 0;
}
.fabric__canvas svg { width: 100%; height: auto; }

.node__body { fill: var(--surface-3); stroke: rgba(168,85,247,.45); stroke-width: 1.5; transition: stroke .3s, fill .3s; }
.node__body--hub { stroke: rgba(244,114,182,.6); }
.node__halo { opacity: 0; transition: opacity .35s; }
.node__icon { text-anchor: middle; font-size: 15px; dominant-baseline: central; }
.node__label { text-anchor: middle; font-family: var(--font-mono); font-size: 9.5px; fill: var(--text-dim); font-weight: 600; letter-spacing: .3px; }
.node.active .node__body { stroke: #f472b6; stroke-width: 2.2; fill: #241a3d; }
.node.active .node__halo { opacity: 1; }
.node.active .node__label { fill: var(--text); }

.packet { fill: #f472b6; filter: drop-shadow(0 0 6px rgba(244,114,182,.9)); }

.fabric__log {
  border-top: 1px solid var(--border); background: rgba(12,10,20,.55);
  padding: 12px 16px; min-height: 134px; max-height: 134px; overflow: hidden;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.55;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.log-line { display: flex; gap: 8px; padding: 2px 0; opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .35s; }
.log-line.show { opacity: 1; transform: none; }
.log-line__who { flex-shrink: 0; font-weight: 600; }
.lw-user { color: var(--amber); }
.lw-support { color: #67e8f9; }
.lw-router { color: var(--purple-400); }
.lw-orders { color: #86efac; }
.lw-inventory { color: #fda4af; }
.lw-payments { color: #93c5fd; }
.log-line__text { color: var(--text-2); }
.log-line__text b { color: var(--text); }
.log-line--done .log-line__text { color: var(--pink-400); font-weight: 600; }

.fabric__note { margin-top: 14px; text-align: center; font-size: 13px; color: var(--text-mute); }

/* ---------- Integrations strip ---------- */
.strip { padding: 36px 0 44px; border-block: 1px solid var(--border); background: var(--bg-2); overflow: hidden; }
.strip__label { text-align: center; font-size: 13px; color: var(--text-mute); margin-bottom: 24px; letter-spacing: .3px; }
.strip__track { width: 100%; 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); }
.strip__row { display: flex; gap: 44px; width: max-content; animation: scroll 36s linear infinite; }
.strip__row span { font-weight: 700; font-size: 18px; color: var(--text-dim); white-space: nowrap; transition: color .2s; }
.strip__row span:hover { color: var(--purple-400); }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--border); }
.section__head { max-width: 740px; margin: 0 auto 54px; text-align: center; }
.kicker { display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--purple-400); margin-bottom: 14px; }
.section__head h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 800; line-height: 1.18; letter-spacing: -1px; color: var(--text); margin-bottom: 16px; }
.section__head p { font-size: 16.5px; color: var(--text-dim); }

/* ---------- Problem ---------- */
.problem__grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 22px; align-items: center; max-width: 920px; margin: 0 auto; }
.problem__card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px 28px; }
.problem__card--good { border-color: rgba(168,85,247,.35); box-shadow: var(--shadow-violet); background: var(--surface-2); }
.problem__bad, .problem__good { font-weight: 700; font-size: 16px; margin-bottom: 18px; display: flex; align-items: center; gap: 9px; }
.problem__bad { color: var(--text-dim); }
.problem__bad::before { content: "✕"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: rgba(255,255,255,.06); color: var(--text-mute); font-size: 12px; }
.problem__good { color: var(--purple-400); }
.problem__good::before { content: "✓"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--grad); color: #14081f; font-size: 12px; }
.problem__card ul { display: flex; flex-direction: column; gap: 13px; }
.problem__card li { position: relative; padding-left: 22px; color: var(--text-2); font-size: 14.5px; }
.problem__card li::before { content: "—"; position: absolute; left: 0; color: var(--text-mute); }
.problem__card--good li::before { content: "→"; color: var(--pink-400); font-weight: 700; }
.problem__vs { font-size: 24px; font-weight: 800; color: var(--text-mute); }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 26px; transition: transform .26s ease, border-color .26s, background .26s; overflow: hidden; }
.card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(168,85,247,.1), transparent 60%); opacity: 0; transition: opacity .3s; pointer-events: none; }
.card:hover { transform: translateY(-5px); border-color: rgba(168,85,247,.4); background: var(--surface-2); }
.card:hover::after { opacity: 1; }
.card__icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: rgba(168,85,247,.12); border: 1px solid rgba(168,85,247,.25); color: var(--purple-400); margin-bottom: 18px; }
.card__icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 9px; letter-spacing: -.3px; }
.card p { font-size: 14.5px; color: var(--text-dim); line-height: 1.68; }

/* ---------- Scenarios / use cases ---------- */
.scenarios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.scenario { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px 28px; overflow: hidden; transition: transform .26s ease, border-color .26s; }
.scenario:hover { transform: translateY(-5px); border-color: rgba(168,85,247,.4); }
.scenario__num { position: absolute; top: 20px; right: 24px; font-family: var(--font-mono); font-size: 38px; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .2; }
.scenario__icon { font-size: 32px; margin-bottom: 16px; }
.scenario h3 { font-size: 21px; font-weight: 800; color: var(--text); margin-bottom: 11px; letter-spacing: -.4px; }
.scenario__desc { font-size: 14.5px; color: var(--text-dim); line-height: 1.7; margin-bottom: 18px; }
.scenario__list { display: flex; flex-direction: column; gap: 11px; padding-top: 16px; border-top: 1px solid var(--border); }
.scenario__list li { position: relative; padding-left: 26px; font-size: 14px; color: var(--text-2); }
.scenario__list li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center; background: rgba(168,85,247,.14); color: var(--purple-400); font-size: 11px; font-weight: 700; }

/* ---------- Steps ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; max-width: 940px; margin: 0 auto; }
.steps__line { position: absolute; top: 26px; left: 16%; right: 16%; height: 2px; background: var(--grad); opacity: .3; }
.step { position: relative; text-align: center; padding: 0 10px; }
.step__num { width: 54px; height: 54px; margin: 0 auto 22px; border-radius: 15px; display: grid; place-items: center; font-size: 21px; font-weight: 800; color: #14081f; background: var(--grad); box-shadow: 0 12px 30px -10px rgba(168,85,247,.55); }
.step h3 { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.step p { font-size: 14.5px; color: var(--text-dim); line-height: 1.7; }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; max-width: 1020px; margin: 0 auto; }
.plan { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px 28px; display: flex; flex-direction: column; transition: transform .26s ease, border-color .26s; }
.plan:hover { transform: translateY(-5px); border-color: var(--border-2); }
.plan--featured { border-color: transparent; background:
    linear-gradient(var(--surface-2), var(--surface-2)) padding-box,
    var(--grad) border-box; border: 1.5px solid transparent; box-shadow: var(--shadow-violet); }
.plan--featured:hover { transform: translateY(-9px); }
.plan__tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--grad); color: #14081f; font-size: 11.5px; font-weight: 700; padding: 5px 15px; border-radius: 100px; }
.plan__name { font-size: 19px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.plan__desc { font-size: 13.5px; color: var(--text-mute); margin-bottom: 22px; min-height: 38px; }
.plan__price { font-size: 42px; font-weight: 800; color: var(--text); letter-spacing: -1.5px; margin-bottom: 22px; display: flex; align-items: baseline; gap: 1px; }
.plan__price--text { font-size: 30px; }
.plan__cur { font-size: 24px; font-weight: 700; }
.plan__per { font-size: 15px; font-weight: 500; color: var(--text-mute); margin-left: 5px; }
.plan .btn { margin-bottom: 26px; }
.plan__feat { display: flex; flex-direction: column; gap: 13px; }
.plan__feat li { position: relative; padding-left: 26px; font-size: 14px; color: var(--text-2); }
.plan__feat li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: rgba(168,85,247,.14); color: var(--purple-400); font-size: 10px; font-weight: 700; }
.plan--featured .plan__feat li::before { background: var(--grad); color: #14081f; }

/* ---------- CTA ---------- */
.cta { position: relative; padding: 100px 0; overflow: hidden; text-align: center; border-top: 1px solid var(--border); }
.cta__bg { position: absolute; inset: 0; }
.cta__glow { position: absolute; width: 820px; height: 480px; left: 50%; top: 50%; transform: translate(-50%, -50%); background: radial-gradient(ellipse, rgba(168,85,247,.3), rgba(244,114,182,.14) 40%, transparent 70%); filter: blur(50px); }
.cta__inner { position: relative; z-index: 1; max-width: 660px; }
.cta h2 { font-size: clamp(30px, 4.2vw, 46px); font-weight: 800; color: var(--text); letter-spacing: -1.2px; margin-bottom: 16px; line-height: 1.14; }
.cta p { font-size: 17px; color: var(--text-dim); margin-bottom: 32px; }
.cta__form { display: flex; gap: 12px; max-width: 500px; margin: 0 auto 16px; flex-wrap: wrap; }
.cta__form input { flex: 1; min-width: 200px; padding: 14px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-2); color: var(--text); font-size: 15px; transition: border-color .2s; }
.cta__form input::placeholder { color: var(--text-mute); }
.cta__form input:focus { outline: none; border-color: var(--purple-500); }
.cta__note { font-size: 13px; color: var(--text-mute); margin-bottom: 26px; }
.cta__note.success { color: var(--pink-400); font-weight: 500; }
.cta__alt { font-size: 15px; color: var(--text-dim); }
.cta__alt a { color: var(--purple-400); font-weight: 600; }
.cta__alt a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-2); border-top: 1px solid var(--border); padding: 60px 0 0; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 2fr; gap: 48px; padding-bottom: 44px; border-bottom: 1px solid var(--border); }
.footer__tag { margin-top: 16px; font-size: 14px; color: var(--text-mute); line-height: 1.7; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.footer__col h4 { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 15px; }
.footer__col a { display: block; font-size: 14px; color: var(--text-dim); padding: 6px 0; transition: color .2s; }
.footer__col a:hover { color: var(--purple-400); }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; font-size: 13px; color: var(--text-mute); flex-wrap: wrap; gap: 8px; }
.footer__legal a:hover { color: var(--purple-400); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 44px; }
  .hero__demo { max-width: 580px; }
  .cards, .scenarios, .pricing { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 36px; max-width: 460px; }
  .steps__line { display: none; }
  .footer__inner { grid-template-columns: 1fr; gap: 34px; }
}
@media (max-width: 760px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .section { padding: 70px 0; }
  .cards, .scenarios, .pricing { grid-template-columns: 1fr; }
  .problem__grid { grid-template-columns: 1fr; }
  .problem__vs { margin: 0 auto; transform: rotate(90deg); }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .hero__trust { flex-wrap: wrap; gap: 16px; }
}
@media (max-width: 440px) {
  .hero__divider { display: none; }
  .cta__form { flex-direction: column; }
  .cta__form .btn { width: 100%; }
}

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