/* ==========================================================================
   itick — o filme da compra, no celular do herói da home.
   Cinco telas no mesmo palco (evento → CPF → pagamento → PIX → ingresso),
   trocadas pelo fone-demo.js com um cursor que clica e digita. A primeira
   tela é a de sempre (.itk-tela-topo / .itk-lote do theme.css); as outras
   usam o prefixo fd- e as mesmas cores e raios do site.
   ========================================================================== */

/* O palco tem altura fixa: cada tela entra por cima da anterior, e o celular
   não muda de tamanho no meio do filme. */
/* text-align: no celular o herói centraliza tudo, e isso vazava pras telas. */
.fd-tela { position: relative; text-align: left; }
.fd-palco { position: relative; height: 482px; overflow: hidden; }
.fd-cena {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateX(26px);
  transition: opacity .45s ease, transform .45s cubic-bezier(.22, .9, .32, 1), visibility 0s .45s;
}
/* A nova tela entra deslizando POR CIMA da que sai (z-index), um instante
   depois de a outra começar a sumir: nunca ficam as duas meio transparentes
   ao mesmo tempo. */
.fd-cena.ativa {
  z-index: 2;
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .35s ease .12s, transform .45s cubic-bezier(.22, .9, .32, 1) .12s, visibility 0s 0s;
}
.fd-cena.saindo {
  z-index: 1;
  opacity: 0;
  visibility: visible;
  transform: translateX(-18px);
  transition: opacity .2s ease, transform .3s ease, visibility 0s .3s;
}

/* No filme o lote começa sem marcação: o clique é que o escolhe. */
.fd-tela.rodando .itk-lote.ativo:not(.escolhido) { border-color: var(--itk-line); background: #fff; }
.fd-tela .itk-lote { transition: border-color .25s ease, background .25s ease, transform .2s ease; }
.fd-tela .itk-lote.escolhido { border-color: var(--itk-lilas-400); background: var(--itk-lilas-50); box-shadow: 0 0 0 3px var(--itk-lilas-100); }

/* ----- Barra de cima das telas internas -------------------------------- */
.fd-barra {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 34px 16px 14px;
  background: var(--itk-grad);
  color: #fff;
  line-height: 1.25;
}
.fd-volta { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: rgba(255, 255, 255, .18); flex-shrink: 0; }
.fd-volta svg { width: 15px; height: 15px; }
.fd-barra b { display: block; font-size: .92rem; font-weight: 800; }
.fd-barra small { font-size: .74rem; opacity: .85; }

.fd-corpo { padding: 18px 16px; }
.fd-centro { text-align: center; }
.fd-passo { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--itk-lilas-50); color: var(--itk-lilas-700); font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.fd-tit { margin: 10px 0 2px; color: var(--itk-ink); font-size: 1.12rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.25; }
.fd-sub { margin: 0 0 14px; font-size: .78rem; color: var(--itk-muted); line-height: 1.45; }

/* ----- CPF ------------------------------------------------------------- */
.fd-campo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  margin-bottom: 6px;
  border: 2px solid var(--itk-lilas-200);
  border-radius: 14px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: .03em;
  color: var(--itk-ink);
  font-variant-numeric: tabular-nums;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.fd-campo em { position: absolute; font-style: normal; font-size: .9rem; font-weight: 500; letter-spacing: 0; color: var(--itk-muted); }
.fd-campo.foco { border-color: var(--itk-lilas-500); box-shadow: 0 0 0 4px var(--itk-lilas-100); }
.fd-campo.foco em, .fd-campo.cheio em { display: none; }
.fd-caret { display: none; width: 2px; height: 22px; margin-left: 2px; background: var(--itk-lilas-600); animation: fd-pisca 1s steps(1) infinite; }
.fd-campo.foco .fd-caret { display: inline-block; }
@keyframes fd-pisca { 50% { opacity: 0; } }

/* ----- Forma de pagamento ---------------------------------------------- */
.fd-opcao {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--itk-line);
  border-radius: 13px;
  line-height: 1.25;
  transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.fd-opcao:first-of-type { margin-top: 14px; }
.fd-opcao > span:nth-child(2) { flex: 1; }
.fd-opcao b { display: block; font-size: .9rem; color: var(--itk-ink); }
.fd-opcao small { font-size: .72rem; color: var(--itk-muted); }
.fd-radio { width: 18px; height: 18px; border-radius: 999px; border: 2px solid var(--itk-lilas-200); flex-shrink: 0; transition: border .2s ease; }
.fd-opcao.escolhido { border-color: var(--itk-lilas-400); background: var(--itk-lilas-50); box-shadow: 0 0 0 3px var(--itk-lilas-100); }
.fd-opcao.escolhido .fd-radio { border: 5px solid var(--itk-lilas-600); }
.fd-pix-logo { padding: 3px 8px; border-radius: 7px; background: rgba(45, 212, 191, .16); color: #0d9488; font-size: .7rem; font-weight: 900; letter-spacing: .04em; }
.fd-total { display: flex; justify-content: space-between; margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--itk-line); font-size: .85rem; }
.fd-total b { color: var(--itk-ink); }

/* ----- PIX ------------------------------------------------------------- */
.fd-qr { display: grid; margin: 0 auto; background: #fff; }
.fd-qr i { display: block; background: var(--itk-ink); border-radius: 1px; }
.fd-qr i.v { background: transparent; }
.fd-qr-pix { width: 150px; height: 150px; margin-bottom: 12px; padding: 8px; border: 1px solid var(--itk-line); border-radius: 14px; }
.fd-copiar {
  display: inline-block;
  padding: 9px 18px;
  border: 1.5px solid var(--itk-lilas-300);
  border-radius: 999px;
  color: var(--itk-lilas-700);
  font-size: .82rem;
  font-weight: 800;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.fd-copiar.feito { background: rgba(45, 212, 191, .14); border-color: #2dd4bf; color: #0d9488; }
.fd-espera { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0; font-size: .8rem; font-weight: 700; color: var(--itk-body); }
.fd-gira { width: 14px; height: 14px; border-radius: 999px; border: 2px solid var(--itk-lilas-100); border-top-color: var(--itk-lilas-600); animation: fd-gira .8s linear infinite; }
@keyframes fd-gira { to { transform: rotate(360deg); } }

/* Aprovado: cobre a tela do PIX com o check verde. */
.fd-aprovado {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(180deg, #ecfdf5, #fff 70%);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility 0s .35s;
}
.fd-cena.aprovado .fd-aprovado { opacity: 1; visibility: visible; transition-delay: 0s; }
.fd-aprovado b { margin-top: 10px; color: var(--itk-ink); font-size: 1.15rem; font-weight: 800; }
.fd-aprovado small { color: var(--itk-muted); font-size: .8rem; }
.fd-check {
  display: grid;
  place-items: center;
  width: 76px; height: 76px;
  border-radius: 999px;
  background: var(--itk-grad-accent);
  color: #fff;
  box-shadow: 0 14px 34px rgba(45, 212, 191, .45);
  transform: scale(0);
}
.fd-check svg { width: 38px; height: 38px; stroke-dasharray: 30; stroke-dashoffset: 30; }
.fd-cena.aprovado .fd-check { animation: fd-pula .5s cubic-bezier(.3, 1.6, .5, 1) .1s forwards; }
.fd-cena.aprovado .fd-check svg { animation: fd-risca .4s ease .45s forwards; }
@keyframes fd-pula { to { transform: scale(1); } }
@keyframes fd-risca { to { stroke-dashoffset: 0; } }

/* ----- Ingresso -------------------------------------------------------- */
.fd-cena[data-cena="ingresso"] { padding: 32px 16px 0; background: var(--itk-soft); }
.fd-ingresso { border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgba(28, 21, 35, .12); overflow: hidden; }
.fd-cena[data-cena="ingresso"].ativa .fd-ingresso { animation: fd-ing-entra .6s cubic-bezier(.22, .9, .32, 1) both; }
@keyframes fd-ing-entra { from { transform: translateY(30px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.fd-ing-topo { padding: 16px 18px; background: var(--itk-grad); color: #fff; line-height: 1.3; }
.fd-ing-topo small { display: block; font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.fd-ing-topo b { display: block; font-size: 1.02rem; font-weight: 800; }
.fd-ing-topo span { font-size: .76rem; opacity: .88; }
/* O picote entre o topo e o QR, com as duas "mordidas" do canhoto. */
.fd-ing-corte { position: relative; height: 0; border-top: 2px dashed var(--itk-line); margin: 0 14px; }
.fd-ing-corte::before, .fd-ing-corte::after { content: ""; position: absolute; top: -9px; width: 16px; height: 16px; border-radius: 999px; background: var(--itk-soft); }
.fd-ing-corte::before { left: -22px; }
.fd-ing-corte::after { right: -22px; }
.fd-ing-corpo { padding: 16px 18px 14px; text-align: center; }
.fd-qr-ing { width: 140px; height: 140px; }
.fd-ing-lote { margin: 10px 0 2px; font-weight: 800; font-size: .92rem; color: var(--itk-ink); }
.fd-ing-corpo .fd-sub { margin: 0; }
.fd-ing-pe { margin: 12px 0 0; text-align: center; font-size: .74rem; color: var(--itk-muted); }

/* ----- Cursor ---------------------------------------------------------- */
/* A ponta da seta fica no canto de cima (5,3 do desenho): o JS posiciona a
   caixa já descontando isso. */
.fd-cursor {
  position: absolute;
  left: 0; top: 0;
  z-index: 5;
  width: 26px; height: 26px;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 3px 4px rgba(28, 21, 35, .3));
  transition: transform .75s cubic-bezier(.45, .05, .25, 1), opacity .3s ease;
}
.fd-cursor svg { width: 100%; height: 100%; transition: transform .12s ease; }
.fd-cursor.visivel { opacity: 1; }
.fd-cursor.clica svg { transform: scale(.8); }
/* A onda do clique. */
.fd-onda {
  position: absolute;
  z-index: 4;
  width: 40px; height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 999px;
  background: rgba(124, 58, 237, .28);
  pointer-events: none;
  animation: fd-onda .5s ease-out forwards;
}
@keyframes fd-onda { from { transform: scale(.2); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }

/* A etiqueta "Pagamento confirmado" pisca junto com a aprovação. */
.itk-fone-tag.t1.fd-brilha { animation: fd-tag .9s ease 2; }
@keyframes fd-tag {
  50% { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(45, 212, 191, .25), var(--itk-shadow-g); }
}

/* Celular estreito: o palco encolhe um pouco junto com o telefone. */
@media (max-width: 380px) {
  .fd-palco { height: 470px; }
  .fd-qr-pix { width: 130px; height: 130px; }
  .fd-qr-ing { width: 120px; height: 120px; }
}

/* As etiquetas em volta do celular saem de cima do conteúdo: com o filme, a
   tela tem texto onde antes havia espaço (o nome do evento no topo, a frase
   do ingresso no meio). Seletor com .itk-hero-visual pra vencer o
   responsive.css, que vem depois. */
.itk-hero-visual .itk-fone-tag.t1 { top: -18px; left: -44px; }
.itk-hero-visual .itk-fone-tag.t2 { bottom: 84px; right: -70px; }
.itk-hero-visual .itk-fone-tag.t3 { bottom: -20px; left: -30px; }
@media (max-width: 1199.98px) {
  .itk-hero-visual .itk-fone-tag.t1 { left: -24px; }
  .itk-hero-visual .itk-fone-tag.t2 { right: -30px; }
}
@media (max-width: 575.98px) {
  .itk-hero-visual .itk-fone-tag.t1 { top: -16px; left: -6px; }
  /* Na tela estreita ela caía em cima dos botões. */
  .itk-hero-visual .itk-fone-tag.t2 { display: none; }
}

/* ==========================================================================
   O CELULAR GRANDE, SAINDO DE BAIXO (computador)
   O celular cresce com "scale" (não transform: o itk-flutua anima o
   transform) a partir do topo, e o que passa do fim do herói é cortado pelo
   overflow dele — parece que o celular sobe de baixo da página. O cursor do
   filme desconta essa escala (fone-demo.js, ponto()). As etiquetas encolhem
   na mesma proporção pra não ficarem gigantes; o "seuevento.itick.app" vai
   pro alto à direita e o "Ingresso com QR" pra lateral, pra não serem
   cortados embaixo.
   ========================================================================== */
@media (min-width: 992px) {
  .itk-hero .row { align-items: flex-start !important; }
  /* O topo do celular alinha com a 1ª linha do título ("Ingressos,
     inscrições"), abaixo do logo do herói (84px + 22px de margem). O herói
     mantém a folga normal embaixo dos botões, e o celular é cortado ali — no
     1,38× o botão "Comprar inscrição" (que o cursor clica) ainda aparece. */
  .itk-hero-visual { --cel: 1.38; margin-top: 106px; }
  /* Folga embaixo dos botões 25% menor; o celular corta mais (o filme pula o
     clique em "Comprar inscrição" quando ele fica fora — fone-demo.js). */
  .itk-hero { padding-bottom: calc(clamp(64px, 8vw, 104px) - 40px); }
  .itk-hero-visual .itk-fone { scale: var(--cel); transform-origin: 50% 0; }
  .itk-hero-visual .itk-fone-tag { scale: .72; }
  .itk-hero-visual .itk-fone-tag.t1 { top: -16px; left: -96px; transform-origin: 100% 50%; }
  .itk-hero-visual .itk-fone-tag.t3 { top: 70px; right: -150px; bottom: auto; left: auto; transform-origin: 0 50%; }
  .itk-hero-visual .itk-fone-tag.t2 { top: 200px; right: -150px; bottom: auto; transform-origin: 0 50%; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  .itk-hero-visual { --cel: 1.42; }
  /* Container mais estreito: as etiquetas da direita não podem passar da tela. */
  .itk-hero-visual .itk-fone-tag.t3 { right: -58px; }
  .itk-hero-visual .itk-fone-tag.t2 { right: -58px; }
}

/* Mais etiquetas (formas de entrada): só a partir de 1200px, à esquerda do
   celular, no vão entre o texto do herói e ele. Abaixo disso o vão some e
   elas cairiam em cima do texto ou da tela. */
.itk-fone-tag.t4, .itk-fone-tag.t5 { display: none; }
@media (min-width: 1200px) {
  .itk-hero-visual .itk-fone-tag.t4,
  .itk-hero-visual .itk-fone-tag.t5 { display: flex; left: auto; right: calc(100% - 22px); transform-origin: 100% 50%; }
  .itk-hero-visual .itk-fone-tag.t4 { top: 128px; animation: itk-flutua 5.8s ease-in-out infinite 1.3s; }
  .itk-hero-visual .itk-fone-tag.t5 { top: 292px; line-height: 1.25; border-radius: 22px; animation: itk-flutua 6.4s ease-in-out infinite .6s; }
}
@media (min-width: 1200px) and (max-width: 1399.98px) {
  /* Container de 1140: as etiquetas da direita passavam da borda da tela. */
  .itk-hero-visual .itk-fone-tag.t3,
  .itk-hero-visual .itk-fone-tag.t2 { right: -70px; }
}
