:root {
  --bg: #0b0f1a;
  --bg2: #111827;
  --card: #151c2e;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #facc15;
  --ok: #22c55e;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.55; -webkit-text-size-adjust: 100%;
}
html.chat-lock, html.chat-lock body { overflow: hidden; }
.hero .wrap { padding-top: 36px; }
.wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 44px 20px; }
.alt { background: var(--bg2); max-width: none; }
.alt > * { max-width: 940px; margin-left: auto; margin-right: auto; }
h1 { font-size: clamp(1.7rem, 6vw, 2.8rem); line-height: 1.15; margin: 0 0 16px; text-align: center; }
h2 { font-size: clamp(1.35rem, 4.5vw, 1.9rem); margin: 0 0 22px; text-align: center; }
h3 { margin: 0 0 6px; font-size: 1.05rem; }
.hl { color: var(--accent); }
.lead { color: #cbd5e1; text-align: center; font-size: 1.05rem; max-width: 720px; margin: 0 auto 24px; }
.mini { color: var(--muted); font-size: .85rem; text-align: center; margin: 10px 0 0; }
.note { text-align: center; color: var(--muted); margin-top: 18px; }

.topbar { background: #000; text-align: center; padding: 10px 14px 12px; font-size: .95rem; }
.topbar strong { color: var(--accent); }
.bar { height: 8px; border-radius: 99px; background: #1e293b; overflow: hidden; max-width: 360px; margin: 8px auto 0; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #f59e0b, #ef4444); border-radius: 99px; transition: width 1.2s ease; }
.bar.big { height: 12px; margin-top: 12px; }

/* Hero com fundo de VS Code desfocado */
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero-in { position: relative; z-index: 1; }
.hero h1, .hero .lead { text-shadow: 0 2px 18px rgba(0,0,0,.9); }
.ide {
  position: absolute; inset: 0; z-index: -1; display: flex; font: 13px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #1e1e1e; color: #d4d4d4; filter: blur(2.5px) saturate(1.2); transform: scale(1.04); opacity: .9;
  -webkit-mask-image: linear-gradient(#000 70%, transparent 100%); mask-image: linear-gradient(#000 60%, transparent 100%);
  pointer-events: none; user-select: none;
}
.ide-act { width: 46px; background: #333; display: flex; flex-direction: column; gap: 14px; padding: 14px 0; align-items: center; flex: none; }
.ide-act i { width: 20px; height: 20px; border: 2px solid #858585; border-radius: 4px; }
.ide-tree { width: 190px; background: #252526; padding: 12px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; flex: none; }
.ide-tree b { font-size: 11px; letter-spacing: .08em; color: #bbb; margin-bottom: 6px; }
.ide-tree .o { color: #ddd; } .ide-tree .c { color: #e37933; } .ide-tree .y { color: #cbcb41; } .ide-tree .b { color: #519aba; }
.ide-main { flex: 1; min-width: 0; }
.ide-tabs { display: flex; background: #252526; font-size: 12px; }
.ide-tabs span { padding: 8px 16px; color: #969696; }
.ide-tabs .on { background: #1e1e1e; color: #fff; border-top: 2px solid var(--accent); }
.ide pre { margin: 0; padding: 14px 20px; font: inherit; font-size: 15px; white-space: pre; overflow: hidden; }
.ide .k { color: #569cd6; } .ide .f { color: #dcdcaa; } .ide .v { color: #9cdcfe; }
.ide .s { color: #ce9178; } .ide .n { color: #4ec9b0; } .ide .m { color: #6a9955; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11,15,26,.1) 0%, rgba(11,15,26,.45) 55%, var(--bg) 100%); }
@media (max-width: 700px) { .ide-tree, .ide-act { display: none; } .ide pre { font-size: 17px; } }

.video-som {
  position: absolute; inset: 0; width: 100%; border: 0; cursor: pointer; color: #fff; font: inherit; font-weight: 700; font-size: 1.05rem;
  background: rgba(0,0,0,.55); backdrop-filter: blur(2px);
}
.oculto-ate-preco { display: none !important; }


.video { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; margin: 0 auto 24px; background: #000; max-width: 760px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none; text-align: center;
  font: inherit; font-weight: 700; padding: 16px 26px; border-radius: 999px; min-height: 52px;
}
.btn-cta { background: var(--accent); color: #111; box-shadow: 0 8px 24px rgba(250,204,21,.25); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid #334155; }
.cta-box { display: flex; flex-direction: column; gap: 10px; align-items: stretch; max-width: 420px; margin: 0 auto; }

.checks { list-style: none; padding: 0; margin: 0 auto; max-width: 640px; }
.checks li { padding: 10px 0 10px 34px; position: relative; border-bottom: 1px solid #1e293b; }
.checks li::before { content: "✔"; position: absolute; left: 4px; color: var(--ok); font-weight: 700; }
.checks.small li { border: 0; padding: 6px 0 6px 30px; }

.cards, .trilhas { display: grid; gap: 14px; grid-template-columns: 1fr; }
.card { background: var(--card); border-radius: var(--radius); padding: 20px; }
.card p { margin: 0; color: #cbd5e1; font-size: .95rem; }
.tag { display: inline-block; background: var(--accent); color: #111; font-size: .75rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; margin-bottom: 8px; }

.urgencia { text-align: center; background: #1f1a05; border: 1px solid #5c4a06; border-radius: var(--radius); padding: 16px; }
.urgencia strong { color: var(--accent); }

.provas { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
.provas img { width: 100%; border-radius: 10px; display: block; }

.oferta { background: var(--card); border: 2px solid var(--accent); border-radius: 20px; padding: 28px 22px; max-width: 460px; text-align: center; }
.oferta .de { margin: 0; color: var(--muted); }
.oferta .por { margin: 0; font-size: 3rem; font-weight: 800; color: var(--accent); line-height: 1.1; }
.oferta .parc { margin: 4px 0 18px; color: #cbd5e1; }
.oferta .checks { text-align: left; margin-bottom: 20px; }
.oferta .btn { display: block; width: 100%; margin-top: 10px; }
.pay { width: 100%; max-width: 320px; margin: 16px auto 0; display: block; }

details { background: var(--card); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 600; }
details p { color: #cbd5e1; margin: 10px 0 0; }

.foot { text-align: center; color: var(--muted); font-size: .85rem; padding-bottom: 110px; }
.foot a { color: var(--muted); }

/* ---------- Chat ---------- */
.fab {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 50;
  display: flex; align-items: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--accent); color: #111; font-weight: 700; font-size: 1rem;
  padding: 14px 18px; border-radius: 999px; box-shadow: 0 10px 30px rgba(0,0,0,.45);
  animation: pulse 2.4s infinite;
}
.fab.hidden { display: none; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }

.chat {
  --vh: 100dvh;
  position: fixed; z-index: 100; left: 0; top: 0; width: 100%; height: var(--vh);
  background: var(--bg); display: none; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.chat.open { display: flex; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: calc(12px + env(safe-area-inset-top)) 14px 12px; background: var(--bg2); border-bottom: 1px solid #1e293b; }
.chat-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #111; display: grid; place-items: center; font-weight: 800; }
.chat-title { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.chat-title small { color: var(--ok); }
.chat-x { background: transparent; border: 0; color: var(--text); font-size: 1.4rem; width: 44px; height: 44px; cursor: pointer; }

.chat-msgs { flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 1rem; word-wrap: break-word; }
.msg-bot { background: var(--card); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-user { background: var(--accent); color: #111; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-buy { display: block; margin-top: 12px; }
.typing { display: flex; gap: 4px; padding: 14px; }
.typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,80%,100% { opacity: .25; } 40% { opacity: 1; } }

.chat-form { display: flex; gap: 8px; padding: 10px 12px; background: var(--bg2); border-top: 1px solid #1e293b; align-items: flex-end; }
.chat-form textarea {
  flex: 1; resize: none; border: 1px solid #334155; background: var(--bg); color: var(--text);
  border-radius: 20px; padding: 12px 16px; font: inherit; font-size: 16px; /* 16px evita zoom no iOS */
  max-height: 120px; outline: none;
}
.chat-form textarea:focus { border-color: var(--accent); }
.chat-form button { width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--accent); color: #111; font-size: 1.2rem; cursor: pointer; flex: none; }
.chat-form button:disabled { opacity: .5; }

@media (min-width: 700px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .trilhas { grid-template-columns: repeat(2, 1fr); }
  .provas { grid-template-columns: repeat(3, 1fr); }
  .cta-box { flex-direction: row; max-width: none; justify-content: center; }
  .alt .oferta, .oferta { margin: 0 auto; }
  /* desktop: painel no canto; celular continua tela cheia */
  .chat { left: auto; top: auto; right: 20px; bottom: 20px; width: 400px; height: min(640px, calc(100vh - 40px)); border-radius: 18px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.6); border: 1px solid #1e293b; }
  html.chat-lock, html.chat-lock body { overflow: auto; }
}

.atualizado { display: block; text-align: center; color: var(--muted); font-size: .75rem; margin-top: 6px; }
.atualizado:empty { display: none; }
.btn-zap { background: #25d366; color: #052e16; }
