/* The main menu. It is drawn on the tube (under the scanlines) and laid over whatever is playing:
   a black slab slams in from the left with the channel list on it, the picture keeps running on the right.
   --mc is the colour of the highlighted entry; every show brings its own. */
#menu { position: absolute; inset: 0; z-index: 3; overflow: hidden; font-family: var(--display); color: #fff; text-shadow: none; --mc: #ff2b2b; }
#menu[hidden] { display: none; }
#screen:has(#menu:not([hidden])) :is(#cam, #banner) { display: none; }   /* nothing of the channel's own furniture over the menu */
#menu button { font-family: inherit; }

.m-shade { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(0,0,0,.75) 45%, rgba(0,0,0,.18) 80%); animation: m-fade .25s both; }
.m-slab { position: absolute; inset: 0; clip-path: polygon(0 0, 67% 0, 60% 33%, 63.5% 36%, 48% 100%, 0 100%); animation: m-slam .32s cubic-bezier(.2,1.25,.3,1) both; }
.m-slab.c { background: var(--mc); transform: translateX(3.4cqw); transition: background .12s steps(2); }
.m-slab.w { background: #fff; transform: translateX(1.1cqw); animation-delay: .04s; }
.m-slab.k { background: #060607; animation-delay: .08s; }
.m-slab.k::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, var(--mc) 27%, transparent 30%) 0 0 / 2.4cqw 2.4cqw;
  -webkit-mask: linear-gradient(100deg, transparent 30%, #000 75%); mask: linear-gradient(100deg, transparent 30%, #000 75%); opacity: .5; }
@keyframes m-slam { from { translate: -110% 0; } to { translate: 0 0; } }
@keyframes m-fade { from { opacity: 0; } }

.m-ghost { position: absolute; left: 24cqw; bottom: -13cqh; font-size: 78cqh; line-height: .8; letter-spacing: -.02em; color: transparent;
  -webkit-text-stroke: .45cqw var(--mc); opacity: .5; transform: rotate(-11deg); pointer-events: none; animation: m-pop .22s cubic-bezier(.2,1.6,.4,1); }
.m-star { position: absolute; left: 50cqw; top: 3cqh; width: 15cqw; aspect-ratio: 1; background: var(--mc); pointer-events: none;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); animation: m-spin 9s linear infinite; }
.m-star::after { content: ""; position: absolute; inset: 22%; background: #060607; clip-path: inherit; }
@keyframes m-spin { to { rotate: 360deg; } }
@keyframes m-pop { from { scale: 1.3; opacity: 0; } }

.m-tag { position: absolute; left: 4cqw; top: 6cqh; display: flex; align-items: baseline; gap: 1.4cqw; padding: .2cqh 2.6cqw .2cqh 1.6cqw; background: #fff; color: #000;
  font-size: 4.6cqw; line-height: 1.15; letter-spacing: .03em; transform: rotate(-5deg) skewX(-10deg); clip-path: polygon(0 0, 100% 8%, 96% 100%, 2% 92%); animation: m-item .3s .1s cubic-bezier(.2,1.5,.4,1) both; }
.m-tag small { font-family: var(--vt); font-size: .62em; letter-spacing: .14em; }

.m-list { position: absolute; left: 5cqw; top: 19cqh; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; align-items: flex-start;
  gap: 1.25cqh;
  font-size: min(6.1cqh, calc(49cqh / var(--n, 7))); }
.m-list li { animation: m-item .28s cubic-bezier(.2,1.5,.4,1) both; animation-delay: calc(var(--i) * 38ms + 140ms); }
.m-list li:nth-child(4n+1) { --r: -4deg; } .m-list li:nth-child(4n+2) { --r: -1.5deg; margin-left: 3cqw; }
.m-list li:nth-child(4n+3) { --r: -3.5deg; margin-left: 1cqw; } .m-list li:nth-child(4n) { --r: -1deg; margin-left: 4cqw; }
.m-list button { position: relative; isolation: isolate; display: flex; align-items: baseline; gap: .28em; padding: 0 .35em 0 .2em; color: #fff; font-size: 1em; line-height: 1.1; letter-spacing: .02em; white-space: nowrap;
  transform: rotate(var(--r, 0deg)) skewX(-9deg); transform-origin: 0 60%; transition: transform .1s steps(2); }
.m-list button i { font-style: normal; font-size: .46em; color: var(--c); letter-spacing: .06em; }
.m-list button::before, .m-list button::after { content: ""; position: absolute; z-index: -1; inset: -2% -3% -4% -4%; clip-path: polygon(1% 14%, 100% 0, 97% 84%, 0 100%); opacity: 0; }
.m-list button::before { background: #fff; }
.m-list button::after { z-index: -2; background: var(--c); translate: 1.1cqw 1cqh; }
.m-list button.on { color: #000; transform: rotate(var(--r, 0deg)) skewX(-9deg) scale(1.06) translateX(1.4cqw); }
.m-list button.on i { color: #000; }
.m-list button.on::before, .m-list button.on::after { opacity: 1; animation: m-jab .16s steps(3); }
.m-list button:focus-visible { outline: none; }
@keyframes m-item { from { opacity: 0; translate: -14cqw 0; } }
@keyframes m-jab { from { scale: 1.25 .6; } }

.m-info { position: absolute; right: 3cqw; bottom: 12cqh; width: 39cqw; padding: 2cqh 3cqw 2.2cqh 4cqw; background: #060607; transform: rotate(-3deg);
  clip-path: polygon(5% 0, 100% 4%, 96% 100%, 0 94%); border-left: 1.4cqw solid var(--mc); display: flex; flex-direction: column; gap: .6cqh; animation: m-info .3s .22s cubic-bezier(.2,1.4,.4,1) both; }
.m-info small { font-family: var(--vt); font-size: 3.2cqw; letter-spacing: .16em; line-height: 1; color: var(--mc); }
.m-info b { font-weight: 400; font-size: 4.6cqw; line-height: 1.05; letter-spacing: .02em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.m-info span { font-family: var(--vt); font-size: 3cqw; line-height: 1.05; letter-spacing: .06em; color: #c9c9d0; }
@keyframes m-info { from { opacity: 0; translate: 20cqw 0; } }

.m-hint { position: absolute; left: 5cqw; bottom: 4.5cqh; font-family: var(--vt); font-size: 2.6cqw; letter-spacing: .1em; color: #8d8d95; white-space: nowrap; }
.m-hint b { font-weight: 400; color: #000; background: var(--mc); padding: 0 .8cqw; margin-right: .6cqw; }
.m-hint span { margin-right: 1.5cqw; }

@media (prefers-reduced-motion: reduce) {
  .m-slab, .m-list li, .m-tag, .m-info, .m-ghost, .m-shade, .m-list button.on::before, .m-list button.on::after { animation: none !important; }
  .m-star { animation: none; }
}
