/* =========================================================
   Teragrid Swarm — Neural Web landing page
   Powered by Teragrid Ai · AITG Sdn Bhd
   ========================================================= */

:root {
  --bg: #06080f;
  --bg-2: #0a0e1a;
  --bg-3: #0d1426;
  --surface: #111a31;
  --line: rgba(125, 249, 255, 0.12);
  --line-strong: rgba(125, 249, 255, 0.28);
  --text: #eaf0ff;
  --muted: #9aa6c2;
  --muted-2: #6b7793;
  --primary: #3d5cff;
  --accent: #7df9ff;
  --accent-2: #b388ff;
  --grad: linear-gradient(135deg, #7df9ff 0%, #3d5cff 50%, #b388ff 100%);
  --grad-alt: linear-gradient(135deg, #ffd166 0%, #7df9ff 100%);
  --shadow: 0 30px 60px -20px rgba(61, 92, 255, 0.45);
  --radius: 16px;
  --maxw: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(800px 500px at 15% -10%, rgba(61, 92, 255, 0.18), transparent 60%),
    radial-gradient(700px 500px at 95% 10%, rgba(179, 136, 255, 0.14), transparent 60%),
    radial-gradient(900px 600px at 50% 110%, rgba(125, 249, 255, 0.10), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.text-center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-sm { padding: 0.55rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 1.7rem; font-size: 1rem; }

.btn-primary {
  background: var(--grad);
  color: #06080f;
  box-shadow: 0 14px 30px -8px rgba(125, 249, 255, 0.5);
}
.btn-primary:hover {
  box-shadow: 0 20px 40px -10px rgba(125, 249, 255, 0.65);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--line-strong);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(6, 8, 15, 0.55);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.site-header.scrolled {
  background: rgba(6, 8, 15, 0.85);
  border-color: var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 1.05rem; }
.brand strong { font-weight: 800; letter-spacing: -0.01em; }
.brand-accent {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}
.brand-mark { display: inline-flex; }
.brand-lg { font-size: 1.3rem; margin-bottom: 0.75rem; }

.site-nav {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
  margin-right: 1rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.site-nav a { transition: color 0.15s ease; }
.site-nav a:hover { color: var(--text); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 14, 26, 0.97);
    padding: 1.25rem;
    border-bottom: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    margin-right: 0;
  }
  .site-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-toggle { display: flex; }
  .header-inner > .btn { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 6rem 0 4rem;
}
#neuralWeb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(700px 500px at 50% 50%, rgba(6, 8, 15, 0) 0%, rgba(6, 8, 15, 0.55) 60%, rgba(6, 8, 15, 0.85) 100%);
  z-index: 1;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; max-width: 920px; }

.kicker {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(125, 249, 255, 0.06);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin: 0 0 1.5rem;
}
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.grad.alt { background: var(--grad-alt); -webkit-background-clip: text; background-clip: text; color: transparent; }

.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--muted);
  max-width: 720px;
  margin: 0 0 2.5rem;
}
.hero-sub strong { color: var(--text); }
.hero-sub em { color: var(--accent); font-style: normal; }

.hero-cta {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  max-width: 720px;
}
.hero-stats > div {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 20, 38, 0.5);
  backdrop-filter: blur(8px);
}
.hero-stats strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-stats span { font-size: 0.78rem; color: var(--muted); }
@media (max-width: 700px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

.hero-scroll {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.hero-scroll span {
  display: block;
  width: 22px;
  height: 36px;
  border: 2px solid var(--line-strong);
  border-radius: 12px;
  position: relative;
}
.hero-scroll span::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scroll 1.6s ease-in-out infinite;
}
@keyframes scroll {
  0% { opacity: 1; top: 6px; }
  100% { opacity: 0; top: 22px; }
}

/* ---------- Strip ---------- */
.strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(13, 20, 38, 0.3);
}
.strip-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  padding: 1.1rem 1.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

/* ---------- Sections ---------- */
.section { padding: 6rem 0; position: relative; }
.section-dark {
  background: linear-gradient(180deg, rgba(13, 20, 38, 0.6), rgba(6, 8, 15, 0.9));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-hero-lite { padding: 5rem 0 3rem; }

.section-head { max-width: 760px; margin: 0 auto 3rem; text-align: center; }
.section-head h2 {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0.6rem 0 1rem;
  line-height: 1.1;
}
.lede { color: var(--muted); font-size: 1.05rem; margin: 0; }

/* ---------- Orchestration ---------- */
.orchestration-visual {
  margin: 0 auto 3rem;
  padding: 1.5rem;
  max-width: 1100px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(600px 300px at 20% 10%, rgba(61, 92, 255, 0.12), transparent 60%),
    rgba(13, 20, 38, 0.45);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.flow-svg { width: 100%; height: auto; }
.flow-line {
  stroke-dasharray: 6 8;
  animation: flow 2.6s linear infinite;
}
@keyframes flow {
  to { stroke-dashoffset: -56; }
}

.orchestration-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
@media (max-width: 880px) { .orchestration-cards { grid-template-columns: 1fr; } }

.card {
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 20, 38, 0.5);
  transition: transform 0.22s ease, border-color 0.22s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.card h3 { margin: 0 0 0.5rem; font-size: 1.15rem; font-weight: 700; }
.card p { margin: 0; color: var(--muted); }

/* ---------- Metrics ---------- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
  margin-bottom: 4rem;
}
@media (max-width: 900px) { .metrics-grid { grid-template-columns: 1fr; } }

.metric {
  padding: 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 26, 49, 0.5);
}
.metric-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.bars { display: flex; flex-direction: column; gap: 0.85rem; }
.bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}
.bar > span:first-child { z-index: 1; padding: 0.55rem 0.7rem; font-weight: 500; }
.bar .fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: rgba(154, 166, 194, 0.18);
  border-radius: 8px;
  transition: width 1.6s cubic-bezier(.2,.8,.2,1);
}
.bar.swarm .fill { background: var(--grad); opacity: 0.95; }
.bar.swarm > span:first-child { color: #06080f; font-weight: 700; }

.counters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}
.counter {
  padding: 1.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 20, 38, 0.5);
}
.counter strong {
  display: block;
  font-size: 2.8rem;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.counter span { font-size: 0.85rem; color: var(--muted); display: block; margin-top: 0.4rem; }
@media (max-width: 700px) { .counters { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Use cases ---------- */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
@media (max-width: 900px) { .usecase-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .usecase-grid { grid-template-columns: 1fr; } }

.usecase {
  padding: 1.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 20, 38, 0.5);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
  position: relative;
  overflow: hidden;
}
.usecase::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.usecase:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.usecase:hover::before { transform: scaleX(1); }
.usecase-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(125, 249, 255, 0.08);
  color: var(--accent);
  margin-bottom: 1rem;
}
.usecase-icon svg { width: 22px; height: 22px; }
.usecase h3 { margin: 0 0 0.4rem; font-size: 1.1rem; font-weight: 700; }
.usecase p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- CTA banner ---------- */
.cta-banner {
  padding: 5rem 0;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(125, 249, 255, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(13, 20, 38, 0.7), rgba(6, 8, 15, 0.95));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.cta-banner h2 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 0.6rem; font-weight: 800; }
.cta-banner p { color: var(--muted); margin: 0 0 2rem; }

/* ---------- Blog ---------- */
.blog-teaser-grid, .blog-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.3rem;
}
.blog-list { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px) {
  .blog-teaser-grid, .blog-list { grid-template-columns: 1fr; }
}

.blog-card {
  display: block;
  padding: 1.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 20, 38, 0.5);
  transition: transform 0.22s ease, border-color 0.22s ease;
}
.blog-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.blog-card-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.blog-card h2, .blog-card h3 {
  margin: 0.5rem 0 0.6rem;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}
.blog-card p { margin: 0 0 1rem; color: var(--muted); font-size: 0.95rem; }
.blog-card-link { color: var(--accent); font-size: 0.9rem; font-weight: 600; }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0; }
.tag {
  font-size: 0.72rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

/* ---------- Article ---------- */
.article-inner { max-width: 760px; }
.back-link { color: var(--accent); font-size: 0.9rem; }
.article-head { margin: 1.5rem 0 2.5rem; }
.article-head h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  margin: 0.7rem 0 0.8rem;
  line-height: 1.15;
  font-weight: 800;
}
.article-body { font-size: 1.05rem; line-height: 1.75; color: #d4dcf0; }
.article-body h1 { display: none; }
.article-body h2 {
  font-size: 1.55rem;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
  font-weight: 700;
}
.article-body h3 { font-size: 1.2rem; margin: 1.8rem 0 0.7rem; font-weight: 700; }
.article-body p { margin: 0 0 1.1rem; }
.article-body ul, .article-body ol { padding-left: 1.4rem; margin: 0 0 1.2rem; }
.article-body li { margin-bottom: 0.4rem; }
.article-body strong { color: var(--text); }
.article-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9em;
  background: rgba(125, 249, 255, 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1rem;
  color: var(--muted);
  margin: 1.5rem 0;
  font-style: italic;
}
.article-cta {
  margin-top: 4rem;
  padding: 2.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(13, 20, 38, 0.6);
  text-align: center;
}
.article-cta h3 { margin: 0 0 1rem; font-size: 1.3rem; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 20, 38, 0.4);
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.faq-item[open] { border-color: var(--line-strong); }
.faq-item summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 1.15rem 1.4rem;
  font-weight: 600;
  font-size: 1.02rem;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .chev { transition: transform 0.2s ease; color: var(--accent); flex-shrink: 0; }
.faq-item[open] .chev { transform: rotate(180deg); }
.faq-body {
  padding: 0 1.4rem 1.3rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
}
.faq-body p { margin: 0; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
}
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 20, 38, 0.5);
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field label { font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.field input, .field textarea {
  font-family: inherit;
  font-size: 0.98rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(6, 8, 15, 0.7);
  color: var(--text);
  transition: border-color 0.18s ease, background 0.18s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(6, 8, 15, 0.9);
}
.field textarea { resize: vertical; min-height: 120px; }

.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

.form-status { margin: 0; font-size: 0.9rem; min-height: 1.4em; }
.form-status.ok { color: #6ef0a5; }
.form-status.err { color: #ff8b8b; }

.contact-aside {
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 20, 38, 0.4);
  height: fit-content;
}
.contact-aside h3 { margin: 0 0 0.6rem; font-size: 1rem; color: var(--accent); }
.contact-aside h3:not(:first-child) { margin-top: 1.6rem; }
.contact-aside p, .contact-aside li { margin: 0 0 0.4rem; color: var(--muted); font-size: 0.95rem; }
.contact-aside ol { padding-left: 1.2rem; margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(6, 8, 15, 0.85);
  padding: 4rem 0 1.5rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }

.site-footer h4 {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.5rem; font-size: 0.93rem; color: var(--muted); }
.site-footer li a { transition: color 0.15s ease; }
.site-footer li a:hover { color: var(--text); }
.site-footer p { color: var(--muted); font-size: 0.93rem; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.5rem 1.25rem 0;
  border-top: 1px solid var(--line);
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* =========================================================
   HERO V2 — depth, motion, drama
   ========================================================= */

.hero-v2 {
  min-height: 100vh;
  padding: 8rem 0 6rem;
  isolation: isolate;
}

/* Breathing gradient orb */
.hero-orb {
  position: absolute;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(61, 92, 255, 0.55) 0%, rgba(125, 249, 255, 0.18) 35%, transparent 70%);
  filter: blur(80px);
  top: 10%;
  left: 50%;
  transform: translate(-50%, -10%);
  z-index: 1;
  animation: orbBreath 10s ease-in-out infinite;
  will-change: transform, opacity;
  pointer-events: none;
}
.hero-orb-2 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at center, rgba(179, 136, 255, 0.45) 0%, transparent 70%);
  top: 50%;
  left: 70%;
  animation: orbDrift 14s ease-in-out infinite alternate;
}
@keyframes orbBreath {
  0%, 100% { transform: translate(-50%, -10%) scale(1); opacity: 0.85; }
  50%      { transform: translate(-50%, -8%)  scale(1.12); opacity: 1; }
}
@keyframes orbDrift {
  from { transform: translate(0, 0) scale(1);   opacity: 0.7; }
  to   { transform: translate(-80px, 60px) scale(1.2); opacity: 1; }
}

/* Animated grid floor (perspective) */
.hero-grid {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 50%;
  background-image:
    linear-gradient(rgba(125, 249, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 249, 255, 0.08) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(500px) rotateX(60deg);
  transform-origin: 50% 100%;
  mask-image: linear-gradient(180deg, transparent 0%, #000 50%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 50%, transparent 100%);
  z-index: 1;
  animation: gridScroll 14s linear infinite;
  pointer-events: none;
}
@keyframes gridScroll {
  from { background-position: 0 0; }
  to   { background-position: 0 60px; }
}

/* Canvas above orb but below content */
#neuralWeb { z-index: 2; }
.hero-overlay { z-index: 3; }
.hero-inner { z-index: 4; }
.hero-badges { z-index: 4; }

/* Kicker row with live status */
.hero-kicker-row {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.6rem;
  flex-wrap: wrap;
}
.kicker-live { margin-bottom: 0; display: inline-flex; align-items: center; gap: 0.55rem; }
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #6ef0a5;
  box-shadow: 0 0 0 0 rgba(110, 240, 165, 0.7);
  animation: livePulse 1.6s ease-out infinite;
}
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(110, 240, 165, 0.7); }
  70%  { box-shadow: 0 0 0 12px rgba(110, 240, 165, 0); }
  100% { box-shadow: 0 0 0 0 rgba(110, 240, 165, 0); }
}
.kicker-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(13, 20, 38, 0.5);
  backdrop-filter: blur(8px);
}
.kicker-stat #liveSwarmCount { color: var(--accent); font-weight: 700; }

/* Animated gradient flow on the title */
.grad-flow {
  background-size: 250% 250%;
  animation: gradFlow 6s ease-in-out infinite;
}
@keyframes gradFlow {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* Title gets a subtle glow */
.hero-v2 .hero-title {
  text-shadow: 0 0 60px rgba(61, 92, 255, 0.25);
}

/* Terminal widget */
.hero-terminal {
  margin: 2.2rem 0 2.8rem;
  max-width: 580px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(6, 8, 15, 0.85);
  backdrop-filter: blur(12px);
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(125, 249, 255, 0.06) inset,
    0 0 60px rgba(61, 92, 255, 0.15);
  transform: translateY(0);
  animation: termFloat 6s ease-in-out infinite;
}
@keyframes termFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.9rem;
  background: rgba(13, 20, 38, 0.85);
  border-bottom: 1px solid var(--line);
}
.terminal-bar .dot { width: 11px; height: 11px; border-radius: 50%; }
.dot-r { background: #ff5f56; }
.dot-y { background: #ffbd2e; }
.dot-g { background: #27c93f; }
.terminal-title {
  margin-left: 0.6rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted-2);
  letter-spacing: 0.05em;
}
.terminal-body {
  padding: 1rem 1.1rem 1.1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text);
  min-height: 130px;
}
.terminal-line { display: block; }
.terminal-line .prompt { color: var(--accent); margin-right: 0.5rem; }
.terminal-line.out { color: var(--muted); }
.terminal-line.out.ok { color: #6ef0a5; }
.caret {
  display: inline-block;
  color: var(--accent);
  animation: caretBlink 0.9s steps(1) infinite;
}
@keyframes caretBlink { 50% { opacity: 0; } }

/* Shimmer button */
.btn-shimmer {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.45) 50%, transparent 100%);
  transform: skewX(-20deg);
  animation: shimmer 3.2s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
}
@keyframes shimmer {
  0%   { left: -75%; }
  60%  { left: 130%; }
  100% { left: 130%; }
}

/* Floating agent badges */
.hero-badges {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.agent-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text);
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(13, 20, 38, 0.65);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  opacity: 0;
  animation: badgeIn 0.9s 0.6s forwards ease-out, badgeFloat 7s ease-in-out infinite;
}
.ab-pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: dotPulse 1.8s ease-in-out infinite;
}
@keyframes dotPulse { 0%,100% { opacity: 0.6; } 50% { opacity: 1; } }
@keyframes badgeIn { to { opacity: 1; } }
@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

.ab1 { top: 18%;  left: 4%;   animation-delay: 0s,   0s; }
.ab2 { top: 70%;  left: 6%;   animation-delay: 0.15s, 1.4s; }
.ab3 { top: 22%;  right: 4%;  animation-delay: 0.3s,  2.1s; }
.ab4 { top: 65%;  right: 6%;  animation-delay: 0.45s, 0.7s; }

@media (max-width: 1100px) {
  .agent-badge { display: none; }
}

/* Hero CTA spacing tweak in v2 */
.hero-v2 .hero-cta { margin-top: 0.5rem; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-orb, .hero-orb-2, .hero-grid, .hero-terminal, .btn-shimmer::after,
  .agent-badge, .ab-pulse, .live-dot, .grad-flow, .caret { animation: none !important; }
}

/* Responsive */
@media (max-width: 880px) {
  .hero-terminal { font-size: 0.78rem; }
  .hero-orb  { width: 460px; height: 460px; }
  .hero-orb-2 { width: 320px; height: 320px; left: 80%; }
}

/* =========================================================
   HERO V2 — Three.js globe (sits behind canvas, low opacity)
   ========================================================= */

#globeContainer {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 760px;
  height: 760px;
  transform: translate(-50%, -50%);
  z-index: 0;
  opacity: 0.78;
  pointer-events: none;
  filter: drop-shadow(0 0 40px rgba(125, 249, 255, 0.25));
}
#globeContainer canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* On mobile, shrink and shift the globe so it doesn't dominate */
@media (max-width: 880px) {
  #globeContainer {
    width: 480px;
    height: 480px;
    opacity: 0.5;
    top: 60%;
  }
}

/* Lift the orb above the globe for color blending */
.hero-v2 .hero-orb { mix-blend-mode: screen; }
