/* ==========================================================================
   KAVOX LABS — MINIMALIST DEEP TECH DESIGN SYSTEM
   Theme: High-End Clinical Light Mode (Stark Minimalist Biotech Aesthetic)
   ========================================================================== */

:root {
  /* Color Palette - Ultra Clean Clinical Light */
  --bg-primary: #f8fafc;       /* Crisp light slate background */
  --bg-secondary: #ffffff;     /* Pure white card fill */
  --bg-tertiary: #f1f5f9;      /* Subtle fill for badges/headers */
  --bg-card: #ffffff;
  
  /* Borders */
  --border-color: #e2e8f0;
  --border-hover: #0284c7;

  /* Accents */
  --accent-cyan: #0284c7;      /* Primary scientific blue */
  --accent-cyan-dim: rgba(2, 132, 199, 0.06);
  --accent-emerald: #059669;   /* Bio emerald */
  --accent-emerald-dim: rgba(5, 150, 105, 0.06);
  --accent-purple: #6366f1;

  /* Typography */
  --text-primary: #0f172a;     /* Deep slate primary text */
  --text-secondary: #475569;   /* Muted body text */
  --text-muted: #64748b;       /* Caption text */
  --text-bright: #020617;      /* Dark headers */

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', monospace;

  /* Shadows & Elevation */
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 20px 35px -10px rgba(15, 23, 42, 0.08);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-cyan); }

/* Containers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Section Common Styling */
.section {
  padding: 7rem 0;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.section-header {
  text-align: left;
  max-width: 760px;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.85rem;
  background: var(--accent-cyan-dim);
  border: 1px solid rgba(2, 132, 199, 0.2);
  border-radius: 9999px;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .section-title { font-size: 2.75rem; }
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Text Colors */
.text-cyan { color: var(--accent-cyan); }
.text-emerald { color: var(--accent-emerald); }

.gradient-text {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Minimalist Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2.5rem;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-card);
}

.card:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

/* Grids */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Header & Navigation */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-bright);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.04em;
}

.logo-dot {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--accent-cyan);
  border-radius: 50%;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 2.25rem;
  list-style: none;
}

@media (min-width: 1024px) {
  .nav-links { display: flex; }
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.nav-link:hover { color: var(--accent-cyan); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-dark {
  background: #0f172a;
  color: #ffffff;
}

.btn-dark:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.btn-outline {
  background: #ffffff;
  color: var(--text-primary);
  border-color: #cbd5e1;
}

.btn-outline:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Mobile Nav Toggle */
.mobile-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-primary);
  cursor: pointer;
}

@media (min-width: 1024px) {
  .mobile-menu-btn { display: none; }
}

.mobile-drawer {
  display: none;
  position: fixed;
  top: 4.5rem; left: 0; right: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem;
  z-index: 99;
}

.mobile-drawer.active { display: block; }
.mobile-nav-list { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.mobile-nav-link { color: var(--text-primary); text-decoration: none; font-size: 1rem; font-weight: 600; display: block; padding: 0.5rem 0; }

/* Hero Section */
.hero {
  padding-top: 9rem;
  padding-bottom: 6rem;
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.9rem;
  background: var(--accent-cyan-dim);
  border: 1px solid rgba(2, 132, 199, 0.2);
  border-radius: 9999px;
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.pulse-dot {
  width: 0.45rem;
  height: 0.45rem;
  background-color: var(--accent-cyan);
  border-radius: 50%;
}

.hero-headline {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.04em;
  color: var(--text-bright);
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .hero-headline { font-size: 3.75rem; }
}

.hero-subheadline {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 2.5rem;
  max-width: 640px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Canvas Container */
.canvas-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-card);
  height: 420px;
  display: flex;
  flex-direction: column;
}

#graph-canvas {
  width: 100%;
  height: 100%;
  background: #f8fafc;
}

.canvas-overlay-info {
  position: absolute;
  bottom: 1rem; left: 1rem; right: 1rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

/* Metrics Banner */
.metrics-banner {
  background: #ffffff;
  border-y: 1px solid var(--border-color);
  padding: 3rem 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  text-align: center;
}

@media (min-width: 768px) {
  .metrics-grid { grid-template-columns: repeat(4, 1fr); }
}

.metric-value {
  font-size: 2.75rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-bright);
  margin-bottom: 0.25rem;
  letter-spacing: -0.03em;
}

.metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

/* Platform Pillars */
.pillar-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  padding: 2.5rem;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-card);
}

.pillar-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.pillar-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: var(--accent-cyan-dim);
  border: 1px solid rgba(2, 132, 199, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.pillar-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 0.85rem;
  letter-spacing: -0.02em;
}

.pillar-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Three-Track Graph Inspector */
.track-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.track-tab-btn {
  padding: 0.75rem 1.5rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.track-tab-btn.active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: #ffffff;
}

.track-content-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
}

.track-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 768px) {
  .track-stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.track-stat-box {
  background: var(--bg-tertiary);
  padding: 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
}

.track-stat-num {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-bright);
}

.track-stat-lbl {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Ledger Section */
.terminal-container {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 1rem;
  overflow: hidden;
  font-family: var(--font-mono);
  box-shadow: 0 15px 30px rgba(15, 23, 42, 0.12);
}

.terminal-header {
  background: #1e293b;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #94a3b8;
}

.terminal-body {
  padding: 1.5rem;
  max-height: 380px;
  overflow-y: auto;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #e2e8f0;
}

.log-entry {
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.log-time { color: #94a3b8; }
.log-hash { color: #38bdf8; }
.log-status-pos { color: #34d399; }
.log-status-neg { color: #fb7185; }
.log-status-tox { color: #fbbf24; }

/* Modals */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active { display: flex; }

.modal-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  max-width: 540px;
  width: 100%;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.2);
}

.modal-close {
  position: absolute;
  top: 1.25rem; right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
}

.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.4rem; }

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--accent-cyan);
  background: #ffffff;
}

/* Footer */
.footer {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

.footer-brand p {
  color: var(--text-secondary);
  margin-top: 0.85rem;
  font-size: 0.9rem;
  max-width: 360px;
}

.footer-col-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-bright);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.footer-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; transition: var(--transition-fast); }
.footer-links a:hover { color: var(--accent-cyan); }

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; }
}
