/* ==========================================================================
   Kaldi Station — Premium Dark Mode & Glassmorphism Design System
   ========================================================================== */

:root {
  /* Color System */
  --bg-dark: #0b0f17;
  --bg-surface: #111827;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-hover: rgba(255, 255, 255, 0.08);

  /* Brand Accents */
  --primary-cyan: #06b6d4;
  --primary-cyan-hover: #0891b2;
  --accent-violet: #8b5cf6;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;

  /* Typography Colors (WCAG AA Compliant) */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  /* Font Families */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Container Boundaries */
  --max-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Transition Speeds */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

body {
  overflow-x: hidden;
  position: relative;
}

/* Accessibility: Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Glowing Radial Background Effects */
.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.18;
  pointer-events: none;
  z-index: -1;
}

.bg-glow-indigo {
  top: -200px;
  left: 20%;
  background: var(--accent-indigo);
}

.bg-glow-cyan {
  top: 400px;
  right: 10%;
  background: var(--primary-cyan);
}

/* Glassmorphism Panel Utilities */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.glass-panel {
  background: rgba(17, 24, 39, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 20px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
}

.badge-subtle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
}

.badge-glowing {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--primary-cyan);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-normal);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-cyan), var(--accent-indigo));
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.5);
}

.btn-secondary {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--glass-hover);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm { padding: 8px 16px; font-size: 0.9rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; flex-direction: column; text-align: center; }
.btn-xl { padding: 18px 36px; font-size: 1.1rem; }

.btn-subtext {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.85;
}

/* Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(11, 15, 23, 0.75);
  border-bottom: 1px solid var(--glass-border);
  padding: 16px 0;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.15rem;
}

.brand-icon {
  font-size: 1.3rem;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text-main);
}

/* Hero Section */
.hero {
  padding: 100px 0 80px;
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 24px 0 16px;
  background: linear-gradient(180deg, #ffffff 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.hero-guarantee {
  display: flex;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-subtle);
}

/* App Showcase Mockup */
.hero-mockup-wrapper {
  width: 100%;
  max-width: 960px;
  margin-top: 60px;
}

.hero-mockup {
  overflow: hidden;
}

.mockup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--glass-border);
}

.window-controls {
  display: flex;
  gap: 8px;
}

.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-close { background: #ef4444; }
.dot-minimize { background: #f59e0b; }
.dot-expand { background: #10b981; }

.mockup-title {
  font-size: 0.85rem;
  color: var(--text-subtle);
  font-family: var(--font-mono);
}

.mockup-selector {
  font-size: 0.8rem;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  background: rgba(6, 182, 212, 0.15);
  color: var(--primary-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.mockup-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.chat-bubble {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
}

.bubble-user {
  background: rgba(255, 255, 255, 0.03);
  margin-left: 20%;
}

.bubble-agent {
  background: rgba(17, 24, 39, 0.5);
  margin-right: 10%;
}

.bubble-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.time { color: var(--text-subtle); font-size: 0.75rem; margin-left: auto; }
.badge-tag {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-violet);
}

.bubble-text {
  font-size: 0.95rem;
  color: var(--text-main);
}

/* Sections */
.section { padding: 90px 0; }

.section-header {
  max-width: 650px;
  margin: 0 auto 60px;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Simulator Widget */
.simulator-wrapper {
  overflow: hidden;
}

.simulator-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid var(--glass-border);
}

.sim-seats {
  display: flex;
  gap: 8px;
}

.sim-seat-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition-fast);
}

.sim-seat-btn.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--primary-cyan);
  color: var(--text-main);
  font-weight: 600;
}

.sim-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.simulator-display {
  padding: 32px;
  min-height: 240px;
  text-align: left;
}

/* Grid & Cards */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 32px;
  text-align: left;
  transition: var(--transition-normal);
}

.feature-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Privacy Matrix Table */
.table-wrapper {
  overflow-x: auto;
}

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

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

.privacy-table th {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.col-highlight {
  background: rgba(6, 182, 212, 0.05);
  color: var(--text-main);
  font-weight: 600;
}

.check { color: var(--accent-emerald); font-weight: bold; margin-right: 4px; }
.cross { color: #ef4444; font-weight: bold; margin-right: 4px; }

/* Download & Verifier Section */
.download-card {
  padding: 60px 40px;
}

.download-title { font-size: 2.5rem; margin: 16px 0 8px; }
.download-subtitle { color: var(--text-muted); margin-bottom: 40px; }

.arch-toggle {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  margin-bottom: 24px;
}

.arch-btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.arch-btn.active {
  background: var(--glass-bg);
  color: var(--text-main);
  font-weight: 600;
  border: 1px solid var(--glass-border);
}

.verifier-box {
  max-width: 680px;
  margin: 40px auto 0;
}

.verifier-header { margin-bottom: 6px; font-size: 0.95rem; }
.verifier-desc { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 16px; }

.drop-zone {
  border: 2px dashed var(--glass-border);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  background: rgba(0, 0, 0, 0.2);
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--primary-cyan);
  background: rgba(6, 182, 212, 0.05);
}

.drop-icon { font-size: 2rem; margin-bottom: 8px; }
.drop-text { color: var(--text-muted); font-size: 0.9rem; }

.checksum-display {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hash {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  word-break: break-all;
  color: var(--primary-cyan);
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.hidden { display: none !important; }

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

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

.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-copy { color: var(--text-subtle); font-size: 0.85rem; margin-left: 16px; }

.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }

/* Responsive Breakpoints */
@media (max-width: 900px) {
  .hero-title { font-size: 2.5rem; }
  .grid-3 { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; width: 100%; }
  .nav-links { display: none; }
  .bubble-user { margin-left: 0; }
  .bubble-agent { margin-right: 0; }
}
