:root {
  --bg-0: #07040c;
  --bg-1: #120821;
  --bg-2: #22103d;
  --violeta: #8e4fe0;
  --lilas: #d6c2ff;
  --lilas-2: #b995f0;
  --ouro-1: #ffe2b0;
  --ouro-2: #e2a55a;
  --ouro-3: #b8762f;
  --texto: #f4eefc;
  --texto-2: rgba(244, 238, 252, 0.68);
  --linha: rgba(214, 194, 255, 0.16);
  --erro: #ff9fb4;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
[hidden] { display: none !important; }

body {
  min-height: 100svh;
  background: var(--bg-0);
  color: var(--texto);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Fundo: gradiente escuro + luzes ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% -10%, var(--bg-2) 0%, transparent 60%),
    radial-gradient(90% 70% at 100% 100%, #1b0b30 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
}

.luz {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
}
.luz--1 {
  width: 46vmax; height: 46vmax;
  top: -18vmax; left: -12vmax;
  background: radial-gradient(circle, rgba(142, 79, 224, 0.75), transparent 65%);
  animation: flutuar 18s var(--ease) infinite alternate;
}
.luz--2 {
  width: 38vmax; height: 38vmax;
  bottom: -16vmax; right: -10vmax;
  background: radial-gradient(circle, rgba(226, 165, 90, 0.38), transparent 65%);
  animation: flutuar 22s var(--ease) infinite alternate-reverse;
}
.luz--3 {
  width: 28vmax; height: 28vmax;
  top: 38%; left: 58%;
  background: radial-gradient(circle, rgba(185, 149, 240, 0.4), transparent 65%);
  animation: flutuar 26s var(--ease) infinite alternate;
}

@keyframes flutuar {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4vmax, 3vmax, 0) scale(1.12); }
}

.arcos {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.arcos path {
  fill: none;
  stroke: url(#arco);
  stroke-width: 2;
  filter: drop-shadow(0 0 8px rgba(185, 140, 255, 0.8));
  opacity: 0.7;
}
.arcos path.fino { stroke-width: 1; opacity: 0.4; }

.grao {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Layout ---------- */
.palco {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vh, 48px);
  padding: clamp(32px, 6vh, 64px) 16px;
}

.logo {
  width: min(440px, 82vw);
  height: auto;
  filter: drop-shadow(0 6px 30px rgba(185, 149, 240, 0.35));
  animation: surgir 1.1s var(--ease) both;
}

.cartao {
  position: relative;
  width: 100%;
  max-width: 480px;
  padding: clamp(28px, 5vw, 44px);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(34, 16, 61, 0.62), rgba(12, 6, 22, 0.72));
  border: 1px solid var(--linha);
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: surgir 1.1s 0.15s var(--ease) both;
}
/* filete de luz no topo do cartão */
.cartao::before {
  content: "";
  position: absolute;
  top: -1px; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lilas), var(--ouro-1), transparent);
}

@keyframes surgir {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.etapa { text-align: center; }
.entrar { animation: surgir 0.6s var(--ease) both; }

/* ---------- Tipografia ---------- */
.sobre {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--lilas-2);
}

.titulo {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 6vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.titulo:focus { outline: none; }
.titulo em {
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(180deg, var(--ouro-1), var(--ouro-2) 70%, var(--ouro-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.etapa--nova .titulo em {
  background-image: linear-gradient(180deg, #fff, var(--lilas) 55%, var(--lilas-2));
}

.texto {
  margin: 0 auto 26px;
  max-width: 38ch;
  text-wrap: pretty;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--texto-2);
}
.texto strong { color: var(--texto); font-weight: 500; }

/* ---------- Formulário ---------- */
.campo { display: block; text-align: left; }
.campo__rotulo {
  display: block;
  margin: 0 0 8px 4px;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--texto-2);
}

input[type="email"] {
  width: 100%;
  height: 56px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid var(--linha);
  background: rgba(7, 4, 12, 0.55);
  color: var(--texto);
  font: 400 1rem var(--sans); /* 16px evita zoom no iOS */
  transition: border-color 0.2s, box-shadow 0.2s;
}
input[type="email"]::placeholder { color: rgba(244, 238, 252, 0.3); }
input[type="email"]:focus {
  outline: none;
  border-color: var(--lilas-2);
  box-shadow: 0 0 0 4px rgba(185, 149, 240, 0.18);
}
input[aria-invalid] { border-color: var(--erro); }

.erro {
  margin: 10px 4px 0;
  text-align: left;
  font-size: 0.85rem;
  color: var(--erro);
}

.botao {
  position: relative;
  width: 100%;
  height: 56px;
  margin-top: 18px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font: 500 0.92rem var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2a1606;
  background: linear-gradient(180deg, var(--ouro-1) 0%, var(--ouro-2) 60%, var(--ouro-3) 100%);
  box-shadow:
    0 12px 30px -10px rgba(226, 165, 90, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  overflow: hidden;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, filter 0.2s;
}
/* brilho que passa pelo botão */
.botao::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: brilho 4.5s 1.5s ease-in-out infinite;
}
@keyframes brilho {
  0%, 70% { transform: translateX(-120%); }
  100%    { transform: translateX(120%); }
}
.botao:hover { transform: translateY(-1px); filter: brightness(1.05); }
.botao:active { transform: translateY(1px); }
.botao:focus-visible { outline: 2px solid var(--lilas); outline-offset: 3px; }
.botao:disabled { cursor: progress; }

.botao__loader {
  display: none;
  position: absolute;
  top: 50%; left: 50%;
  width: 22px; height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  border: 2px solid rgba(42, 22, 6, 0.25);
  border-top-color: #2a1606;
  animation: girar 0.7s linear infinite;
}
.botao.is-loading .botao__texto { visibility: hidden; }
.botao.is-loading .botao__loader { display: block; }
@keyframes girar { to { transform: rotate(360deg); } }

.privacidade {
  margin: 16px 0 0;
  font-size: 0.75rem;
  color: rgba(244, 238, 252, 0.4);
}
.privacidade a { color: inherit; text-underline-offset: 2px; }

.turnstile { display: flex; justify-content: center; }

/* ---------- Resultados ---------- */
.selo {
  display: grid;
  place-items: center;
  width: 68px; height: 68px;
  margin: 0 auto 20px;
  border-radius: 50%;
}
.selo svg { width: 28px; height: 28px; }
.selo--ouro {
  background: radial-gradient(circle at 35% 30%, var(--ouro-1), var(--ouro-2) 60%, var(--ouro-3));
  box-shadow: 0 0 0 8px rgba(226, 165, 90, 0.12), 0 0 50px rgba(226, 165, 90, 0.55);
}
.selo--ouro svg { fill: #3a1f08; }
.selo--lilas {
  background: radial-gradient(circle at 35% 30%, #fff, var(--lilas) 55%, var(--lilas-2));
  box-shadow: 0 0 0 8px rgba(185, 149, 240, 0.12), 0 0 50px rgba(185, 149, 240, 0.55);
}
.selo--lilas svg { fill: #3b1d66; }

.etapa--aluna .sobre { color: var(--ouro-2); }

.email-verificado {
  display: inline-block;
  max-width: 100%;
  margin: 0 0 22px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--linha);
  background: rgba(7, 4, 12, 0.45);
  font-size: 0.85rem;
  color: var(--texto-2);
  overflow-wrap: anywhere;
}

.dica {
  margin: 0 0 18px;
  font-size: 0.82rem;
  color: rgba(244, 238, 252, 0.5);
}

.link {
  display: block;
  margin: 0 auto;
  padding: 8px;
  border: 0;
  background: none;
  cursor: pointer;
  font: 400 0.85rem var(--sans);
  letter-spacing: 0.06em;
  color: var(--lilas);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(214, 194, 255, 0.35);
}
.link:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
