/* ===========================================
   WalkEEG - Main Stylesheet
   =========================================== */

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --accent: #06b6d4;
  --accent-dark: #0891b2;
  --bg-dark: #0b0f1a;
  --bg-card: #111827;
  --bg-card-hover: #1f2937;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #1e293b;
  --border-light: #334155;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --gradient-1: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --gradient-2: linear-gradient(135deg, #4f46e5 0%, #0891b2 100%);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--primary-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; }

/* ===== Utility ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.7;
}

.text-center { text-align: center; }
.text-gradient { background: var(--gradient-1); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }

.mx-auto { margin-left: auto; margin-right: auto; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient-1);
  color: white;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}
.btn-secondary:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-outline:hover {
  background: rgba(6, 182, 212, 0.1);
  transform: translateY(-2px);
}

.btn-sm { padding: 8px 18px; font-size: 0.8125rem; }
.btn-lg { padding: 16px 36px; font-size: 1.0625rem; }

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all 0.3s ease;
  background: transparent;
}

.navbar.scrolled {
  background: rgba(11, 15, 26, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
}

.navbar-brand .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.875rem;
  color: white;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.navbar-links a {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s;
  text-decoration: none;
}

.navbar-links a:hover { color: var(--text-primary); }

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

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

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
}

.hero-bg-glow {
  position: absolute;
  top: -20%;
  left: -10%;
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-bg-glow-2 {
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 50%;
  height: 70%;
  background: radial-gradient(ellipse, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 720px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 100px;
  font-size: 0.8125rem;
  color: var(--primary-light);
  margin-bottom: 24px;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero h1 .highlight {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.hero-stat h3 {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
}

.hero-stat p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ===== Features ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== How It Works ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
  position: relative;
}

.step {
  text-align: center;
  padding: 32px 20px;
  position: relative;
}

.step-number {
  width: 56px;
  height: 56px;
  background: var(--gradient-1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 auto 20px;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.step h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Open Source ===== */
.oss-section {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
  border-radius: var(--radius-xl);
  padding: 64px;
  text-align: center;
  border: 1px solid var(--border);
}

.oss-section .section-title { max-width: 600px; margin-left: auto; margin-right: auto; }

.oss-badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0 32px;
}

.oss-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.tech-stack {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.tech-item {
  padding: 8px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ===== Gallery / Preview ===== */
.preview-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.preview-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.preview-text {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.preview-text h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.preview-text p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.preview-image {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(6, 182, 212, 0.1));
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.preview-placeholder {
  text-align: center;
  color: var(--text-muted);
}

.preview-placeholder .icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* ===== CTA ===== */
.cta-section {
  text-align: center;
  padding: 80px 0;
}

.cta-section h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-section p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 12px;
  max-width: 300px;
}

.footer-col h4 {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li { margin-bottom: 8px; }

.footer-col a {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  color: var(--text-muted);
  font-size: 1.25rem;
  transition: color 0.2s;
}

.footer-social a:hover { color: var(--text-primary); }

/* ===== Page Header ===== */
.page-header {
  padding: 140px 0 60px;
  text-align: center;
  position: relative;
}

.page-header-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.page-header h1 {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero h1 { font-size: 3rem; }
  .section-title { font-size: 2rem; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .navbar-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(11, 15, 26, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  .navbar-links.open { display: flex; }
  .navbar-toggle { display: block; }

  .hero { min-height: auto; padding: 120px 0 80px; }
  .hero h1 { font-size: 2.25rem; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }

  .features-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .preview-content { grid-template-columns: 1fr; }

  .section { padding: 60px 0; }
  .oss-section { padding: 32px 24px; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.75rem; }
  .section-title { font-size: 1.5rem; }
  .hero-actions { flex-direction: column; }
  .btn-lg { width: 100%; text-align: center; }
}

/* ===== Animations ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* ===== Signal visualization ===== */
.signal-visualization {
  width: 100%;
  height: 200px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.signal-line {
  position: absolute;
  bottom: 50%;
  left: 0;
  width: 200%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 50%, var(--primary) 100%);
  opacity: 0.3;
  animation: signal-sweep 4s linear infinite;
}

@keyframes signal-sweep {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
