/* ===== The Founder Signal — dark tech theme (roxo) ===== */

:root {
  --bg: #0b0a12;
  --bg-card: #15121f;
  --border: #262038;
  --text: #ece9f4;
  --text-dim: #9a93ad;
  --accent: #a78bfa;
  --accent-strong: #8b5cf6;
  --accent-dark: #6d28d9;
  --accent-soft: rgba(139, 92, 246, 0.09);
  --on-accent: #17102b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Fundo interativo de partículas */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.topbar, .screen, footer { position: relative; z-index: 1; }

/* Animações de entrada */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero > * { animation: fadeUp 0.7s ease both; }
.hero > *:nth-child(2) { animation-delay: 0.08s; }
.hero > *:nth-child(3) { animation-delay: 0.16s; }
.hero > *:nth-child(4) { animation-delay: 0.24s; }
.hero > *:nth-child(5) { animation-delay: 0.32s; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .hero > *, .reveal { animation: none; transition: none; opacity: 1; transform: none; }
  #bg-canvas { display: none; }
}

body {
  font-family: "Inter", system-ui, sans-serif;
  background: radial-gradient(ellipse 90% 45% at 50% -8%, rgba(139, 92, 246, 0.16), transparent), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Top bar ---- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 24px;
  max-width: 1040px;
  width: 100%;
  margin: 0 auto;
}

.logo { font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; cursor: pointer; }
.logo span { color: var(--accent); }

.mainnav { display: flex; gap: 4px; flex-wrap: wrap; }
.mainnav button {
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
}
.mainnav button:hover { color: var(--text); }
.mainnav button.active { color: var(--accent); background: var(--accent-soft); }

.lang-switch button {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 6px 11px;
  margin-left: 5px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.75rem;
}
.lang-switch button.active {
  color: var(--on-accent);
  background: var(--accent);
  border-color: var(--accent);
}

/* ---- Screens ---- */
.screen { display: none; flex: 1; }
.screen.active { display: block; }

/* ---- Hero ---- */
.hero {
  text-align: center;
  padding: 56px 24px 44px;
  max-width: 760px;
  margin: 0 auto;
}

.avatar {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-dark);
  box-shadow: 0 0 0 6px var(--accent-soft);
  margin-bottom: 20px;
}
.avatar-lg { width: 140px; height: 140px; }

.badge {
  display: inline-block;
  color: var(--accent);
  border: 1px solid var(--accent-dark);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 18px;
}

h1 {
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.subtitle {
  color: var(--text-dim);
  font-size: 1.08rem;
  line-height: 1.65;
  margin-bottom: 26px;
}

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn-primary {
  background: var(--accent-strong);
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.35);
}

.btn-secondary {
  background: none;
  color: var(--accent);
  border: 1px solid var(--accent-dark);
  padding: 13px 26px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-secondary:hover { background: var(--accent-soft); }

.hint { color: var(--text-dim); font-size: 0.85rem; margin-top: 14px; }

/* ---- Features ---- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px 56px;
}

.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  transition: transform 0.2s, border-color 0.2s;
}
.feature:hover { transform: translateY(-4px); border-color: var(--accent-dark); }

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.28);
}
.feature-icon svg { width: 22px; height: 22px; color: #fff; }
.feature h3 { font-size: 1rem; margin-bottom: 8px; }
.feature p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.5; }

/* ---- Listas de artigos ---- */
.pubs {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px 64px;
}
.pubs h2 { font-size: 1.4rem; margin-bottom: 20px; }
.pubs .btn-secondary { margin-top: 18px; }

.pub-list, .article-list { display: flex; flex-direction: column; gap: 10px; }

.pub-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px 14px 14px;
  text-decoration: none;
  color: var(--text);
  text-align: left;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  width: 100%;
}
.pub-item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateX(4px);
}
.pub-item:hover .pub-arrow { opacity: 1; transform: translateX(2px); }

.pub-thumb {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pub-thumb svg { width: 26px; height: 26px; }

.pub-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.pub-title { line-height: 1.4; font-weight: 600; }
.pub-date { color: var(--text-dim); font-size: 0.8rem; }

.pub-arrow {
  color: var(--accent);
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}

/* ---- Páginas (artigos / sobre) ---- */
.page {
  max-width: 720px;
  margin: 36px auto 56px;
  padding: 0 24px;
}
.page h1 { margin-bottom: 12px; }

.reader .btn-ghost { margin: 0 0 20px; }

.article-cover {
  width: 100%;
  height: 200px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.article-cover svg { width: 72px; height: 72px; opacity: 0.95; }

.article-meta { color: var(--accent); font-size: 0.85rem; font-weight: 600; margin-bottom: 10px; }

.article-body { line-height: 1.75; color: var(--text); }
.article-body p { margin: 0 0 18px; }
.article-body h3 {
  font-size: 1.25rem;
  margin: 30px 0 12px;
  letter-spacing: -0.01em;
}
.article-body h4 { font-size: 1.05rem; margin: 24px 0 10px; }
.article-body ul, .article-body ol { margin: 0 0 18px 22px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: #fff; }
.article-body blockquote {
  border-left: 3px solid var(--accent-strong);
  padding: 4px 0 4px 16px;
  color: var(--text-dim);
  margin: 0 0 18px;
  font-style: italic;
}

.reader hr { border: none; border-top: 1px solid var(--border); margin: 32px 0 16px; }
.article-footer { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 24px; }
.article-footer a { color: var(--accent); }

/* ---- Sobre ---- */
.about-header {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.about-header .subtitle { margin-bottom: 10px; }
.about-links { display: flex; gap: 14px; flex-wrap: wrap; }
.about-links a { color: var(--accent); font-weight: 600; font-size: 0.9rem; text-decoration: none; }
.about-links a:hover { text-decoration: underline; }

/* ---- Quiz ---- */
.quiz-box {
  max-width: 640px;
  margin: 40px auto;
  padding: 0 24px;
}

.progress-track {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 24px;
}
#progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-strong);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.question-count {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 10px;
}

#question-text { font-size: 1.4rem; line-height: 1.4; margin-bottom: 24px; }

.answers { display: flex; flex-direction: column; gap: 12px; }

.answer-btn {
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 16px 18px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.45;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.answer-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.btn-ghost {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 24px;
  text-decoration: underline;
}
.btn-ghost:hover { color: var(--text); }

/* ---- Resultado ---- */
.result-box {
  max-width: 640px;
  margin: 40px auto;
  padding: 0 24px 40px;
  text-align: center;
}

.score-ring { position: relative; width: 180px; margin: 24px auto; }
.score-ring svg { width: 100%; transform: rotate(-90deg); }

.ring-bg, .ring-fill {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}
.ring-bg { stroke: var(--border); }
.ring-fill {
  stroke: var(--accent-strong);
  stroke-dasharray: 326.7; /* 2 * PI * 52 */
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 1.2s ease;
}

.score-number {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: 800;
}
.score-number small { font-size: 1rem; color: var(--text-dim); margin-top: 12px; }

#stage-name { font-size: 1.6rem; margin-bottom: 10px; color: var(--accent); }
.stage-desc { color: var(--text-dim); line-height: 1.6; margin-bottom: 32px; }

.result-box h3 { margin-bottom: 16px; font-size: 1.1rem; }

.recs {
  text-align: left;
  margin: 0 0 36px;
  padding-left: 0;
  list-style: none;
  counter-reset: rec;
}
.recs li {
  counter-increment: rec;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px 16px 52px;
  margin-bottom: 10px;
  position: relative;
  line-height: 1.5;
  font-size: 0.95rem;
}
.recs li::before {
  content: counter(rec);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-strong);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.email-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  margin-bottom: 24px;
}
.email-card p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 16px; }

#email-form { display: flex; gap: 10px; }
#email-form input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 13px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
}
#email-form input:focus { outline: none; border-color: var(--accent); }
#email-form .btn-primary { padding: 13px 22px; font-size: 0.9rem; }

.email-done { color: var(--accent); font-weight: 600; }
.hidden { display: none; }

.newsletter-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.newsletter-link:hover { text-decoration: underline; }

footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  padding: 24px;
}
footer a { color: var(--text-dim); }

/* ---- Mobile ---- */
@media (max-width: 700px) {
  .features { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; }
  #email-form { flex-direction: column; }
  .topbar { justify-content: center; }
  .about-header { flex-direction: column; text-align: center; justify-content: center; }
  .about-links { justify-content: center; }
}
