/* A peça viva do Início: a esteira do estoque. Três rodas brancas (Notas → Estoque → Cozinha), cada uma com o
   anel da sua cor e o número dentro; a lona corre entre elas levando os pacotes; embaixo de cada trecho, quem
   segura. Com movimento reduzido tudo continua andando, só mais devagar (nunca some: o Luiz usa esse modo). */
.heroi { position: relative; color: var(--sobre-marca); overflow: hidden; background:
  radial-gradient(700px 320px at 85% 120%, rgb(140 42 48 / .55), transparent 70%),
  radial-gradient(520px 260px at 10% -30%, rgb(255 255 255 / .07), transparent 70%),
  linear-gradient(180deg, var(--noite) 0%, var(--painel-1) 70%, var(--painel-2) 100%); }
.heroi::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: radial-gradient(rgb(255 255 255 / .09) 1px, transparent 1.4px); background-size: 22px 22px; }
.heroi__dentro { position: relative; max-width: var(--largura); margin: 0 auto; padding: 26px 20px 76px; }
.heroi__topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; }
.heroi__dia { margin: 0 0 6px; font: 800 .72rem/1.2 var(--fonte); letter-spacing: .14em; text-transform: uppercase; color: var(--dourado); }
.heroi__manchete { margin: 0; max-width: 26ch; font: 800 1.85rem/1.18 var(--fonte); letter-spacing: -.02em; text-wrap: balance; }
.heroi__manchete em { font-style: normal; color: var(--dourado); }
.heroi__sub { margin: 8px 0 0; max-width: 60ch; color: rgb(255 255 255 / .78); font-size: var(--t-2); }
.heroi__acoes { display: grid; justify-items: end; gap: 6px; }
.heroi__sync { font-size: .78rem; color: rgb(255 255 255 / .66); text-align: right; max-width: 46ch; }
.heroi__sync--falha { color: var(--falha-clara); font-weight: 700; }
.heroi .botao-vidro { min-height: 46px; padding: 0 18px; font-size: var(--t-2); }
.heroi .botao-vidro[aria-busy="true"] .icone { animation: gira .8s linear infinite !important; }

.pista { display: grid; grid-template-columns: auto minmax(40px, 1fr) auto minmax(40px, 1fr) auto; align-items: start; margin: 30px auto 0; max-width: 980px; --roda: 116px; }
.estacao { position: relative; z-index: 2; width: 168px; display: grid; justify-items: center; text-align: center; color: inherit; text-decoration: none; border-radius: 18px; }
.roda { position: relative; width: var(--roda); height: var(--roda); border-radius: 50%; display: grid; place-content: center; justify-items: center; gap: 2px; color: var(--tinta);
  background: radial-gradient(circle at 32% 24%, var(--roda-1) 0%, var(--roda-2) 52%, var(--roda-3) 100%);
  box-shadow: 0 0 0 6px var(--cor-viva), 0 0 0 8px rgb(0 0 0 / .28), 0 16px 30px rgb(0 0 0 / .5), inset 0 -8px 12px rgb(0 0 0 / .09);
  transition: transform 220ms ease; }
.estacao:hover .roda { transform: translateY(-3px) scale(1.03); }
.roda__aro { position: absolute; inset: -17px; border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--cor-viva) 80%, transparent); animation: gira 20s linear infinite; }
.roda .icone { width: 20px; height: 20px; color: var(--cor); }
.roda b { font: 800 2.3rem/1 var(--fonte); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.estacao__nome { margin-top: 24px; font: 800 1.0625rem/1.2 var(--fonte); }
.estacao__dica { margin-top: 3px; font-size: .8rem; line-height: 1.35; color: rgb(255 255 255 / .76); }
.estacao__dica b { color: var(--sobre-marca); }

.correia { position: relative; z-index: 1; height: var(--roda); --volta: 6.5s; }
.correia__lona { position: absolute; left: -26px; right: -26px; top: calc(50% - 2px); height: 18px; border-radius: 9px; background-color: var(--lona);
  background-image: repeating-linear-gradient(90deg, rgb(255 255 255 / .24) 0 3px, transparent 3px 17px); background-size: 17px 100%;
  box-shadow: inset 0 2px 5px rgb(0 0 0 / .7), 0 1px 0 rgb(255 255 255 / .14); animation: lona .85s linear infinite; }
.correia__rolos { position: absolute; left: 0; right: 0; top: calc(50% + 19px); height: 10px;
  background: radial-gradient(circle at 5px 5px, rgb(255 255 255 / .5) 0 1.6px, rgb(255 255 255 / .18) 2px 4.4px, transparent 5px) 0 0 / 19px 10px repeat-x; opacity: .9; }
.pacote { position: absolute; top: calc(50% - 25px); left: 0; width: 26px; height: 23px; border-radius: 5px; opacity: 0;
  background: linear-gradient(180deg, var(--pacote-1) 0%, var(--pacote-2) 100%); box-shadow: 0 4px 8px rgb(0 0 0 / .45), inset 0 -3px 0 rgb(0 0 0 / .14), inset 0 1px 0 rgb(255 255 255 / .4);
  animation: anda var(--volta) linear infinite; animation-delay: calc(var(--volta) * var(--f, 0) * -1); }
.pacote::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 6px; background: rgb(255 255 255 / .55); }
.pacote--cozinha { background: linear-gradient(180deg, var(--pacote-cozinha-1) 0%, var(--pacote-cozinha-2) 100%); }
.correia__quem { position: absolute; top: calc(50% + 36px); left: 50%; transform: translateX(-50%); z-index: 3; }
.quem { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 12px; border-radius: 999px; white-space: nowrap; color: var(--sobre-marca); text-decoration: none; font: 700 .78rem/1 var(--fonte); background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .22); }
a.quem:hover { background: rgb(255 255 255 / .2); }
.quem::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cor-viva, var(--estoque-viva)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cor-viva, var(--estoque-viva)) 30%, transparent); }
.quem--espera::before { animation: pulsa 1.6s ease-in-out infinite; }
.correia--parada .correia__lona { animation-play-state: paused; opacity: .5; }
.correia--parada .correia__rolos { opacity: .4; }
.correia--corre { --volta: 2.2s; }
.correia--corre .correia__lona { animation-duration: .3s; }
.pista__quem { display: none; }

@keyframes lona { to { background-position: 17px 0; } }
@keyframes anda { 0% { left: -6px; opacity: 0; transform: translateY(0); } 7% { opacity: 1; } 30% { transform: translateY(-1.5px); } 60% { transform: translateY(0); } 93% { opacity: 1; } 100% { left: calc(100% - 20px); opacity: 0; transform: translateY(-1px); } }
@keyframes pulsa { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .55; } }
@keyframes sobe { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* movimento reduzido: mais devagar, nunca parado (vence a regra geral do tokens.css pela especificidade) */
@media (prefers-reduced-motion: reduce) {
  .heroi .correia { --volta: 11s; }
  .heroi .correia__lona { animation-duration: 1.8s !important; animation-iteration-count: infinite !important; }
  .heroi .pacote { animation-duration: var(--volta) !important; animation-iteration-count: infinite !important; }
  .heroi .roda__aro { animation-duration: 60s !important; animation-iteration-count: infinite !important; }
  .heroi .quem--espera::before { animation-duration: 3.2s !important; animation-iteration-count: infinite !important; }
  .heroi .correia--corre { --volta: 4s; }
}

@media (max-width: 820px) {
  .heroi__dentro { padding: 18px 14px 62px; }
  .heroi__manchete { font-size: 1.35rem; max-width: none; }
  .heroi__sub { font-size: var(--t-1); }
  .heroi__acoes { justify-items: stretch; flex: 1 1 100%; }
  .heroi__sync { text-align: left; max-width: none; }
  .pista { margin-top: 30px; --roda: 76px; grid-template-columns: auto minmax(24px, 1fr) auto minmax(24px, 1fr) auto; }
  .estacao { width: 84px; }
  .estacao__dica { display: none; } /* no celular quem fala é o placar do topo e as duas etiquetas embaixo da esteira */
  .roda { box-shadow: 0 0 0 5px var(--cor-viva), 0 0 0 6px rgb(0 0 0 / .28), 0 10px 20px rgb(0 0 0 / .5), inset 0 -6px 10px rgb(0 0 0 / .09); gap: 0; }
  .roda__aro { inset: -10px; }
  .roda .icone { width: 15px; height: 15px; }
  .roda b { font-size: 1.6rem; }
  .estacao__nome { margin-top: 18px; font-size: .9rem; }
  .estacao__dica { font-size: .7rem; }
  .correia__lona { height: 14px; left: -12px; right: -12px; }
  .correia__rolos { top: calc(50% + 15px); }
  .pacote { width: 19px; height: 17px; top: calc(50% - 19px); border-radius: 4px; }
  .pacote::before { left: 7px; width: 5px; }
  .correia__quem { display: none; }
  .pista__quem { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
  .pista__quem .quem { min-height: 36px; white-space: normal; text-align: left; line-height: 1.25; padding: 6px 12px; }
}
/* cada pacote começa num ponto da volta (o HTML não leva style="": a CSP proíbe e a regra da casa também) */
.pacote.f0 { --f: 0; } .pacote.f1 { --f: .25; } .pacote.f2 { --f: .5; } .pacote.f3 { --f: .75; }
