/* Telos Squad · etapas da compra: a tocha passa a chama de etapa em etapa até a coroa de louros (o τέλος).
   Usado no checkout (etapa 2) e no obrigado (coroa conquistada). O desenho é feito por assets/tocha.js. */
.tocha { position: relative; margin: 6px 0 30px; max-width: 560px; }
.tocha__svg { display: block; width: 100%; height: auto; overflow: visible; }
.tocha__steps { list-style: none; position: relative; height: 58px; margin-top: 4px; padding: 0; }
.tocha__steps li { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; white-space: nowrap; font-family: "Cinzel", Georgia, serif; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #6b86a3; }
.tocha__steps li .gr { font-family: "GFS Didot", Georgia, serif; font-style: italic; font-weight: 400; font-size: 0.82rem; letter-spacing: 0; text-transform: none; color: #6b86a3; }
.tocha__steps li small { font-family: inherit; font-size: 0.62rem; letter-spacing: 0.16em; color: #6b86a3; font-weight: 600; min-height: 1em; }
.tocha__steps .done, .tocha__steps .now { color: #f2efe9; }
.tocha__steps .now small { color: #3d9be6; }
.tocha__steps .meta small { color: #c9a95e; letter-spacing: 0.2em; }
.tocha.is-win .tocha__steps .meta small { color: #f3dfa8; text-shadow: 0 0 12px rgba(226, 194, 122, 0.8); }
.tocha.is-loading .tocha__steps .now { color: #6b86a3; }
.tocha.is-loading .tocha__steps .now small { opacity: 0; }
.tocha.is-reached .tocha__steps .now, .tocha.is-win .tocha__steps .meta, .tocha__steps .lit { animation: tocha-pop 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0.15s both; }
@keyframes tocha-pop { from { opacity: 0; transform: translate(-50%, 6px); } to { opacity: 1; transform: translateX(-50%); } }
@media (max-width: 480px) {
  .tocha__steps { height: 54px; }
  .tocha__steps li { font-size: 0.66rem; letter-spacing: 0.08em; }
  .tocha__steps li .gr { font-size: 0.72rem; }
  .tocha__steps li small { font-size: 0.54rem; letter-spacing: 0.1em; }
}

/* chama: cinco línguas tremulando cada uma no seu ritmo, brasas subindo e brilho irregular */
.tocha .fl { transform-box: fill-box; transform-origin: 50% 100%; }
.tocha .t0 { animation: tk0 0.42s ease-in-out infinite alternate; }
.tocha .t1 { animation: tk1 0.33s ease-in-out infinite alternate; }
.tocha .t2 { animation: tk2 0.27s ease-in-out infinite alternate; }
.tocha .t3 { animation: tk3 0.51s ease-in-out infinite alternate; }
.tocha .t4 { animation: tk4 0.46s ease-in-out infinite alternate; }
@keyframes tk0 { 0% { transform: scale(1, 1) skewX(-4deg); } 50% { transform: scale(0.94, 1.1) skewX(3deg); } 100% { transform: scale(1.03, 0.94) skewX(6deg); } }
@keyframes tk1 { 0% { transform: scale(1.05, 0.92) skewX(5deg); } 100% { transform: scale(0.92, 1.12) skewX(-6deg); } }
@keyframes tk2 { 0% { transform: scale(1, 1.08) translateX(-1px); } 100% { transform: scale(0.9, 0.9) translateX(1px); } }
@keyframes tk3 { 0% { transform: rotate(-14deg) scale(0.9); } 100% { transform: rotate(-26deg) scale(1.15, 1.25); } }
@keyframes tk4 { 0% { transform: rotate(14deg) scale(1.1); } 100% { transform: rotate(26deg) scale(0.85, 1.2); } }
.tocha .halo { transform-box: fill-box; transform-origin: 50% 60%; animation: th1 1.3s steps(1) infinite, th2 0.35s ease-in-out infinite alternate; }
@keyframes th1 { 0% { opacity: 0.5; } 23% { opacity: 0.38; } 41% { opacity: 0.6; } 67% { opacity: 0.44; } 84% { opacity: 0.56; } }
@keyframes th2 { to { transform: scale(1.08); } }
.tocha .em { animation: tsobe var(--d) linear infinite; animation-delay: var(--w); }
@keyframes tsobe { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate(var(--x), -46px); opacity: 0; } }

/* chegada na etapa: chama nasce com um pulo, clarão, onda de luz e brasas para os lados */
.tocha .grow { transform-box: fill-box; transform-origin: 50% 100%; animation: tcresce 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes tcresce { 0% { transform: scale(0.1, 0); opacity: 0; } 30% { opacity: 1; } 100% { transform: none; } }
.tocha .flash { transform-box: fill-box; transform-origin: center; animation: tflash 0.55s ease-out both; }
@keyframes tflash { 0% { transform: scale(0.2); opacity: 1; } 100% { transform: scale(2.4); opacity: 0; } }
.tocha .ring { transform-box: fill-box; transform-origin: center; animation: tring 0.9s cubic-bezier(0.23, 1, 0.32, 1) both; }
@keyframes tring { 0% { transform: scale(0.2); opacity: 0.9; } 100% { transform: scale(3.4); opacity: 0; } }
.tocha .burst { animation: tburst 0.8s cubic-bezier(0.23, 1, 0.32, 1) both; }
@keyframes tburst { 0% { transform: translate(0, 0); opacity: 1; } 100% { transform: translate(var(--x), var(--y)); opacity: 0; } }
.tocha .base-on { transform-box: fill-box; transform-origin: center; animation: tbase 0.6s ease-out; }
@keyframes tbase { 0% { transform: scale(2.4, 1.6); } 100% { transform: none; } }

/* coroa de louros: a meta. Respira, pisca, e as folhas ficam douradas conforme as etapas */
.tocha .lf { fill: #0e2440; stroke: #2a5280; stroke-width: 0.8; transform-box: fill-box; transform-origin: 50% 100%; }
.tocha .lf.gold { fill: #e2c27a; stroke: #9c7a35; }
.tocha .lf.just { animation: tfolha 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; animation-delay: var(--dl); }
@keyframes tfolha { 0% { transform: scale(0.4); fill: #0e2440; stroke: #2a5280; } 100% { transform: none; } }
.tocha .aura { transform-box: fill-box; transform-origin: center; animation: tresp 2.6s ease-in-out infinite; }
.tocha.is-win .aura { animation-duration: 1.4s; }
@keyframes tresp { 0%, 100% { opacity: 0.25; transform: scale(0.92); } 50% { opacity: 0.55; transform: scale(1.06); } }
.tocha .tw { transform-box: fill-box; transform-origin: center; animation: tpisca var(--d) ease-in-out infinite; animation-delay: var(--w); }
@keyframes tpisca { 0%, 100% { opacity: 0; transform: scale(0.3) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }
.tocha .crown { transform-box: fill-box; transform-origin: center; }
.tocha.is-win .crown { animation: tbate 0.7s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes tbate { 0% { transform: scale(0.85); } 100% { transform: none; } }
.tocha .shine { animation: tshine 1.1s ease-in-out 0.9s both; }
@keyframes tshine { from { transform: translateX(-60px) rotate(20deg); } to { transform: translateX(60px) rotate(20deg); } }

@media (prefers-reduced-motion: reduce) {
  .tocha .fl, .tocha .halo, .tocha .em, .tocha .aura, .tocha .tw, .tocha .lf.just, .tocha .crown { animation: none; }
  .tocha .em, .tocha .tw, .tocha .shine { display: none; }
}
