/* ============================================================
   Circle of Fifths — page-specific styles
   Dark theme, uses design tokens from /css/styles.css
   ============================================================ */

.cof-page {
  --bg: #0C1A14;
  --bg-card: #12251B;
  --bg-card-border: #1F4B34;
  --text: #E8F5EE;
  --text-dim: #7CA88E;
  --accent: #10B981;
  --accent-hover: #059669;
  --ring-major: #1a3d2a;
  --ring-minor: #14291e;
  --ring-hover: #225a38;
  --ring-active: #10B981;
}

/* ── Layout ── */
.cof-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  background: var(--bg);
  min-height: 100vh;
}

body:has(.cof-page) { background: #0C1A14; }
body:has(.cof-page) .nav { background: rgba(12, 26, 20, 0.92); border-bottom-color: #1F4B34; }
body:has(.cof-page) .nav__menu a { color: #7CA88E; }
body:has(.cof-page) .nav__menu a:hover,
body:has(.cof-page) .nav__menu a.active { color: #10B981; }
body:has(.cof-page) .footer { background: #0A1610; color: #7CA88E; }
body:has(.cof-page) .footer h4 { color: #E8F5EE; }
body:has(.cof-page) .footer a { color: #7CA88E; }
body:has(.cof-page) .footer a:hover { color: #10B981; }
body:has(.cof-page) .footer__bottom { border-top-color: #1F4B34; color: #5A8A6E; }
body:has(.cof-page) .footer__brand p,
body:has(.cof-page) .footer .loc { color: #5A8A6E; }

.cof-page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--text);
  margin-bottom: 8px;
  text-align: center;
}
.cof-page .page-subtitle {
  color: var(--text-dim);
  font-size: 1rem;
  margin-bottom: 32px;
  text-align: center;
}
.cof-page .page-subtitle strong { color: var(--text); font-weight: 500; }

/* ── Two-column layout ── */
.cof-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

/* ── Card ── */
.cof-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* ── Circle ── */
.cof-circle-wrap {
  max-width: 460px;
  margin: 0 auto;
}
.cof-circle-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

.cof-controls {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
}
.cof-ctrl {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-dim);
  font-weight: 500;
}
.cof-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px; height: 4px;
  background: var(--bg-card-border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.cof-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  background: var(--accent); border-radius: 50%; cursor: pointer;
}
.cof-slider::-moz-range-thumb {
  width: 16px; height: 16px;
  background: var(--accent); border-radius: 50%; border: none; cursor: pointer;
}
.cof-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 0.8125rem;
  font-family: var(--font-body);
  font-weight: 600;
  padding: 6px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.cof-btn:hover { background: var(--accent-hover); }
.cof-btn.playing { background: #EF4444; }

/* ── SVG Segments ── */
.cof-seg-major {
  fill: var(--ring-major);
  stroke: var(--bg-card-border);
  stroke-width: 1.5;
  cursor: pointer;
  transition: fill 0.15s;
}
.cof-seg-major:hover { fill: var(--ring-hover); }
.cof-seg-major.active { fill: var(--ring-active); }

.cof-seg-minor {
  fill: var(--ring-minor);
  stroke: var(--bg-card-border);
  stroke-width: 1;
  cursor: pointer;
  transition: fill 0.15s;
}
.cof-seg-minor:hover { fill: #1d4630; }
.cof-seg-minor.active { fill: #059669; }

.cof-seg-neighbor {
  fill: #1e5035 !important;
}

.cof-label {
  fill: var(--text);
  font-family: var(--font-body);
  font-weight: 700;
  pointer-events: none;
  text-anchor: middle;
  dominant-baseline: central;
}
.cof-label--major { font-size: 16px; }
.cof-label--minor { font-size: 12px; fill: var(--text-dim); }
.cof-label--active { fill: #fff; }

/* ── Info Panel ── */
.cof-key-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--bg-card-border);
}
.cof-key-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.cof-key-sig {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
}

.cof-detail {
  margin-bottom: 16px;
}
.cof-detail:last-child { margin-bottom: 0; }
.cof-detail h3 {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-weight: 600;
}
.cof-detail p {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
}

.cof-chords {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cof-chord-pill {
  padding: 5px 10px;
  background: var(--bg);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 52px;
}
.cof-chord-pill__numeral {
  font-size: 0.5625rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* ── Info Sections ── */
.cof-info {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin-top: 20px;
  color: var(--text);
}
.cof-info h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin-bottom: 16px;
  color: var(--text);
}
.cof-info ol {
  padding-left: 20px;
  color: var(--text-dim);
  line-height: 1.8;
}
.cof-info ol strong { color: var(--text); font-weight: 500; }
.cof-info p {
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 10px;
}
.cof-info p:last-child { margin-bottom: 0; }
.cof-info p strong { color: var(--text); font-weight: 500; }
.cof-info--links p { font-size: 0.9375rem; }
.cof-info a { color: var(--accent); text-decoration: none; }
.cof-info a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .cof-page { padding: 32px 16px 64px; }
  .cof-layout {
    grid-template-columns: 1fr;
  }
  .cof-card { padding: 16px; }
}
@media (max-width: 480px) {
  .cof-circle-wrap { max-width: 320px; }
  .cof-key-name { font-size: 1.375rem; }
}
