/*
 * SMuFL music notation glyphs (Bravura / BravuraText by Steinberg).
 *
 * Bravura is the reference font for the Standard Music Font Layout (SMuFL)
 * specification - ~3000 glyphs covering virtually every Western music
 * notation symbol (clefs, noteheads, accidentals, dynamics, articulations,
 * ornaments, time signatures, instrument-specific symbols, etc.).
 *
 * License: SIL Open Font License (OFL) - see ui/assets/fonts/smufl/OFL.txt
 * Source:  https://github.com/steinbergmedia/bravura
 *
 * Two faces are bundled:
 *   - Bravura      (small, optimised for full-size notation rendering)
 *   - BravuraText  (designed for inline use within running prose; better
 *                   metrics & ligatures, but ~330KB so only loaded when
 *                   the .smufl-text class is used)
 *
 * Usage:
 *
 *   <i class="smufl smufl-treble-clef"></i>
 *   <i class="smufl smufl-quarter-note"></i>
 *   <i class="smufl smufl-forte"></i>
 *
 *   Or: arbitrary glyph by name (data-attribute pattern)
 *   <span class="smufl">&#xE050;</span>          (G clef via raw codepoint)
 *
 *   Inline within text (sentence-aware metrics):
 *   <span class="smufl-text">&#xE050;</span>
 *
 * Full glyph list / codepoints:
 *   https://w3c.github.io/smufl/latest/tables/index.html
 *   ui/assets/fonts/smufl/glyphnames.json (name -> codepoint, 2900+ entries)
 *
 * Add new convenience classes here as needed.
 */

@font-face {
  font-family: "Bravura";
  font-style: normal;
  font-weight: normal;
  font-display: swap;
  src: url("../fonts/smufl/Bravura.woff2?v=1") format("woff2"),
       url("../fonts/smufl/Bravura.woff?v=1") format("woff");
}

@font-face {
  font-family: "BravuraText";
  font-style: normal;
  font-weight: normal;
  font-display: swap;
  src: url("../fonts/smufl/BravuraText.woff2?v=1") format("woff2"),
       url("../fonts/smufl/BravuraText.woff?v=1") format("woff");
}

.smufl {
  font-family: "Bravura", serif;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: inline-block;
}

.smufl-text {
  font-family: "BravuraText", serif;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: inline-block;
}

/* ---------- Clefs ---------- */
.smufl-treble-clef:before        { content: "\E050"; } /* G clef */
.smufl-bass-clef:before          { content: "\E062"; } /* F clef */
.smufl-alto-clef:before          { content: "\E05C"; } /* C clef */

/* ---------- Notes ---------- */
.smufl-whole-note:before         { content: "\E1D2"; }
.smufl-half-note:before          { content: "\E1D3"; }
.smufl-quarter-note:before       { content: "\E1D5"; }
.smufl-eighth-note:before        { content: "\E1D7"; }
.smufl-sixteenth-note:before     { content: "\E1D9"; }

/* ---------- Accidentals ---------- */
.smufl-sharp:before              { content: "\E262"; }
.smufl-flat:before               { content: "\E260"; }
.smufl-natural:before            { content: "\E261"; }

/* ---------- Dynamics ---------- */
.smufl-piano:before              { content: "\E520"; } /* p */
.smufl-mezzo:before              { content: "\E521"; } /* m */
.smufl-forte:before              { content: "\E522"; } /* f */
.smufl-pp:before                 { content: "\E52B"; }
.smufl-mp:before                 { content: "\E52C"; }
.smufl-mf:before                 { content: "\E52D"; }
.smufl-ff:before                 { content: "\E52F"; }

/* ---------- Time signatures ---------- */
.smufl-time-common:before        { content: "\E08A"; } /* 4/4 (C) */
.smufl-time-cut:before           { content: "\E08B"; } /* 2/2 (cut C) */
.smufl-time-0:before             { content: "\E080"; }
.smufl-time-1:before             { content: "\E081"; }
.smufl-time-2:before             { content: "\E082"; }
.smufl-time-3:before             { content: "\E083"; }
.smufl-time-4:before             { content: "\E084"; }
.smufl-time-5:before             { content: "\E085"; }
.smufl-time-6:before             { content: "\E086"; }
.smufl-time-7:before             { content: "\E087"; }
.smufl-time-8:before             { content: "\E088"; }
.smufl-time-9:before             { content: "\E089"; }

/* ---------- Repeats / barlines ---------- */
.smufl-repeat-left:before        { content: "\E040"; }
.smufl-repeat-right:before       { content: "\E041"; }
.smufl-final-barline:before      { content: "\E032"; }

/* ---------- Articulations / ornaments ---------- */
.smufl-staccato:before           { content: "\E4A2"; }
.smufl-accent:before             { content: "\E4A0"; }
.smufl-tenuto:before             { content: "\E4A4"; }
.smufl-fermata:before            { content: "\E4C0"; }
.smufl-trill:before              { content: "\E566"; }
.smufl-turn:before               { content: "\E567"; }
.smufl-mordent:before            { content: "\E56D"; }

/* ---------- Instrument symbols (selection) ---------- */
.smufl-pedal-down:before         { content: "\E650"; } /* "Ped." */
.smufl-pedal-up:before           { content: "\E655"; } /* "*" pedal release */
.smufl-bow-up:before             { content: "\E612"; }
.smufl-bow-down:before           { content: "\E610"; }
.smufl-strum-up:before           { content: "\E846"; }
.smufl-strum-down:before         { content: "\E847"; }

/* ---------- Guitar tablature ---------- */
.smufl-tab-clef:before           { content: "\E06D"; } /* "TAB" — 6-string tablature clef */
.smufl-tab-clef-bass:before      { content: "\E06E"; } /* 4-string (bass) tab clef */
.smufl-fretboard:before          { content: "\E857"; } /* 6-string fretboard, with nut */
.smufl-fretboard-no-nut:before   { content: "\E856"; } /* 6-string fretboard, no nut */
.smufl-fretboard-bass:before     { content: "\E853"; } /* 4-string fretboard, with nut */
.smufl-fret-open:before          { content: "\E85A"; } /* "O" — open string */
.smufl-fret-muted:before         { content: "\E859"; } /* "X" — muted string */
.smufl-fret-finger:before        { content: "\E858"; } /* filled dot — finger position */
.smufl-barre:before              { content: "\E848"; } /* full barre */
.smufl-barre-half:before         { content: "\E849"; } /* half barre */

/* ---------- Misc ---------- */
.smufl-x-notehead:before         { content: "\E0A9"; } /* unpitched / drum X */
