/* AutomationWithAI: "Agent Canvas" layer (loads after the page's inline styles).
   Brand kept: DM Serif Display + DM Sans, greens #1D9E75 / #0F6E56 / #9FE1CB.
   Rebuilt in vanilla: Scrolltide-style pinned build sequence; 21st.dev-style animated
   flow graph, marquee, spotlight bento, shine border and beam CTA. Static with no JS
   and with prefers-reduced-motion. */

:root { --ink: #0B1411; --ink-2: #111E19; --ink-line: rgba(159, 225, 203, .14); --mint: #9FE1CB; --ease: cubic-bezier(.22, 1, .36, 1); }

body { background: #fff; }
nav { background: rgba(255, 255, 255, .8); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.btn-primary, .btn-hero-primary, .plan-btn-filled { position: relative; overflow: hidden; isolation: isolate; transition: background .2s, transform .2s var(--ease), box-shadow .2s; }
.btn-primary::after, .btn-hero-primary::after, .plan-btn-filled::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%); transform: translateX(-120%); transition: transform .8s var(--ease); }
.btn-primary:hover::after, .btn-hero-primary:hover::after, .plan-btn-filled:hover::after { transform: translateX(120%); }
.btn-hero-primary { box-shadow: 0 10px 30px -10px rgba(29, 158, 117, .7); }
.btn-hero-primary:hover { transform: translateY(-2px); }
:focus-visible { outline: 2px solid #0F6E56; outline-offset: 3px; }

/* ---------- Hero: copy + live agent canvas ---------- */
.hero.ag-hero { max-width: none; text-align: left; position: relative; overflow: hidden; padding: 4.5rem 2rem 5rem;
  background:
    radial-gradient(50rem 26rem at 85% 10%, rgba(29, 158, 117, .16), transparent 60%),
    radial-gradient(40rem 22rem at 0% 90%, rgba(159, 225, 203, .22), transparent 65%),
    linear-gradient(rgba(0, 0, 0, .035) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(0, 0, 0, .035) 1px, transparent 1px) 0 0 / 32px 32px, #fff; }
.ag-hero__grid { max-width: 1180px; margin: 0 auto; display: grid; gap: 3rem; align-items: center; }
@media (min-width: 1000px) { .ag-hero__grid { grid-template-columns: .95fr 1.05fr; } }
.ag-hero__copy h1 { font-size: clamp(44px, 5.6vw, 72px); letter-spacing: -2.5px; }
.ag-hero__copy p { margin-left: 0; }
.ag-hero__copy .hero-ctas, .ag-hero__copy .hero-proof { justify-content: flex-start; }
.hero-badge { box-shadow: 0 0 0 4px rgba(29, 158, 117, .06); }
.badge-dot { box-shadow: 0 0 0 0 rgba(29, 158, 117, .6); animation: ag-ping 2s infinite; }
@keyframes ag-ping { 70% { box-shadow: 0 0 0 8px rgba(29, 158, 117, 0); } 100% { box-shadow: 0 0 0 0 rgba(29, 158, 117, 0); } }
@media (max-width: 999px) { .hero.ag-hero { text-align: center; } .ag-hero__copy p { margin-left: auto; } .ag-hero__copy .hero-ctas, .ag-hero__copy .hero-proof { justify-content: center; } }

.ag-canvas { position: relative; border-radius: 18px; background: var(--ink); color: #dff3ea; border: 1px solid var(--ink-line);
  box-shadow: 0 40px 90px -35px rgba(11, 20, 17, .7), 0 0 0 1px rgba(255, 255, 255, .03) inset; overflow: hidden; transform: perspective(1400px) rotateX(4deg) rotateY(-6deg); transition: transform .8s var(--ease); }
.ag-canvas:hover { transform: none; }
@media (max-width: 999px) { .ag-canvas { transform: none; max-width: 560px; margin: 0 auto; width: 100%; } }
.ag-canvas__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--ink-line); font: 500 12px/1 'DM Sans', sans-serif; }
.ag-canvas__bar span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.ag-canvas__bar b { margin-left: 8px; font-weight: 500; color: #9fb8ad; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ag-live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-style: normal; color: var(--mint); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.ag-live i { width: 7px; height: 7px; border-radius: 50%; background: #1D9E75; animation: ag-ping 1.6s infinite; }
.ag-flow { display: block; width: 100%; height: auto; }
.ag-edges path { fill: none; stroke: url(#agEdge); stroke-width: 2; stroke-dasharray: 5 6; animation: ag-dash 1.2s linear infinite; }
@keyframes ag-dash { to { stroke-dashoffset: -22; } }
.ag-packets circle { fill: #9FE1CB; filter: drop-shadow(0 0 6px #1D9E75); }
.ag-node rect { fill: var(--ink-2); stroke: rgba(159, 225, 203, .22); stroke-width: 1; transition: stroke .3s, fill .3s; }
.ag-node .ag-k { font: 600 9.5px/1 'DM Sans', sans-serif; letter-spacing: .12em; fill: #7fa396; }
.ag-node .ag-v { font: 500 13.5px/1 'DM Sans', sans-serif; fill: #e9f7f1; }
.ag-node .ag-dot { fill: #2c3e37; transition: fill .3s; }
.ag-node.on rect { stroke: #1D9E75; fill: #0f241d; }
.ag-node.on .ag-dot, .ag-node.done .ag-dot { fill: #1D9E75; }
.ag-node--gate rect { stroke-dasharray: 4 4; }
.ag-log { list-style: none; margin: 0; padding: 12px 16px 14px; border-top: 1px solid var(--ink-line); font: 12px/1.75 ui-monospace, SFMono-Regular, Menlo, monospace; color: #b9d6ca; min-height: 128px; }
.ag-log time { color: #1D9E75; margin-right: 8px; }
.js-ag .ag-log li { opacity: 0; transform: translateY(4px); transition: opacity .35s, transform .35s var(--ease); }
.js-ag .ag-log li.in { opacity: 1; transform: none; }

/* ---------- Integrations marquee ---------- */
.logo-bar { overflow: hidden; }
.ag-marquee { display: flex; flex-wrap: nowrap; overflow: hidden; gap: 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.ag-marquee__track { display: flex; gap: 12px; padding-right: 12px; flex: none; animation: ag-marq 26s linear infinite; }
.ag-marquee:hover .ag-marquee__track { animation-play-state: paused; }
@keyframes ag-marq { to { transform: translateX(-100%); } }

/* ---------- Features: spotlight bento + mini demos ---------- */
.ag-bento .feat-card { --mx: 50%; --my: 50%; position: relative; overflow: hidden; isolation: isolate; border-radius: 16px; transition: border-color .3s, transform .35s var(--ease), box-shadow .35s; }
.ag-bento .feat-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(360px circle at var(--mx) var(--my), rgba(29, 158, 117, .12), transparent 45%); opacity: 0; transition: opacity .3s; }
.ag-bento .feat-card:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -24px rgba(15, 110, 86, .45); }
.ag-bento .feat-card:hover::before { opacity: 1; }
@media (min-width: 900px) {
  .ag-bento { grid-template-columns: repeat(3, 1fr); }
  .ag-bento .feat-card:nth-child(1), .ag-bento .feat-card:nth-child(4) { grid-column: span 2; }
}
.ag-mini { margin: 0 0 1.1rem; border-radius: 12px; background: var(--ink); color: #cfe9de; padding: 14px; font: 500 12px/1.4 'DM Sans', sans-serif; }
.ag-mini--builder { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ag-mini--builder span { padding: 7px 12px; border-radius: 8px; border: 1px solid rgba(159, 225, 203, .25); background: #10201a; }
.ag-mini--builder i { flex: 1 1 18px; min-width: 18px; height: 2px; background: repeating-linear-gradient(90deg, #1D9E75 0 5px, transparent 5px 10px); background-size: 20px 2px; animation: ag-flowx 1s linear infinite; }
@keyframes ag-flowx { to { background-position: 20px 0; } }
.ag-mini--log { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; height: 92px; overflow: hidden; }
.ag-mini--log p { margin: 0 0 4px; animation: ag-scroll 6s steps(4) infinite; }
.ag-mini--log b { color: #1D9E75; } .ag-mini--log b.warn { color: #E2A43A; }
@keyframes ag-scroll { to { transform: translateY(-88px); } }
.ag-mini--meter { display: flex; align-items: center; gap: 12px; }
.ag-meter { position: relative; flex: 1; height: 8px; border-radius: 8px; background: #1b2c25; overflow: visible; }
.ag-meter i { position: absolute; inset: 0 auto 0 0; width: 94%; border-radius: inherit; background: linear-gradient(90deg, #0F6E56, #1D9E75, #9FE1CB); animation: ag-meter 4s var(--ease) infinite alternate; }
.ag-meter b { position: absolute; left: 85%; top: -5px; bottom: -5px; width: 2px; background: #E2A43A; }
@keyframes ag-meter { from { width: 62%; } to { width: 94%; } }
.ag-mini--meter span { color: #E2A43A; font-size: 11px; white-space: nowrap; }

/* ---------- How it works: pinned build sequence ---------- */
.ag-build { background: var(--ink); color: #dff3ea; }
.ag-build .eyebrow { color: var(--mint); }
.ag-build .section-title { color: #fff; }
.ag-build .section-sub { color: #9fb8ad; }
.ag-build__grid { display: grid; gap: 2rem; margin-top: 3rem; }
.ag-build .how-grid { margin-top: 0; border-color: var(--ink-line); background: transparent; }
.ag-build .how-step { background: var(--ink-2); border-color: var(--ink-line); transition: background .4s, opacity .4s; }
.ag-build .how-step h3 { color: #fff; }
.ag-build .how-step p { color: #a8c2b7; }
.ag-build .step-num { color: rgba(159, 225, 203, .35); transition: color .4s; }
.ag-build .how-step.on { background: #10261e; }
.ag-build .how-step.on .step-num { color: #1D9E75; }
.ag-build__stage { position: relative; min-height: 300px; border-radius: 18px; border: 1px solid var(--ink-line); background: radial-gradient(30rem 16rem at 70% 0%, rgba(29, 158, 117, .2), transparent 60%), var(--ink-2); overflow: hidden; }
.ag-panel { position: absolute; inset: 0; padding: 26px; display: flex; flex-direction: column; gap: 18px; opacity: 0; transform: translateY(16px) scale(.98); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.ag-panel.on { opacity: 1; transform: none; }
.ag-panel__k { font: 600 11px/1 'DM Sans', sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--mint); }
.ag-panel__note { margin-top: auto; font-size: 11px; color: #6f8b80; letter-spacing: .06em; text-transform: uppercase; }
.ag-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ag-apps span { padding: 14px 10px; text-align: center; border-radius: 12px; border: 1px solid var(--ink-line); background: #0d1a15; font-size: 13px; transition: border-color .4s, box-shadow .4s; }
.ag-panel.on .ag-apps span { border-color: rgba(29, 158, 117, .6); box-shadow: 0 0 22px -8px #1D9E75; transition-delay: calc(var(--i, 0) * 90ms); }
.ag-hub { align-self: center; padding: 12px 22px; border-radius: 999px; background: #1D9E75; color: #04251b; font-weight: 600; box-shadow: 0 0 0 8px rgba(29, 158, 117, .15); }
.ag-steps { display: grid; gap: 10px; }
.ag-steps span { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--ink-line); background: #0d1a15; font-size: 14px; }
.ag-steps em { font-style: normal; font-weight: 600; color: var(--mint); margin-right: 6px; }
.ag-status { display: inline-flex; align-items: center; gap: 10px; font: 400 34px/1 'DM Serif Display', serif; color: #fff; }
.ag-status i { width: 12px; height: 12px; border-radius: 50%; background: #1D9E75; animation: ag-ping 1.6s infinite; }
.ag-spark { width: 100%; height: 110px; }
.ag-spark path { fill: none; stroke: #1D9E75; stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 600; stroke-dashoffset: 600; }
.ag-panel.on .ag-spark path { transition: stroke-dashoffset 1.6s var(--ease) .2s; stroke-dashoffset: 0; }
@media (min-width: 1000px) {
  .ag-build__grid { grid-template-columns: .9fr 1.1fr; align-items: stretch; }
  .ag-build .how-grid { grid-template-columns: 1fr; }
  .ag-build .how-step { border-right: 0; border-bottom: 1px solid var(--ink-line); }
  .ag-build .how-step:last-child { border-bottom: 0; }
  html.js-ag .ag-build { height: 280vh; padding: 0; }
  html.js-ag .ag-build > .section-inner { position: sticky; top: 62px; min-height: calc(100vh - 62px); display: flex; flex-direction: column; justify-content: center; padding: 2.5rem 0; max-width: 1100px; }
  html.js-ag .ag-build .how-step:not(.on) { opacity: .55; }
  html.js-ag .ag-build .how-step { padding: 1.2rem 1.5rem; }
  html.js-ag .ag-build .how-step .step-num { font-size: 30px; }
  html.js-ag .ag-build .how-step:not(.on) p { display: none; }
  html.js-ag .ag-build .section-sub { margin-bottom: 0; }
  html.js-ag .ag-build__grid { margin-top: 2rem; }
  html.js-ag .ag-build__stage { min-height: 360px; }
}
@media (min-width: 1000px) and (max-height: 760px) { html.js-ag .ag-build .section-sub { display: none; } }
/* no JS / small screens: show every panel stacked */
html:not(.js-ag) .ag-build__stage, .ag-build__stage.is-static { display: grid; gap: 1px; }
html:not(.js-ag) .ag-panel, .ag-build__stage.is-static .ag-panel { position: relative; opacity: 1; transform: none; }
html:not(.js-ag) .ag-spark path, .ag-build__stage.is-static .ag-spark path { stroke-dashoffset: 0; }
@media (max-width: 999px) { .ag-build__stage { display: grid; gap: 1px; background: var(--ink-line); } .ag-panel { position: relative; opacity: 1; transform: none; background: var(--ink-2); } .ag-spark path { stroke-dashoffset: 0; } }

/* ---------- Pricing: shine border on the popular plan ---------- */
.ag-shine { position: relative; isolation: isolate; border-color: transparent !important; }
.ag-shine::before { content: ""; position: absolute; inset: -1.5px; z-index: -1; border-radius: inherit; padding: 1.5px;
  background: conic-gradient(from var(--ag-a, 0deg), #1D9E75, #9FE1CB, #0F6E56, #1D9E75);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: ag-spin 6s linear infinite; }
@property --ag-a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes ag-spin { to { --ag-a: 360deg; } }
.plan { transition: transform .35s var(--ease), box-shadow .35s; }
.plan:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -30px rgba(15, 110, 86, .5); }

/* ---------- CTA: beams ---------- */
.ag-beam { position: relative; overflow: hidden; isolation: isolate; }
.ag-beam::before { content: ""; position: absolute; inset: -40% -10%; z-index: -1; background: conic-gradient(from 200deg at 50% 0%, transparent 0 40%, rgba(29, 158, 117, .35) 46%, transparent 52%, rgba(159, 225, 203, .18) 58%, transparent 64%); animation: ag-sway 10s ease-in-out infinite alternate; }
.ag-beam::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 40px 40px; -webkit-mask-image: radial-gradient(ellipse at center, #000, transparent 70%); mask-image: radial-gradient(ellipse at center, #000, transparent 70%); }
@keyframes ag-sway { to { transform: rotate(8deg) translateX(4%); } }

/* ---------- Reveal ---------- */
.js-ag .ag-rv { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js-ag .ag-rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .ag-marquee__track[aria-hidden] { display: none; }
  .ag-marquee__track { animation: none; flex-wrap: wrap; justify-content: center; }
  .ag-marquee { -webkit-mask-image: none; mask-image: none; }
  .ag-canvas { transform: none; }
}
