@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

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

html { scroll-behavior: smooth; }

body {
  background-color: #02040a;
  color: #f8fafc;
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection { background: rgba(6,182,212,0.3); color: #a5f3fc; }

/* ─── Deep Space Grid Background ─────────────────────── */
.bg-space-grid {
  background-color: #02040a;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(56,189,248,0.03) 0%, transparent 60%),
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 100% 100%, 60px 60px, 60px 60px;
  background-position: center top;
}

/* ─── Noise Overlay ──────────────────────────────────── */
.bg-noise {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 50;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ─── Chromatic Aberration ────────────────────────────── */
.text-aberration {
  color: white;
  text-shadow: 2px 0 rgba(56,189,248,0.4), -2px 0 rgba(168,85,247,0.3);
}

@keyframes aberration-shift {
  0%,100% { text-shadow: 2px 0 rgba(56,189,248,0.4), -2px 0 rgba(168,85,247,0.3); }
  25%      { text-shadow: 3px 1px rgba(56,189,248,0.5), -1px -1px rgba(168,85,247,0.25); }
  50%      { text-shadow: 1px -1px rgba(56,189,248,0.35), -3px 1px rgba(168,85,247,0.4); }
  75%      { text-shadow: 2px 0 rgba(56,189,248,0.3), -2px 0 rgba(168,85,247,0.5); }
}
.text-aberration-animated {
  color: white;
  animation: aberration-shift 8s ease-in-out infinite;
}

/* ─── Tech Border Corners ─────────────────────────────── */
.tech-border-corner {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}
.tech-border-corner-reverse {
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

/* ─── Data Stream (Rain) ──────────────────────────────── */
.data-stream {
  position: absolute;
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(56,189,248,0.4), transparent);
  animation: rain 3s linear infinite;
}
@keyframes rain {
  0%   { transform: translateY(-100%) scaleY(1); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(1000%) scaleY(1.5); opacity: 0; }
}

/* ─── Scanlines ───────────────────────────────────────── */
.scanlines {
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0),
    rgba(255,255,255,0) 50%,
    rgba(0,0,0,0.05) 50%,
    rgba(0,0,0,0.05)
  );
  background-size: 100% 3px;
  pointer-events: none;
}

/* ─── Fade-In-Up Animation ────────────────────────────── */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up {
  animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.anim-delay-1 { animation-delay: 0.2s; }
.anim-delay-2 { animation-delay: 0.6s; }
.anim-delay-3 { animation-delay: 1s; }
.anim-delay-4 { animation-delay: 1.8s; }
.anim-delay-5 { animation-delay: 2.5s; }
.anim-delay-6 { animation-delay: 3.2s; }
.anim-delay-7 { animation-delay: 3.5s; }

/* ─── Spotlight Card ──────────────────────────────────── */
.spotlight-card { position: relative; overflow: hidden; }
.spotlight-card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(800px circle at var(--mouse-x,50%) var(--mouse-y,50%), rgba(255,255,255,0.06), transparent 40%);
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
}
.spotlight-card:hover::before { opacity: 1; }

/* ─── Pulse animation ─────────────────────────────────── */
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }
@keyframes ping { 75%,100% { transform: scale(2); opacity: 0; } }
.animate-ping { animation: ping 1s cubic-bezier(0,0,0.2,1) infinite; }

/* ─── Navbar ──────────────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  transition: all 0.5s;
}
#navbar.scrolled {
  background: rgba(2,4,10,0.9);
  backdrop-filter: blur(12px);
}
#navbar.scrolled #scroll-border { opacity: 1; }
#nav-accent { height: 1px; background: rgba(59,130,246,0.1); }
#scroll-border { height: 1px; background: rgba(255,255,255,0.05); opacity: 0; transition: opacity 0.5s; }

.nav-link {
  position: relative;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 6px 12px;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.3s;
}
.nav-link:hover { color: #d1d5db; }
.nav-link.active { color: white; }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 12px; right: 12px;
  height: 1px;
  background: rgba(96,165,250,0.6);
}

/* ─── Launch Button ───────────────────────────────────── */
.launch-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: white;
  background: #000;
  border: 1px solid rgba(59,130,246,0.4);
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.3s, color 0.3s;
}
.launch-btn:hover { border-color: rgba(59,130,246,0.7); }
.launch-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s;
}
.launch-btn:hover::before { left: 150%; }
.launch-btn.lg { padding: 14px 36px; font-size: 11px; }
.launch-btn.sm { padding: 6px 16px; font-size: 10px; }

/* ─── Mobile Menu ─────────────────────────────────────── */
#mobile-menu {
  position: fixed; inset: 0;
  background: rgba(2,4,10,0.98);
  backdrop-filter: blur(24px);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}
#mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-nav-link {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  letter-spacing: -0.02em;
  padding: 8px 0;
  color: #4b5563;
  text-decoration: none;
  transition: color 0.3s;
}
.mobile-nav-link:hover, .mobile-nav-link.active { color: white; }

/* ─── Glass Card ──────────────────────────────────────── */
.glass-card {
  background: rgba(5,7,10,0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  transition: all 0.3s;
}
.glass-card:hover {
  background: rgba(5,7,10,0.95);
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

/* ─── Terminal Card ───────────────────────────────────── */
.terminal-card {
  background: rgba(5,7,10,0.9);
  border: 1px solid rgba(255,255,255,0.1);
}
.terminal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.terminal-dot { width: 6px; height: 6px; border-radius: 50%; }
.terminal-dot.red   { background: rgba(239,68,68,0.5); }
.terminal-dot.yellow{ background: rgba(234,179,8,0.5); }
.terminal-dot.green { background: rgba(34,197,94,0.5); }

/* ─── Typewriter Cursor ───────────────────────────────── */
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.cursor { animation: blink 1s step-end infinite; }

/* ─── Inline Grid ─────────────────────────────────────── */
.mini-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* ─── Section Headings ────────────────────────────────── */
.section-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

/* ─── Responsive utilities not in Tailwind CDN ────────── */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
  .show-mobile { display: none !important; }
}

/* ─── Agent Tabs ──────────────────────────────────────── */
.agent-step {
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.4s ease;
}
.agent-step.visible {
  opacity: 1;
  transform: translateX(0);
}

/* ─── Feature Image Hover ────────────────────────────── */
.feature-group:hover .feature-image { transform: scale(1.01); opacity: 1; }
.feature-image { transition: all 0.7s; opacity: 0.8; }

/* ─── Progress dots ───────────────────────────────────── */
.progress-dot {
  width: 8px; height: 8px;
  border-radius: 4px;
  background: #374151;
  transition: all 0.3s;
}
.progress-dot.active {
  width: 32px;
  background: #60a5fa;
}

/* ─── Contact form ────────────────────────────────────── */
.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.form-input::placeholder { color: #4b5563; }
.form-input:focus {
  border-color: rgba(168,85,247,0.5);
  box-shadow: 0 0 0 2px rgba(168,85,247,0.1);
}
.form-input.error { border-color: rgba(239,68,68,0.5); }
.form-error { font-size: 12px; color: #f87171; margin-top: 4px; }

/* ─── Lineage graph animation ────────────────────────── */
.lineage-ping {
  animation: ping 1s cubic-bezier(0,0,0.2,1) infinite;
}
