/* ============================================================
   Brainwave Matrix Technologies — Main Stylesheet
   ============================================================ */

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: #060f24;
  color: #e2e8f0;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #060f24; }
::-webkit-scrollbar-thumb { background: #00ff88; border-radius: 3px; }

/* Matrix Canvas */
#matrix-canvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0.04; pointer-events: none; z-index: 0;
}

/* Glass */
.glass {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.08);
}
.glass-strong {
  background: rgba(0,255,136,0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0,255,136,0.15);
}

/* Glow effects */
.glow-green { text-shadow: 0 0 20px rgba(0,255,136,0.6), 0 0 40px rgba(0,255,136,0.3); }
.glow-btn {
  box-shadow: 0 0 20px rgba(0,255,136,0.4), 0 4px 15px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}
.glow-btn:hover {
  box-shadow: 0 0 35px rgba(0,255,136,0.7), 0 8px 25px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}
.glow-btn-outline { transition: all 0.3s ease; }
.glow-btn-outline:hover { box-shadow: 0 0 25px rgba(0,255,136,0.4); transform: translateY(-2px); }

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #00ff88 0%, #00b4d8 50%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section divider */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,255,136,0.4), transparent);
}

/* Navbar */
#navbar { transition: all 0.3s ease; }
#navbar.scrolled {
  background: rgba(6,15,36,0.95) !important;
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
  border-bottom: 1px solid rgba(0,255,136,0.1);
}

/* Hero */
.hero-bg { background: linear-gradient(135deg, #060f24 0%, #0d1b3e 50%, #0a2a18 100%); }

/* Animations */
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
@keyframes blink { 0%,50% { opacity:1; } 51%,100% { opacity:0; } }
.float-anim { animation: float 6s ease-in-out infinite; }
.typewriter-cursor::after { content: '|'; color: #00ff88; animation: blink 1s infinite; }

/* Stat cards */
.stat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(0,255,136,0.1);
  transition: all 0.3s ease;
}
.stat-card:hover {
  border-color: rgba(0,255,136,0.4);
  background: rgba(0,255,136,0.05);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,255,136,0.1);
}

/* Service cards */
.service-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  transition: all 0.4s cubic-bezier(0.4,0,0.2,1);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, #00ff88, transparent);
  transform: translateX(-100%); transition: transform 0.4s ease;
}
.service-card:hover::before { transform: translateX(100%); }
.service-card:hover {
  border-color: rgba(0,255,136,0.3);
  background: rgba(0,255,136,0.04);
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 40px rgba(0,255,136,0.05);
}

/* App cards */
.app-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  transition: all 0.4s ease;
}
.app-card:hover {
  border-color: rgba(0,180,216,0.4);
  background: rgba(0,180,216,0.05);
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.5), 0 0 50px rgba(0,180,216,0.1);
}

/* Play badge */
.play-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #34d399, #059669);
  color: white; font-size: 11px; font-weight: 600;
  padding: 4px 10px; border-radius: 20px; letter-spacing: 0.5px;
}

/* Case study cards */
.case-study-card {
  background: linear-gradient(135deg, rgba(37,99,235,0.1) 0%, rgba(0,255,136,0.05) 100%);
  border: 1px solid rgba(37,99,235,0.2);
  transition: all 0.4s ease;
}
.case-study-card:hover {
  border-color: rgba(37,99,235,0.5);
  box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 60px rgba(37,99,235,0.1);
  transform: translateY(-6px);
}

/* Form inputs */
.form-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: #e2e8f0; border-radius: 10px;
  padding: 14px 18px; width: 100%;
  transition: all 0.3s ease; outline: none;
  font-family: 'Inter', sans-serif; font-size: 14px;
}
.form-input::placeholder { color: rgba(255,255,255,0.3); }
.form-input:focus {
  border-color: rgba(0,255,136,0.5);
  background: rgba(0,255,136,0.04);
  box-shadow: 0 0 0 3px rgba(0,255,136,0.1);
}

/* Footer */
.footer-bg {
  background: linear-gradient(180deg, #060f24 0%, #03080f 100%);
  border-top: 1px solid rgba(0,255,136,0.1);
}

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Nav links */
.nav-link { position: relative; transition: color 0.3s ease; }
.nav-link::after {
  content: ''; position: absolute; bottom: -2px; left: 0;
  width: 0; height: 2px; background: #00ff88; transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }
.nav-link:hover { color: #00ff88; }

/* Toast */
#toast { transition: all 0.4s cubic-bezier(0.4,0,0.2,1); transform: translateX(120%); }
#toast.show { transform: translateX(0); }

/* Section badge */
.section-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,255,136,0.1); border: 1px solid rgba(0,255,136,0.2);
  color: #00ff88; font-size: 12px; font-weight: 600;
  padding: 6px 16px; border-radius: 100px;
  letter-spacing: 1px; text-transform: uppercase;
}

/* Tech tags */
.tech-tag {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6); font-size: 12px;
  padding: 4px 12px; border-radius: 100px;
}

/* Progress bars */
.progress-bar { height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; }
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00ff88, #00b4d8);
  border-radius: 2px; width: 0;
  transition: width 1.5s cubic-bezier(0.4,0,0.2,1);
}

/* Dot grid */
.dot-grid {
  background-image: radial-gradient(rgba(0,255,136,0.15) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* Back to top */
#back-to-top { transition: all 0.3s ease; }
