/* Core design tokens, resets, typography, and page-level layout for the dark studio aesthetic. */

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

:root {
  --bg: #0a0a0c;
  --bg-elevated: #121215;
  --bg-card: #17171b;
  --bg-card-hover: #1d1d22;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text-primary: #f3f3f1;
  --text-secondary: #adadb4;
  --text-muted: #6f6f78;

  --accent: #e2a83f;
  --accent-strong: #f0b94f;
  --accent-soft: rgba(226, 168, 63, 0.14);

  --color-root: #e2a83f;
  --color-scale-tone: #6f93c9;
  --color-chord-tone: #d97757;
  --color-interval-target: #9b7fd1;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  --font-body: 'Vazirmatn', 'Tahoma', sans-serif;

  color-scheme: dark;
}

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

body {
  margin: 0;
  background: radial-gradient(120% 140% at 15% -10%, #1a1712 0%, var(--bg) 45%), var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.35; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; color: var(--text-secondary); }
a { color: inherit; }
button, select, input { font-family: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.container { max-width: 1180px; margin-inline: auto; padding-inline: 20px; }

/* Any sequence of notes/degrees/chords/roman numerals: always read left-to-right. */
.ltr-seq { unicode-bidi: isolate; direction: ltr; }

#app-main.page-transition { animation: page-fade-in 0.25s ease; }
@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  #app-main, .fretboard * , .card, .chip, .btn { animation: none !important; transition: none !important; }
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px;
  background: var(--accent); color: #1a1204; padding: 10px 16px;
  border-radius: var(--radius-sm); z-index: 200; transition: top 0.15s ease;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.site-header-inner { display: flex; align-items: center; gap: 24px; padding-block: 14px; }
.site-logo { font-weight: 800; font-size: 1.15rem; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.site-logo-mark { color: var(--accent); }

.site-nav { display: flex; gap: 4px; margin-inline-start: auto; flex-wrap: wrap; }
.site-nav a {
  display: inline-block; padding: 8px 14px; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--text-secondary); font-size: 0.92rem; font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.site-nav a:hover { color: var(--text-primary); background: var(--bg-card); }
.site-nav a.is-active { color: var(--accent); background: var(--accent-soft); }

.nav-toggle {
  display: none; background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-primary); border-radius: var(--radius-sm); padding: 8px 12px; cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 0.96rem;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: linear-gradient(180deg, var(--accent-strong), var(--accent)); color: #1a1204; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: var(--bg-card); border-color: var(--border-strong); color: var(--text-primary); }
.btn-secondary:hover { background: var(--bg-card-hover); }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ---------- Hero ---------- */
.hero { padding-block: 64px 40px; text-align: center; }
.hero-eyebrow {
  display: inline-block; color: var(--accent); font-weight: 600; font-size: 0.85rem;
  letter-spacing: 0.02em; background: var(--accent-soft); padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { max-width: 720px; margin-inline: auto; }
.hero p.lead { max-width: 620px; margin-inline: auto; font-size: 1.05rem; }
.hero-actions { display: flex; gap: 14px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.hero-philosophy {
  margin-top: 40px; padding: 18px 26px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-card); display: inline-block; max-width: 600px; font-weight: 600; font-size: 1.05rem;
  color: var(--text-primary);
}

/* ---------- Cards / feature grid ---------- */
.section { padding-block: 48px; }
.section-heading { text-align: center; max-width: 640px; margin: 0 auto; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px; transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  display: block; text-decoration: none; color: inherit;
}
.card:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--bg-card-hover); }
.card-icon { font-size: 1.6rem; margin-bottom: 12px; display: inline-block; }
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; font-size: 0.92rem; }

.page-header { padding-block: 36px 20px; }
.page-header h1 { margin-bottom: 8px; }
.page-header .lead { max-width: 680px; }

.panel {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow-card);
}
.panel h2 { margin-bottom: 14px; }
.controls-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 18px; }

.concept-questions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 20px 0; }
.concept-questions .qa-card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; }
.concept-questions .qa-card h4 { color: var(--accent); font-size: 0.95rem; margin-bottom: 6px; }
.concept-questions .qa-card p { font-size: 0.9rem; margin: 0; }

.site-footer { border-top: 1px solid var(--border); padding-block: 28px; margin-top: 40px; color: var(--text-muted); font-size: 0.85rem; text-align: center; }
.footer-link-btn {
  background: none; border: none; color: var(--accent); font-size: 0.85rem; cursor: pointer;
  padding: 8px 0; text-decoration: underline; font-family: inherit;
}

.cof-layout { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 800px) { .cof-layout { grid-template-columns: 1fr; } }

/* ---------- Flow strip (home page concept chain) ---------- */
.flow-strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px;
  margin-top: 32px; font-size: 0.85rem;
}
.flow-step {
  background: var(--bg-card); border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 6px 14px; color: var(--text-secondary); font-weight: 600;
}
.flow-arrow { color: var(--text-muted); }
