/* ============ Página inicial (minimalista, cabe numa tela) ============ */
body { overflow-x: clip; }
body[data-route="/"] { display: flex; flex-direction: column; min-height: 100dvh; }
body[data-route="/"] main { flex: 1; display: flex; max-width: 1080px; padding-top: 0; padding-bottom: 0; }
.site-header .container, .site-footer .container { max-width: 1080px; }

.home {
  flex: 1; display: flex; flex-direction: column; justify-content: center; gap: clamp(14px, 3.2vh, 32px);
  width: 100%; max-width: 900px; margin: 0 auto; padding: clamp(14px, 3vh, 40px) 0;
}

/* Faixa de destaque */
.home-hero {
  position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 24px; align-items: center;
  padding: clamp(18px, 3.5vh, 36px) clamp(18px, 4vw, 36px); border-radius: 22px; color: #fff;
  background:
    radial-gradient(60% 90% at 90% 0%, rgb(255 210 63 / .3), transparent 60%),
    radial-gradient(50% 80% at 0% 100%, rgb(47 123 246 / .55), transparent 60%),
    linear-gradient(135deg, var(--hero-1), var(--hero-2) 55%, var(--hero-3));
  box-shadow: 0 24px 48px -28px var(--hero-1);
}
.home-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .16;
  background-image: radial-gradient(rgb(255 255 255 / .8) 1px, transparent 1px); background-size: 20px 20px;
  mask-image: linear-gradient(to right, transparent, #000);
}
@media (min-width: 820px) { .home-hero { grid-template-columns: 1.4fr 1fr; } }
.home-title { max-width: none; font-size: clamp(1.55rem, 4.6vw, 2.5rem); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 8px; color: #fff; }
.home-title .hl { display: block; color: var(--highlight); }
.home-lead { margin: 0; color: rgb(255 255 255 / .88); font-size: clamp(.9rem, 2.3vw, 1.05rem); max-width: 30em; }
.hero-stats { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-stats li {
  padding: 5px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600;
  background: rgb(255 255 255 / .14); border: 1px solid rgb(255 255 255 / .25);
}
.hero-stats b { color: var(--highlight); font-weight: 800; }

/* Como funciona */
.features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.features li { display: flex; gap: 10px; align-items: flex-start; }
.features svg {
  flex: none; width: 36px; height: 36px; padding: 8px; border-radius: 10px;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.features b { display: block; font-size: .95rem; }
.features span { display: block; font-size: .82rem; color: var(--muted); line-height: 1.35; }

/* Ilustração (só desktop) */
.hero-art { position: relative; display: none; padding: 4px 24px 18px 8px; }
@media (min-width: 820px) { .hero-art { display: block; } }
.mock {
  background: #fff; color: #13112e; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 24px 44px -18px rgb(10 5 60 / .6); transform: rotate(2deg);
}
.mock-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.mock-pill { width: 70px; height: 16px; border-radius: 5px; background: #eeeaff; }
.mock-count { font-size: .75rem; font-weight: 800; color: #5d5b7a; }
.mock-line { display: block; height: 8px; border-radius: 6px; background: #e6e3f4; }
.w90 { width: 90%; } .w70 { width: 70%; } .w60 { width: 60%; } .w45 { width: 45%; }
.mock-alt { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1.5px solid #e2dff2; border-radius: 10px; }
.mock-alt b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #e2dff2; font-size: .72rem; }
.mock-alt .mock-line { flex: 1; }
.mock-ok { border-color: #18794e; background: #e3f7ec; }
.mock-ok b { background: #18794e; border-color: #18794e; color: #fff; }
.mock-ok i { display: grid; color: #18794e; } .mock-ok i svg { width: 16px; height: 16px; }
.mock-badge {
  position: absolute; left: -6px; bottom: 0; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 12px; background: var(--highlight); color: var(--highlight-text);
  font-weight: 800; font-size: .9rem; box-shadow: 0 14px 26px -12px rgb(0 0 0 / .5); transform: rotate(-3deg);
}
.mock-badge svg { width: 16px; height: 16px; }

.home-block { display: flex; flex-direction: column; gap: 10px; }
.home-label { margin: 0; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }

/* Concursos */
.cat-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.cat-grid > li { display: flex; }
.cat-card {
  flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 14px;
  text-decoration: none; color: #fff; background: linear-gradient(140deg, var(--hero-1), var(--hero-2));
  box-shadow: 0 10px 22px -14px var(--accent); transition: transform .15s ease, box-shadow .15s ease;
}
a.cat-card:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -14px var(--accent); }
.tone-1 { background: linear-gradient(140deg, #2f6df6, #5b3df5); }
.tone-2 { background: linear-gradient(140deg, #d6336c, #7b2ff7); }
.tone-3 { background: linear-gradient(140deg, #0f9f6e, #2f6df6); }
.cat-card strong { font-size: 1.1rem; line-height: 1.2; }
.cat-count { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; color: var(--highlight); font-weight: 700; }
.cat-count svg { width: 14px; height: 14px; }
div.cat-card.skeleton { min-height: 62px; background: var(--surface); }
.soon { margin: 0; font-size: .85rem; color: var(--muted); line-height: 1.5; }
.soon span { font-weight: 700; }

/* Simulado rápido */
.simu-panel { padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.simu { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.simu select { width: auto; flex: 1 1 200px; max-width: 280px; }
.simu-counts { display: flex; gap: 8px; flex-wrap: wrap; }
.simu-btn { min-height: 44px; }
.simu-more { font-size: .9rem; font-weight: 700; margin-left: 4px; }
@media (max-width: 560px) {
  .simu select { max-width: none; flex-basis: 100%; }
  .simu-counts { flex: 1 1 100%; }
  .simu-btn { flex: 1; padding: 0 6px; white-space: nowrap; font-size: .9rem; }
  .cat-grid { gap: 8px; }
  .cat-card { padding: 10px 14px; }
}

/* Retomar sessão / último resultado */
.resume {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; text-decoration: none;
  color: var(--text); background: var(--surface); border: 1.5px solid var(--border);
}
.resume:hover { border-color: var(--accent); }
.resume-text { flex: 1; min-width: 0; font-size: .92rem; }
.resume-bar { flex: 0 0 80px; height: 6px; border-radius: 9px; background: var(--border); overflow: hidden; }
.resume-bar span { display: block; height: 100%; width: 0; background: var(--accent); }
.resume-go { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.resume-go svg { width: 16px; height: 16px; }
@media (max-width: 560px) { .resume-bar { display: none; } }

/* Carregamento */
.skeleton { position: relative; overflow: hidden; }
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 80%, transparent), transparent);
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* Rodapé */
.site-footer { border-top: 1px solid var(--border); padding: 14px 0; color: var(--muted); font-size: .8rem; }
body.focus-mode .site-footer { display: none; }
/* Na inicial o lead já diz "grátis e sem cadastro"; no celular o rodapé só empurraria a página. */
@media (max-width: 560px) { body[data-route="/"] .site-footer { display: none; } }

/* Celular: tudo mais compacto para caber sem rolagem */
@media (max-width: 560px) {
  .home { gap: 12px; padding: 12px 0; }
  .home-hero { padding: 16px; border-radius: 18px; }
  .home-title { font-size: 1.4rem; margin-bottom: 6px; }
  .home-lead { font-size: .86rem; }
  .hero-stats { margin-top: 10px; gap: 4px; flex-wrap: nowrap; }
  .hero-stats li { padding: 3px 7px; font-size: .72rem; white-space: nowrap; }
  .features { gap: 6px; }
  .features li { flex-direction: column; align-items: center; text-align: center; gap: 4px; }
  .features svg { width: 32px; height: 32px; padding: 7px; }
  .features b { font-size: .82rem; }
  .features span { display: none; }
  .home-block { gap: 8px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .cat-card { padding: 8px 10px; border-radius: 12px; }
  .cat-card strong { font-size: .92rem; }
  .cat-count { font-size: .72rem; }
  .cat-count svg { display: none; }
  .soon { display: none; }
  .simu-panel { padding: 10px 12px; }
  .simu select { min-height: 40px; }
  .simu-counts { flex-wrap: nowrap; gap: 6px; }
  .simu-btn { min-height: 40px; min-width: 0; font-size: .85rem; }
}


/* Desktop: simulado numa linha só, faixa mais baixa — tudo cabe em 768px de altura */
@media (min-width: 820px) {
  .home { gap: clamp(12px, 2.4vh, 26px); padding: clamp(12px, 2.4vh, 32px) 0; }
  .home-hero { padding-top: clamp(16px, 2.6vh, 30px); padding-bottom: clamp(16px, 2.6vh, 30px); }
  .hero-art { padding-bottom: 12px; }
  .simu-panel { flex-direction: row; align-items: center; gap: 16px; }
  .simu-panel .home-label { flex: none; }
  .simu { flex: 1; flex-wrap: nowrap; }
  .simu select { min-width: 0; }
  .simu-counts { flex-wrap: nowrap; }
}
