/* ============================================================
   HARMONIA PRO — Global Design System
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== DESIGN TOKENS ===== */
:root {
  --primary: #7C6CFF;
  --primary-light: #A59BFF;
  --primary-dark: #5A4BE0;
  --primary-glow: rgba(124, 108, 255, 0.25);
  --accent: #FFB347;
  --accent-dark: #E08A00;
  --accent-glow: rgba(255, 179, 71, 0.2);
  --success: #4ADE80;
  --danger: #F87171;
  --warning: #FB923C;

  --bg: #07081A;
  --bg-2: #0C0E24;
  --bg-3: #12152C;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.065);
  --surface-hover: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.07);
  --border-2: rgba(124, 108, 255, 0.3);
  --border-3: rgba(255, 255, 255, 0.12);

  --text: #E8E9F3;
  --text-2: #9FA3BC;
  --text-3: #565872;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-primary: 0 4px 30px var(--primary-glow);
  --shadow-accent: 0 4px 30px var(--accent-glow);

  --transition: 0.2s ease;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Ambient gradient mesh */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 700px 500px at 10% 10%, rgba(124, 108, 255, 0.07) 0%, transparent 70%),
    radial-gradient(ellipse 500px 400px at 90% 85%, rgba(255, 179, 71, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 50% 50%, rgba(74, 222, 128, 0.02) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3, h4, h5 { font-family: 'Outfit', sans-serif; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 8, 26, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  white-space: nowrap;
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 16px var(--primary-glow);
  flex-shrink: 0;
}

.navbar-brand .brand-pro { color: var(--primary-light); }

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

.nav-links a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  transition: all var(--transition);
}

.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a.active { color: var(--primary-light); background: rgba(124, 108, 255, 0.12); }

/* ===== LAYOUT ===== */
.container { max-width: 1180px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }
.section { padding: 72px 0; }
.section-sm { padding: 48px 0; }

/* ===== CARD ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover { border-color: var(--border-3); }
.card-elevated { background: var(--surface-2); box-shadow: var(--shadow); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 36px var(--primary-glow); }

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-3);
}
.btn-secondary:hover { background: var(--surface-hover); border-color: var(--border-2); }

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #1a1200;
  font-weight: 700;
  box-shadow: var(--shadow-accent);
}
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 8px 36px var(--accent-glow); }

.btn-ghost {
  background: transparent;
  color: var(--primary-light);
  border: 1px solid rgba(124, 108, 255, 0.3);
}
.btn-ghost:hover { background: rgba(124, 108, 255, 0.1); border-color: var(--primary); }

.btn-play {
  background: var(--surface-2);
  color: var(--primary-light);
  border: 1px solid rgba(124, 108, 255, 0.2);
  padding: 6px 14px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  font-weight: 600;
}
.btn-play:hover { background: rgba(124, 108, 255, 0.15); border-color: var(--primary); box-shadow: 0 0 16px var(--primary-glow); }
.btn-play.playing { background: var(--primary); color: white; border-color: var(--primary); }

.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 6px 14px; font-size: 0.78rem; border-radius: var(--radius-sm); }

/* ===== FORM CONTROLS ===== */
.form-group { display: flex; flex-direction: column; gap: 7px; }

.form-label {
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.form-select {
  appearance: none;
  background: var(--bg-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239FA3BC' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--border-3);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 36px 10px 14px;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  cursor: pointer;
}
.form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.15); }
.form-select option { background: var(--bg-3); color: var(--text); }

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-primary { background: rgba(124,108,255,0.18); color: var(--primary-light); border: 1px solid rgba(124,108,255,0.3); }
.badge-accent  { background: rgba(255,179,71,0.18);  color: var(--accent);         border: 1px solid rgba(255,179,71,0.3); }
.badge-success { background: rgba(74,222,128,0.15);  color: var(--success);        border: 1px solid rgba(74,222,128,0.3); }

/* ===== NOTE CARDS ===== */
.note-cards-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

.note-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  min-width: 72px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.note-card:hover {
  border-color: var(--primary);
  background: rgba(124, 108, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--primary-glow);
}
.note-card:active { transform: scale(0.95); }

.note-card .nc-degree {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.note-card .nc-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
}
.note-card.octave { opacity: 0.55; }

.note-card.playing {
  background: var(--primary) !important;
  border-color: var(--primary-light) !important;
  box-shadow: 0 4px 28px var(--primary-glow) !important;
  transform: translateY(-2px) !important;
}
.note-card.playing .nc-degree,
.note-card.playing .nc-name { color: white !important; }

/* ===== DATA TABLE ===== */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table thead tr { border-bottom: 1px solid var(--border-3); }
.data-table th {
  padding: 13px 16px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
  text-align: left;
  white-space: nowrap;
  background: var(--surface);
}
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background-color 0.15s; }
.data-table tbody tr:hover { background: var(--surface-hover); }

/* ===== CHORD CHIP (reference tables) ===== */
.chord-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 42px;
  cursor: pointer;
  transition: all 0.15s;
  gap: 1px;
}
.chord-chip:hover { border-color: var(--primary); background: rgba(124,108,255,0.1); }
.chord-chip .cc-roman { font-size: 0.58rem; color: var(--text-3); font-weight: 700; text-transform: uppercase; }
.chord-chip .cc-cipher { font-size: 0.82rem; font-weight: 800; font-family: 'Outfit', sans-serif; color: var(--text); }

/* ===== CHORD TYPE COLORS ===== */
.color-major      .cc-cipher, .color-major      .chord-sym { color: #A59BFF; }
.color-minor      .cc-cipher, .color-minor      .chord-sym { color: #4ADE80; }
.color-dominant   .cc-cipher, .color-dominant   .chord-sym { color: #FFB347; }
.color-diminished .cc-cipher, .color-diminished .chord-sym { color: #F87171; }
.color-augmented  .cc-cipher, .color-augmented  .chord-sym { color: #FB923C; }

/* ===== HERO SECTION ===== */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 18px;
  background: rgba(124, 108, 255, 0.12);
  border: 1px solid rgba(124, 108, 255, 0.3);
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 4.8rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 22px;
  background: linear-gradient(145deg, #fff 20%, var(--primary-light) 65%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-2);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-value { font-family: 'Outfit', sans-serif; font-size: 2rem; font-weight: 800; color: var(--primary-light); line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-3); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ===== FEATURE CARDS ===== */
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: all var(--transition);
}
.feature-card:hover { border-color: var(--border-3); background: var(--surface-2); transform: translateY(-2px); }
.feature-icon { font-size: 2rem; margin-bottom: 14px; display: block; }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.feature-card p { font-size: 0.85rem; color: var(--text-2); line-height: 1.65; }

/* ===== LEARNING STEPS ===== */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.step-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  opacity: 0;
  transition: opacity var(--transition);
}
.step-card:hover { border-color: var(--border-2); transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.step-card:hover::after { opacity: 1; }

.step-num {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 0.9rem;
  color: white;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px var(--primary-glow);
}
.step-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.step-card p  { font-size: 0.875rem; color: var(--text-2); line-height: 1.65; }

.step-formula {
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border-3);
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-light);
  letter-spacing: 0.05em;
  text-align: center;
}

/* ===== SECTION HEADER ===== */
.section-header { margin-bottom: 52px; }
.section-header.centered { text-align: center; }
.section-header h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); font-weight: 800; margin-bottom: 10px; }
.section-header p { color: var(--text-2); font-size: 1rem; max-width: 560px; }
.section-header.centered p { margin: 0 auto; }

/* ===== PAGE HEADER ===== */
.page-header {
  padding: 44px 0 36px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-header h1 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 800; margin-bottom: 4px; }
.page-header p  { color: var(--text-2); font-size: 0.95rem; }

/* ===== CONTROLS BAR ===== */
.controls-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
  margin-bottom: 28px;
}
.controls-bar .form-group { flex: 1; min-width: 160px; }

/* ===== TABS ===== */
.tabs-bar {
  display: flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 28px;
  overflow-x: auto;
}
.tab-btn {
  flex: 1;
  min-width: 90px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  text-align: center;
}
.tab-btn:hover { color: var(--text); background: var(--surface-hover); }
.tab-btn.active { background: var(--primary); color: white; box-shadow: 0 2px 14px var(--primary-glow); font-weight: 600; }

/* ===== ADVANCED CHORD TABLE ===== */
.ext-chord-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 84px;
}
.chord-sym {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
}
.chord-notes-tiny {
  font-size: 0.62rem;
  color: var(--text-3);
  text-align: center;
  line-height: 1.5;
  max-width: 110px;
}
.chord-header { font-size: 0.7rem; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }

/* Degree badge */
.degree-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 38px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
}
.degree-major     { background: rgba(124,108,255,0.15); color: #A59BFF; border: 1px solid rgba(124,108,255,0.3); }
.degree-minor     { background: rgba(74,222,128,0.12);  color: #4ADE80; border: 1px solid rgba(74,222,128,0.25); }
.degree-dominant  { background: rgba(255,179,71,0.12);  color: #FFB347; border: 1px solid rgba(255,179,71,0.25); }
.degree-diminished { background: rgba(248,113,113,0.12); color: #F87171; border: 1px solid rgba(248,113,113,0.25); }
.degree-augmented  { background: rgba(251,146,60,0.12);  color: #FB923C; border: 1px solid rgba(251,146,60,0.25); }

/* ===== CTA SECTION ===== */
.cta-section {
  background: linear-gradient(135deg, rgba(124,108,255,0.1) 0%, rgba(255,179,71,0.05) 100%);
  border: 1px solid rgba(124,108,255,0.2);
  border-radius: var(--radius-xl);
  padding: 64px 48px;
  text-align: center;
}
.cta-section h2 { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.cta-section p  { color: var(--text-2); font-size: 1rem; margin-bottom: 32px; max-width: 480px; margin-left: auto; margin-right: auto; }
.cta-section .btn-group { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 36px 28px;
  text-align: center;
  color: var(--text-3);
  font-size: 0.82rem;
  position: relative;
  z-index: 1;
  line-height: 1.7;
}
footer a { color: var(--primary-light); }
footer a:hover { text-decoration: underline; }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.anim-fade-up { animation: fadeUp 0.55s ease both; }
.anim-fade-in { animation: fadeIn 0.4s ease both; }
.anim-d1 { animation-delay: 0.08s; }
.anim-d2 { animation-delay: 0.16s; }
.anim-d3 { animation-delay: 0.24s; }
.anim-d4 { animation-delay: 0.32s; }
.anim-d5 { animation-delay: 0.40s; }

/* ===== UTILITY ===== */
.text-primary  { color: var(--primary-light); }
.text-accent   { color: var(--accent); }
.text-muted    { color: var(--text-2); }
.text-faint    { color: var(--text-3); }
.text-success  { color: var(--success); }
.text-danger   { color: var(--danger); }
.text-center   { text-align: center; }
.font-bold     { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-heading  { font-family: 'Outfit', sans-serif; }
.text-xs  { font-size: 0.72rem; }
.text-sm  { font-size: 0.85rem; }
.text-lg  { font-size: 1.1rem; }
.text-xl  { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.divider  { height: 1px; background: var(--border); margin: 32px 0; }
.mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.flex { display: flex; } .flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
  .hero { padding: 60px 0 48px; }
  .hero h1 { font-size: 2.4rem; }
  .cta-section { padding: 44px 24px; }
  .controls-bar { flex-direction: column; }
  .navbar { padding: 0 16px; }
  .page-header { padding: 28px 0 24px; }
  .hero-stats { gap: 28px; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero-stats { display: none; }
}
