/* ==========================================================
   Inscrição — mobile primeiro
   ========================================================== */

body { background: var(--canvas); }

/* ---------- Topo com progresso ---------- */

.i-topo {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 251, 252, .9);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.i-topo__linha { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; padding-block: 8px; }
.i-voltar { width: 48px; height: 48px; display: inline-grid; place-items: center; border-radius: 14px; color: var(--plum-700); text-decoration: none; font-weight: 700; }
.i-voltar span { display: none; }
.i-topo__logo { height: 40px; width: auto; justify-self: center; }
.i-topo__etapa { font-size: var(--step--1); font-weight: 700; color: var(--plum-700); white-space: nowrap; }

.progresso { list-style: none; padding: 0 0 10px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.progresso li { position: relative; height: 5px; border-radius: 999px; background: #EBDCE5; overflow: hidden; }
.progresso li::after { content: ""; position: absolute; inset: 0; background: var(--plum-500); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-out); }
.progresso li.is-feita::after, .progresso li.is-atual::after { transform: scaleX(1); }
.progresso li.is-atual::after { background: var(--lilac); }
.progresso span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (min-width: 1024px) {
  .i-topo__linha { grid-template-columns: 1fr auto 1fr; padding-block: 12px; }
  .i-voltar { width: auto; height: auto; display: inline-flex; gap: 10px; padding: 10px 0; justify-self: start; }
  .i-voltar span { display: inline; }
  .i-topo__logo { height: 52px; }
  .i-topo__etapa { justify-self: end; }
  .progresso { gap: 10px; padding-bottom: 14px; }
  .progresso li { height: auto; background: none; overflow: visible; padding-top: 10px; }
  .progresso li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; border-radius: 999px; background: #EBDCE5; }
  .progresso li::after { top: 0; bottom: auto; height: 5px; border-radius: 999px; }
  .progresso span { position: static; width: auto; height: auto; clip: auto; overflow: visible; font-size: .8rem; font-weight: 700; color: var(--muted); }
  .progresso li.is-atual span, .progresso li.is-feita span { color: var(--plum-700); }
}

/* ---------- Conteúdo ---------- */

.i-main { padding-top: 24px; padding-bottom: calc(120px + env(safe-area-inset-bottom)); min-height: calc(100svh - 80px); }

.passo { display: grid; grid-template-columns: 1fr; gap: 20px; animation: passoEntra .6s var(--ease-out) both; }
@keyframes passoEntra { from { opacity: 0; transform: translateX(28px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.passo.is-voltando { animation-name: passoVolta; }
@keyframes passoVolta { from { opacity: 0; transform: translateX(-28px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

.passo > * { min-width: 0; }
.passo__cabeca { display: flex; flex-direction: column; gap: 12px; }
.passo__cabeca--centro { align-items: center; text-align: center; }
.passo__cabeca .lead { font-size: var(--step-0); }
.passo__corpo { padding: clamp(20px, 3vw, 40px); display: flex; flex-direction: column; gap: 24px; }

@media (min-width: 1024px) {
  .i-main { padding-top: clamp(40px, 5vw, 72px); }
  .passo { grid-template-columns: minmax(280px, 5fr) 7fr; gap: clamp(40px, 6vw, 120px); align-items: start; }
  .passo__cabeca { position: sticky; top: 140px; }
  .passo__cabeca .lead { font-size: var(--step-1); }
  .passo--largo, .passo--sucesso { grid-template-columns: 1fr; }
}

/* ---------- Mini resumo do pacote ---------- */

.mini-pacote {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px;
  box-shadow: var(--depth-1); max-width: 420px;
}
.mini-pacote span { display: flex; flex-direction: column; line-height: 1.3; }
.mini-pacote small { font-size: .75rem; color: var(--muted); font-weight: 600; }
.mini-pacote strong { font-size: var(--step--1); }

/* ---------- Passo 1: pacotes ---------- */

.pacotes { border: 0; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 900px) { .pacotes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 24px; } }

.pacote {
  position: relative; cursor: pointer;
  display: flex; flex-direction: column; gap: 10px;
  padding: 24px 22px 26px; border: 2px solid transparent;
}
.pacote input { position: absolute; opacity: 0; pointer-events: none; }
.pacote__marca {
  position: absolute; top: 20px; right: 20px; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--field); display: grid; place-items: center; background: var(--white);
  transition: background-color .3s, border-color .3s, transform .4s var(--ease-spring);
}
.pacote__marca svg { width: 16px; height: 16px; fill: none; stroke: var(--white); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .35s .1s var(--ease-out); }
.pacote__tag { align-self: flex-start; font-size: .75rem; font-weight: 700; background: var(--blush); color: var(--plum-700); padding: 7px 12px; border-radius: 999px; }
.pacote__tag--ouro { background: var(--gold); color: var(--plum-950); }
.pacote__nome { font-family: var(--font-display); font-size: var(--step-3); font-weight: 560; line-height: 1; color: var(--plum-700); margin-top: 6px; }
.pacote__sub { font-size: var(--step--1); color: var(--muted); font-weight: 600; }
.pacote__preco { color: var(--ink-soft); font-weight: 600; margin: 6px 0 4px; }
.pacote__preco b { font-family: var(--font-display); font-size: clamp(2.8rem, 10vw, 4rem); font-weight: 600; color: var(--ink); letter-spacing: -.03em; line-height: 1; }
.pacote__lista { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: var(--step--1); }
.pacote__lista span { display: flex; gap: 10px; }
.pacote__lista span::before { content: ""; flex-shrink: 0; width: 7px; height: 7px; margin-top: .55em; border-radius: 50%; background: var(--lilac); }

.pacote:has(input:checked) { border-color: var(--plum-500); background: linear-gradient(180deg, var(--white) 0%, var(--blush-50) 100%); box-shadow: var(--depth-2), 0 0 0 4px rgba(200, 140, 183, .25); }
.pacote:has(input:checked) .pacote__marca { background: var(--plum-500); border-color: var(--plum-500); transform: scale(1.1); }
.pacote:has(input:checked) .pacote__marca svg { stroke-dashoffset: 0; }
.pacote:has(input:focus-visible) { outline: 3px solid var(--plum-500); outline-offset: 4px; }

/* ---------- Formulários ---------- */

.campos { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 600px) { .campos { grid-template-columns: repeat(2, minmax(0, 1fr)); } .campos__cheio { grid-column: 1 / -1; } }
.pequeno { font-size: var(--step--1); }

.grupo { border: 0; margin: 0; padding: 0; }
.grupo legend { font-weight: 700; font-size: var(--step-0); margin-bottom: 14px; }

.resumo { display: flex; flex-direction: column; }
.resumo > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 0; border-bottom: 1px solid #F0E1EA; }
.resumo dt { color: var(--muted); font-size: var(--step--1); }
.resumo dd { font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.resumo__total { border-bottom: 0 !important; }
.resumo__total dd { font-family: var(--font-display); font-size: var(--step-3); font-weight: 600; color: var(--plum-700); }

.aceite { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; padding: 16px; border-radius: 16px; background: var(--blush-50); }
.aceite input { width: 24px; height: 24px; accent-color: var(--plum-500); margin-top: 1px; flex-shrink: 0; }

/* ---------- Pagamento ---------- */

.pix__valor { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.pix__valor > span { font-family: var(--font-display); font-size: var(--step-4); font-weight: 600; line-height: 1; letter-spacing: -.03em; }
.pix__valor small { font-size: var(--step--1); color: var(--muted); }
.pix__valor strong { color: var(--plum-700); }

.aguardando { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; font-size: var(--step--1); font-weight: 700; padding: 10px 16px; border-radius: 999px; background: var(--white); box-shadow: var(--depth-1); }
.aguardando__ponto { width: 10px; height: 10px; border-radius: 50%; background: var(--plum-500); animation: pulse 2s infinite; }
.brilho-texto { background: linear-gradient(90deg, var(--plum-500) 0%, #E7B6CF 50%, var(--plum-500) 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 2.2s linear infinite; }

.pix { gap: 18px; }
.pix__passos { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pix__passos li { display: flex; align-items: center; gap: 14px; font-size: var(--step--1); }
.pix__passos b { width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--blush); color: var(--plum-700); font-size: .85rem; }
.pix__codigo { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; padding: 14px 16px; border: 1.5px dashed var(--field); border-radius: 14px; background: #FBF5F8; color: var(--ink-soft); width: 100%; }
.pix__qr { border: 1px solid var(--line); border-radius: 16px; padding: 4px 16px; }
.pix__qr summary { cursor: pointer; font-weight: 700; color: var(--plum-700); padding: 12px 0; min-height: 44px; }
.pix__qr .qr { margin: 8px auto 18px; max-width: 240px; }
.simulador { border: 1.5px dashed var(--gold); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: #FFF8EE; font-size: var(--step--1); color: #6B4718; }
.simulador .btn { align-self: flex-start; }
@media (min-width: 600px) { .simulador { flex-direction: row; align-items: center; justify-content: space-between; } }

/* ---------- Bem-vindo ---------- */

.passo--sucesso { justify-items: stretch; gap: 18px; max-width: 980px; }
.passo--sucesso .sucesso__check, .passo--sucesso .eyebrow { justify-self: start; }
.sucesso__titulo { overflow-wrap: anywhere; }
.sucesso__titulo { line-height: .95; }
.sucesso__check .ring { fill: var(--white); stroke: var(--plum-500); stroke-width: 4; stroke-dasharray: 240; stroke-dashoffset: 240; animation: draw .7s ease-out forwards; }
.sucesso__check .tick { fill: none; stroke: var(--plum-500); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .6s .35s ease-out forwards; }
.redirect { width: 100%; padding: 22px; display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.redirect__barra { height: 6px; border-radius: 999px; background: #F0E1EA; overflow: hidden; }
.redirect__barra div { height: 100%; width: 0; background: var(--plum-500); border-radius: 999px; transition: width 1s linear; }
.redirect__acoes { display: flex; flex-direction: column; gap: 12px; }
.redirect__acoes .btn { width: 100%; }
@media (min-width: 600px) { .redirect__acoes { flex-direction: row; } .redirect__acoes .btn { width: auto; } }

/* ---------- Barra de ação (polegar) ---------- */

.i-acoes { display: flex; align-items: center; gap: 10px; }
.i-acoes__voltar { width: 56px; min-height: 56px; padding: 0; flex-shrink: 0; }
.i-acoes__voltar span { display: none; }
.i-acoes__resumo { display: none; flex-direction: column; line-height: 1.25; margin-right: auto; }
.i-acoes__resumo small { color: var(--muted); font-size: .78rem; }
.i-acoes__resumo strong { font-size: var(--step-0); }
.i-acoes__avancar { flex: 1; }
@media (min-width: 600px) {
  .i-acoes__resumo { display: flex; }
  .i-acoes__avancar { flex: 0 0 auto; min-width: 260px; }
  .i-acoes__voltar { width: auto; padding: 0 22px; }
  .i-acoes__voltar span { display: inline; }
}

/* ==========================================================
   Comemoração em tela cheia
   ========================================================== */

.festa {
  position: fixed; inset: 0; z-index: 900;
  display: grid; place-items: center;
  background:
    radial-gradient(120% 80% at 50% 20%, #7A3E70 0%, var(--plum-700) 35%, var(--plum-900) 75%, var(--plum-950) 100%);
  color: var(--white); text-align: center; overflow: hidden;
  padding: env(safe-area-inset-top) 24px env(safe-area-inset-bottom);
}
.festa__centro { position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.festa__check { width: clamp(110px, 30vw, 170px); filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .35)); }
.festa__check .ring { fill: rgba(255, 255, 255, .08); stroke: var(--gold-soft); stroke-width: 5; stroke-dasharray: 320; stroke-dashoffset: 320; }
.festa__check .tick { fill: none; stroke: var(--white); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; stroke-dashoffset: 80; }
.festa__titulo { font-family: var(--font-display); font-size: clamp(2.6rem, 11vw, 7rem); line-height: .95; letter-spacing: -.03em; font-variation-settings: "opsz" 144, "SOFT" 50, "wght" 600; }
.festa__titulo .split-char { font-variation-settings: "opsz" 144, "SOFT" 50, "wght" var(--w, 600); }
.festa__sub { font-size: var(--step-1); color: #F2D7E5; }
.festa__brilhos svg { position: absolute; fill: var(--gold-soft); width: 28px; opacity: 0; }
.festa__brilhos svg:nth-child(1) { left: 12%; top: 18%; width: 36px; }
.festa__brilhos svg:nth-child(2) { right: 14%; top: 26%; width: 22px; }
.festa__brilhos svg:nth-child(3) { left: 20%; bottom: 20%; width: 18px; }
.festa__brilhos svg:nth-child(4) { right: 18%; bottom: 16%; width: 30px; }
.festa__pular {
  position: absolute; right: 16px; top: calc(16px + env(safe-area-inset-top));
  font: inherit; font-weight: 700; font-size: var(--step--1); color: var(--white);
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px; padding: 10px 18px; min-height: 44px; cursor: pointer;
}

/* Sem GSAP: versão só com CSS */
.festa.sem-gsap { animation: fade .35s ease both; }
.festa.sem-gsap .ring { animation: draw .8s .2s ease-out forwards; }
.festa.sem-gsap .tick { animation: draw .6s .8s ease-out forwards; }
.festa.sem-gsap .festa__brilhos svg { animation: twinkle 2s ease-in-out infinite; opacity: 1; }

/* ---------- v3: acabamento ---------- */
.pacote__topo { display: flex; align-items: center; gap: 12px; margin-right: 44px; }
.pacote__lista span:nth-child(4n+1)::before { background: var(--tone-plum); }
.pacote__lista span:nth-child(4n+2)::before { background: var(--tone-rose); }
.pacote__lista span:nth-child(4n+3)::before { background: var(--tone-teal); }
.pacote__lista span:nth-child(4n+4)::before { background: var(--tone-gold); }
.pacote__lista span::before { width: 8px !important; height: 8px !important; }
.pacote::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: inherit; border-bottom-left-radius: 0; border-bottom-right-radius: 0; background: linear-gradient(90deg, var(--tone-plum), var(--tone-rose)); opacity: 0; transition: opacity .3s; }
.pacote:has(input:checked)::after { opacity: 1; }
.i-acoes__avancar.btn--primary { background: linear-gradient(135deg, var(--plum-500), var(--plum-700)); }

/* QR Code real da Efí (imagem) */
.qr:has(img) { display: block; aspect-ratio: auto; }
.qr img { display: block; width: 100%; height: auto; }
