/* ==========================
   AI Hero Enhancements
   ========================== */
.ai-hero {
  background: radial-gradient(1200px 600px at 80% -10%, rgba(99, 102, 241, 0.18), rgba(0,0,0,0)) ,
              radial-gradient(900px 500px at 10% -20%, rgba(59, 130, 246, 0.22), rgba(0,0,0,0)) ,
              linear-gradient(135deg, #0B1220 0%, #111827 60%, #0F172A 100%);
  position: relative;
  overflow: hidden;
  padding-bottom: 6rem; /* Reserve space for the wave */
}
.ai-hero .container { position: relative; z-index: 3; }

/* Starfield */
.ai-stars {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
  z-index: 1;
}
.ai-stars::before,
.ai-stars::after {
  content: '';
  position: absolute;
  inset: -50% -50% -50% -50%;
  background-image: radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.7) 50%, transparent 51%),
                    radial-gradient(1px 1px at 80px 120px, rgba(255,255,255,0.6) 50%, transparent 51%),
                    radial-gradient(2px 2px at 200px 80px, rgba(255,255,255,0.6) 50%, transparent 51%),
                    radial-gradient(1px 1px at 320px 220px, rgba(255,255,255,0.5) 50%, transparent 51%),
                    radial-gradient(2px 2px at 500px 150px, rgba(255,255,255,0.7) 50%, transparent 51%);
  background-size: 600px 600px;
  animation: twinkle 18s linear infinite;
  opacity: 0.35;
}
.ai-stars::after {
  transform: scale(1.5) rotate(15deg);
  animation-duration: 26s;
  opacity: 0.25;
}
@keyframes twinkle {
  0% { transform: translateY(0); }
  100% { transform: translateY(100px); }
}

/* Subtle 3D Grid */
.ai-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(99,102,241,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.05) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 25%, black 80%, transparent);
          mask-image: linear-gradient(to bottom, transparent, black 25%, black 80%, transparent);
  transform: perspective(600px) rotateX(55deg) translateY(-15%);
  transform-origin: top;
  filter: blur(0.15px);
  z-index: 1;
}

/* Glowing orb */
.ai-orb {
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  top: -80px;
  background: radial-gradient(circle at 30% 30%, rgba(139,92,246,0.50), rgba(59,130,246,0.35), rgba(15,23,42,0.0) 65%);
  filter: blur(14px) saturate(115%);
  animation: float 10s ease-in-out infinite;
  z-index: 2;
}
@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(16px) translateX(-6px); }
}

/* Gradient headline */
.ai-gradient-text {
  background: linear-gradient(90deg, #60A5FA 0%, #A78BFA 40%, #34D399 80%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

/* Glass card */
.glass {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  -webkit-backdrop-filter: blur(8px) saturate(110%);
          backdrop-filter: blur(8px) saturate(110%);
  padding: 1.25rem;
}
.ai-card .code-block {
  background: rgba(2,6,23,0.8);
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 10px;
  color: #E5E7EB;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.95rem;
  padding: 1rem 1.25rem;
  line-height: 1.6;
  box-shadow: inset 0 0 0 1px rgba(59,130,246,0.1);
}

/* Pulse indicator */
.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 0 rgba(16,185,129, 0.7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129, 0.7); }
  70% { box-shadow: 0 0 0 12px rgba(16,185,129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129, 0); }
}

/* Glow button */
.btn-glow { box-shadow: 0 0 0 rgba(59,130,246,0.0); }
.btn-glow:hover { box-shadow: 0 8px 30px rgba(59,130,246,0.22); }

/* Wave divider - send behind content */
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 0; pointer-events: none; }

/* Mobile adjustments */
@media (max-width: 991.98px) {
  .ai-orb { width: 360px; height: 360px; right: -140px; top: -120px; }
  .ai-grid { transform: perspective(600px) rotateX(55deg) translateY(-10%); }
}
@media (max-width: 575.98px) {
  .ai-orb { width: 280px; height: 280px; right: -120px; top: -140px; }
}
