/* Lyricsync — shared tokens, type and controls.
   One family (Anek) covers Latin, Devanagari and Gurmukhi with the same width axis, so a lyric line
   looks like itself whichever script it is shown in. */

@font-face {
  font-family: "Anek"; font-display: swap; font-weight: 100 800; font-stretch: 75% 125%;
  src: url(fonts/anek-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Anek"; font-display: swap; font-weight: 100 800; font-stretch: 75% 125%;
  src: url(fonts/anek-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Anek"; font-display: swap; font-weight: 100 800; font-stretch: 75% 125%;
  src: url(fonts/anek-devanagari.woff2) format("woff2");
  unicode-range: U+0900-097F, U+1CD0-1CF4, U+1CF7-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0, U+25CC, U+A830-A839,
    U+A8E0-A8FF;
}
@font-face {
  font-family: "Anek"; font-display: swap; font-weight: 100 800; font-stretch: 75% 125%;
  src: url(fonts/anek-gurmukhi.woff2) format("woff2");
  unicode-range: U+0A01-0A76;
}

:root {
  /* the old karaoke-VCD screen: ultramarine stage, white words, a warm fill sweeping through them */
  --stage: #1a1f9c;
  --night: #0e1163;
  --paper: #f5f3ff;
  --ink: #141766;
  --marigold: #ffc233;
  --haze: #8e92dd;      /* unsung lyric lines (large type only) */
  --dim: #a3a7ea;       /* small secondary text on blue */
  --soft: #c9cbf5;      /* body copy on blue */
  --cue: #ff5a6e;       /* live / listening indicator only */
  --fill: var(--marigold);

  --font: "Anek", "Nirmala UI", "Noto Sans", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* type scale, ratio 1.25 from a 17px body */
  --s-1: .8125rem; --s0: 1.0625rem; --s1: 1.33rem; --s2: 1.66rem; --s3: 2.075rem; --s4: 2.6rem; --s5: 3.25rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: var(--s0); line-height: 1.5; font-weight: 400;
  background: var(--stage); color: var(--paper); -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 0;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--marigold); color: var(--ink); }

:focus-visible { outline: 3px solid var(--marigold); outline-offset: 3px; border-radius: 4px; }

.tnum { font-variant-numeric: tabular-nums; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- buttons: a filled marigold "play" button and a quiet outlined one ---- */
.btn {
  --bg: transparent; --fg: var(--paper); --bd: color-mix(in srgb, var(--paper) 45%, transparent);
  display: inline-flex; align-items: center; gap: .55em; min-height: 48px; padding: .55em 1.25em .5em;
  border-radius: 999px; border: 1.5px solid var(--bd); background: var(--bg); color: var(--fg);
  font-weight: 600; font-stretch: 100%; letter-spacing: .005em; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.btn:hover { --bd: var(--paper); }
.btn:active { transform: translateY(1px); }
.btn.primary { --bg: var(--marigold); --fg: var(--ink); --bd: var(--marigold); }
.btn.primary:hover { --bg: #ffd060; --bd: #ffd060; }
.btn.on-paper { --fg: var(--ink); --bd: color-mix(in srgb, var(--ink) 40%, transparent); }
.btn.on-paper:hover { --bd: var(--ink); }
.btn.on-paper.primary { --bg: var(--stage); --fg: var(--paper); --bd: var(--stage); }
.btn.on-paper.primary:hover { --bg: var(--ink); --bd: var(--ink); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---- the karaoke word: background-clipped fill driven by --p (0..1) ---- */
.kw {
  --p: 0;
  background-image: linear-gradient(90deg, var(--fill) 0 calc(var(--p) * 100%), var(--unsung, var(--haze)) calc(var(--p) * 100%) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
}
