/* Placar. 1rem = 10px numa TV 1920 x 1080; o JS ajusta para qualquer tela.
   Sem flex gap, grid, clamp e inset: navegador de TV antiga nao entende. */
html { font-size: calc(100vw / 192); height: 100%; }
body { position: relative; width: 100vw; height: 100vh; overflow: hidden; }
/* o cursor so some parado e em tela cheia */
body.quieto { cursor: none; }

#clima, #brasas, #cena, #espera, #final, #palco, #fogo, #escuro { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
#clima {
  background:
    radial-gradient(ellipse 90rem 60rem at 14% 108%, rgba(201, 90, 26, .38), rgba(201, 90, 26, 0) 70%),
    radial-gradient(ellipse 120rem 46rem at 78% 112%, rgba(243, 107, 33, .16), rgba(243, 107, 33, 0) 70%);
}

/* ------------------------------------------------------------- trono */
#trono { position: absolute; left: 5rem; top: 4.4rem; bottom: 4.4rem; width: 56rem; }
.marca { display: flex; align-items: center; }
.marca-chama { height: 8.4rem; width: auto; }
.marca-nome { height: 3.5rem; width: auto; margin-left: 2rem; margin-top: 1.6rem; }

#rei { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); }
#rei.vazio { visibility: hidden; }
.coroa { display: flex; align-items: flex-end; height: 13rem; }
.coroa img { height: 9.4rem; width: auto; transform-origin: 50% 100%; }
.coroa img:nth-child(1) { transform: rotate(-17deg) translateX(.5rem); }
.coroa img:nth-child(2) { height: 13rem; margin: 0 .2rem; }
.coroa img:nth-child(3) { transform: rotate(17deg) translateX(-.5rem) scaleX(-1); }
#rei-rotulo { margin: 1.6rem 0 0; font-family: var(--titulo); font-weight: 600; font-size: 4.6rem; line-height: 1.1; color: var(--areia); }
#rei-nome { margin: .4rem 0 0; font-family: var(--titulo); font-weight: 700; font-size: 13rem; line-height: .94; letter-spacing: -.02em; color: var(--branco); }
#rei-nome.quebra { word-wrap: break-word; overflow-wrap: break-word; }
#rei-total { margin: 2rem 0 0; font-weight: 700; font-size: 6.4rem; line-height: 1; letter-spacing: -.03em; color: var(--laranja); white-space: nowrap; }
#rei-itens { margin: 1.6rem 0 0; padding: 0; list-style: none; font-weight: 600; font-size: 3rem; line-height: 1.36; color: var(--branco); }
#rei-itens b { color: var(--laranja); font-weight: 700; }
#rei-vantagem { margin: 1.6rem 0 0; font-weight: 500; font-size: 2.5rem; line-height: 1.35; color: var(--areia); max-width: 52rem; }
#pe { position: absolute; left: 0; right: 0; bottom: 1.6rem; display: flex; align-items: flex-end; }
.vao { display: none; flex: none; width: var(--mini, 20rem); height: var(--mini, 20rem); margin-right: 2.4rem; }
.pe-texto { flex: 1 1 auto; min-width: 0; }
#convite { margin: 0; padding-left: 2rem; border-left: .4rem solid var(--laranja); font-weight: 500; font-size: 2.4rem; line-height: 1.35; color: var(--areia); }
#tocando { margin: 0 0 2rem; }
#tocando span { display: block; font-weight: 500; font-size: 1.7rem; line-height: 1.3; color: var(--areia); }
#tocando b { display: block; max-height: 3.6em; overflow: hidden; margin-top: .3rem; font-weight: 600; font-size: 2.3rem; line-height: 1.2; color: var(--branco); overflow-wrap: anywhere; word-wrap: break-word; }

/* ------------------------------------------------------------- torre */
#torre { position: absolute; left: 66rem; right: 5rem; top: 4.4rem; bottom: 4.4rem; }
#faixas { position: absolute; left: 0; right: 0; top: 0; margin: 0; padding: 0; list-style: none; }
.faixa { position: absolute; left: 0; right: 0; top: 0; height: var(--h, 9rem); will-change: transform; transition: transform .5s cubic-bezier(.2, .9, .25, 1), opacity .4s; }
.faixa.fora { opacity: 0; }
.faixa.ativa { z-index: 5; }
.faixa-corpo { position: relative; height: 100%; border-radius: .8rem; background: var(--grafite); overflow: hidden; display: flex; align-items: center; }
.faixa.ativa .faixa-corpo { background: #3A1E0F; box-shadow: 0 2.4rem 6rem rgba(0, 0, 0, .85), 0 0 4rem rgba(243, 107, 33, .35); }
.faixa.ativa.lider .faixa-corpo { background: var(--laranja); }
.faixa-aro { position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: .8rem; border: .35rem solid var(--laranja); opacity: 0; pointer-events: none; }
.faixa.ativa .faixa-aro { opacity: 1; transition: opacity .2s; }

/* calor: a barra da mesa corre da esquerda pra direita, na proporcao do lider */
.calor { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; transform: translateX(-100%); transition: transform 1.1s cubic-bezier(.3, 0, .1, 1); }
.calor::before { content: ''; position: absolute; top: 0; bottom: 0; left: -4rem; right: 0; transform: skewX(-14deg); transform-origin: 100% 100%; background: linear-gradient(90deg, rgba(201, 90, 26, .04) 0%, rgba(201, 90, 26, .48) 100%); }
.calor::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: .7rem; background: linear-gradient(90deg, var(--ambar), var(--laranja)); }
.faixa.lider .faixa-corpo { background: var(--laranja); color: var(--preto); }
.faixa.lider .calor { opacity: 0 !important; }
.faixa.lider .faixa-aro { border-color: var(--branco); }

.riscos { position: absolute; top: 0; bottom: 0; left: 0; right: 0; overflow: hidden; pointer-events: none; }
.riscos i { position: absolute; left: 0; height: .35rem; width: 34%; opacity: 0; background: linear-gradient(90deg, rgba(245, 241, 236, 0), rgba(245, 241, 236, .95)); }

.pos { position: relative; flex: none; width: calc(var(--f) * 1.4); padding-left: calc(var(--f) * .2); text-align: center; font-weight: 800; font-size: calc(var(--f) * .46); line-height: 1; color: var(--areia); }
.lider .pos { color: var(--preto); }
.texto { position: relative; flex: 0 1 auto; min-width: 0; max-width: 52%; }
.nome { display: block; font-weight: 600; font-size: calc(var(--f) * .42); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sub { display: none; }
.itens { position: relative; flex: 1 1 0; min-width: 0; display: flex; align-items: center; overflow: hidden; margin-left: calc(var(--f) * .25); }
.item { flex: none; margin-left: calc(var(--f) * .09); padding: .38em .62em; border-radius: .45em; background: rgba(245, 241, 236, .1); font-weight: 500; font-size: calc(var(--f) * .245); line-height: 1.1; color: var(--areia); white-space: nowrap; }
.item:first-child { margin-left: auto; }
.item b { font-weight: 700; color: var(--branco); }
.item.resto { background: none; padding-left: .2em; padding-right: 0; }
.item.novo { animation: item-novo 1.6s ease-out; }
@keyframes item-novo { from { background: var(--laranja); color: var(--preto); } to { background: rgba(245, 241, 236, .1); } }
/* enquanto a etiqueta do pedido esta na frente, a lista espera */
.faixa.ativa .itens, .faixa.ativa .total { opacity: 0; }
.itens, .total { transition: opacity .35s; }
.lider .item { background: rgba(11, 11, 11, .16); color: var(--preto); }
.lider .item b { color: var(--preto); }
.lider .item.resto { background: none; }
.total { position: relative; flex: none; width: calc(var(--f) * 1.75); padding-right: calc(var(--f) * .24); text-align: right; line-height: 1; white-space: nowrap; }
.total b { display: block; font-weight: 800; font-size: calc(var(--f) * .46); line-height: 1; }
.total small { display: block; margin-top: .12em; font-weight: 500; font-size: calc(var(--f) * .18); line-height: 1.1; color: var(--areia); }
.lider .total small { color: var(--preto); font-weight: 600; }
.subiu { position: absolute; left: calc(var(--f) * .12); top: 50%; margin-top: calc(var(--f) * -.15); font-size: calc(var(--f) * .23); line-height: 1.3; font-weight: 700; color: var(--laranja); opacity: 0; transition: opacity .4s; }
.lider .subiu { color: var(--preto); }
.subiu.on { opacity: 1; }
.mais { position: absolute; right: 2.2rem; top: 50%; padding: .35em .6em .3em; border-radius: .5rem; background: var(--branco); color: var(--preto); font-weight: 800; font-size: calc(var(--f) * .42); line-height: 1; white-space: nowrap; opacity: 0; transform: translateY(-50%); pointer-events: none; z-index: 2; }
.mais.tira { background: var(--grafite-2); color: var(--areia); }

.faixa.chamas-2 .faixa-corpo { box-shadow: 0 0 0 .3rem rgba(243, 107, 33, .8); }
.faixa.chamas-3 .faixa-corpo, .faixa.chamas-4 .faixa-corpo { box-shadow: 0 0 0 .35rem var(--laranja), 0 0 4.5rem rgba(243, 107, 33, .55); }
.faixa.chamas-4 .faixa-aro { opacity: 1; animation: respira 1.4s ease-in-out infinite alternate; }
@keyframes respira { from { opacity: .25; } to { opacity: 1; } }

#resto { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; height: 4rem; font-weight: 500; font-size: 2.3rem; line-height: 4rem; color: var(--areia); white-space: pre; overflow: hidden; text-overflow: ellipsis; transition: opacity .5s; }
#vazio { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); }
#vazio p:first-child { margin: 0; font-family: var(--titulo); font-weight: 700; font-size: 13rem; line-height: .95; letter-spacing: -.02em; }
#vazio p:last-child { margin: 3rem 0 0; max-width: 80rem; font-weight: 500; font-size: 3.6rem; line-height: 1.4; color: var(--areia); }

/* ---------------------------------------------------- telas cheias */
#espera, #final { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.espera-logo { display: flex; flex-direction: column; align-items: center; animation: pulsa 5s ease-in-out infinite alternate; }
.espera-chama { height: 40rem; width: auto; }
.espera-nome { height: 10rem; width: auto; margin-top: 4rem; }
.espera-frase { margin: 6rem 0 0; font-family: var(--titulo); font-weight: 600; font-size: 6rem; line-height: 1; color: var(--areia); }
@keyframes pulsa { from { opacity: .82; transform: scale(1); } to { opacity: 1; transform: scale(1.025); } }
#final .coroa { height: 15rem; }
#final .coroa img { height: 11rem; }
#final .coroa img:nth-child(2) { height: 15rem; }
.final-rotulo { margin: 2rem 0 0; font-family: var(--titulo); font-weight: 600; font-size: 6rem; line-height: 1.1; color: var(--areia); }
#final-nome { margin: 0; max-width: 170rem; font-family: var(--titulo); font-weight: 700; font-size: 26rem; line-height: 1; letter-spacing: -.02em; white-space: nowrap; }
#final-total { margin: 2rem 0 0; font-weight: 700; font-size: 10rem; line-height: 1; letter-spacing: -.03em; color: var(--laranja); }
#final-itens { margin: 2rem 0 0; max-width: 150rem; font-weight: 600; font-size: 3.6rem; line-height: 1.35; }
#final-podio { display: flex; flex-wrap: wrap; justify-content: center; margin: 5rem 0 0; padding: 0; list-style: none; font-weight: 500; font-size: 3.2rem; color: var(--areia); }
#final-podio li { margin: 0 2.6rem; white-space: nowrap; }

/* ------------------------------------------------------------- palco */
#palco { pointer-events: none; overflow: hidden; z-index: 20; visibility: hidden; }
#palco.on { visibility: visible; }
#escuro { background: var(--preto); opacity: 0; }
#numeros { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.cartaz::before { content: ''; position: absolute; left: -10%; right: -10%; top: 50%; height: 96rem; margin-top: -48rem; background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(11, 11, 11, .82), rgba(11, 11, 11, .5) 55%, rgba(11, 11, 11, 0) 100%); }
.cartaz > div { position: relative; }
.cartaz { position: absolute; left: 0; right: 0; top: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.cartaz-frase { font-family: var(--titulo); font-weight: 600; font-size: 7rem; line-height: 1.1; color: var(--areia); }
.cartaz-nome { font-family: var(--titulo); font-weight: 700; font-size: 26rem; line-height: 1.02; letter-spacing: -.02em; color: var(--branco); white-space: nowrap; text-shadow: 0 .6rem 4rem rgba(11, 11, 11, .75); }
.cartaz-nome span { display: inline-block; white-space: pre; }
.cartaz-valor { margin-top: 1.6rem; font-weight: 800; font-size: 15rem; line-height: 1; letter-spacing: -.04em; color: var(--laranja); white-space: nowrap; text-shadow: 0 .6rem 3rem rgba(11, 11, 11, .8); }
.cartaz-valor span { display: inline-block; white-space: pre; }
.cartaz.n4 .cartaz-valor { color: var(--branco); }
.cartaz.n4 .cartaz-nome { font-size: 30rem; }

.tarja { position: absolute; left: -6%; width: 112%; top: 50%; height: 40rem; margin-top: -20rem; background: var(--laranja); color: var(--preto); overflow: hidden; display: flex; align-items: center; justify-content: center; transform: translateX(-110%); }
.tarja-dentro { width: 89.3%; display: flex; align-items: center; padding: 0 5rem; }
.tarja-chama { flex: none; height: 28rem; width: auto; margin-right: 5rem; }
.tarja-texto { flex: 1 1 auto; min-width: 0; text-align: left; }
.tarja-frase { font-family: var(--titulo); font-weight: 700; font-size: 5.4rem; line-height: 1.1; }
.tarja-nome { font-family: var(--titulo); font-weight: 700; font-size: 17rem; line-height: 1; letter-spacing: -.02em; white-space: nowrap; }
.tarja-valor { flex: none; margin-left: 5rem; font-weight: 800; font-size: 11rem; line-height: 1; letter-spacing: -.04em; white-space: nowrap; }
.tarja-rastro { position: absolute; left: -6%; width: 112%; top: 50%; height: 40rem; margin-top: -20rem; background: var(--ambar); transform: translateX(-110%); }
.tarja i { position: absolute; left: 0; height: .5rem; width: 40%; opacity: 0; background: linear-gradient(90deg, rgba(245, 241, 236, 0), rgba(245, 241, 236, .85)); }

.largada { position: absolute; left: 0; right: 0; top: 50%; margin-top: -9rem; display: flex; justify-content: center; }
.largada b { width: 18rem; height: 18rem; margin: 0 1.8rem; border-radius: 50%; background: #191310; border: .5rem solid #3a2a21; }
.largada b.on { background: var(--laranja); border-color: var(--laranja); box-shadow: 0 0 9rem rgba(243, 107, 33, .85); }
.desenho { position: absolute; left: 50%; top: 50%; width: 44.3rem; height: 90rem; margin: -45rem 0 0 -22.15rem; }
.clarao { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(ellipse 70% 70% at 50% 50%, #F5F1EC 0%, #F3A26B 38%, #F36B21 100%); opacity: 0; }

/* musica: miniatura no menor tamanho que o YouTube aceita (200 x 200), a vista e na frente de tudo, por regra deles */
#musica { position: absolute; z-index: 35; left: 5rem; bottom: 6rem; width: var(--mini, 20rem); height: var(--mini, 20rem); background: var(--preto); box-shadow: 0 0 0 .2rem rgba(243, 107, 33, .55); }
#musica-tela { width: 100%; height: 100%; }
#musica iframe { display: block; width: 100%; height: 100%; border: 0; }
body.com-musica .vao { display: block; }
body.com-musica #convite { font-size: 2rem; padding-left: 1.4rem; }
body.com-musica #convite br { display: none; }
body.com-musica #rei { top: 13rem; bottom: var(--mini, 20rem); padding-bottom: 5rem; transform: none; display: flex; flex-direction: column; justify-content: center; }
body.com-musica #rei .coroa { height: 9rem; }
body.com-musica #rei .coroa img { height: 6.5rem; }
body.com-musica #rei .coroa img:nth-child(2) { height: 9rem; }
body.com-musica #rei-rotulo { margin-top: 1rem; font-size: 4rem; }
body.com-musica #rei-nome { font-size: 10.4rem; }
body.com-musica #rei-total { margin-top: 1rem; font-size: 5rem; }
body.com-musica #rei-itens { margin-top: 1rem; font-size: 2.6rem; }
body.com-musica #rei-vantagem { margin-top: .8rem; font-size: 2.2rem; }
body.com-musica.baixa #rei .coroa { display: none; }
body.com-musica.baixa #rei-nome { font-size: 8.6rem; }
body.com-musica #selo { left: 33rem; top: 7.2rem; }
body.com-musica #final-podio { max-width: 112rem; }
body.em-pe #musica { display: none; }
#lei { position: absolute; z-index: 6; left: 5rem; bottom: 1.5rem; margin: 0; font-weight: 400; font-size: 1.8rem; line-height: 1.3; color: var(--apagado); }
body.em-pe #lei { left: 2rem; right: 2rem; bottom: .4rem; font-size: 1.15rem; text-align: center; }

#selo, #sinal, #dica { position: absolute; z-index: 30; margin: 0; padding: .5rem 1.4rem; border-radius: 2rem; font-weight: 600; font-size: 1.9rem; line-height: 1.4; }
#selo { left: 5rem; top: 15rem; background: var(--areia); color: var(--preto); }
#dica { left: 66rem; right: 5rem; bottom: 4.4rem; padding: 2rem 3rem; border-radius: .8rem; background: var(--laranja); color: var(--preto); font-size: 3.4rem; line-height: 1.25; text-align: center; animation: chama 1.1s ease-in-out infinite alternate; }
@keyframes chama { from { opacity: 1; } to { opacity: .72; } }
#sinal { right: 40rem; bottom: .6rem; background: var(--grafite); color: var(--areia); }

/* -------------------------------------------------------- celular em pe */
body.em-pe #trono { left: 2rem; right: 2rem; top: 2rem; bottom: auto; width: auto; height: 33rem; }
body.em-pe .marca-chama { height: 5rem; }
body.em-pe .marca-nome { height: 2.1rem; margin-left: 1.2rem; margin-top: 1rem; }
body.em-pe #rei { top: 8rem; transform: none; }
body.em-pe #rei .coroa { position: absolute; right: 0; top: -6.6rem; height: 5rem; }
body.em-pe #rei .coroa img { height: 3.6rem; }
body.em-pe #rei .coroa img:nth-child(2) { height: 5rem; }
body.em-pe #final .coroa { height: 9rem; }
body.em-pe #final .coroa img { height: 6.6rem; }
body.em-pe #final .coroa img:nth-child(2) { height: 9rem; }
body.em-pe #rei-rotulo { margin: 0; font-size: 3rem; }
body.em-pe #rei-nome { margin-top: 0; font-size: 7.4rem; line-height: 1; }
body.em-pe #rei-total { margin-top: .6rem; font-size: 3.4rem; }
body.em-pe #rei-itens { margin-top: .4rem; font-size: 1.7rem; }
body.em-pe #rei-vantagem { margin-top: .6rem; font-size: 1.7rem; }
body.em-pe #pe { display: none; }
body.em-pe #torre { left: 2rem; right: 2rem; top: 36rem; bottom: 2rem; }
body.em-pe .itens { display: none; }
body.em-pe .texto { flex: 1 1 auto; max-width: none; }
body.em-pe .sub { display: block; margin-top: .1em; font-weight: 500; font-size: calc(var(--f) * .2); line-height: 1.25; color: var(--areia); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.em-pe .lider .sub { color: var(--preto); }
body.em-pe .pos { width: calc(var(--f) * .95); }
body.em-pe .nome { font-size: calc(var(--f) * .34); }
body.em-pe .total { width: calc(var(--f) * 1.5); }
body.em-pe .total b { font-size: calc(var(--f) * .38); }
body.em-pe .total small { font-size: calc(var(--f) * .17); }
body.em-pe .subiu { display: none; }
body.em-pe .mais { font-size: calc(var(--f) * .34); right: 1rem; }
body.em-pe #resto { font-size: 1.6rem; height: 2.6rem; line-height: 2.6rem; }
body.em-pe #vazio p:first-child { font-size: 7rem; }
body.em-pe #vazio p:last-child { font-size: 2rem; margin-top: 1.4rem; }
body.em-pe .espera-chama { height: 24rem; }
body.em-pe .espera-nome { height: 6rem; }
body.em-pe .espera-frase { font-size: 4rem; }
body.em-pe .final-rotulo { font-size: 3.6rem; }
body.em-pe #final-nome { max-width: 39rem; font-size: 10rem; white-space: normal; }
body.em-pe #final-total { font-size: 5.4rem; }
body.em-pe #final-itens { max-width: 38rem; font-size: 1.9rem; margin-top: 1rem; }
body.em-pe #final-podio { flex-direction: column; font-size: 1.9rem; }
body.em-pe #final-podio li { margin: .4rem 0; }
body.em-pe .cartaz-frase { font-size: 3.4rem; }
body.em-pe .cartaz-nome, body.em-pe .cartaz.n4 .cartaz-nome { font-size: 10rem; }
body.em-pe .cartaz-valor { font-size: 8rem; }
body.em-pe .tarja, body.em-pe .tarja-rastro { height: 26rem; margin-top: -13rem; }
body.em-pe .tarja-dentro { flex-direction: column; align-items: flex-start; padding: 0 2rem; }
body.em-pe .tarja-chama { display: none; }
body.em-pe .tarja-frase { font-size: 3rem; }
body.em-pe .tarja-nome { font-size: 8rem; }
body.em-pe .tarja-valor { font-size: 6.6rem; margin: .6rem 0 0; }
body.em-pe .largada b { width: 6rem; height: 6rem; margin: 0 .7rem; }
body.em-pe .desenho { width: 19.7rem; height: 40rem; margin: -20rem 0 0 -9.85rem; }
body.em-pe #selo { font-size: 1.1rem; left: 50%; top: .5rem; transform: translateX(-50%); }
body.em-pe #sinal { font-size: 1.3rem; right: 2rem; }

/* ------------------------------------------------------ controles da demo */
#demo { position: absolute; z-index: 40; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; justify-content: center; padding: 8px; background: rgba(11, 11, 11, .86); }
#demo button { margin: 4px; padding: 9px 14px; border: 1px solid #4a3a30; border-radius: 8px; background: #1C1C1C; color: #F5F1EC; font: 600 14px/1.2 var(--texto); cursor: pointer; }
#demo button:hover, #demo button:focus-visible { border-color: #F36B21; outline: none; }
#demo button.on { background: #F36B21; border-color: #F36B21; color: #0B0B0B; }
#demo.some { opacity: 0; transition: opacity .6s; }
#demo:hover, #demo:focus-within { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .espera-logo, .faixa.chamas-4 .faixa-aro { animation: none; }
}
