@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg: #0c0c0e;
  --bg-card: #141416;
  --bg-elevated: #1a1a1e;
  --border: #232328;
  --border-light: #2a2a30;
  --text: #f0f0f2;
  --text-muted: #7a7a88;
  --text-dim: #55555f;
  --gold: #e5a800;
  --gold-light: #f0c040;
  --gold-dim: #a07500;
  --gold-glow: rgba(229, 168, 0, 0.08);
  --green: #2dcc70;
  --green-dim: rgba(45, 204, 112, 0.12);
  --red: #e55050;
  --blue: #5090e5;
  --camelot-orange: #e5a800;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}

body {
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    system-ui,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---- Nav ---- */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(12, 12, 14, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
nav .inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.7rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
nav .logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: -0.02em;
}
nav .links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
nav .links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}
nav .links a:hover {
  color: var(--text);
}
nav .links .gh {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text);
  transition: border-color 0.2s;
}
nav .links .gh:hover {
  border-color: var(--gold-dim);
}

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 7rem 2rem 4rem;
  gap: 3rem;
  position: relative;
}
.hero-left {
  position: relative;
  z-index: 2;
}
.hero-right {
  position: relative;
  z-index: 1;
}

.hero-logo {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.hero-logo svg {
  flex-shrink: 0;
}
.hero-logo h1 {
  font-size: clamp(3rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
}
.hero p.tagline {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 520px;
  margin-bottom: 2.5rem;
}

/* ---- Feature cards (2x2) ---- */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  max-width: 580px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.35rem;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.feature-card:hover {
  border-color: var(--border-light);
  background: var(--bg-elevated);
}
.feature-card .icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--gold-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}
.feature-card .icon svg {
  width: 20px;
  height: 20px;
}
.feature-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}
.feature-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ---- Command bar ---- */
.command-bar {
  max-width: 580px;
  margin-top: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  font-family:
    'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.command-bar .prompt {
  color: var(--text-dim);
}
.command-bar .cmd {
  color: var(--gold);
  font-weight: 600;
}
.command-bar .args {
  color: var(--text-muted);
}
.command-bar .arrow {
  color: var(--text-dim);
}

/* ---- Mock UI (right panel) ---- */
.mock-ui {
  position: relative;
}
.mock-window {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.03);
}
.mock-titlebar {
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border-bottom: 1px solid var(--border);
}
.mock-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.mock-dot.red {
  background: #ff5f57;
}
.mock-dot.yellow {
  background: #febc2e;
}
.mock-dot.green {
  background: #28c840;
}

/* Waveform bar */
.mock-waveform {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 50px;
  overflow: hidden;
}
.wave-bar {
  flex: 1;
  min-width: 2px;
  background: var(--gold);
  border-radius: 1px 1px 0 0;
  opacity: 0.7;
}

/* Pending changes */
.mock-section {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}
.mock-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.mock-section-header h4 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}
.mock-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(229, 168, 0, 0.15);
  color: var(--gold);
  border: 1px solid rgba(229, 168, 0, 0.25);
}
.mock-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Change rows */
.change-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  font-size: 0.72rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.change-row .check {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--border-light);
  border-radius: 3px;
}
.change-row .op {
  color: var(--text-muted);
  font-weight: 500;
  min-width: 45px;
}
.change-row .from {
  color: var(--text-dim);
}
.change-row .arrow-sm {
  color: var(--text-dim);
  font-size: 0.7rem;
}
.change-row .to {
  color: var(--gold-light);
}

/* Buttons */
.mock-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.mock-btn {
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  border: none;
  cursor: default;
}
.mock-btn-green {
  background: var(--green);
  color: #0c0c0e;
}
.mock-btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* BPM & Key section */
.mock-bpm-key {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}
.bpm-display,
.key-display {
  text-align: center;
}
.bpm-display .label,
.key-display .label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
}
.bpm-display .value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.bpm-display .decimal {
  color: var(--text-muted);
}

/* Camelot wheel (simplified) */
.camelot-wheel {
  width: 90px;
  height: 90px;
  margin: 0 auto;
  position: relative;
}
.camelot-wheel svg {
  width: 100%;
  height: 100%;
}

/* Library table */
.mock-library {
  padding: 0.75rem;
}
.mock-sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.mock-sidebar-header h4 {
  font-size: 0.75rem;
  font-weight: 600;
}
.mock-tree {
  font-size: 0.68rem;
  color: var(--text-muted);
}
.mock-tree .item {
  padding: 0.2rem 0;
  padding-left: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.mock-tree .item.active {
  color: var(--text);
}
.mock-tree .nested {
  padding-left: 1.25rem;
}
.mock-tree .count {
  margin-left: auto;
  font-size: 0.6rem;
  background: var(--bg-elevated);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  color: var(--text-dim);
}
.mock-tree .folder-icon {
  color: var(--text-dim);
  font-size: 0.7rem;
}

/* Track table */
.mock-tracks {
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.mock-track-header,
.mock-track-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 50px 40px 0.8fr;
  gap: 0.5rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.65rem;
  align-items: center;
}
.mock-track-header {
  background: var(--bg-elevated);
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.58rem;
}
.mock-track-row {
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}
.mock-track-row .title {
  color: var(--text);
  font-weight: 500;
}
.key-badge {
  display: inline-block;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-size: 0.58rem;
  font-weight: 600;
}
.key-8b {
  background: rgba(229, 168, 0, 0.15);
  color: var(--gold);
}
.key-3a {
  background: rgba(96, 144, 229, 0.15);
  color: var(--blue);
}
.key-10a {
  background: rgba(45, 204, 112, 0.15);
  color: var(--green);
}
.key-5b {
  background: rgba(229, 80, 80, 0.15);
  color: var(--red);
}
.key-7a {
  background: rgba(229, 168, 0, 0.15);
  color: var(--gold-light);
}

/* ---- Below fold sections ---- */
section.content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 6rem 2rem;
}
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
section.content h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}
section.content .subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin-bottom: 3rem;
}

/* ---- How it works ---- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  counter-reset: step;
}
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
}
.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--bg);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
}
.step h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.step p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ---- Tool categories ---- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.tool-cat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.35rem;
}
.tool-cat h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tool-cat .count {
  font-size: 0.62rem;
  font-weight: 700;
  background: rgba(229, 168, 0, 0.1);
  color: var(--gold);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}
.tool-cat ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.tool-cat li {
  font-size: 0.7rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ---- Install ---- */
.install-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  max-width: 680px;
}
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}
.tab {
  padding: 0.65rem 1rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  font-family: inherit;
  white-space: nowrap;
}
.tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.tab:hover {
  color: var(--text);
}
.install-panel {
  display: none;
  padding: 1.25rem;
}
.install-panel.active {
  display: block;
}
.install-panel pre {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  overflow-x: auto;
}
.install-panel .comment {
  color: var(--text-dim);
}
.install-panel .string {
  color: var(--gold-light);
}

/* Formats */
.formats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.format-tag {
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'SF Mono', 'Fira Code', monospace;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}
footer a {
  color: var(--gold);
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 6rem;
  }
  .hero-right {
    display: none;
  }
  .feature-grid,
  .command-bar {
    max-width: 100%;
  }
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  nav .links a:not(.gh) {
    display: none;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .steps,
  .tools-grid {
    grid-template-columns: 1fr;
  }
}
