/* =====================================================================
   Movimento do site do Tevi. Quem pede "menos movimento" no aparelho vê
   tudo parado (regra no fim); sem JavaScript a página aparece inteira.
   ===================================================================== */

/* Barra de leitura e topo */
.progresso {
  position: fixed; top: 0; left: 0; z-index: 30; width: 100%; height: 3px;
  transform-origin: 0 50%; transform: scaleX(var(--rolagem, 0));
  background: linear-gradient(90deg, var(--amarelo), #FFE07A);
}
.topo { transition: box-shadow .3s, background .3s; }
.topo.rolou { box-shadow: 0 8px 28px rgba(0,0,0,.28); }

/* Abertura entrando em cascata */
.js .entra { opacity: 0; transform: translateY(26px); animation: entrar .95s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(var(--d, 0) * 120ms + 120ms); }
@keyframes entrar { to { opacity: 1; transform: none; } }
h1 .palavra { display: inline-block; }
.sublinhado { position: relative; }
.risco { position: absolute; left: -2%; bottom: -.1em; width: 104%; height: .22em; overflow: visible; }
.risco path { fill: none; stroke: var(--amarelo); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 340; stroke-dashoffset: 340; animation: riscar 1.1s 1s cubic-bezier(.6,0,.2,1) forwards; }
@keyframes riscar { to { stroke-dashoffset: 0; } }

/* Céu da noite: lua e vaga-lumes */
.abertura { position: relative; isolation: isolate; }
.ceu { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.lua {
  position: absolute; right: 5%; top: 2%; width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 38% 36%, #FFF8DF, #F4E2A2 62%, #E6CB72);
  box-shadow: 0 0 70px 26px rgba(255,232,160,.10); opacity: .8;
}
@media (min-width: 900px) { .lua { width: 62px; height: 62px; right: 3%; top: 5%; } }
.vagalumes { position: absolute; inset: 0; pointer-events: none; }
.vagalume {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: #FFE47A; box-shadow: 0 0 10px 3px rgba(255,214,80,.55); opacity: 0;
  animation: vagar var(--t) ease-in-out var(--a) infinite, brilhar var(--p) ease-in-out var(--a) infinite;
}
@keyframes vagar {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(var(--x1), var(--y1)); }
  66% { transform: translate(var(--x2), var(--y2)); }
}
@keyframes brilhar { 0%, 100% { opacity: 0; } 45%, 55% { opacity: var(--o, .9); } }
.contato { position: relative; isolation: isolate; overflow: hidden; }
.vagalumes-contato { z-index: -1; }

/* Indicador "role para baixo" (só no computador) */
.rolar { display: none; }
@media (min-width: 900px) {
  .rolar { display: block; position: absolute; left: 50%; bottom: 22px; width: 26px; height: 42px; margin-left: -13px; border: 2px solid rgba(255,255,255,.35); border-radius: 14px; }
  .rolar span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #FFFFFF; animation: rodinha 1.8s ease-in-out infinite; }
}
@keyframes rodinha { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 80%, 100% { opacity: 0; transform: translateY(14px); } }

/* Celular: flutua, inclina com o mouse, vibra quando chega o aviso */
.celular-palco { position: relative; transition: transform .5s cubic-bezier(.2,.8,.2,1); animation: flutuar 6s ease-in-out infinite; }
@keyframes flutuar { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
.tocando .celular { animation: vibrar .09s linear 6; }
@keyframes vibrar { 0% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-3px) rotate(-1deg); } 75% { transform: translateX(3px) rotate(1deg); } 100% { transform: translateX(0) rotate(0); } }

.aviso-flutuante {
  --ax: -62%;
  transform: translate(var(--ax), 0);
  transition: opacity .35s, transform .7s cubic-bezier(.34,1.56,.64,1);
}
@media (min-width: 900px) { .aviso-flutuante { --ax: -88%; } }
.js .aviso-flutuante { opacity: 0; transform: translate(var(--ax), -40px) scale(.92); }
.js .tocando .aviso-flutuante { opacity: 1; transform: translate(var(--ax), 0) scale(1); }

.onda { position: absolute; left: 50%; top: 10%; width: 140px; height: 140px; margin: -70px 0 0 -70px; border: 2px solid var(--amarelo); border-radius: 50%; opacity: 0; pointer-events: none; }
.tocando .onda { animation: onda 1.7s ease-out; }
.tocando .o2 { animation-delay: .45s; }
@keyframes onda { 0% { opacity: .85; transform: scale(.3); } 100% { opacity: 0; transform: scale(2.8); } }

/* Faixa de estado do app: calmo ↔ alerta */
.app-estado { position: relative; height: 38px; border-radius: 12px; overflow: hidden; margin-bottom: 10px; background: var(--verde-claro); transition: background .4s; font-weight: 600; }
.app-estado > span { position: absolute; inset: 0; display: flex; align-items: center; gap: 8px; padding: 0 12px; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.estado-calmo { color: var(--mata-escuro); }
.estado-alerta { color: var(--laranja); transform: translateY(110%); }
.tocando .app-estado { background: #FDEBD3; }
.tocando .estado-calmo { transform: translateY(-110%); }
.tocando .estado-alerta { transform: translateY(0); }
.ponto-verde { animation: respirar 2.4s ease-in-out infinite; }
.ponto-laranja { width: 9px; height: 9px; border-radius: 50%; background: var(--laranja); box-shadow: 0 0 0 4px rgba(194,65,12,.2); animation: respirar .8s ease-in-out infinite; }
@keyframes respirar { 50% { box-shadow: 0 0 0 7px rgba(63,163,91,0); } }

/* Câmeras "ao vivo" do celular */
.app-cam-vivo::before { animation: piscar-rec 1.2s steps(1) infinite; display: inline-block; }
@keyframes piscar-rec { 50% { opacity: .2; } }
.app-cam-hora { position: absolute; top: 7px; left: 9px; font: 600 9.5px/1 ui-monospace, Consolas, monospace; color: rgba(255,255,255,.92); text-shadow: 0 1px 2px rgba(0,0,0,.5); letter-spacing: .02em; }
.app-cam > .app-cam-nome, .app-cam > .app-cam-vivo { position: relative; z-index: 1; }
/* Imagem da câmera ocupando o quadro, com degradê embaixo para o nome ler bem */
.app-cam-midia { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 85%; }
.app-cam::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, rgba(0,0,0,.55)); pointer-events: none; }
.app-cam > .app-cam-nome, .app-cam > .app-cam-vivo, .app-cam-hora { z-index: 1; }
.app-cam-2 .app-cam-midia { object-position: 50% 60%; animation: farol 3.5s ease-in-out infinite alternate; }
@keyframes farol { from { filter: brightness(.92); } to { filter: brightness(1.08); } }
.caixa-pessoa { position: absolute; z-index: 1; left: 28%; top: 24%; width: 17%; height: 70%; border: 2px solid var(--amarelo); border-radius: 3px; opacity: 0; transform: scale(1.5); transition: opacity .25s, transform .35s cubic-bezier(.34,1.56,.64,1); }
.caixa-pessoa em { position: absolute; left: -2px; top: -15px; background: var(--amarelo); color: var(--mata-noite); font: 700 8.5px/1 Inter, sans-serif; font-style: normal; text-transform: uppercase; padding: 2.5px 4px; border-radius: 2px 2px 0 0; }
.detectou .caixa-pessoa { opacity: 1; transform: scale(1); }
/* Três quadros da câmera do barracão trocando como gravação: sai pela porta, anda, vai para a cerca.
   A caixa "pessoa" acompanha o homem em cada quadro. */
.app-cam-1 .app-cam-midia { opacity: 0; transition: opacity .35s; }
.celular-palco:not([data-quadro]) .quadro-2, [data-quadro="1"] .quadro-1, [data-quadro="2"] .quadro-2, [data-quadro="3"] .quadro-3 { opacity: 1; }
.caixa-pessoa { transition: opacity .25s, transform .35s cubic-bezier(.34,1.56,.64,1), left .35s, top .35s, width .35s, height .35s; }
[data-quadro="1"] .caixa-pessoa { left: 29%; top: 21%; width: 13%; height: 75%; }
[data-quadro="3"] .caixa-pessoa { left: 56%; top: 8%; width: 9%; height: 36%; }
[data-quadro="3"] .caixa-pessoa em { top: auto; bottom: -15px; border-radius: 0 0 2px 2px; }

/* Item novo entrando na lista "Hoje" */
.app-lista li { transition: max-height .5s, padding .5s, margin .5s, opacity .5s; }
.app-lista .novo { max-height: 0; padding-top: 0; padding-bottom: 0; margin-bottom: -6px; opacity: 0; overflow: hidden; background: #FFF4E0; }
.mostra-novo .app-lista .novo { max-height: 40px; padding-top: 8px; padding-bottom: 8px; margin-bottom: 0; opacity: 1; }

/* Aparecer ao rolar */
.js .revela { opacity: 0; transform: translateY(24px); transition: opacity .55s ease, transform .65s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--i, 0) * 70ms); }
.js .revela.visivel { opacity: 1; transform: none; }

/* Passos: número dá um pulinho ao aparecer */
.passos li.visivel .passo-numero { animation: pulinho .6s .3s cubic-bezier(.34,1.56,.64,1) both; }
@keyframes pulinho { from { transform: scale(.4); } to { transform: scale(1); } }

/* Aviso de exemplo: a imagem da câmera chega devagar e as caixas marcam o carro e a pessoa */
.aviso-foto img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 6s ease-out; }
.aviso-grande.visivel .aviso-foto img { transform: scale(1); }
.caixa-carro { left: 42%; top: 31%; width: 34%; height: 45%; }
.caixa-homem { left: 39.5%; top: 38%; width: 8.5%; height: 33%; }
.js .caixa-deteccao { opacity: 0; transform: scale(1.4); transition: opacity .3s 1.4s, transform .45s 1.4s cubic-bezier(.34,1.56,.64,1); }
.js .caixa-homem { transition-delay: 1.9s; }
.caixa-homem em { top: auto; bottom: -20px; border-radius: 0 0 3px 3px; }
.js .aviso-grande.visivel .caixa-deteccao { opacity: 1; transform: scale(1); }
[data-digita].digitando::after { content: "▍"; color: var(--laranja); animation: piscar-rec .8s steps(1) infinite; margin-left: 1px; }

/* Botões dos cantos */
.cantos { display: grid; gap: 10px; margin: 4px 0 20px; }
.canto-botao {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 16px;
  padding: 12px 16px; color: #FFFFFF; font: inherit;
  transition: background .2s, border-color .2s, translate .25s;
}
.canto-botao:hover { background: rgba(255,255,255,.1); border-color: rgba(242,184,7,.45); translate: 4px 0; }
.canto-botao:focus-visible { outline: 3px solid var(--amarelo); outline-offset: 3px; }
.tocar { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 50%; background: var(--amarelo); color: var(--mata-noite); }
.tocar svg { width: 18px; height: 18px; fill: currentColor; margin-left: 2px; }
.canto-urgente .tocar { background: #F06A2E; color: #FFFFFF; }
.canto-texto { display: grid; line-height: 1.3; }
.canto-texto b { font-weight: 600; }
.canto-texto small { color: rgba(255,255,255,.7); font-size: 14px; }
.canto { margin-left: auto; display: flex; gap: 6px; }
.canto i { width: 10px; height: 10px; border-radius: 50%; background: var(--amarelo); }
.canto-3 i { background: #F06A2E; }
.canto-botao.tocando { border-color: var(--amarelo); background: rgba(242,184,7,.12); }
.canto-botao.tocando .tocar { animation: anel 1s ease-out infinite; }
.canto-urgente.tocando .tocar { animation-name: anel-urgente; }
.canto-botao.tocando .canto i { animation: chilro .32s ease-in-out infinite alternate; }
.canto-botao.tocando .canto i:nth-child(2) { animation-delay: .1s; }
.canto-botao.tocando .canto i:nth-child(3) { animation-delay: .2s; }
@keyframes chilro { to { transform: translateY(-7px) scale(1.25); } }
@keyframes anel { from { box-shadow: 0 0 0 0 rgba(242,184,7,.6); } to { box-shadow: 0 0 0 16px rgba(242,184,7,0); } }
@keyframes anel-urgente { from { box-shadow: 0 0 0 0 rgba(240,106,46,.7); } to { box-shadow: 0 0 0 16px rgba(240,106,46,0); } }

/* Cartões: luz que segue o mouse e ícone que se mexe */
.recursos article { position: relative; overflow: hidden; transition: border-color .2s, box-shadow .25s, translate .25s; }
.recursos article::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(242,184,7,.16), transparent 65%);
}
.recursos article:hover::before { opacity: 1; }
.recursos article:hover { translate: 0 -4px; box-shadow: 0 16px 34px rgba(23,58,36,.10); }
.recursos .icone { transition: transform .35s cubic-bezier(.34,1.56,.64,1), background .25s, color .25s; }
.recursos article:hover .icone { transform: rotate(-8deg) scale(1.08); background: var(--mata); color: #FFFFFF; }

/* Lançamento: borda com brilho girando e botão com reflexo */
@property --ang { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.oferta { position: relative; }
/* Só o contorno (2 px) recebe o brilho: a máscara recorta o miolo */
.oferta::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none;
  background: conic-gradient(from var(--ang), rgba(242,184,7,0) 0 62%, rgba(242,184,7,.95) 80%, rgba(242,184,7,0) 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: girar 5s linear infinite;
}
@keyframes girar { to { --ang: 360deg; } }
.botao-brilho { position: relative; overflow: hidden; isolation: isolate; }
.botao-brilho::after {
  content: ""; position: absolute; top: 0; left: -70%; width: 45%; height: 100%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.65), transparent);
  transform: skewX(-20deg); animation: reflexo 5s ease-in-out 2.4s infinite;
}
@keyframes reflexo { 0% { left: -70%; } 28%, 100% { left: 130%; } }

/* Esteira de lugares */
.esteira { overflow: hidden; margin: 6px 0 28px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 60px, #000 calc(100% - 60px), transparent); mask-image: linear-gradient(90deg, transparent, #000 60px, #000 calc(100% - 60px), transparent); }
/* 4 cópias da lista: anda 1/4 e recomeça, sem buraco nem em tela bem larga */
.esteira .lugares { width: max-content; animation: esteira 32s linear infinite; }
.esteira:hover .lugares { animation-play-state: paused; }
@keyframes esteira { to { transform: translateX(-25%); } }

/* Perguntas abrindo macio */
details[open] .resposta { animation: abrir .4s ease-out; }
@keyframes abrir { from { opacity: 0; transform: translateY(-8px); } }

/* Passarinho do contato: pisca, olha, segue o mouse e canta ao toque */
.ave-viva { position: relative; display: block; margin: 0 auto 20px; padding: 0; background: none; border: 0; cursor: pointer; border-radius: 50%; }
.ave-viva:focus-visible { outline: 3px solid var(--amarelo); outline-offset: 6px; }
.ave-viva svg { display: block; overflow: visible; }
.ave-viva > svg { animation: pousar 4s ease-in-out infinite; }
@keyframes pousar { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
.ave-cabeca { transform-box: fill-box; transform-origin: 30% 85%; animation: olhar 8s ease-in-out infinite; }
@keyframes olhar { 0%, 38%, 100% { transform: rotate(0); } 44%, 58% { transform: rotate(-9deg); } 64%, 78% { transform: rotate(6deg); } }
.ave-olho { transform-box: fill-box; transform-origin: center; animation: pestanejar 4.6s infinite; }
@keyframes pestanejar { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
.ave-pupila { transform: translate(var(--px, 0px), var(--py, 0px)); transition: transform .2s; }
.ave-viva.cantando .ave-cabeca { animation: cantar .18s ease-in-out 8 alternate; }
@keyframes cantar { from { transform: rotate(0); } to { transform: rotate(-14deg); } }
.nota-musical { position: absolute; top: 4px; right: -6px; color: var(--amarelo); font-size: 24px; opacity: 0; pointer-events: none; }
.cantando .nm1 { animation: nota 1.4s ease-out; }
.cantando .nm2 { animation: nota 1.4s .35s ease-out; right: -22px; top: 22px; }
.cantando .nm3 { animation: nota 1.4s .7s ease-out; }
@keyframes nota { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(34px, -60px) rotate(24deg) scale(1.1); } }

/* Menos movimento: tudo aparece parado */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js .revela, .js .entra { opacity: 1; transform: none; }
  .vagalumes { display: none; }
}
