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

:root {
  --purple-200: #DDD6FE;
  --purple-300: #C4B5FD;
  --purple-400: #A78BFA;
  --purple-500: #8B5CF6;
  --purple-600: #7C3AED;
  --purple-700: #6D28D9;

  --bg-base: #08050F;
  --bg-surface: #0F0A1C;
  --bg-elevated: #150E27;
  --bg-elevated-2: #1B1232;

  --text-hi: #F5F2FC;
  --text-mid: #AFA3CB;
  --text-low: #6F6390;

  --border: rgba(167,139,250,0.12);
  --border-strong: rgba(167,139,250,0.28);

  --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 26px;
  --shadow: 0 8px 32px rgba(0,0,0,0.45);
  --glow: 0 4px 24px rgba(139,92,246,0.40);
  --t: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --max-w: 1120px;
}

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 92px; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-hi);
  line-height: 1.6; font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--purple-600); color: #fff; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated-2); border-radius: 8px; border: 2px solid var(--bg-base); }
::-webkit-scrollbar-thumb:hover { background: var(--purple-700); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--purple-400); outline-offset: 3px; border-radius: 4px;
}

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 600ms ease, transform 600ms ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── NAV ── */
nav.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(8,5,15,0.80);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; height: 72px;
  padding: 0 1.5rem;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
}
.nav-logo { display: inline-flex; align-items: center; justify-self: start; }
.logo-img {
  height: 46px; width: auto; display: block;
  filter: brightness(0) invert(1);
  transition: opacity var(--t);
}
.nav-logo:hover .logo-img { opacity: 0.85; }
.nav-links { display: flex; gap: 1.5rem; list-style: none; justify-self: center; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--text-mid);
  text-decoration: none; transition: color var(--t); position: relative; padding: 4px 0;
}
.nav-links a::after {
  content: ''; position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%);
  width: 0; height: 2px; border-radius: 2px; background: var(--purple-500);
  transition: width var(--t);
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta {
  justify-self: end;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-700));
  color: #fff; padding: 10px 22px; border-radius: 100px;
  font-size: 14px; font-weight: 600; text-decoration: none;
  transition: transform var(--t), box-shadow var(--t), filter var(--t);
  box-shadow: 0 2px 16px rgba(139,92,246,0.35);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(139,92,246,0.5); filter: brightness(1.1); }

.hamburger { display: none; justify-self: end; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; border: none; background: none; }
.hamburger span { width: 22px; height: 2px; background: var(--text-hi); border-radius: 2px; transition: all var(--t); display: block; }
.mobile-menu {
  display: none; position: fixed; top: 72px; left: 0; right: 0; z-index: 99;
  background: rgba(10,6,19,0.97);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem 1.75rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; }
.mobile-menu ul li a {
  display: block; padding: 14px 0; font-size: 15px; font-weight: 500;
  color: var(--text-hi); text-decoration: none; border-bottom: 1px solid var(--border);
}

/* ── BOTÕES ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 32px; border-radius: 100px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  cursor: pointer; border: none; font-family: inherit;
  transition: transform var(--t), box-shadow var(--t), filter var(--t), background var(--t), border-color var(--t);
}
.btn-primary {
  background: linear-gradient(135deg, var(--purple-500), var(--purple-700));
  color: #fff; box-shadow: var(--glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 36px rgba(139,92,246,0.55); filter: brightness(1.08); }

/* ── CABEÇALHO DO BLOG ── */
.blog-head {
  text-align: center; max-width: 660px;
  margin: 0 auto; padding: 150px 1.5rem 3.5rem;
}
.sec-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--purple-400); margin-bottom: 1.1rem;
}
.sec-tag::before, .sec-tag::after { content: ''; width: 24px; height: 1.5px; background: var(--purple-500); border-radius: 2px; opacity: 0.7; }
.blog-head h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 700; letter-spacing: -0.02em;
  color: #fff; line-height: 1.18; margin-bottom: 1rem;
}
.blog-head p { font-size: 17px; color: var(--text-mid); line-height: 1.75; }

/* ── GRADE DE POSTS ── */
.posts-wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem 96px; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.post-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.75rem;
  display: flex; flex-direction: column;
  text-decoration: none;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t), background var(--t);
  position: relative; overflow: hidden;
}
.post-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--purple-500), transparent);
  opacity: 0; transition: opacity var(--t);
}
.post-card:hover {
  transform: translateY(-5px); border-color: var(--border-strong);
  box-shadow: var(--shadow), 0 0 32px rgba(139,92,246,0.12);
  background: var(--bg-elevated);
}
.post-card:hover::before { opacity: 1; }
.post-cat {
  display: inline-block; align-self: flex-start;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--purple-300); background: rgba(139,92,246,0.13);
  border: 1px solid rgba(139,92,246,0.22);
  padding: 4px 12px; border-radius: 100px; margin-bottom: 1rem;
}
.post-card h2 {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 600; color: #fff;
  line-height: 1.35; letter-spacing: -0.01em; margin-bottom: 0.6rem;
}
.post-card p { font-size: 14px; color: var(--text-mid); line-height: 1.7; flex: 1; margin-bottom: 1.25rem; }
.post-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-low);
}
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-low); }

/* ── ARTIGO ── */
.article-head { max-width: 760px; margin: 0 auto; padding: 150px 1.5rem 0; }
.breadcrumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-low); margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--text-mid); text-decoration: none; transition: color var(--t); }
.breadcrumb a:hover { color: var(--purple-300); }
.article-head .post-cat { margin-bottom: 1.1rem; }
.article-head h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.8vw, 2.6rem);
  font-weight: 700; letter-spacing: -0.02em;
  color: #fff; line-height: 1.2; margin-bottom: 1.1rem;
}
.article-head .post-meta { padding-bottom: 2rem; border-bottom: 1px solid var(--border); }

.article { max-width: 760px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.article p { font-size: 16.5px; color: var(--text-mid); line-height: 1.85; margin-bottom: 1.4rem; }
.article p strong, .article li strong { color: var(--text-hi); font-weight: 600; }
.article h2 {
  font-family: var(--font-display);
  font-size: 25px; font-weight: 600; color: #fff;
  letter-spacing: -0.01em; line-height: 1.3;
  margin: 2.75rem 0 1.1rem;
}
.article h3 {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 600; color: #fff;
  margin: 2rem 0 0.85rem;
}
.article ul, .article ol { margin: 0 0 1.5rem 1.4rem; }
.article li { font-size: 16px; color: var(--text-mid); line-height: 1.8; margin-bottom: 0.6rem; }
.article li::marker { color: var(--purple-400); }
.article a { color: var(--purple-300); text-decoration: underline; text-underline-offset: 3px; transition: color var(--t); }
.article a:hover { color: var(--purple-200); }
.article blockquote {
  border-left: 3px solid var(--purple-500);
  background: var(--bg-surface);
  padding: 1.25rem 1.5rem; margin: 0 0 1.5rem;
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.article blockquote p { margin: 0; font-style: italic; }
.article table {
  width: 100%; border-collapse: collapse; margin: 0 0 1.75rem;
  font-size: 14.5px; border: 1px solid var(--border);
  border-radius: var(--r-md); overflow: hidden;
}
.article th {
  background: var(--bg-elevated); color: #fff; font-weight: 600;
  text-align: left; padding: 12px 16px; font-size: 13.5px;
  border-bottom: 1px solid var(--border-strong);
}
.article td {
  padding: 12px 16px; color: var(--text-mid);
  border-bottom: 1px solid var(--border); vertical-align: top;
}
.article tr:last-child td { border-bottom: none; }

/* ── CTA DENTRO DO POST ── */
.cta-box {
  background:
    linear-gradient(var(--bg-elevated), var(--bg-elevated)) padding-box,
    linear-gradient(140deg, rgba(139,92,246,0.65), rgba(139,92,246,0.10) 50%, rgba(196,181,253,0.40)) border-box;
  border: 1px solid transparent;
  border-radius: var(--r-xl);
  padding: 2.25rem 2rem; margin: 2.75rem 0;
  text-align: center;
  box-shadow: var(--shadow), 0 0 60px rgba(124,58,237,0.12);
}
.cta-box h3 {
  font-family: var(--font-display);
  font-size: 21px; font-weight: 600; color: #fff; margin: 0 0 0.6rem;
}
.cta-box p { font-size: 15px; color: var(--text-mid); max-width: 480px; margin: 0 auto 1.5rem; line-height: 1.7; }
.cta-box .note { font-size: 12px; color: var(--text-low); margin: 1rem auto 0; }

/* ── AUTOR / RODAPÉ DO POST ── */
.author-box {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 1.25rem 1.5rem; margin-top: 2.5rem;
}
.author-avatar {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-700));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; color: #fff;
  box-shadow: 0 2px 12px rgba(139,92,246,0.35);
}
.author-box h4 { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 2px; }
.author-box p { font-size: 13px; color: var(--text-mid); margin: 0; line-height: 1.6; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--purple-300);
  text-decoration: none; margin-top: 2rem; transition: color var(--t);
}
.back-link:hover { color: var(--purple-200); }

/* ── FOOTER ── */
footer { border-top: 1px solid var(--border); background: var(--bg-surface); padding: 3rem 1.5rem 2rem; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2.5rem; }
.nav-logo--lg .logo-img { height: 58px; }
.footer-desc { font-size: 14px; color: var(--text-mid); margin-top: 1rem; line-height: 1.7; max-width: 300px; }
.footer-legal { font-size: 12px; color: var(--text-low); line-height: 1.8; margin-top: 1rem; }
.footer-legal a, .footer-bottom a { color: var(--purple-400); text-decoration: none; }
.footer-legal a:hover, .footer-bottom a:hover { color: var(--purple-300); }
.footer-col h4 { font-size: 12px; font-weight: 600; color: var(--text-low); margin-bottom: 1.1rem; letter-spacing: 0.10em; text-transform: uppercase; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col ul li a { font-size: 13px; color: var(--text-mid); text-decoration: none; transition: color var(--t); }
.footer-col ul li a:hover { color: var(--purple-300); }
.social-row { display: flex; gap: 10px; margin-top: 1.4rem; }
.social-link {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); color: var(--text-mid);
  transition: color var(--t), border-color var(--t), background var(--t), transform var(--t);
}
.social-link svg { width: 18px; height: 18px; }
.social-link:hover {
  color: var(--purple-300); border-color: var(--purple-400);
  background: rgba(139,92,246,0.10); transform: translateY(-2px);
}
.social-link.soon { opacity: 0.4; cursor: default; }
.social-link.soon:hover {
  color: var(--text-mid); border-color: var(--border);
  background: none; transform: none;
}
.footer-bottom {
  max-width: var(--max-w); margin: 2.5rem auto 0; padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem;
}
.footer-bottom p { font-size: 12px; color: var(--text-low); }
.footer-bottom strong { color: var(--purple-400); font-weight: 600; }

/* ── WHATSAPP FLUTUANTE ── */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(37,211,102,0.45);
  transition: transform var(--t), box-shadow var(--t);
  text-decoration: none;
}
.wa-float:hover { transform: scale(1.08); box-shadow: 0 10px 32px rgba(37,211,102,0.6); }
.wa-float::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid rgba(37,211,102,0.45);
  animation: waPulse 2s ease-out infinite;
}
@keyframes waPulse { 0% { transform: scale(0.9); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
.wa-float svg { width: 28px; height: 28px; }

/* ── COOKIE BANNER ── */
.cookie-banner {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  z-index: 200; width: min(620px, calc(100vw - 32px));
  background: var(--bg-elevated-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg); padding: 1.25rem 1.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
}
.cookie-banner p { flex: 1; min-width: 240px; font-size: 13px; color: var(--text-mid); line-height: 1.6; margin: 0; }
.cookie-actions { display: flex; gap: 8px; }
.cookie-btn {
  padding: 9px 20px; border-radius: 100px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all var(--t); border: none;
}
.cookie-accept { background: linear-gradient(135deg, var(--purple-500), var(--purple-700)); color: #fff; }
.cookie-accept:hover { filter: brightness(1.1); }
.cookie-decline { background: none; border: 1px solid var(--border-strong); color: var(--text-mid); }
.cookie-decline:hover { border-color: var(--purple-400); color: var(--text-hi); }

/* ── RESPONSIVE ── */
@media (max-width: 980px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; grid-column: 3; }
  .posts-grid { grid-template-columns: 1fr; }
  .blog-head, .article-head { padding-top: 120px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
