/* ===========================
   CSS VARIABLES & RESET
   =========================== */
:root {
  --bg-deep:      #050a1a;
  --bg-mid:       #080f25;
  --bg-card:      rgba(8, 18, 46, 0.7);
  --cyan:         #00f0ff;
  --cyan-dim:     rgba(0, 240, 255, 0.15);
  --cyan-glow:    rgba(0, 240, 255, 0.4);
  --purple:       #7b5ea7;
  --purple-dim:   rgba(123, 94, 167, 0.2);
  --blue-bright:  #1a3cff;
  --navy:         #0d1b4b;
  --text-primary: #e8eeff;
  --text-muted:   rgba(180, 200, 240, 0.55);
  --border:       rgba(0, 240, 255, 0.1);
  --border-hover: rgba(0, 240, 255, 0.35);
  --font-display: sans-serif;
  --font-mono:    'DM Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-display);
  overflow-x: hidden;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===========================
   SCROLLBAR
   =========================== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--cyan-glow); border-radius: 2px; }

/* ===========================
   NAV
   =========================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 3rem;
  background: rgba(5, 10, 26, 0.7);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.nav.scrolled { background: rgba(5, 10, 26, 0.95); }

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}
.brand-dot {
  width: 8px; height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyan);
  animation: blink 2s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}
.nav-links a {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--cyan); }
.nav-cta {
  color: var(--cyan) !important;
  border: 1px solid var(--border-hover);
  padding: 0.4rem 1.1rem !important;
  border-radius: 2rem;
  transition: background 0.2s, box-shadow 0.2s !important;
}
.nav-cta:hover {
  background: var(--cyan-dim) !important;
  box-shadow: 0 0 16px var(--cyan-glow);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: 0.3s;
}

/* ===========================
   HERO
   =========================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 3rem 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}
.orb-1 {
  width: 600px; height: 600px;
  top: -200px; right: -100px;
  background: radial-gradient(circle, #1a3cff 0%, #0d1b4b 60%, transparent 80%);
}
.orb-2 {
  width: 400px; height: 400px;
  bottom: -100px; left: 0;
  background: radial-gradient(circle, #7b5ea7 0%, transparent 70%);
  opacity: 0.25;
}
.orb-3 {
  width: 300px; height: 300px;
  top: 30%; right: 20%;
  background: radial-gradient(circle, #00f0ff 0%, transparent 70%);
  opacity: 0.12;
}

#neuralCanvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  animation: fadeUp 0.9s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid rgba(0, 240, 255, 0.25);
  padding: 0.35rem 0.9rem;
  border-radius: 2rem;
  margin-bottom: 1.8rem;
  letter-spacing: 0.05em;
}
.pulse-dot {
  width: 6px; height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.5; }
}

.hero-title {
  font-size: clamp(2.6rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.4rem;
}
.title-accent {
  color: transparent;
  background: linear-gradient(90deg, var(--cyan), #4a8fff, var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 480px;
  margin-bottom: 2.2rem;
}

.hero-actions {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--blue-bright), #0d8fff);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  padding: 0.85rem 2rem;
  border-radius: 0.4rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 24px rgba(26, 60, 255, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(26, 60, 255, 0.6);
}
.btn-primary.btn-large { font-size: 1rem; padding: 1rem 2.5rem; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.85rem 0;
  border: none;
  background: none;
  cursor: pointer;
  transition: color 0.2s;
  letter-spacing: 0.03em;
}
.btn-ghost:hover { color: var(--cyan); }

.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.stat { text-align: left; }
.stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--cyan);
}
.stat span:last-of-type {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--cyan);
}
.stat p {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 0.2rem;
  letter-spacing: 0.05em;
}
.stat-divider {
  width: 1px; height: 40px;
  background: var(--border);
}

/* Hero Visual */
.hero-visual {
  position: absolute;
  right: 6%;
  top: 50%;
  transform: translateY(-50%);
  width: 380px; height: 380px;
  z-index: 1;
  animation: floatVisual 6s ease-in-out infinite;
}
@keyframes floatVisual {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(calc(-50% - 12px)) translateX(4px); }
}

.brain-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.1);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.ring-1 { width: 380px; height: 380px; animation: spinRing 25s linear infinite; }
.ring-2 { width: 280px; height: 280px; animation: spinRing 18s linear infinite reverse; border-color: rgba(123, 94, 167, 0.15); }
.ring-3 { width: 180px; height: 180px; animation: spinRing 12s linear infinite; }
@keyframes spinRing {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.brain-core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 160px; height: 160px;
  background: radial-gradient(circle at 50% 40%, rgba(0,240,255,0.18) 0%, rgba(0,240,255,0.05) 50%, transparent 75%);
  border-radius: 50%;
}
.brain-svg { width: 100%; height: 100%; }
.bnode { animation: nodeGlow 2.5s ease-in-out infinite alternate; }
@keyframes nodeGlow {
  from { opacity: 0.5; }
  to   { opacity: 1; filter: drop-shadow(0 0 4px #00f0ff); }
}

/* ===========================
   SECTIONS SHARED
   =========================== */
.section {
  padding: 7rem 0;
  position: relative;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan);
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  opacity: 0.7;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}
.section-title em {
  font-style: normal;
  color: transparent;
  background: linear-gradient(90deg, var(--cyan), #4a8fff);
  -webkit-background-clip: text;
  background-clip: text;
}
.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 580px;
  line-height: 1.8;
  margin-bottom: 4rem;
}

/* ===========================
   HOW IT WORKS
   =========================== */
.how {
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 100%);
}

.steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  flex-wrap: wrap;
}

.step {
  flex: 1;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem 1.6rem;
  position: relative;
  transition: border-color 0.3s, transform 0.3s;
  overflow: hidden;
}
.step::before {
  content: attr(data-step);
  position: absolute;
  top: -0.5rem; right: 1rem;
  font-family: var(--font-mono);
  font-size: 4rem;
  font-weight: 800;
  color: rgba(0,240,255,0.04);
  line-height: 1;
  pointer-events: none;
}
.step:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.step-icon {
  width: 44px; height: 44px;
  margin-bottom: 1.2rem;
}
.step-icon svg { width: 100%; height: 100%; }

.step h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  letter-spacing: 0.02em;
}
.step p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.step-arrow {
  color: var(--cyan);
  font-size: 1.2rem;
  padding: 0 0.5rem;
  padding-top: 3rem;
  opacity: 0.4;
  flex-shrink: 0;
}

/* ===========================
   FEATURES
   =========================== */
.features { background: var(--bg-deep); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 1.2rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem 1.8rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}
.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
}
.feature-large {
  grid-column: 1 / 3;
  background: linear-gradient(135deg, rgba(0,240,255,0.04) 0%, rgba(26,60,255,0.06) 100%);
  border-color: rgba(0,240,255,0.18);
}

.feature-glow {
  position: absolute;
  top: -40px; left: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(0,240,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.feature-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--cyan);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0.7;
}
.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.7rem;
  letter-spacing: 0.01em;
}
.feature-large h3 { font-size: 1.5rem; }

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.feature-stat {
  display: inline-block;
  margin-top: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cyan);
  background: var(--cyan-dim);
  padding: 0.3rem 0.8rem;
  border-radius: 2rem;
  border: 1px solid rgba(0,240,255,0.2);
}

/* ===========================
   USE CASES
   =========================== */
.usecases {
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 100%);
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.usecase {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2.5rem 2rem;
  transition: border-color 0.3s, transform 0.3s;
  position: relative;
}
.usecase:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}
.usecase::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  border-radius: 0 0 1rem 1rem;
  opacity: 0;
  transition: opacity 0.3s;
}
.usecase:hover::after { opacity: 1; }

.usecase-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan);
  letter-spacing: 0.1em;
  margin-bottom: 1.2rem;
  opacity: 0.6;
}
.usecase h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}
.usecase p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.usecase-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.usecase-tags li {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--purple);
  background: var(--purple-dim);
  border: 1px solid rgba(123,94,167,0.2);
  padding: 0.25rem 0.7rem;
  border-radius: 2rem;
  letter-spacing: 0.05em;
}

/* ===========================
   AI SECTION
   =========================== */
.ai-section { background: var(--bg-deep); }

.ai-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.ai-text .section-title { margin-bottom: 1rem; }
.ai-text > p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.ai-flow {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.flow-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.7rem 1rem;
  border-radius: 0.6rem;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  text-align: center;
}
.flow-icon { font-size: 1.2rem; }
.flow-arrow {
  color: var(--cyan);
  font-size: 1rem;
  opacity: 0.5;
}

.ai-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.ai-list li {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.ai-list li span {
  color: var(--cyan);
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* Code block */
.code-block {
  background: rgba(4, 8, 20, 0.9);
  border: 1px solid rgba(0,240,255,0.15);
  border-radius: 0.9rem;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.code-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.2rem;
  background: rgba(0,240,255,0.04);
  border-bottom: 1px solid rgba(0,240,255,0.08);
}
.code-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.code-dot:nth-child(1) { background: #ff5f57; }
.code-dot:nth-child(2) { background: #febc2e; }
.code-dot:nth-child(3) { background: #28c840; }
.code-filename {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
  letter-spacing: 0.04em;
}
.code-body {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.8;
  padding: 1.5rem 1.4rem;
  overflow-x: auto;
  color: #b8d0f0;
}
.c-kw   { color: #7b9fff; }
.c-str  { color: #79e2a7; }
.c-num  { color: #ffb86c; }
.c-comment { color: #4a5e80; font-style: italic; }

/* ===========================
   CTA
   =========================== */
.cta-section {
  position: relative;
  text-align: center;
  padding: 8rem 2rem;
  overflow: hidden;
}
.cta-bg { position: absolute; inset: 0; pointer-events: none; }
.orb-cta-1 {
  width: 500px; height: 500px;
  top: -200px; left: -100px;
  background: radial-gradient(circle, rgba(26,60,255,0.3) 0%, transparent 70%);
  filter: blur(80px);
  opacity: 0.5;
}
.orb-cta-2 {
  width: 400px; height: 400px;
  bottom: -150px; right: -50px;
  background: radial-gradient(circle, rgba(123,94,167,0.3) 0%, transparent 70%);
  filter: blur(80px);
  opacity: 0.4;
}
.cta-container { position: relative; z-index: 1; }
.cta-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan);
  letter-spacing: 0.12em;
  margin-bottom: 1.2rem;
  opacity: 0.7;
}
.cta-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}
.cta-sub {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
}

/* ===========================
   CONTACT
   =========================== */
.contact-section {
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 100%);
}

.contact-cards {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.8rem 2rem;
  flex: 1;
  min-width: 280px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}
.contact-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,240,255,0.08);
}

.contact-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-bright), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.contact-info h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.contact-info span {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--cyan);
  opacity: 0.7;
}

.contact-arrow {
  margin-left: auto;
  font-size: 1.3rem;
  color: var(--text-muted);
  transition: color 0.2s, transform 0.2s;
}
.contact-card:hover .contact-arrow {
  color: var(--cyan);
  transform: translate(2px, -2px);
}

/* ===========================
   FOOTER
   =========================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 3rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1160px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ===========================
   REVEAL ANIMATION
   =========================== */
.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: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: rgba(5, 10, 26, 0.98);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    gap: 1.2rem;
    z-index: 99;
  }

  .hero { flex-direction: column; padding: 7rem 2rem 4rem; }
  .hero-visual { display: none; }

  .steps { flex-direction: column; }
  .step-arrow { display: none; }

  .features-grid { grid-template-columns: 1fr 1fr; }
  .feature-large { grid-column: 1 / -1; }

  .usecases-grid { grid-template-columns: 1fr; }

  .ai-container { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 600px) {
  .nav { padding: 1rem 1.5rem; }
  .hero { padding: 6rem 1.5rem 3rem; }
  .container { padding: 0 1.5rem; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-large { grid-column: 1; }
  .hero-stats { gap: 1rem; }
  .section { padding: 5rem 0; }
}