/* ==========================================================================
   Neural Pulse Design System & Web Stylesheet
   Theme: Deep Obsidian / Cyber-Acoustic Dark Mode
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-darkest: #031427;
  --bg-main: #0b0e14;
  --bg-surface: #102034;
  --bg-surface-high: #1b2b3f;
  --bg-surface-highest: #26364a;
  --bg-surface-dim: #020f1e;

  /* Accents */
  --primary: #00f2ff;
  --primary-glow: rgba(0, 242, 255, 0.25);
  --primary-light: #e1fdff;
  --primary-dim: #00dbe7;
  
  --secondary: #dcb8ff;
  --secondary-glow: rgba(220, 184, 255, 0.2);
  --secondary-dark: #7701d0;

  /* Typography */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-cyan: #74f5ff;
  --text-violet: #dcb7ff;

  /* Borders & Glass */
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(0, 242, 255, 0.35);
  --glass-bg: rgba(16, 32, 52, 0.65);
  --glass-bg-card: rgba(27, 43, 63, 0.5);

  /* Fonts */
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Transitions & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-glow: 0 0 35px rgba(0, 242, 255, 0.15);
  --shadow-violet-glow: 0 0 35px rgba(119, 1, 208, 0.2);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-main);
  color: var(--text-main);
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  background-color: var(--bg-main);
  color: var(--text-main);
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Background Atmosphere Glows */
body::before {
  content: '';
  position: fixed;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 242, 255, 0.12) 0%, rgba(119, 1, 208, 0.08) 50%, transparent 75%);
  z-index: -1;
  pointer-events: none;
  filter: blur(60px);
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

p {
  color: var(--text-muted);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-light);
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 60px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(0, 242, 255, 0.1);
  border: 1px solid rgba(0, 242, 255, 0.3);
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.badge-purple {
  background: rgba(220, 184, 255, 0.1);
  border-color: rgba(220, 184, 255, 0.3);
  color: var(--secondary);
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 10%, #e1fdff 45%, #74f5ff 75%, #dcb8ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-text-purple {
  background: linear-gradient(135deg, #dcb8ff 0%, #a855f7 60%, #74f5ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(11, 14, 20, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  transition: var(--transition);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00f2ff, #7701d0);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(0, 242, 255, 0.35);
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  fill: #031427;
}

.brand-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.brand-text span {
  color: var(--primary);
}

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

.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--primary);
}

.nav-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, #00f2ff, #00b4d8);
  color: #002022;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-full);
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.3);
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.nav-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(0, 242, 255, 0.5);
  color: #001012;
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.6rem;
  cursor: pointer;
}

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  border-color: var(--border-glass-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

/* Hero Section */
.hero {
  padding: 160px 0 100px;
  text-align: center;
  position: relative;
}

.hero h1 {
  font-size: 3.8rem;
  line-height: 1.12;
  max-width: 960px;
  margin: 0 auto 24px;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 32px;
  background: linear-gradient(135deg, #00f2ff 0%, #00c2cb 100%);
  color: #002528;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: var(--radius-full);
  box-shadow: 0 0 30px rgba(0, 242, 255, 0.35);
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 45px rgba(0, 242, 255, 0.55);
  color: #001518;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  transition: var(--transition);
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  color: #ffffff;
}

/* Interactive Visualizer Canvas Box */
.visualizer-container {
  max-width: 980px;
  margin: 0 auto;
  background: radial-gradient(circle at 50% 50%, rgba(16, 32, 52, 0.85), rgba(3, 20, 39, 0.95));
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(0, 242, 255, 0.05);
  position: relative;
}

.canvas-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(2, 15, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

#waveCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.wave-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  flex-wrap: wrap;
  gap: 16px;
  padding: 8px 12px;
}

.wave-pill-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.wave-pill {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.wave-pill:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.wave-pill.active {
  background: rgba(0, 242, 255, 0.15);
  border-color: var(--primary);
  color: var(--primary-light);
  box-shadow: 0 0 16px rgba(0, 242, 255, 0.25);
}

.audio-preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(0, 242, 255, 0.15);
  border: 1px solid var(--primary);
  border-radius: var(--radius-full);
  color: var(--primary-light);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.audio-preview-btn:hover {
  background: var(--primary);
  color: #002528;
  box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
}

.audio-preview-btn.playing {
  background: #ff4757;
  border-color: #ff4757;
  color: #ffffff;
}

/* Feature & Brainwave Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 32px;
}

.grid-5 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
}

/* Wave Band Card */
.wave-card {
  background: var(--glass-bg);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.wave-freq-tag {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  display: block;
}

.wave-card h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.wave-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Ambient Mixer Showcase */
.mixer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.mixer-item {
  background: rgba(16, 32, 52, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: var(--transition);
}

.mixer-item:hover {
  border-color: rgba(0, 242, 255, 0.25);
  background: rgba(27, 43, 63, 0.6);
}

.mixer-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mixer-item-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mixer-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  transition: var(--transition);
}

.mixer-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 242, 255, 0.6);
}

/* App Showcase Phone Mockup */
.mockup-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.phone-mockup {
  width: 320px;
  height: 650px;
  background: #031427;
  border-radius: 44px;
  border: 8px solid #1b2b3f;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 50px rgba(0, 242, 255, 0.2);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-screen {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: radial-gradient(circle at 50% 30%, #0d2238 0%, #031427 100%);
  color: #fff;
  font-family: var(--font-heading);
}

.phone-island {
  width: 100px;
  height: 22px;
  background: #000;
  border-radius: 20px;
  margin: 0 auto 20px;
}

/* Comparison Table */
.comparison-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  margin-top: 40px;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.comparison-table th,
.comparison-table td {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-glass);
}

.comparison-table th {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  background: rgba(3, 20, 39, 0.8);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.check-icon {
  color: var(--primary);
  font-weight: bold;
}

.dash-icon {
  color: var(--text-dim);
}

/* FAQ Accordion */
.faq-list {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--glass-bg);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: rgba(0, 242, 255, 0.25);
}

.faq-question {
  padding: 22px 28px;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.faq-icon {
  font-size: 1.3rem;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 28px;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 28px 24px;
}

/* Support Form */
.support-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-control {
  background: rgba(3, 20, 39, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 242, 255, 0.25);
  background: rgba(16, 32, 52, 0.8);
}

/* Footer */
.footer {
  background: #020b17;
  border-top: 1px solid var(--border-glass);
  padding: 80px 0 40px;
  color: var(--text-muted);
}

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

.footer-brand p {
  margin-top: 16px;
  font-size: 0.92rem;
  max-width: 340px;
}

.footer-col h4 {
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  flex-wrap: wrap;
  gap: 16px;
}

/* Legal Documents Layout (Privacy & Terms) */
.legal-container {
  max-width: 860px;
  margin: 140px auto 80px;
  padding: 0 24px;
}

.legal-card {
  background: var(--glass-bg);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 48px;
  backdrop-filter: blur(20px);
}

.legal-card h1 {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.legal-card h2 {
  font-size: 1.5rem;
  margin-top: 36px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-glass);
  color: #ffffff;
}

.legal-card p, .legal-card li {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 14px;
}

.legal-card ul {
  padding-left: 24px;
  margin-bottom: 20px;
}

.last-updated {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 30px;
}

/* Diagnostic Box on Support Page */
.diag-box {
  background: rgba(3, 20, 39, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 24px;
}

.diag-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.92rem;
}

.diag-item:last-child {
  border-bottom: none;
}

.diag-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.diag-status.ok {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

/* Responsive Media Queries */
@media (max-width: 968px) {
  .hero h1 {
    font-size: 2.8rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: rgba(11, 14, 20, 0.98);
    padding: 30px 24px;
    border-bottom: 1px solid var(--border-glass);
    gap: 20px;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero-subtitle {
    font-size: 1.05rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .legal-card {
    padding: 28px 20px;
  }
}
