/* ============ Base ============ */
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(120,120,150,.25); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(120,120,150,.4); }

/* ============ Ambient background ============ */
.bg-aurora {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60% 50% at 15% 0%, rgba(109,99,242,.30), transparent 60%),
    radial-gradient(50% 45% at 85% 5%, rgba(34,211,238,.18), transparent 60%),
    radial-gradient(55% 55% at 60% 100%, rgba(91,69,224,.20), transparent 60%);
  filter: saturate(1.1);
}
:root:not(.dark) .bg-aurora {
  background:
    radial-gradient(55% 45% at 12% 0%, rgba(109,99,242,.16), transparent 60%),
    radial-gradient(45% 40% at 88% 6%, rgba(34,211,238,.12), transparent 60%),
    radial-gradient(55% 55% at 60% 100%, rgba(91,69,224,.10), transparent 60%);
}
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(120,120,160,.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(120,120,160,.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 30%, transparent 75%);
}
:root:not(.dark) .bg-grid {
  background-image:
    linear-gradient(to right, rgba(60,60,110,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(60,60,110,.05) 1px, transparent 1px);
}

/* ============ Nav ============ */
.nav-shell {
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(15,23,42,.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all .3s ease;
}
.dark .nav-shell {
  background: rgba(12,13,26,.55);
  border: 1px solid rgba(255,255,255,.07);
}
#nav.scrolled .nav-shell { box-shadow: 0 8px 30px rgba(2,6,23,.25); }
.nav-link {
  padding: .5rem .8rem; border-radius: .6rem; color: inherit; opacity: .8;
  transition: all .2s ease;
}
.nav-link:hover { opacity: 1; background: rgba(120,120,160,.1); }
.mobile-link { display: block; padding: .7rem .9rem; border-radius: .7rem; font-weight: 500; }
.mobile-link:hover { background: rgba(120,120,160,.1); }

/* ============ Logo ============ */
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #6d63f2, #22d3ee);
  box-shadow: 0 6px 18px rgba(109,99,242,.45);
  position: relative;
}
.logo-glyph {
  font-family: var(--font-display); font-weight: 800; font-size: 17px; line-height: 1;
  color: #fff; letter-spacing: -.02em;
  text-shadow: 0 1px 6px rgba(0,0,0,.25);
}
.logo-mark::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
  animation: haloPulse 2.8s ease-in-out infinite;
}
@keyframes haloPulse { 0%,100%{opacity:.5} 50%{opacity:1} }

/* ============ Buttons ============ */
.btn-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.25rem; border-radius: .8rem; font-weight: 600; font-size: 14px;
  color: #fff; background: linear-gradient(135deg, #6d63f2, #5b45e0);
  box-shadow: 0 10px 30px -8px rgba(109,99,242,.6);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -8px rgba(109,99,242,.75); filter: brightness(1.05); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.25rem; border-radius: .8rem; font-weight: 600; font-size: 14px;
  color: inherit;
  background: rgba(120,120,160,.08);
  border: 1px solid rgba(120,120,160,.18);
  backdrop-filter: blur(8px);
  transition: all .2s ease;
}
.btn-ghost:hover { background: rgba(120,120,160,.16); transform: translateY(-2px); }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: .7rem; color: inherit;
  background: rgba(120,120,160,.08);
  border: 1px solid rgba(120,120,160,.15);
  transition: all .2s ease;
}
.icon-btn:hover { background: rgba(120,120,160,.18); }

/* theme icon visibility */
.theme-icon-moon { display: none; }
.dark .theme-icon-sun { display: none; }
.dark .theme-icon-moon { display: inline; }

/* ============ Cards / glass ============ */
.glass-card {
  border-radius: 1.25rem;
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(15,23,42,.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.dark .glass-card {
  background: rgba(18,19,34,.55);
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: 0 1px 0 rgba(255,255,255,.04) inset;
}
.glass-card.hover-lift:hover {
  transform: translateY(-4px);
  border-color: rgba(109,99,242,.4);
  box-shadow: 0 20px 50px -20px rgba(109,99,242,.4);
}
.glow-card { box-shadow: 0 24px 60px -28px rgba(109,99,242,.55); border-color: rgba(109,99,242,.3) !important; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1rem; }

/* ============ Typography helpers ============ */
.section-title { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.12; margin-top: .75rem; }
.section-sub { margin-top: 1rem; font-size: 16px; line-height: 1.6; color: rgb(100 116 139); }
.dark .section-sub { color: rgb(148 163 184); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .16em;
  color: #6d63f2;
}
.dark .eyebrow { color: #a5adff; }
.text-gradient {
  background: linear-gradient(120deg, #8b87fb 10%, #22d3ee 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ============ Pills ============ */
.pill {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .4rem .85rem; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  background: rgba(109,99,242,.1);
  border: 1px solid rgba(109,99,242,.25);
  color: inherit;
}
.pulse-dot { width: 7px; height: 7px; border-radius: 999px; background: #6d63f2; box-shadow: 0 0 0 0 rgba(109,99,242,.6); animation: ping 1.8s infinite; }
@keyframes ping { 0%{box-shadow:0 0 0 0 rgba(109,99,242,.5)} 70%{box-shadow:0 0 0 8px rgba(109,99,242,0)} 100%{box-shadow:0 0 0 0 rgba(109,99,242,0)} }
.live-dot { width: 7px; height: 7px; border-radius: 999px; background: #10b981; animation: ping 1.8s infinite; }

/* ============ Ecosystem pipeline ============ */
.pipe-node {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem .85rem; border-radius: .85rem;
  background: rgba(120,120,160,.07);
  border: 1px solid rgba(120,120,160,.14);
  transition: all .3s ease;
}
.pipe-node.active {
  background: linear-gradient(90deg, rgba(109,99,242,.18), rgba(34,211,238,.08));
  border-color: rgba(109,99,242,.45);
  transform: translateX(3px);
  box-shadow: 0 8px 24px -12px rgba(109,99,242,.5);
}
.pipe-ico { width: 34px; height: 34px; border-radius: .6rem; display: grid; place-items: center; background: linear-gradient(140deg,#6d63f2,#22d3ee); color: #fff; flex-shrink: 0; }
.pipe-connector { height: 14px; width: 2px; margin-left: 1.6rem; background: linear-gradient(#6d63f2, transparent); opacity: .5; }

/* ============ Before/After ============ */
.ba-item { display: flex; align-items: center; gap: .6rem; font-size: 14px; }
.ba-before { color: rgb(148 163 184); }
.ba-before i { color: #fb7185; }
.ba-after i { color: #34d399; }

/* ============ Agent / module tiles ============ */
.tile-ico {
  width: 44px; height: 44px; border-radius: .8rem; display: grid; place-items: center;
  background: linear-gradient(140deg, rgba(109,99,242,.9), rgba(34,211,238,.7));
  color: #fff; box-shadow: 0 8px 20px -8px rgba(109,99,242,.6);
}
.cap-chip { font-size: 11.5px; padding: .2rem .55rem; border-radius: 999px; background: rgba(120,120,160,.12); border: 1px solid rgba(120,120,160,.15); }

/* ============ Copilot ============ */
.copilot-window { box-shadow: 0 30px 80px -30px rgba(109,99,242,.5); }
.dot { width: 10px; height: 10px; border-radius: 999px; }
.msg-user { align-self: flex-end; max-width: 85%; margin-left: auto; padding: .65rem .85rem; border-radius: 1rem 1rem .25rem 1rem; background: linear-gradient(135deg,#6d63f2,#5b45e0); color:#fff; }
.msg-ai { max-width: 92%; padding: .65rem .85rem; border-radius: 1rem 1rem 1rem .25rem; background: rgba(120,120,160,.12); border: 1px solid rgba(120,120,160,.15); }
.chat-row { display: flex; }
.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin-top: .6rem; }
.result-cell { padding: .55rem .7rem; border-radius: .7rem; background: rgba(109,99,242,.1); border: 1px solid rgba(109,99,242,.22); }
.result-num { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: #a5adff; }
.typing span { display:inline-block; width:6px; height:6px; margin:0 1px; border-radius:999px; background: currentColor; opacity:.5; animation: blink 1.2s infinite; }
.typing span:nth-child(2){animation-delay:.2s} .typing span:nth-child(3){animation-delay:.4s}
@keyframes blink { 0%,100%{opacity:.2;transform:translateY(0)} 50%{opacity:1;transform:translateY(-2px)} }

/* ============ Integration / security / roi ============ */
.int-logo { width: 40px; height: 40px; border-radius: .7rem; display: grid; place-items: center; background: rgba(120,120,160,.1); border: 1px solid rgba(120,120,160,.16); }
.roi-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px,4vw,42px); line-height: 1; }

/* ============ CTA ============ */
.cta-card { position: relative; overflow: hidden; border-color: rgba(109,99,242,.3) !important; }
.cta-card::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 200px;
  background: radial-gradient(50% 100% at 50% 0%, rgba(109,99,242,.4), transparent 70%);
  pointer-events: none;
}

/* ============ Footer ============ */
.footer-h { font-family: var(--font-display); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: rgb(100 116 139); margin-bottom: .9rem; }
.footer-list { display: flex; flex-direction: column; gap: .6rem; font-size: 13.5px; }
.footer-list a { color: rgb(100 116 139); transition: color .2s ease; }
.dark .footer-list a { color: rgb(148 163 184); }
.footer-list a:hover { color: #6d63f2; }

/* ============ Reveal animation ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}

/* ============ Founder avatar ============ */
.founder-avatar {
  width: 60px; height: 60px; border-radius: 1rem; flex-shrink: 0;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 20px; color: #fff;
  letter-spacing: .02em;
  background: linear-gradient(140deg, #6d63f2, #22d3ee);
  box-shadow: 0 10px 26px -10px rgba(109,99,242,.7);
}
.founder-avatar--alt { background: linear-gradient(140deg, #22d3ee, #6d63f2); }
.pipe-node.\!cursor-default:hover { transform: none; }
