/* ============================================================
   Estilos específicos do portal — hero de conversão + grid de cards.
   styles-base.css já dá o design system (tokens, .tag, cores).
   Carregado também por blog/sobre/transparencia/guias: toda classe
   antiga continua existindo; as novas são aditivas.
   ============================================================ */

:root {
  --max-width: 1040px; /* portal é um diretório, não um funil — layout mais largo */
  --grad-brand: linear-gradient(120deg, #4A8DF8 0%, #1E4FD8 100%);
}

/* ---------- Header sticky (todas as páginas) ---------- */
header.top {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0;
  background: rgba(6, 9, 15, .78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(30, 44, 78, .55);
}
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.header-nav { display: flex; align-items: center; gap: 22px; }
.header-nav a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color .15s;
}
.header-nav a:hover { color: var(--text); }
.header-nav a.header-cta {
  background: var(--accent-2);
  color: #fff;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(30, 79, 216, .4);
  transition: background .15s, transform .15s;
}
.header-nav a.header-cta:hover { background: #2a5ce6; transform: translateY(-1px); }

/* âncoras não somem embaixo do header fixo */
section[id], main[id] { scroll-margin-top: 84px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------- Hero do blog (mantido p/ /blog/) ---------- */
.portal-hero { text-align: center; padding: 56px 0 36px; }
.portal-hero img { height: 64px; margin-bottom: 24px; }
.portal-hero h1 { font-size: clamp(28px, 5vw, 40px); }
.portal-hero .subtitle { margin: 0 auto 0; text-align: center; }

.eyebrow {
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

/* ---------- Hero da home ---------- */
.home-hero {
  position: relative;
  text-align: center;
  padding: 92px 0 72px;
}
/* grade sutil ao fundo — personalidade sem ruído */
.home-hero::before {
  content: "";
  position: absolute;
  inset: -80px -50vw 0;
  background-image:
    linear-gradient(rgba(74, 141, 248, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 141, 248, .06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 60% 65% at 50% 35%, #000 0%, transparent 100%);
  mask-image: radial-gradient(ellipse 60% 65% at 50% 35%, #000 0%, transparent 100%);
  pointer-events: none;
}
.home-hero > * { position: relative; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text-dim);
  background: rgba(10, 17, 32, .8);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  margin-bottom: 22px;
}
.hero-badge .pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(110, 231, 168, .5);
}
@media (prefers-reduced-motion: no-preference) {
  .hero-badge .pulse-dot { animation: pulse 2.4s ease-out infinite; }
  @keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(110, 231, 168, .45); }
    70% { box-shadow: 0 0 0 8px rgba(110, 231, 168, 0); }
    100% { box-shadow: 0 0 0 0 rgba(110, 231, 168, 0); }
  }
}

.home-hero h1 {
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin: 0 auto 18px;
  max-width: 17ch;
}
.home-hero h1 .grad {
  background: linear-gradient(100deg, #7FB0FF 0%, #4A8DF8 55%, #2a5ce6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.home-hero .subtitle {
  font-size: clamp(16px, 2.2vw, 18.5px);
  max-width: 52ch;
  margin: 0 auto 30px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 34px;
}
.btn-lg { padding: 14px 26px; font-size: 15.5px; border-radius: 12px; }
.btn-ghost {
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); }

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 26px;
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--text-dim);
  font-size: 13.5px;
}
.hero-trust li { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust li::before {
  content: "✓";
  color: var(--green);
  font-weight: 700;
  font-size: 12px;
}

/* ---------- Seções ---------- */
section { padding: 52px 0; }

.section-heading { margin-bottom: 26px; }
.section-heading h2 {
  font-size: clamp(24px, 3.4vw, 32px);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.section-heading p { color: var(--text-dim); font-size: 15px; margin: 0; }
.section-heading-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-link {
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.section-link:hover { color: var(--text); }

/* ---------- Pilares (como funciona) ---------- */
.hub-intro { padding-top: 30px; }
.hub-intro-heading { max-width: 720px; margin-bottom: 30px; }
.hub-intro-heading h2 { font-size: clamp(24px, 3.4vw, 32px); margin-bottom: 8px; letter-spacing: -0.02em; }
.hub-intro-heading > p:last-child { font-size: 16px; line-height: 1.65; color: var(--text-dim); margin: 0; }

.hub-pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: pilar; }
.hub-pillar {
  position: relative;
  background: linear-gradient(180deg, rgba(14, 33, 72, .32), rgba(10, 17, 32, .85));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.hub-pillar:hover { border-color: rgba(74, 141, 248, .5); transform: translateY(-3px); }
.hub-pillar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--grad-brand);
  opacity: 0;
  transition: opacity .2s;
}
.hub-pillar:hover::before { opacity: 1; }
.hub-pillar-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: rgba(30, 79, 216, .18);
  border: 1px solid rgba(74, 141, 248, .35);
  color: var(--accent);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
}
.hub-pillar h3 { font-family: var(--font-head); font-size: 19px; margin: 14px 0 6px; letter-spacing: -0.01em; }
.hub-pillar p { color: var(--text-dim); font-size: 14px; line-height: 1.6; margin: 0; }

/* ---------- Cards de ferramentas ---------- */
#tools-grid,
.catalog-section .tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
  margin-top: 12px;
}
.catalog-section { padding-top: 0; }
.catalog-section h2 { font-size: clamp(22px, 3vw, 28px); letter-spacing: -0.02em; margin-bottom: 4px; }

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  background: linear-gradient(180deg, rgba(14, 33, 72, .30), rgba(10, 17, 32, .9));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.tool-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--grad-brand);
  opacity: 0;
  transition: opacity .2s;
}
.tool-card:hover {
  border-color: rgba(74, 141, 248, .55);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .38), 0 0 24px rgba(30, 79, 216, .12);
}
.tool-card:hover::before { opacity: 1; }

.tool-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.tool-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 12px;
  background: rgba(30, 79, 216, .16);
  border: 1px solid rgba(74, 141, 248, .3);
  font-size: 20px;
  line-height: 1;
}
.tool-card h3 {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 700;
  margin: 4px 0 0;
  letter-spacing: -0.01em;
}
.tool-card p { color: var(--text-dim); font-size: 14.5px; margin: 0; line-height: 1.55; }
.tool-card-cta {
  margin-top: auto;
  padding-top: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tool-card-cta .arrow { transition: transform .2s; display: inline-block; }
.tool-card:hover .tool-card-cta .arrow { transform: translateX(4px); }

/* ---------- Artigos ---------- */
#latest-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.article-card {
  background: linear-gradient(180deg, rgba(14, 33, 72, .22), rgba(10, 17, 32, .9));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 20px;
  text-decoration: none;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.article-card:hover {
  border-color: rgba(74, 141, 248, .55);
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, .35);
}
.article-card-date { color: var(--text-faint); display: block; font-size: 12px; margin-bottom: 8px; }
.article-card h3 { font-family: var(--font-head); font-size: 16.5px; line-height: 1.35; margin: 0 0 8px; }
.article-card p { color: var(--text-dim); font-size: 13.5px; line-height: 1.55; margin: 0; }
.section-empty { color: var(--text-dim); margin: 0; }

/* ---------- Compromisso ---------- */
.principles {
  align-items: start;
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  background: linear-gradient(135deg, rgba(30, 79, 216, .14), rgba(10, 17, 32, .6));
  border: 1px solid rgba(74, 141, 248, .28);
  border-radius: 18px;
  padding: 36px;
  margin-top: 20px;
}
.principles h2 { font-size: clamp(24px, 3.2vw, 31px); letter-spacing: -0.02em; margin-bottom: 0; }
.principles-copy p { color: var(--text-dim); font-size: 15px; line-height: 1.7; margin: 0 0 16px; }
.promise-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: grid;
  gap: 12px;
}
.promise-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}
.promise-list li::before {
  content: "✓";
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  margin-top: 1px;
  border-radius: 6px;
  background: rgba(110, 231, 168, .12);
  border: 1px solid rgba(110, 231, 168, .3);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

/* ---------- Footer rico (só a home usa .footer-rich) ---------- */
footer.footer-rich { text-align: left; padding: 0; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 40px;
  padding: 44px 20px 28px;
  border-top: 1px solid var(--border);
}
.footer-brand img { height: 30px; margin-bottom: 14px; display: block; }
.footer-brand p { color: var(--text-dim); font-size: 13.5px; line-height: 1.65; margin: 0; max-width: 42ch; }
.footer-nav { display: flex; gap: 28px; justify-content: flex-end; }
.footer-nav-col { display: grid; gap: 8px; align-content: start; }
.footer-nav-col strong {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 4px;
}
.footer-nav-col a { color: var(--text-dim); font-size: 13.5px; text-decoration: none; }
.footer-nav-col a:hover { color: var(--accent); }
.footer-legal {
  border-top: 1px solid rgba(30, 44, 78, .5);
  padding: 18px 20px 34px;
  color: var(--text-faint);
  font-size: 12.5px;
  line-height: 1.6;
  text-align: center;
}
.footer-legal p { margin: 4px 0; }

/* ---------- Reveal on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
  .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-nav { justify-content: flex-start; }
}
@media (max-width: 560px) {
  .header-nav { gap: 12px; }
  .header-nav a { font-size: 13px; }
  /* o hero já tem CTA; no mobile o botão não cabe no header */
  .header-nav a.header-cta { display: none; }
  .home-hero { padding: 60px 0 52px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .section-heading-row { align-items: start; flex-direction: column; gap: 10px; }
  .hub-pillars { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; gap: 22px; padding: 26px 20px; }
}
