:root {
  --bg: #f6f5fc;
  --surface: #ffffff;
  --ink: #17142b;
  --muted: #65627d;
  --line: #e1def2;
  --accent: #5b3df5;
  --accent-hover: #4528d8;
  --ok: #138a4b;
  --err: #c0262d;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(900px 420px at 50% -8%, color-mix(in srgb, var(--accent) 13%, transparent), transparent),
    var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-align: center;
}

.wrap {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 40px 16px;
}

h1 { font-size: clamp(24px, 3.4vw, 32px); line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 24px; }
.lead { color: var(--muted); margin: 0 0 24px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: 0 10px 30px -14px color-mix(in srgb, var(--accent) 30%, transparent);
}

label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }

input {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
  text-align: left;
}

input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }

#licenca { text-align: center; letter-spacing: .04em; font-weight: 600; }

.hint { min-height: 22px; margin: 6px 0 14px; font-size: 14px; color: var(--muted); }
.hint.ok { color: var(--ok); }
.hint.err { color: var(--err); }

.btn {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 13px 16px;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { filter: brightness(1.08); background: var(--ok); }

.link {
  display: block;
  margin: 14px auto 0;
  background: none;
  border: 0;
  color: var(--accent);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.estado { font-weight: 700; font-size: 18px; }
.estado.ok { color: var(--ok); }
.estado.err { color: var(--err); }
.msg { margin: 6px 0 0; color: var(--muted); }

.barra { height: 8px; margin-top: 14px; border-radius: 99px; background: var(--bg); overflow: hidden; }
.barra span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 99px;
  background: var(--accent);
  animation: corre 1.4s ease-in-out infinite;
}

@keyframes corre {
  0% { margin-left: -40%; }
  100% { margin-left: 100%; }
}

.aviso {
  margin: 0 0 16px;
  padding: 14px 16px;
  text-align: center;
  font-weight: 600;
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 12px;
}

.suporte { max-width: 640px; margin: 24px auto 0; font-size: 14px; color: var(--ink); }
.foot { font-size: 13px; color: var(--muted); margin: 8px 0 0; }

/* ----- duas colunas depois que a licença é aceita ----- */
.wrap.larga { max-width: 1000px; }
.duas { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }
.duas .card { margin-bottom: 16px; }

.tut {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 10px 30px -14px color-mix(in srgb, var(--accent) 30%, transparent);
}
.tut { display: flex; flex-direction: column; justify-content: center; }
.tut h2 { font-size: 18px; margin: 0 0 16px; }

.demo { position: relative; height: 268px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overflow: hidden; }
.demo .tabs { display: flex; gap: 4px; height: 32px; padding: 6px 8px 0; background: #e3e1f2; }
.demo .tab { flex: 1; max-width: 46%; padding: 5px 10px; font-size: 11px; font-weight: 600; color: var(--muted); border-radius: 8px 8px 0 0; background: transparent; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo .ta { animation: d-ta 14s infinite; }
.demo .tb { animation: d-tb 14s infinite; }
.demo .vista { position: absolute; inset: 32px 0 0 0; background: var(--bg); }
.demo .va { animation: d-va 14s infinite; }
.demo .vb { animation: d-vb 14s infinite; }
.demo .bar { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px; background: #fff; border-bottom: 1px solid var(--line); }
.demo .bar i { width: 9px; height: 9px; border-radius: 50%; background: #c9c6df; flex: none; }
.demo .addr { flex: 1; margin-left: 6px; padding: 4px 10px; background: var(--bg); border-radius: 99px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.demo .sel { font-weight: 400; border-radius: 4px; padding: 1px 3px; animation: d-sel 14s infinite; }
.demo .pag { padding: 14px 16px 0; }
.demo .pag .img { height: 86px; border-radius: 10px; background: linear-gradient(135deg, #d9d4f7, #c3bcf0); }
.demo .pag .l1, .demo .pag .l2 { height: 9px; margin-top: 12px; border-radius: 99px; background: #dcd9ee; }
.demo .pag .l1 { width: 62%; }
.demo .pag .l2 { width: 40%; }
.demo .alvo { padding: 16px 16px 0; }
.demo .lbl { font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.demo .campo { height: 38px; padding: 9px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; color: var(--ink); overflow: hidden; white-space: nowrap; }
.demo .cola { display: inline-block; animation: d-cola 14s infinite; }
.demo .fbtn { margin-top: 14px; padding: 10px; text-align: center; font-size: 13px; font-weight: 700; color: #fff; background: var(--accent); border-radius: 10px; animation: d-btn 14s infinite; }
.demo .tecla { position: absolute; right: 12px; padding: 3px 9px; font-size: 12px; font-weight: 700; color: #fff; background: var(--ink); border-radius: 6px; opacity: 0; }
.demo .t1 { top: 50px; animation: d-t1 14s infinite; }
.demo .t2 { top: 50px; animation: d-t2 14s infinite; }
.demo .cursor { position: absolute; left: 60%; top: 130px; z-index: 2; animation: d-cursor 14s infinite; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }

.passos { margin: 18px 0 0; padding: 0; list-style: none; counter-reset: passo; font-size: 14px; color: var(--muted); }
.passos li { counter-increment: passo; padding: 7px 10px; margin-bottom: 3px; border-radius: 10px; }
.passos li::before {
  content: counter(passo);
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  line-height: 22px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
}
.passos .p1 { animation: d-p1 14s infinite; }
.passos .p2 { animation: d-p2 14s infinite; }
.passos .p3 { animation: d-p3 14s infinite; }
.passos .p4 { animation: d-p4 14s infinite; }

/* Linha do tempo (14s): 0-10% abre o site, 10-32% copia o link, 36% volta para a aba desta página,
   40-62% cola, 64-97% clica em Baixar. */
@keyframes d-cursor {
  0%, 8% { left: 60%; top: 132px; }
  14%, 30% { left: 42%; top: 54px; }
  35% { left: 73%; top: 16px; }
  42% { left: 73%; top: 16px; }
  48%, 62% { left: 40%; top: 130px; }
  70%, 96% { left: 50%; top: 196px; }
  100% { left: 60%; top: 132px; }
}
@keyframes d-ta { 0%, 36% { background: var(--bg); color: var(--ink); } 37%, 97% { background: transparent; color: var(--muted); } 98%, 100% { background: var(--bg); color: var(--ink); } }
@keyframes d-tb { 0%, 36% { background: transparent; color: var(--muted); } 37%, 97% { background: var(--bg); color: var(--ink); } 98%, 100% { background: transparent; color: var(--muted); } }
@keyframes d-va { 0%, 36% { opacity: 1; } 37%, 97% { opacity: 0; } 98%, 100% { opacity: 1; } }
@keyframes d-vb { 0%, 36% { opacity: 0; } 37%, 97% { opacity: 1; } 98%, 100% { opacity: 0; } }
@keyframes d-sel {
  0%, 11% { background: transparent; color: inherit; }
  15%, 32% { background: var(--accent); color: #fff; }
  35%, 100% { background: transparent; color: inherit; }
}
@keyframes d-t1 { 0%, 17% { opacity: 0; } 20%, 32% { opacity: 1; } 35%, 100% { opacity: 0; } }
@keyframes d-t2 { 0%, 48% { opacity: 0; } 51%, 62% { opacity: 1; } 65%, 100% { opacity: 0; } }
@keyframes d-cola { 0%, 52% { clip-path: inset(0 100% 0 0); } 62%, 97% { clip-path: inset(0 0 0 0); } 100% { clip-path: inset(0 100% 0 0); } }
@keyframes d-btn {
  0%, 74% { transform: scale(1); box-shadow: none; }
  79% { transform: scale(.96); }
  85%, 96% { transform: scale(1); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 28%, transparent); }
  100% { transform: scale(1); box-shadow: none; }
}
@keyframes d-p1 { 0%, 10% { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--ink); } 13%, 100% { background: transparent; color: var(--muted); } }
@keyframes d-p2 { 0%, 10% { background: transparent; color: var(--muted); } 13%, 34% { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--ink); } 37%, 100% { background: transparent; color: var(--muted); } }
@keyframes d-p3 { 0%, 36% { background: transparent; color: var(--muted); } 39%, 64% { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--ink); } 67%, 100% { background: transparent; color: var(--muted); } }
@keyframes d-p4 { 0%, 66% { background: transparent; color: var(--muted); } 69%, 97% { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--ink); } 100% { background: transparent; color: var(--muted); } }

@media (max-width: 820px) {
  .duas { grid-template-columns: 1fr; }
  .col { order: -1; }
}

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .demo .ta, .demo .tb, .demo .va, .demo .vb, .demo .sel, .demo .cola, .demo .fbtn, .demo .t1, .demo .t2, .demo .cursor, .passos li { animation: none; }
  .demo .va { opacity: 0; }
  .demo .vb { opacity: 1; }
  .demo .ta { background: transparent; }
  .demo .tb { background: var(--bg); color: var(--ink); }
  .demo .cursor { left: 50%; top: 196px; }
  .demo .t2 { opacity: 1; }
  .barra span { animation: none; width: 100%; opacity: .5; }
}
input[readonly] { opacity: .7; }
