/* ===================================================================
   BitChord PC — Official Landing Experience
   Design System: Obsidian & BitChord Signature Flat Aesthetic
   Colors directly mapped from src/theme.rs (BitChord PC Native Core)
   =================================================================== */

:root {
  /* Surface Tokens from src/theme.rs */
  --bg: #0c0a0e;
  --bg-deep: #070608;
  --bg-surface: #18151c;
  --bg-surface-elevated: #221e28;
  --bg-surface-hover: #26222c;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-focus: #fa586a;
  
  /* Typography Tokens */
  --text-primary: #f2f0f5;
  --text-secondary: #b2acba;
  --text-muted: #827c8c;
  
  /* BitChord Signature Palette */
  --bitchord-red: #fa586a;
  --bitchord-red-hover: #ff6f80;
  --bitchord-red-active: #e2495b;
  --bitchord-red-tint: rgba(250, 88, 106, 0.12);
  --bitchord-red-border: rgba(250, 88, 106, 0.35);
  
  --bitchord-green: #30d158;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Inter Tight", "Inter", sans-serif;
  --font-mono: "JetBrains Mono", Consolas, monospace;
  
  --max-width: 1200px;
  --transition: all 0.2s ease-out;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  color-scheme: dark;
}

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

::selection {
  background: var(--bitchord-red);
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid var(--bitchord-red);
  outline-offset: 2px;
}

/* ================= NAV ================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  transition: var(--transition);
  background: transparent;
}

.header.scrolled {
  background: rgba(12, 10, 14, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

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

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

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gh-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}

.gh-badge:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

/* ================= BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
}

.btn-primary {
  background: var(--bitchord-red);
  color: #ffffff;
  font-weight: 700;
  border-color: var(--bitchord-red);
}

.btn-primary:hover {
  background: var(--bitchord-red-hover);
  border-color: var(--bitchord-red-hover);
  transform: translateY(-2px);
}

.btn-primary:active {
  background: var(--bitchord-red-active);
  transform: translateY(0);
}

.btn-ghost {
  background: var(--bg-surface);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-ghost:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--bitchord-red);
  color: #ffffff;
  transform: translateY(-2px);
}

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

.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
}

/* ================= HERO ================= */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 140px 24px 60px;
  text-align: center;
}

.version-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--bitchord-red-border);
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 24px;
  text-decoration: none;
  transition: var(--transition);
}

.version-pill:hover {
  border-color: var(--bitchord-red);
  background: var(--bg-surface-elevated);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bitchord-red);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6.5vw, 5.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  max-width: 950px;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.accent-text {
  color: var(--bitchord-red);
}

.hero-description {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 780px;
  margin-bottom: 40px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}

.hero-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ================= STATS BANNER ================= */
.stats-banner {
  width: 100%;
  max-width: var(--max-width);
  margin: 50px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--bitchord-red);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 6px;
}

/* ================= SECTIONS COMMON ================= */
.section {
  padding: 100px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

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

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--bitchord-red);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--text-primary);
}

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

/* ================= BENTO GRID ================= */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.bento-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: var(--transition);
  overflow: hidden;
}

.bento-card:hover {
  transform: translateY(-4px);
  border-color: var(--bitchord-red-border);
  background: var(--bg-surface-elevated);
}

.bento-card.wide {
  grid-column: span 2;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--bitchord-red-tint);
  border: 1px solid var(--bitchord-red-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bitchord-red);
  margin-bottom: 24px;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

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

/* ================= INTERACTIVE EQ SIMULATOR ================= */
.eq-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-top: 30px;
}

.eq-curve-canvas {
  width: 100%;
  height: 160px;
  border-radius: var(--radius-md);
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  margin-bottom: 28px;
}

.eq-sliders {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 12px;
  align-items: center;
  text-align: center;
}

.eq-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.eq-slider {
  -webkit-appearance: slider-vertical;
  appearance: slider-vertical;
  writing-mode: bt-lr;
  width: 8px;
  height: 140px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
}

.eq-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bitchord-red);
  cursor: pointer;
  border: 2px solid #ffffff;
}

.eq-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.eq-gain {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--bitchord-red);
  font-weight: 600;
}

.eq-presets {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 28px;
}

.preset-chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.preset-chip:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.preset-chip.active {
  background: var(--bitchord-red);
  border-color: var(--bitchord-red);
  color: #ffffff;
  font-weight: 600;
}

/* ================= BENCHMARKS MATRIX ================= */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}

.comparison-table th, .comparison-table td {
  padding: 20px 24px;
  text-align: left;
}

.comparison-table th {
  background: var(--bg-deep);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-subtle);
}

.comparison-table th.highlight {
  color: var(--bitchord-red);
}

.comparison-table tr:not(:last-child) td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.comparison-table td.feature-name {
  font-weight: 600;
  color: var(--text-primary);
}

.comparison-table td.winner {
  color: var(--bitchord-red);
  font-weight: 700;
  background: var(--bitchord-red-tint);
}

.comparison-table td.standard {
  color: var(--text-muted);
}

/* ================= DOWNLOAD HUB ================= */
.download-card {
  background: var(--bg-surface);
  border: 1px solid var(--bitchord-red-border);
  border-radius: 28px;
  padding: 60px 32px;
  text-align: center;
}

.download-platforms {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.platform-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
}

.platform-btn:hover {
  background: var(--bg-surface-hover);
  border-color: var(--bitchord-red-border);
  transform: translateY(-2px);
}

.platform-btn.featured {
  background: var(--bitchord-red-tint);
  border-color: var(--bitchord-red);
}

.platform-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.platform-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ================= FOOTER ================= */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 60px 24px;
  background: var(--bg-deep);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--bitchord-red);
}

.footer-attribution {
  width: 100%;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ================= ACCESSIBILITY & 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;
  }
  .btn:hover, .bento-card:hover, .platform-btn:hover {
    transform: none !important;
  }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
  .bento-card.wide {
    grid-column: span 1;
  }
  .stats-banner {
    grid-template-columns: repeat(2, 1fr);
  }
  .download-platforms {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}
