/* PASSO A PASSO NARRADO (2.1). Dono: frente Passo a passo.
   Por cima do app de verdade: véu com furo (holofote), anel dourado, cartão de vidro com karaokê, medalha na abertura e no fim.
   Atenção: nada aqui pode ter opacity/filter na raiz .tour (isso quebraria o desfoque de vidro dos filhos). */

.tour { position: fixed; inset: 0; z-index: 100; touch-action: none; -webkit-user-select: none; user-select: none; overscroll-behavior: contain; outline: none; }
.tour :focus { outline: none; }
.tour :focus-visible { outline: 2px solid rgba(244, 212, 146, .85); outline-offset: 3px; }

/* ---------- holofote: o furo leva o véu na própria sombra ---------- */
.tour .tr-furo {
  position: fixed; left: 0; top: 0; width: 0; height: 0; border-radius: 24px; pointer-events: none;
  box-shadow: 0 0 0 200vmax rgba(3, 2, 6, .74); opacity: 0; transition: opacity .55s ease; will-change: transform;
}
.tour .tr-furo.on { opacity: 1; }
.tour .tr-anel {
  position: absolute; inset: -2px; border-radius: inherit; border: 1.5px solid rgba(244, 212, 146, .95);
  box-shadow: 0 0 0 1px rgba(255, 236, 190, .10), 0 0 28px -2px rgba(226, 183, 98, .6), inset 0 0 24px -8px rgba(240, 200, 120, .45);
}
.tour .tr-anel::after {   /* sonar: uma onda de luz que sai do anel, devagar */
  content: ''; position: absolute; inset: -2px; border-radius: inherit; border: 1px solid rgba(244, 212, 146, .75);
  animation: trSonar 2.4s cubic-bezier(.2, .7, .3, 1) infinite;
}
@keyframes trSonar { 0% { opacity: .85; transform: scale(1); } 100% { opacity: 0; transform: scale(var(--sx, 1.05), var(--sy, 1.12)); } }

/* ---------- névoa: o app fica desfocado atrás da medalha (abertura e fim) ---------- */
.tour .tr-nevoa {
  position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity .7s ease;
  background:
    linear-gradient(180deg, rgba(4, 3, 7, 0) 38%, rgba(4, 3, 7, .62) 66%, rgba(4, 3, 7, .9) 100%),
    radial-gradient(90% 60% at 50% 34%, rgba(46, 33, 12, .38), rgba(7, 6, 10, .6) 55%, rgba(4, 3, 7, .88) 100%);
  backdrop-filter: blur(22px) saturate(125%); -webkit-backdrop-filter: blur(22px) saturate(125%);
}
.tour .tr-nevoa.on { opacity: 1; }

/* ---------- herói: medalha do guardião, com aura, raios e a estrela que cintila ---------- */
.tour .tr-heroi {
  position: fixed; left: 0; right: 0; top: calc(var(--st) + 54px); bottom: var(--tr-cartao, 210px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 24px;
  pointer-events: none; transition: opacity .55s ease, transform .75s var(--mola), bottom .6s var(--mola);
}
.tour[data-modo="espera"] .tr-heroi { bottom: calc(var(--sb) + 196px); }
.tour .tr-heroi.fora { opacity: 0; transform: translateY(-18px) scale(.9); }
.tour .tr-medalha { position: relative; width: min(58vw, 31vh, 236px); aspect-ratio: 1; flex: none; transition: width .7s var(--mola); }
.tour .tr-heroi.final .tr-medalha { width: min(44vw, 24vh, 180px); }
.tour .tr-medalha > * { position: absolute; }
.tour .tr-logo, .tour .tr-luz { inset: 0; width: 100%; height: 100%; }
.tour .tr-logo { filter: drop-shadow(0 22px 44px rgba(0, 0, 0, .75)) drop-shadow(0 0 34px rgba(226, 183, 98, .28)); }
.tour .tr-luz {   /* as linhas de ouro respiram por cima da medalha (a máscara tira a borda quadrada da imagem) */
  mix-blend-mode: screen; opacity: .35; animation: trLuz 5.2s ease-in-out infinite;
  -webkit-mask-image: radial-gradient(circle, #000 52%, transparent 71%); mask-image: radial-gradient(circle, #000 52%, transparent 71%);
}
@keyframes trLuz { 0%, 100% { opacity: .22; } 50% { opacity: .62; } }
.tour .tr-aura { inset: -34%; border-radius: 50%; background: radial-gradient(circle, rgba(236, 196, 112, .34) 0%, rgba(226, 183, 98, .10) 38%, transparent 66%); animation: trRespira 5.2s ease-in-out infinite; }
@keyframes trRespira { 0%, 100% { transform: scale(.94); opacity: .8; } 50% { transform: scale(1.06); opacity: 1; } }
.tour .tr-raios {
  inset: -58%; border-radius: 50%; opacity: .55;
  background: repeating-conic-gradient(from 0deg, rgba(255, 226, 160, .13) 0deg 3deg, transparent 3deg 15deg);
  -webkit-mask-image: radial-gradient(circle, #000 18%, rgba(0, 0, 0, .5) 38%, transparent 64%); mask-image: radial-gradient(circle, #000 18%, rgba(0, 0, 0, .5) 38%, transparent 64%);
  animation: trGira 90s linear infinite;
}
@keyframes trGira { to { transform: rotate(360deg); } }
.tour .tr-estrela { left: 51.1%; top: 15.4%; width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%); filter: drop-shadow(0 0 10px rgba(255, 236, 190, .9)); }
/* quando a voz começa: uma onda de luz sai da medalha e a aura acende por um instante */
.tour .tr-medalha::after { content: ''; position: absolute; inset: 4%; border-radius: 50%; border: 2px solid rgba(255, 226, 160, .9); opacity: 0; pointer-events: none; }
.tour .tr-medalha.acende::after { animation: trOnda 1.4s cubic-bezier(.2, .7, .3, 1) both; }
.tour .tr-medalha.acende .tr-aura { animation: trAcende 1.6s ease-out both, trRespira 5.2s ease-in-out 1.6s infinite; }
@keyframes trOnda { 0% { opacity: .95; transform: scale(.96); box-shadow: 0 0 30px rgba(255, 220, 150, .8); } 100% { opacity: 0; transform: scale(1.9); box-shadow: 0 0 60px rgba(255, 220, 150, 0); } }
@keyframes trAcende { 0% { transform: scale(1); opacity: 1; filter: brightness(1); } 25% { transform: scale(1.18); filter: brightness(1.9); } 100% { transform: scale(1); filter: brightness(1); } }
.tour .tr-estrela svg { width: 100%; height: 100%; }

.tour .tr-titulo-heroi { font: 500 clamp(31px, 9.4vw, 40px)/1.08 var(--serif); letter-spacing: -.02em; margin: 26px 0 0; text-wrap: balance; text-shadow: 0 2px 24px rgba(0, 0, 0, .6); }
.tour .tr-heroi.final .tr-titulo-heroi { margin-top: 20px; font-size: clamp(34px, 10vw, 44px); }
.tour .tr-sub { margin: 12px auto 0; max-width: 300px; color: var(--txt-2); font-size: 16px; line-height: 1.5; text-wrap: balance; }
.tour .tr-sub:empty { display: none; }
.tour .tr-sub.ref { font: 600 11.5px/1 var(--cinzel); letter-spacing: .24em; text-transform: uppercase; color: var(--ouro); margin-top: 14px; }

/* chegada da abertura: a medalha sobe com mola, o título e os botões vêm depois */
.tour.chega .tr-medalha { animation: trChega 1.1s var(--mola-salto) both; }
.tour.chega .tr-titulo-heroi { animation: trSobe .8s var(--mola) .28s both; }
.tour.chega .tr-sub { animation: trSobe .8s var(--mola) .42s both; }
.tour.chega .tr-entrada > * { animation: trSobe .8s var(--mola) both; }
.tour.chega .tr-entrada > :nth-child(1) { animation-delay: .55s; }
.tour.chega .tr-entrada > :nth-child(2) { animation-delay: .65s; }
.tour.chega .tr-entrada > :nth-child(3) { animation-delay: .75s; }
@keyframes trChega { from { opacity: 0; transform: scale(.72) translateY(16px); filter: blur(8px); } }
@keyframes trSobe { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } }

/* ---------- botões da abertura ---------- */
.tour .tr-entrada {
  position: fixed; left: 16px; right: 16px; bottom: calc(var(--sb) + 16px); max-width: 488px; margin: 0 auto;
  display: grid; gap: 4px; transition: opacity .35s ease, transform .55s var(--mola);
}
.tour .tr-entrada .bt.ouro { min-height: 58px; font-size: 17.5px; }
.tour .tr-entrada .bt.texto { color: var(--txt-2); font-weight: 500; }
.tour .tr-entrada.fora { opacity: 0; transform: translateY(26px); pointer-events: none; }
.tour .tr-dica { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 2px 0 0; font-size: 13.5px; color: var(--txt-3); }
.tour .tr-dica svg { width: 16px; height: 16px; }

/* ---------- cartão de vidro com a fala ---------- */
.tour .tr-cartao {
  position: fixed; left: 16px; right: 16px; top: 0; max-width: 488px; margin: 0 auto; padding: 16px 16px 12px; border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .025) 60%), rgba(14, 12, 20, .66);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), inset 0 -1px 0 rgba(0, 0, 0, .3), 0 28px 64px -20px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .2);
  backdrop-filter: blur(24px) saturate(170%); -webkit-backdrop-filter: blur(24px) saturate(170%);
  transform: translate3d(0, 110vh, 0); transition: transform .66s var(--mola), opacity .35s ease;
}
.tour .tr-cartao::before { content: ''; position: absolute; top: -1px; left: 16%; right: 16%; height: 1px; background: linear-gradient(90deg, transparent, rgba(240, 205, 130, .75), transparent); }
.tour .tr-cartao.fora { opacity: 0; pointer-events: none; }
.tour .tr-miolo.troca { animation: trTexto .5s var(--mola) both; }
@keyframes trTexto { from { opacity: 0; transform: translateY(8px); filter: blur(3px); } }
.tour .tr-olho { gap: 7px; font-size: 11px; letter-spacing: .22em; }
.tour .tr-olho svg { width: 13px; height: 13px; }
.tour .tr-titulo { font: 500 23px/1.15 var(--serif); letter-spacing: -.012em; margin: 7px 0 0; color: var(--txt); text-wrap: balance; }
.tour .tr-fala { margin: 8px 0 0; font: 500 16.5px/1.52 var(--sans); letter-spacing: -.008em; text-wrap: pretty; }
.tour .tr-titulo[hidden] + .tr-fala { margin-top: 10px; }
.tour .tr-sem-voz { display: none; align-items: center; gap: 7px; margin: 8px 0 0; font-size: 13px; line-height: 1.35; color: var(--txt-3); }
.tour .tr-sem-voz svg { width: 15px; height: 15px; flex: none; color: var(--ouro); }
.tour.sem-voz .tr-sem-voz { display: flex; }

/* karaokê: cada palavra acende no tempo da voz */
.tour .tr-p { color: rgba(245, 239, 228, .40); transition: color .22s ease, text-shadow .35s ease; }
.tour .tr-p.dita { color: #ecd49c; }
.tour .tr-p.agora { color: #fff5d8; text-shadow: 0 0 16px rgba(244, 200, 110, .9), 0 0 2px rgba(255, 240, 200, .7); }
.tour .tr-titulo-heroi .tr-p { color: rgba(245, 239, 228, .32); }
.tour .tr-titulo-heroi .tr-p.dita { background: var(--ouro-grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.tour .tr-titulo-heroi .tr-p.agora { color: #fff5d8; -webkit-text-fill-color: #fff5d8; text-shadow: 0 0 22px rgba(244, 200, 110, .95), 0 0 3px rgba(255, 240, 200, .8); }

/* controles: voltar, pontos, pausar (com o aro do andamento da fala), avançar */
.tour .tr-base { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.tour .tr-bt { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; position: relative; color: var(--txt-2); transition: transform .2s var(--mola), background .2s, opacity .2s, color .2s; }
.tour .tr-bt svg { width: 20px; height: 20px; }
.tour .tr-bt:active { transform: scale(.9); }
.tour .tr-bt:disabled { opacity: .28; pointer-events: none; }
.tour .tr-volta { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09); }
.tour .tr-toca { background: rgba(255, 255, 255, .07); color: var(--ouro-2); }
.tour .tr-toca .tr-aro { position: absolute; inset: 0; width: 44px; height: 44px; transform: rotate(-90deg); }
.tour .tr-toca .tr-aro circle { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 2; }
.tour .tr-toca .tr-aro .tr-aro-v { stroke: var(--ouro); stroke-linecap: round; filter: drop-shadow(0 0 3px rgba(226, 183, 98, .7)); }
.tour .tr-toca .tr-ico { position: relative; display: grid; place-items: center; }
.tour .tr-toca .tr-ico svg { width: 17px; height: 17px; }
.tour .tr-toca.pausado { background: rgba(217, 180, 106, .16); }
.tour .tr-vai {
  width: 48px; height: 48px; color: #1b1307;
  background: linear-gradient(180deg, #f5dc9c 0%, #e2bf73 45%, #c49442 100%);
  box-shadow: 0 10px 26px -10px rgba(226, 183, 98, .8), inset 0 1px 0 rgba(255, 255, 255, .55), 0 0 0 1px rgba(120, 84, 30, .35);
}
.tour .tr-vai svg { width: 22px; height: 22px; stroke-width: 2.2; }
.tour .tr-vai.chama, .tour .tr-fim.chama { animation: trChama 1.6s ease-in-out infinite; }
@keyframes trChama { 0%, 100% { box-shadow: 0 10px 26px -10px rgba(226, 183, 98, .8), 0 0 0 0 rgba(240, 205, 130, .55), inset 0 1px 0 rgba(255, 255, 255, .55); } 50% { box-shadow: 0 10px 26px -10px rgba(226, 183, 98, .8), 0 0 0 10px rgba(240, 205, 130, 0), inset 0 1px 0 rgba(255, 255, 255, .55); } }
.tour .tr-fim { flex: 1; min-height: 50px; font-size: 17px; }
.tour .tr-pontos { flex: 1; min-width: 0; display: flex; justify-content: center; align-items: center; gap: 5px; }
.tour .tr-pontos i { width: 5px; height: 5px; border-radius: 9px; background: rgba(255, 255, 255, .2); flex: none; transition: width .4s var(--mola), background .3s, box-shadow .3s; }
.tour .tr-pontos i.feito { background: rgba(217, 180, 106, .5); }
.tour .tr-pontos i.on { width: 16px; background: var(--ouro); box-shadow: 0 0 8px rgba(217, 180, 106, .65); }

/* ---------- topo: selo de exemplo, som e pular ---------- */
.tour .tr-topo {
  position: fixed; left: 0; right: 0; top: 0; z-index: 3; max-width: 520px; margin: 0 auto; padding: calc(var(--st) + 10px) 16px 0;
  display: flex; align-items: center; gap: 8px; pointer-events: none;
}
.tour .tr-topo > * { pointer-events: auto; }
.tour .tr-vazio { flex: 1; pointer-events: none; }
.tour .tr-exemplo {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px 0 10px; border-radius: 99px;
  font: 600 10.5px/1 var(--cinzel); letter-spacing: .22em; text-transform: uppercase; color: var(--ouro-2);
  background: rgba(24, 18, 9, .55); border: 1px solid rgba(217, 180, 106, .38); box-shadow: inset 0 1px 0 rgba(255, 230, 170, .12);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.tour .tr-exemplo i { width: 6px; height: 6px; border-radius: 50%; background: var(--ouro); box-shadow: 0 0 8px var(--ouro); animation: trPisca 2.4s ease-in-out infinite; }
@keyframes trPisca { 50% { opacity: .35; } }
.tour .tr-som, .tour .tr-pula {
  height: 40px; border-radius: 99px; display: inline-grid; place-items: center; color: var(--txt-2);
  background: rgba(16, 14, 22, .5); border: 1px solid rgba(255, 255, 255, .12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
  backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); transition: transform .2s var(--mola), color .2s, background .2s;
}
.tour .tr-som { width: 40px; }
.tour .tr-som svg { width: 19px; height: 19px; }
.tour .tr-som.desligado { color: var(--txt-4); }
.tour .tr-pula { padding: 0 16px; font-size: 15px; font-weight: 600; }
.tour .tr-som:active, .tour .tr-pula:active { transform: scale(.94); }
.tour.sem-voz .tr-som { color: var(--ouro-2); border-color: rgba(217, 180, 106, .4); }

/* ---------- o dedo que toca (aba, vidro, botão) ---------- */
.tour .tr-dedo {
  position: fixed; z-index: 4; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 250, 235, .55), rgba(255, 240, 210, .18) 70%); border: 2px solid rgba(255, 248, 230, .9);
  box-shadow: 0 0 26px rgba(255, 226, 160, .7); animation: trDedo .9s var(--mola) both;
}
@keyframes trDedo { 0% { transform: scale(1.6); opacity: 0; } 28% { transform: scale(.78); opacity: 1; } 55% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }

.tour .tr-sonda { position: fixed; bottom: 0; left: 0; width: 0; height: var(--sb); pointer-events: none; visibility: hidden; }

/* ---------- saída: cada peça some sozinha (a raiz não pode ter opacidade) ---------- */
.tour.sai { pointer-events: none; }
.tour.sai > * { opacity: 0 !important; transition: opacity .42s ease !important; }

@media (prefers-reduced-motion: reduce) {
  .tour .tr-anel::after, .tour .tr-raios, .tour .tr-aura, .tour .tr-luz { animation: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .tour .tr-cartao { background: #17151e; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .tour .tr-nevoa { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(5, 4, 8, .92); }
}
@media (max-height: 700px) {
  .tour .tr-titulo-heroi { margin-top: 16px; }
  .tour .tr-fala { font-size: 16px; line-height: 1.48; }
  .tour .tr-titulo { font-size: 21px; }
}
