/* ==========================================================================
   Victory Music: turntable hero, five-line staff, listening room
   Builds on site.css tokens.
   ========================================================================== */

/* ---------- Hero ---------- */
.m-hero { padding-block: clamp(48px, 7vw, 96px) clamp(40px, 5vw, 64px); overflow: hidden; }
.m-hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 88px); align-items: center; }
.m-hero__title { font-size: clamp(56px, 8.4vw, 116px); font-weight: 800; line-height: .95; letter-spacing: -.05em; color: #fff; }
.m-hero__title em { font-style: normal; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.m-hero .subline { max-width: 26ch; }

.m-facts { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--rule-dark); }
.m-facts li { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--silver-dk); }
.m-facts strong { font-size: 30px; font-weight: 800; letter-spacing: -.03em; color: var(--gold-lt); line-height: 1; font-variant-numeric: tabular-nums; }
.m-facts .ico { width: 18px; height: 18px; color: var(--gold); }

/* ---------- Turntable ---------- */
.turntable { justify-self: center; width: min(540px, 100%); }
.turntable__plinth {
  position: relative; cursor: pointer; aspect-ratio: 1.14 / 1; border-radius: 28px;
  background: linear-gradient(160deg, #15264a 0%, #0a1530 45%, #040a18 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .09),
    inset 0 -18px 30px rgba(0, 0, 0, .35),
    0 0 0 1px rgba(223, 167, 64, .2),
    0 2px 6px rgba(0, 0, 0, .4),
    0 50px 90px -40px rgba(0, 0, 0, .9),
    0 60px 140px -50px rgba(6, 107, 231, .65);
}
.turntable__plinth::before {
  /* brushed top plate */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .012) 0 2px, transparent 2px 5px);
}
.platter {
  position: absolute; left: 6%; top: 50%; width: 74%; aspect-ratio: 1; transform: translateY(-50%);
  border-radius: 50%; background: #03070f;
  box-shadow: 0 0 0 2px rgba(223, 167, 64, .45), 0 0 0 9px #0c1830, 0 0 0 10px rgba(231, 231, 238, .08), 0 24px 44px rgba(0, 0, 0, .65);
}
.record {
  position: absolute; inset: 3%; border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 34%, rgba(255, 255, 255, .06) 34.4%, transparent 35.2%),
    radial-gradient(circle, transparent 0 62%, rgba(255, 255, 255, .05) 62.3%, transparent 63%),
    repeating-radial-gradient(circle, #0a0e17 0 1.3px, #161e2d 1.7px 2.7px);
  box-shadow: inset 0 0 0 3px #05080e, inset 0 0 30px rgba(0, 0, 0, .6);
  animation: spin 1.8s linear infinite; animation-play-state: paused;
}
.record__label { position: absolute; left: 33%; top: 33%; width: 34%; height: 34%; border-radius: 50%; box-shadow: 0 0 0 2px var(--gold), 0 0 0 5px #0a0e17; }
.record__sheen {
  position: absolute; inset: 3%; border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: conic-gradient(from 25deg, transparent 0 6%, rgba(255, 255, 255, .13) 11%, transparent 17% 49%, rgba(120, 170, 255, .11) 56%, transparent 63%);
}
.record__spindle { position: absolute; left: 50%; top: 50%; width: 3.2%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #9aa0b4 60%, #444a5a); }

.tonearm { position: absolute; right: 6%; top: 9%; width: 16%; height: 74%; transform-origin: 50% 7%; transform: rotate(-2deg); transition: transform 1.4s var(--ease); pointer-events: none; }
.tonearm__pivot { position: absolute; left: 50%; top: 0; width: 64%; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #3a4760, #111a2b 70%); box-shadow: 0 0 0 1.5px rgba(223, 167, 64, .55), 0 10px 20px rgba(0, 0, 0, .6); }
.tonearm__arm { position: absolute; left: calc(50% - 3px); top: 7%; width: 6px; height: 84%; border-radius: 3px;
  background: linear-gradient(90deg, #7d8497, #eef0f6 45%, #8e95a8); box-shadow: 6px 10px 14px rgba(0, 0, 0, .45); }
.tonearm__head { position: absolute; left: calc(50% - 12px); bottom: 2%; width: 24px; height: 34px; border-radius: 4px 4px 6px 6px; transform: rotate(18deg);
  background: linear-gradient(180deg, var(--gold-lt), var(--gold-dk)); box-shadow: 4px 8px 12px rgba(0, 0, 0, .5); }
.turntable__led { position: absolute; left: 7%; bottom: 7%; width: 10px; height: 10px; border-radius: 50%; background: #2a3450; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6); transition: background-color .4s, box-shadow .4s; }

.music-page.is-playing .record { animation-play-state: running; }
.music-page.is-playing .tonearm { transform: rotate(17deg); }
.music-page.is-playing .turntable__led { background: var(--gold-lt); box-shadow: 0 0 12px 2px rgba(237, 188, 85, .7); }

/* ---------- Karaoke (under the turntable) ---------- */
.m-deck { display: grid; gap: 22px; justify-items: center; width: 100%; min-width: 0; }
.karaoke {
  width: min(540px, 100%); border-radius: 20px; overflow: hidden;
  background: linear-gradient(180deg, rgba(12, 40, 78, .6), rgba(4, 18, 40, .75));
  box-shadow: var(--shadow-dark);
}
.karaoke__head { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--rule-dark); }
.karaoke__badge { display: inline-flex; align-items: center; gap: 8px; flex: none; font-size: 10.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.karaoke__song { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--silver-dk); }
.karaoke__note { flex: none; padding: 3px 8px; border-radius: 999px; border: 1px dashed rgba(223, 167, 64, .5); font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-lt); }
.karaoke__lines {
  position: relative; height: 212px; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 26%, #000 74%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 26%, #000 74%, transparent 100%);
}
.karaoke__track { position: absolute; left: 0; right: 0; top: 0; padding-inline: 20px; transition: transform .65s var(--ease); will-change: transform; }
.k-line {
  --k-sung: rgba(223, 167, 64, .55); --k-rest: rgba(231, 231, 238, .34);
  padding: 7px 0; text-align: center; font-size: clamp(19px, 2vw, 23px); font-weight: 700; line-height: 1.3; letter-spacing: -.01em;
  transform: scale(.82); opacity: .75; transition: transform .5s var(--ease), opacity .4s, filter .4s;
}
.k-line.is-next { opacity: .95; }
.k-line.is-past { --k-rest: rgba(231, 231, 238, .3); opacity: .55; }
.k-line.is-current { --k-sung: var(--gold-lt); --k-rest: #fff; transform: scale(1); opacity: 1; filter: drop-shadow(0 0 14px rgba(223, 167, 64, .22)); }
.k-w {
  --p: 0;
  color: transparent;
  background-image: linear-gradient(90deg, var(--k-sung) calc(var(--p) * 1%), var(--k-rest) calc(var(--p) * 1%));
  -webkit-background-clip: text; background-clip: text;
}
.k-line--inst { display: flex; justify-content: center; }
.k-dots { display: inline-flex; gap: 8px; padding: 6px 0; }
.k-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); opacity: .5; }
.karaoke.is-playing .k-line--inst.is-current .k-dots i { animation: kdot 1.2s ease-in-out infinite; }
.k-dots i:nth-child(2) { animation-delay: .2s !important; }
.k-dots i:nth-child(3) { animation-delay: .4s !important; }
@keyframes kdot { 0%, 100% { opacity: .35; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-5px); } }
.karaoke__empty { padding: 44px 24px; text-align: center; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--silver-dk); }

.track__lyr { margin-left: 8px; padding: 1px 6px; border-radius: 999px; border: 1px solid rgba(223, 167, 64, .45); font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); vertical-align: 1px; }

/* ---------- Five-line staff ---------- */
.staff { position: relative; z-index: 1; display: block; width: min(1200px, calc(100% - var(--gutter) * 2)); height: auto; margin: clamp(48px, 7vw, 88px) auto 0; overflow: visible; }
.staff__lines path { fill: none; stroke: rgba(223, 167, 64, .32); stroke-width: 1; vector-effect: non-scaling-stroke; }
.staff__notes g { fill: var(--gold-lt); stroke: var(--gold-lt); stroke-width: 1.8; opacity: .5; transform-box: fill-box; transform-origin: center; transition: opacity .6s; animation: note 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * -.22s); animation-play-state: paused; }
.staff__notes ellipse { transform: rotate(-20deg); transform-box: fill-box; transform-origin: center; stroke: none; }
.music-page.is-playing .staff__notes g { opacity: 1; animation-play-state: running; }
@keyframes note { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- EQ bars ---------- */
.eq { display: inline-flex; align-items: flex-end; gap: 3px; height: 26px; flex: none; }
.eq i { width: 4px; height: 25%; border-radius: 2px; background: linear-gradient(0deg, var(--gold-dk), var(--gold-lt)); animation: eqb 1s ease-in-out infinite alternate; animation-play-state: paused; }
.eq i:nth-child(2) { animation-duration: .7s; animation-delay: -.3s; }
.eq i:nth-child(3) { animation-duration: 1.25s; animation-delay: -.6s; }
.eq i:nth-child(4) { animation-duration: .85s; animation-delay: -.15s; }
.eq i:nth-child(5) { animation-duration: 1.1s; animation-delay: -.45s; }
.eq--tiny { height: 12px; gap: 2px; margin-right: 2px; }
.eq--tiny i { width: 2px; height: 40%; }
.eyebrow .eq--tiny { order: -1; }
.m-hero .eyebrow::before { display: none; }
@keyframes eqb { 0% { height: 20%; } 50% { height: 85%; } 100% { height: 45%; } }
.music-page.is-playing .eq i { animation-play-state: running; }

/* ---------- Listening room ---------- */
.m-room { padding-block: clamp(56px, 8vw, 104px); }
.m-room__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 3vw, 32px); align-items: start; }

.m-player { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #000; box-shadow: var(--shadow-dark), 0 60px 120px -50px rgba(6, 107, 231, .5); }
.m-player__mount, .m-player__mount iframe, #yt-player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.m-player__poster { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; align-content: center; gap: 16px; transition: opacity .5s var(--ease), visibility 0s .5s; }
.m-player__poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(2px) saturate(1.1) brightness(.5); transform: scale(1.04); }
.m-player__poster::before { content: ""; position: absolute; inset: 0; background: radial-gradient(80% 90% at 50% 50%, rgba(7, 26, 57, .35), rgba(4, 18, 40, .9)); }
.m-player__ring {
  position: relative; display: grid; place-items: center; width: clamp(64px, 9vw, 86px); aspect-ratio: 1; border-radius: 50%;
  background: rgba(4, 18, 40, .55); color: var(--gold-lt);
  box-shadow: 0 0 0 1.5px var(--gold), 0 0 0 8px rgba(223, 167, 64, .12), 0 20px 40px -10px rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform .3s var(--ease), background-color .3s;
}
.m-player__ring .ico { width: 40%; height: 40%; margin-left: 7%; }
.m-player__poster:hover .m-player__ring { transform: scale(1.06); background: rgba(223, 167, 64, .15); }
.m-player__hint { position: relative; font-size: 12.5px; letter-spacing: .06em; color: var(--silver); }
[data-stage].is-started .m-player__poster { opacity: 0; visibility: hidden; }

.now {
  display: flex; align-items: center; gap: 18px; margin-top: 18px; padding: 18px 20px; border-radius: 18px;
  background: rgba(12, 40, 78, .35); border: 1px solid var(--rule-dark); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.now__text { min-width: 0; flex: 1; }
.now__label { font-size: 10.5px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.now__title { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.6vw, 28px); line-height: 1.2; color: #fff; margin-top: 2px; }
.now__credit { font-size: 13px; color: var(--silver-dk); margin-top: 2px; }
.now__yt { flex: none; }

/* Tracklist */
.tracks {
  display: flex; flex-direction: column; border-radius: 20px; overflow: hidden;
  background: linear-gradient(180deg, rgba(12, 40, 78, .6), rgba(7, 26, 57, .45));
  box-shadow: var(--shadow-dark);
}
.tracks__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 14px; border-bottom: 1px solid var(--rule-dark); flex-wrap: wrap; }
.tracks__title { font-size: 12px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.tracks__search { position: relative; flex: 1; max-width: 240px; min-width: 150px; }
.tracks__search .ico { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--silver-dk); pointer-events: none; }
.tracks__search input {
  width: 100%; height: 38px; padding: 0 14px 0 36px; border-radius: 999px; font: inherit; font-size: 13px; color: #fff;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--rule-dark); outline: none; transition: border-color .2s, background-color .2s;
}
.tracks__search input::placeholder { color: var(--silver-dk); }
.tracks__search input:focus-visible { border-color: var(--gold); background: rgba(255, 255, 255, .08); }

.tracks__list { list-style: none; margin: 0; padding: 8px; max-height: 452px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(223, 167, 64, .45) transparent; }
.track {
  display: grid; grid-template-columns: 2.6ch 68px minmax(0, 1fr); gap: 12px; align-items: center; width: 100%;
  padding: 8px 10px; border-radius: 12px; text-align: left; transition: background-color .2s;
}
.track:hover { background: rgba(255, 255, 255, .045); }
.track__no { font-size: 12px; font-weight: 600; color: var(--silver-dk); font-variant-numeric: tabular-nums; text-align: right; }
.track__thumb { position: relative; width: 68px; aspect-ratio: 16 / 9; border-radius: 7px; overflow: hidden; background: var(--navy); box-shadow: 0 0 0 1px rgba(231, 231, 238, .06); }
.track__thumb img { width: 100%; height: 100%; object-fit: cover; }
.track__thumb .eq { position: absolute; inset: 0; justify-content: center; align-items: center; height: auto; padding: 8px 0; background: rgba(4, 18, 40, .7); opacity: 0; }
.track__thumb .eq i { height: 40%; }
.track__text { min-width: 0; display: flex; flex-direction: column; }
.track__title { font-size: 14px; font-weight: 600; line-height: 1.3; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.track__credit { font-size: 12px; color: var(--silver-dk); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track.is-current { background: rgba(223, 167, 64, .10); box-shadow: inset 0 0 0 1px rgba(223, 167, 64, .35); }
.track.is-current .track__no { color: var(--gold-lt); }
.track.is-current .track__thumb .eq { opacity: 1; }
.tracks__empty { padding: 24px; text-align: center; color: var(--silver-dk); font-size: 14px; }
.tracks__foot { padding: 12px 18px 16px; border-top: 1px solid var(--rule-dark); font-size: 12px; color: var(--silver-dk); }
.tracks__foot a { color: var(--silver); border-bottom: 1px solid rgba(223, 167, 64, .5); }
.tracks__foot a:hover { color: var(--gold-lt); }

/* Coda */
.m-coda__inner { text-align: center; }
.m-coda h2 { max-width: 22ch; margin-inline: auto; }
.m-coda .subline { max-width: 40ch; margin-inline: auto; }
.m-coda .btn-row { justify-content: center; }
.music-page .site-footer__legal { margin-top: 0; }
.music-page .site-footer__legal a { color: var(--silver); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .m-hero__grid, .m-room__grid { grid-template-columns: 1fr; }
  .turntable { width: min(440px, 100%); }
  .tracks__list { max-height: 480px; }
}
@media (max-width: 520px) {
  .now { flex-wrap: wrap; }
  .track { grid-template-columns: 2.6ch 56px minmax(0, 1fr); gap: 10px; }
  .track__thumb { width: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .record, .staff__notes g, .eq i { animation: none !important; }
  .tonearm { transition: none; }
  .karaoke__track, .k-line { transition: none; }
  .eq i:nth-child(odd) { height: 60%; }
}

/* ---------- Responsive pass: readable labels, finger-sized targets ---------- */
.karaoke__badge, .now__label { font-size: 11px; }
.karaoke__note { font-size: 10.5px; }
.track__lyr { font-size: 10px; }
.tracks__search input { font-size: 16px; } /* 16px stops iOS zooming into the field */
@media (pointer: coarse) {
  .tracks__search input { height: 44px; }
  .now__yt, .tracks__foot a, .site-footer__legal a { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 420px) {
  .karaoke__head { flex-wrap: wrap; row-gap: 4px; padding-inline: 14px; }
  .karaoke__song { order: 3; flex-basis: 100%; }
}
