/* Home — hub de Sistemas e Soluções. Reusa a paleta de ../styles.css (dark premium).
   Visual inspirado na WelcomeScreen do app IA Justrabalhista (hero + toggle + cards). */

.home-wrap { max-width: 640px; padding-bottom: 30px; }

/* ---------- hero ---------- */
.home-hero {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 58px 0 26px;
  animation: home-fade-up .5s ease both;
}
/* halo dourado difuso atrás do título */
.home-orb {
  position: absolute; top: 26px; left: 50%; transform: translateX(-50%);
  width: 300px; height: 120px; border-radius: 50%;
  background: var(--accent); opacity: .10; filter: blur(46px);
  animation: home-glow 3.2s ease-in-out infinite;
  pointer-events: none;
}
.home-kicker {
  position: relative; z-index: 1;
  margin: 0 0 12px; font-size: .64rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .13em;
  color: var(--accent); user-select: none;
}
.home-hero h1 {
  position: relative; z-index: 1;
  margin: 0 0 8px; font-size: 1.75rem; letter-spacing: -.02em; line-height: 1.2;
}
.home-accent { color: var(--accent); }
.home-sub { position: relative; z-index: 1; margin: 0; color: var(--muted); font-size: .95rem; max-width: 340px; line-height: 1.55; }

@keyframes home-glow {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: .10; }
  50% { transform: translateX(-50%) scale(1.12); opacity: .16; }
}

/* ---------- toggle ---------- */
.home-toggle {
  display: flex; justify-content: center; margin-bottom: 22px;
  animation: home-fade-up .5s ease .05s both;
}
.home-toggle .tab {
  display: inline-flex; align-items: center; gap: 7px;
}
.home-toggle .tab svg { width: 14px; height: 14px; }
.tab-count {
  font-size: .68rem; font-weight: 700; line-height: 1;
  padding: 3px 7px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  color: var(--accent);
}
.tab.is-active .tab-count {
  background: rgba(0, 0, 0, .18); border-color: transparent; color: inherit;
}

/* ---------- divisor ---------- */
.home-divider {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
  animation: home-fade-up .5s ease .08s both;
}
.home-divider span { flex: 1; height: 1px; background: var(--border); }
.home-divider em {
  font-style: normal; font-size: .64rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .13em; color: var(--muted); opacity: .75; user-select: none; white-space: nowrap;
}

/* ---------- grade de cards ---------- */
.home-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.home-grid[hidden] { display: none; } /* display:grid acima venceria o [hidden] da UA */

.home-card {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 15px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); text-decoration: none; color: var(--text);
  overflow: hidden; transition: border-color .2s, box-shadow .2s;
  animation: home-fade-up .45s ease both;
}
/* entrada escalonada — um degrau por card. Card sem regra aqui fica com atraso
   zero e aparece ANTES dos outros: ao criar um sistema, confira se há degrau. */
.home-grid .home-card:nth-child(1) { animation-delay: .10s; }
.home-grid .home-card:nth-child(2) { animation-delay: .16s; }
.home-grid .home-card:nth-child(3) { animation-delay: .22s; }
.home-grid .home-card:nth-child(4) { animation-delay: .28s; }
.home-grid .home-card:nth-child(5) { animation-delay: .34s; }
.home-grid .home-card:nth-child(6) { animation-delay: .40s; }
.home-grid .home-card:nth-child(7) { animation-delay: .46s; }
.home-grid .home-card:nth-child(8) { animation-delay: .52s; }
.home-grid .home-card:nth-child(9) { animation-delay: .58s; }
.home-grid .home-card:nth-child(10) { animation-delay: .64s; }
.home-grid .home-card:nth-child(11) { animation-delay: .70s; }
.home-grid .home-card:nth-child(12) { animation-delay: .76s; }

.home-card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 55%);
  opacity: 0; transition: opacity .2s;
}
.home-card:hover, .home-card:focus-visible {
  border-color: var(--accent-line);
  box-shadow: 0 0 20px rgba(196, 156, 88, .07);
  outline: none;
}
.home-card:hover::before, .home-card:focus-visible::before { opacity: 1; }

.hc-ico {
  position: relative; z-index: 1; flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.hc-ico svg { width: 17px; height: 17px; color: var(--accent); }
.home-card:hover .hc-ico { background: rgba(196, 156, 88, .18); }

.hc-txt { position: relative; z-index: 1; flex: 1; min-width: 0; display: grid; gap: 2px; }
.hc-txt strong {
  font-family: var(--font-head); font-size: .92rem; font-weight: 700; line-height: 1.25;
  transition: color .2s;
}
.home-card:hover .hc-txt strong { color: var(--accent); }
.hc-txt small { font-size: .76rem; color: var(--muted); line-height: 1.4; }
/* selo de destaque no título do card (ex.: "Grátis no teste") */
.hc-tag {
  justify-self: start; margin-bottom: 1px; padding: 1px 7px;
  font-family: 'Inter', system-ui, sans-serif; font-size: .64rem; font-weight: 600; letter-spacing: .02em;
  color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 999px;
}

.hc-arrow {
  position: relative; z-index: 1; flex-shrink: 0; display: flex;
  color: var(--muted); opacity: .35; transition: opacity .2s, transform .2s, color .2s;
}
.hc-arrow svg { width: 14px; height: 14px; }
.home-card:hover .hc-arrow { opacity: .8; color: var(--accent); transform: translateX(3px); }

/* ---------- animações / acessibilidade ---------- */
@keyframes home-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .home-hero, .home-toggle, .home-divider, .home-card { animation: none; }
  .home-orb { animation: none; }
}

/* ---------- responsivo ---------- */
@media (max-width: 640px) {
  .home-hero { padding-top: 40px; }
  .home-grid { grid-template-columns: 1fr; }
  .home-toggle .tabs { width: 100%; }
  .home-toggle .tab { flex: 1; justify-content: center; }
}
