/* ==========================================
   NEXCODE v0.1.0 — MASTER STYLESHEET
   Obsidian/Slate Dark Theme & Glassmorphism
   ========================================== */

/* --- Custom Variables & Theme Setup --- */
:root {
  --bg-obsidian: #090D16;
  --bg-slate-900: #0D1322;
  --bg-slate-800: #141C30;
  --bg-slate-700: #1E2942;
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --indigo-500: #6366f1;
  --indigo-600: #4f46e5;
  --glow-cyan: rgba(34, 211, 238, 0.35);
  --glow-indigo: rgba(99, 102, 241, 0.35);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(13, 19, 34, 0.75);
}

/* --- Core Base Styles --- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background-color: var(--bg-obsidian);
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-obsidian);
  color: #f1f5f9;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Ensure absolute visibility across all sections */
section, header, footer, div, nav, article {
  opacity: 1 !important;
  visibility: visible !important;
}

code, pre, .font-mono {
  font-family: 'JetBrains Mono', monospace, monospace;
}

/* --- Glassmorphism Component --- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.glass-card:hover {
  border-color: rgba(34, 211, 238, 0.25);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.6), 0 0 20px 0 rgba(34, 211, 238, 0.1);
}

/* --- Glowing Buttons & Elements --- */
.glow-btn {
  position: relative;
  background: linear-gradient(135deg, var(--cyan-500), var(--indigo-600));
  color: #ffffff;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 20px var(--glow-cyan);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.glow-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.glow-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--glow-cyan), 0 0 40px var(--glow-indigo);
  border-color: rgba(255, 255, 255, 0.4);
}

.glow-btn:hover::before {
  left: 100%;
}

.glow-btn:active {
  transform: translateY(0);
}

/* --- Interactive Tabs --- */
.tab-btn {
  background: rgba(30, 41, 66, 0.6);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: #f8fafc;
  background: rgba(30, 41, 66, 0.9);
  border-color: rgba(34, 211, 238, 0.2);
}

.tab-btn.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(99, 102, 241, 0.2));
  color: var(--cyan-400);
  border-color: var(--cyan-500);
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.2);
}

/* --- FAQ Accordion Items --- */
.faq-item {
  background: rgba(13, 19, 34, 0.8);
  border: 1px solid var(--glass-border);
  border-radius: 0.75rem;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(34, 211, 238, 0.3);
}

.faq-item.active {
  background: rgba(20, 28, 48, 0.9);
  border-color: var(--cyan-500);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.15);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0, 1, 0, 1), opacity 0.3s ease, padding 0.3s ease;
  opacity: 0;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  opacity: 1;
  padding-bottom: 1.25rem;
  transition: max-height 0.35s cubic-bezier(1, 0, 1, 0), opacity 0.3s ease, padding 0.3s ease;
}

/* --- Pipeline Steps --- */
.pipeline-step {
  position: relative;
  background: rgba(20, 28, 48, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.pipeline-step.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--cyan-400);
  box-shadow: 0 0 15px rgba(34, 211, 238, 0.25);
}

.pipeline-step.active .step-num {
  background: var(--cyan-500);
  color: #090D16;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-obsidian);
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--cyan-500);
}

/* --- Modals Backdrops & Animation --- */
.modal-overlay {
  background: rgba(9, 13, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 0.25s ease-in-out;
}

/* --- Keyframe Animations for Subtle Effects --- */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.4);
  }
}

.animate-pulse-glow {
  animation: pulseGlow 3s infinite ease-in-out;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

.animate-float {
  animation: float 4s ease-in-out infinite;
}

/* Touch Safety */
canvas {
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-touch-callout: none;
}
