:root {
  --color-bg: #0f1419;
  --color-surface: #1a2332;
  --color-surface-alt: #1e2838;
  --color-accent: #2dd4bf;
  --color-accent-warm: #fb923c;
  --color-accent-purple: #a78bfa;
  --color-text-primary: #f7f8f8;
  --color-text-secondary: #8a8f98;
  --color-text-muted: #62666d;
  --color-border-subtle: rgba(255, 255, 255, 0.08);
  --color-border-teal: rgba(45, 212, 191, 0.15);
  --color-border-teal-hover: rgba(45, 212, 191, 0.35);
  --font-head: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --radius-std: 8px;
  --radius-panel: 12px;
  --radius-btn: 6px;
  --radius-pill: 9999px;
  --max-width: 1200px;
  --section-pad: 120px;
  --section-pad-mobile: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* ===== AMBIENT GRADIENT BLOBS ===== */
body::before {
  content: "";
  position: fixed;
  top: -180px;
  right: -120px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.07) 0%, transparent 70%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: "";
  position: fixed;
  bottom: -200px;
  left: -140px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.06) 0%, transparent 70%);
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: transparent;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
nav.scrolled {
  background: rgba(15, 20, 25, 0.75);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--color-border-subtle);
}
.nav-logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 26px;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-prompt {
  color: var(--color-accent);
  font-family: var(--font-mono);
  font-size: 23px;
}
.nav-name {
  font-family: var(--font-mono), var(--font-body);
  color: var(--color-text-primary, var(--text));
  font-weight: 400;
}
.cursor-blink {
  animation: cursorBlink 1.2s steps(2) infinite;
}
@keyframes cursorBlink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}
.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-links a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--color-accent); }
.nav-links a.active { color: var(--color-accent); }
.nav-cta {
  background: var(--color-accent);
  color: var(--color-bg);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  transition: opacity 0.2s ease;
}
.nav-cta:hover { opacity: 0.9; }
.nav-right {
  display: flex;
  align-items: center;
  gap: 32px;
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}
.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--color-text-primary);
  transition: all 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-subtle);
  flex-direction: column;
  padding: 20px 40px;
  gap: 20px;
  z-index: 99;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-secondary);
  padding: 6px 0;
}
.mobile-menu a:hover { color: var(--color-accent); }
.mobile-menu a.active { color: var(--color-accent); }
.mobile-menu .nav-cta {
  align-self: flex-start;
  background: var(--color-accent);
  color: var(--color-bg);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: var(--radius-btn);
  margin-top: 4px;
}

/* ===== PAGE HEADER ===== */
.page-header {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 204px 24px 120px;
  background: var(--color-bg);
  text-align: center;
}
.page-header .section-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
}
.page-header h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--color-text-primary);
  margin-bottom: 18px;
}
.page-header .header-sub {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.4vw, 19px);
  font-weight: 400;
  color: var(--color-text-secondary);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- Network SVG layer --- */
.network-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.4;
}

/* --- Node breathing glow (staggered) --- */
@keyframes node-glow {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 0.85; }
}
.net-node {
  animation: node-glow 3.6s ease-in-out infinite;
}
.net-node.n1 { animation-delay: 0s; }
.net-node.n2 { animation-delay: 0.45s; }
.net-node.n3 { animation-delay: 0.9s; }
.net-node.n4 { animation-delay: 1.35s; }
.net-node.n5 { animation-delay: 1.8s; }
.net-node.n6 { animation-delay: 2.25s; }

/* --- Core glow ring breathing --- */
@keyframes coreGlow {
  0%, 100% { r: 40; opacity: 0.35; }
  50%      { r: 52; opacity: 0.08; }
}
.core-glow-ring {
  animation: coreGlow 3.6s ease-in-out infinite;
}

/* --- Core halo pulse --- */
@keyframes coreHalo {
  0%, 100% { opacity: 0.30; }
  50%      { opacity: 0.55; }
}
.core-halo {
  animation: coreHalo 3.6s ease-in-out infinite;
}

/* ===== SHARED SECTION ===== */
section {
  padding: var(--section-pad) 24px;
  position: relative;
  z-index: 1;
}
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.mono-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-accent);
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 14px;
}
h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 40px);
  color: var(--color-text-primary);
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.section-subtitle {
  color: var(--color-text-secondary);
  font-size: 16px;
  font-weight: 400;
  margin-top: 14px;
  max-width: 540px;
}
.section-centered { text-align: center; }
.section-centered .section-subtitle { margin-left: auto; margin-right: auto; }

/* ===== INDUSTRIES GRID ===== */
.industries-section {
  background: var(--color-bg);
  position: relative;
  z-index: 1;
}
.industries-section::before {
  content: "";
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(45, 212, 191, 0.06) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}
.industries-section .section-inner {
  position: relative;
  z-index: 1;
}
.industries-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ===== INDUSTRY CARD ===== */
.industry-card {
  background: rgba(26, 35, 50, 0.55);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-panel);
  padding: 40px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
}
.industry-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28), 0 0 0 1px var(--color-border-teal-hover);
  border-color: var(--color-border-teal-hover);
}
.industry-card:nth-child(2) .industry-icon { border-color: rgba(251, 146, 60, 0.35); }
.industry-card:nth-child(2) .industry-icon svg { color: var(--color-accent-warm); }
.industry-card:nth-child(3) .industry-icon { border-color: rgba(167, 139, 250, 0.35); }
.industry-card:nth-child(3) .industry-icon svg { color: var(--color-accent-purple); }
.industry-card:nth-child(5) .industry-icon { border-color: rgba(251, 146, 60, 0.35); }
.industry-card:nth-child(5) .industry-icon svg { color: var(--color-accent-warm); }
.industry-card:nth-child(6) .industry-icon { border-color: rgba(167, 139, 250, 0.35); }
.industry-card:nth-child(6) .industry-icon svg { color: var(--color-accent-purple); }

.industry-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}
.industry-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border-teal-hover);
  border-radius: var(--radius-std);
  flex-shrink: 0;
}
.industry-icon svg { width: 26px; height: 26px; color: var(--color-accent); }
.industry-head h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  color: var(--color-text-primary);
  line-height: 1.2;
}
.industry-desc {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.65;
  margin-bottom: 20px;
}
.industry-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.industry-bullets li {
  font-size: 14px;
  color: var(--color-text-secondary);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  line-height: 1.5;
}
.industry-bullets li .b-prefix {
  font-family: var(--font-mono);
  color: var(--color-accent);
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1.5;
}
.industry-card:nth-child(2) .b-prefix { color: var(--color-accent-warm); }
.industry-card:nth-child(3) .b-prefix { color: var(--color-accent-purple); }
.industry-card:nth-child(5) .b-prefix { color: var(--color-accent-warm); }
.industry-card:nth-child(6) .b-prefix { color: var(--color-accent-purple); }

/* ===== HOW AGENTS WORK ===== */
.how-agents-work {
  background: var(--color-surface-alt);
  position: relative;
  z-index: 1;
}
.how-agents-work::before {
  content: "";
  position: absolute;
  top: 30%;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.05) 0%, transparent 70%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.how-agents-work .section-inner {
  position: relative;
  z-index: 1;
}
.how-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.how-text .section-subtitle {
  max-width: 480px;
}
.how-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
}
.how-bullets li {
  font-size: 15px;
  color: var(--color-text-secondary);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  line-height: 1.5;
}
.how-bullets li .b-prefix {
  font-family: var(--font-mono);
  color: var(--color-accent);
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1.5;
}
.how-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.how-visual svg {
  width: 100%;
  max-width: 340px;
  height: auto;
}

/* ===== CTA ===== */
.cta {
  background: var(--color-bg);
  text-align: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(251, 146, 60, 0.07) 0%, rgba(167, 139, 250, 0.04) 50%, transparent 70%);
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}
.cta .section-inner {
  position: relative;
  z-index: 1;
}
.cta h2 { font-size: clamp(34px, 4.5vw, 48px); }
.cta-sub {
  color: var(--color-text-secondary);
  font-size: 17px;
  margin: 16px auto 0;
  max-width: 560px;
  line-height: 1.6;
}
.cta-btn {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-bg);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  margin-top: 36px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.cta-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* ===== FOOTER ===== */
footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-border-subtle);
  padding: 40px 24px 28px;
  position: relative;
  z-index: 1;
}
.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  align-items: center;
}
.footer-left {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 32px;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-left .nav-prompt { font-size: 30px; }
.footer-center {
  display: flex;
  gap: 28px;
  justify-content: center;
}
.footer-center a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color 0.2s ease;
}
.footer-center a:hover { color: var(--color-accent); }
.footer-right {
  text-align: right;
  font-size: 14px;
  color: var(--color-text-secondary);
}
.footer-copy {
  text-align: center;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border-subtle);
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .industries-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .hamburger { display: flex; order: 1; }
  .nav-right .nav-cta { order: 2; }
  .nav-right { justify-content: flex-end; gap: 16px; }
  section { padding: var(--section-pad-mobile) 20px; }
  .page-header { padding: 174px 20px 86px; }
  .industries-grid { grid-template-columns: 1fr; gap: 20px; }
  .industry-card { padding: 28px; }
  .how-grid { grid-template-columns: 1fr; gap: 28px; }
  .how-visual { order: -1; }
  .how-visual svg { max-width: 280px; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 18px; }
  .footer-left, .footer-right { justify-content: center; text-align: center; }
  .footer-left { display: inline-flex; }
}

@media (max-width: 480px) {
  .industry-head { flex-direction: column; align-items: flex-start; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .cursor-blink { animation: none; }
  .net-node, .core-glow-ring, .core-halo { animation: none !important; }
  .network-bg animateMotion, .network-bg animate { display: none !important; }
  .how-agents-work animateMotion, .how-agents-work animate { display: none !important; }
}