/* ===================================================================
   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: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.015em;
}

.brand-version {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-weight: 500;
  letter-spacing: 0;
}

.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: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out;
}

.btn:active {
  transform: scale(0.985);
}

.btn-primary {
  background: #ededed;
  color: #0f0f10;
  font-weight: 500;
  border-color: #ededed;
}

.btn-primary:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #000000;
}

.btn-primary:active {
  background: #d8d8d8;
}

.btn-secondary,
.btn-ghost {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
  color: var(--text-primary);
  font-weight: 500;
}

.btn-secondary:hover,
.btn-ghost:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-strong);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
}

/* ================= HERO (REZE_OS INSPIRED ASYMMETRIC GRID) ================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 130px 24px 80px;
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero::after {
  content: 'BITCHORD_SYS // NATIVE_AUDIO';
  position: absolute;
  right: 24px;
  bottom: 28px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  opacity: 0.7;
  pointer-events: none;
}

.hero-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(460px, 1.15fr);
  align-items: center;
  gap: clamp(40px, 5.5vw, 76px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--bitchord-red);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.eyebrow .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bitchord-green);
  box-shadow: 0 0 0 4px rgba(48, 209, 88, 0.14);
}

.eyebrow-divider {
  color: var(--border-strong);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 4.3vw, 4.1rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.hero-title em {
  color: var(--bitchord-red);
  font-style: normal;
}

.hero-description {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 32px;
  font-weight: 400;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-bottom: 0;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-meta span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-meta strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-visual {
  position: relative;
  width: 100%;
}

.hero-preview-wrapper {
  position: relative;
  width: 100%;
  perspective: 1200px;
}

.hero-preview-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease;
}

.hero-mode-chip {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(12, 10, 14, 0.68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 4px;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-mode-chip .status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--bitchord-green);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  position: relative;
  z-index: 2;
  margin: -16px 20px 0;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: rgba(24, 21, 28, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}

.stat-card {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 14px;
  border-right: 1px solid var(--border-subtle);
}

.stat-card:last-child {
  border-right: 0;
}

.stat-card strong {
  color: var(--bitchord-red);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.stat-card span {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.scroll-cue {
  position: absolute;
  bottom: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.15s ease;
}

.scroll-cue:hover {
  color: var(--text-primary);
}

.scroll-cue svg {
  color: var(--bitchord-red);
}

.preview-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border-subtle);
}

.titlebar-controls {
  display: flex;
  gap: 6px;
}

.ctrl-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.titlebar-caption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.titlebar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.titlebar-spectrum {
  display: block;
  width: 96px;
  height: 14px;
  opacity: 0.85;
}

.preview-body {
  position: relative;
  overflow: hidden;
}

.preview-body img {
  display: block;
  width: 100%;
  height: auto;
}

.preview-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(700px circle at var(--shine-x, 50%) var(--shine-y, 0%), rgba(255, 255, 255, 0.07), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.hero-preview-frame:hover .preview-shine {
  opacity: 1;
}

@media (max-width: 960px) {
  .hero {
    min-height: auto;
    padding: 110px 24px 60px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero-copy {
    align-items: center;
    text-align: center;
  }
  .hero-description {
    max-width: 100%;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-meta {
    justify-content: center;
  }
  .scroll-cue {
    display: none;
  }
  .hero::after {
    display: none;
  }
  .hero-stats {
    margin: 16px 0 0;
  }
}

@media (max-width: 680px) {
  .titlebar-caption {
    display: none;
  }
  .hero-stats {
    grid-template-columns: 1fr;
  }
  .stat-card {
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
  }
  .stat-card:last-child {
    border-bottom: 0;
  }
}

/* ================= 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-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.eq-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

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

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

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

.eq-audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.eq-audio-btn.playing {
  background: var(--bitchord-red-tint);
  border-color: var(--bitchord-red);
  color: #ffffff;
}

.audio-wave-anim {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  width: 14px;
  height: 12px;
}

.audio-wave-anim span {
  width: 2px;
  background: currentColor;
  border-radius: 1px;
  height: 3px;
  transition: height 0.15s ease;
}

.eq-audio-btn.playing .audio-wave-anim span:nth-child(1) {
  animation: waveBar 0.6s ease infinite alternate;
}
.eq-audio-btn.playing .audio-wave-anim span:nth-child(2) {
  animation: waveBar 0.8s ease 0.2s infinite alternate;
}
.eq-audio-btn.playing .audio-wave-anim span:nth-child(3) {
  animation: waveBar 0.5s ease 0.4s infinite alternate;
}
.eq-audio-btn.playing .audio-wave-anim span:nth-child(4) {
  animation: waveBar 0.7s ease 0.1s infinite alternate;
}

@keyframes waveBar {
  0% { height: 3px; }
  100% { height: 12px; }
}

/* ================= SPOTLIGHT INTERACTION ON CARDS ================= */
.bento-card,
.platform-card,
.platform-btn {
  position: relative;
  transition: border-color 0.25s ease, background-color 0.25s ease;
  background-image: radial-gradient(
    480px circle at var(--mouse-x, -500px) var(--mouse-y, -500px),
    rgba(250, 88, 106, 0.08),
    transparent 65%
  );
}

.bento-card:hover,
.platform-card:hover,
.platform-btn:hover {
  border-color: rgba(250, 88, 106, 0.3);
}

/* ================= SCROLL REVEAL TRANSITIONS ================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ================= 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: 36px;
}

.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;
  }
}
