/* =====================================================================
   ComexAqui — Artigo (blog) · estilos compartilhados
   Estrutura inspirada na referência; identidade do design system ComexAqui
   (Gabarito + DM Sans, escala de azuis).
   ===================================================================== */

:root {
  /* Escala de azul da marca */
  --cx-blue-50:  #e8f0fb;
  --cx-blue-100: #c5d8f6;
  --cx-blue-200: #9dbef0;
  --cx-blue-300: #74a4e9;
  --cx-blue-400: #4f8de4;
  --cx-blue-500: #2F75DE;
  --cx-blue-600: #275AA6;
  --cx-blue-700: #1e4580;
  --cx-blue-800: #14315c;
  --cx-blue-900: #0b1e38;
  --cx-blue-950: #071224;

  --cx-neutral-200: #d9d9d9;
  --cx-neutral-400: #969696;
  --cx-neutral-500: #737373;
  --cx-dark:  #161616;
  --cx-white: #ffffff;

  --gradient-brand: linear-gradient(75deg,#2F75DE 0%,#275AA6 29%,#1e4580 51%,#14315c 76%,#0b1e38 100%);
  --gradient-cover: linear-gradient(150deg, var(--cx-blue-600) 0%, var(--cx-blue-800) 55%, var(--cx-blue-950) 100%);

  --font-primary:   'Gabarito', sans-serif;
  --font-secondary: 'DM Sans', sans-serif;

  /* Semântico */
  --text-heading: var(--cx-blue-900);
  --text-body: #3a4a63;            /* navy dessaturado p/ corpo de texto */
  --text-muted: #6b7a90;
  --text-body-dark: rgba(255,255,255,.72);   /* texto sobre fundo escuro */
  --accent: var(--cx-blue-500);
  --hairline: rgba(11,30,56,.10);

  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-pill: 3rem;

  --max-w: 1180px;
  --gutter: clamp(1.25rem, 5vw, 4.5rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* scroll-behavior NÃO usa 'smooth' — o Lenis (artigo.js) controla o scroll suave;
   CSS smooth + Lenis brigam e travam o scroll. Âncoras usam lenis.scrollTo (ver JS). */
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-secondary);
  color: var(--text-body);
  background: var(--cx-white);
  line-height: 1.6;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
*:focus-visible { outline: 2px solid var(--cx-blue-400); outline-offset: 3px; border-radius: 3px; }

/* ── Preloader ────────────────────────────────────────────── */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--cx-blue-950);
  transition: opacity .6s ease, visibility .6s ease;
}
.preloader-logo { width: 120px; height: auto; opacity: .9; animation: pl-pulse 1.4s ease-in-out infinite; }
@keyframes pl-pulse { 0%,100% { opacity: .35; transform: scale(.98); } 50% { opacity: 1; transform: scale(1); } }
body:not(.preloading) .preloader { opacity: 0; visibility: hidden; pointer-events: none; }

/* ── Nav (minimal de leitura) ─────────────────────────────── */
#nav {
  position: fixed; inset: 0 0 auto 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--gutter);
  background: rgba(255,255,255,0);
  transition: background-color .3s ease, box-shadow .3s ease, padding .3s ease, backdrop-filter .3s ease;
}
#nav.scrolled {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--hairline);
  padding: .7rem var(--gutter);
}
.nav-logo svg { height: 30px; width: auto; display: block; }
.nav-logo svg .logo-half-a { fill: var(--cx-blue-500); }
.nav-logo svg .logo-half-b { fill: var(--cx-blue-900); }
.menu-trigger {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-secondary); font-size: .72rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--cx-blue-700);
  padding: .55rem .95rem; border: 1px solid var(--hairline); border-radius: var(--radius-pill);
  transition: border-color .2s, color .2s, background .2s;
}
.menu-trigger:hover { color: var(--cx-blue-500); border-color: var(--cx-blue-300); background: var(--cx-blue-50); }
.menu-trigger-lines { display: inline-flex; flex-direction: column; gap: 3px; }
.menu-trigger-line { width: 16px; height: 1.5px; background: currentColor; border-radius: 2px; }

/* ── Hero do artigo ───────────────────────────────────────── */
.article-hero {
  max-width: var(--max-w); margin: 0 auto;
  padding: clamp(7rem, 12vh, 9.5rem) var(--gutter) clamp(2.5rem, 5vh, 4rem);
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.article-meta-top { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.article-tag {
  font-family: var(--font-secondary); font-size: .7rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--cx-blue-600);
  background: var(--cx-blue-50); padding: .4rem .85rem; border-radius: var(--radius-pill);
}
.article-readtime { font-size: .8rem; color: var(--text-muted); }
.article-date {
  font-family: var(--font-secondary); font-size: .82rem; color: var(--text-muted);
  margin-bottom: 1rem; text-transform: capitalize;
}
.article-title {
  font-family: var(--font-primary); font-weight: 600;
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.2rem); line-height: 1.08;
  letter-spacing: -.02em; color: var(--text-heading); text-wrap: balance;
  margin-bottom: 1.75rem;
}
.article-author { display: flex; align-items: center; gap: .85rem; }
.article-author-avatar {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-brand); color: #fff;
  font-family: var(--font-primary); font-weight: 700; font-size: .95rem; letter-spacing: .02em;
}
.article-author-info { display: flex; flex-direction: column; line-height: 1.35; }
.article-author-name { font-family: var(--font-primary); font-weight: 600; color: var(--text-heading); font-size: .95rem; }
.article-author-role { font-size: .8rem; color: var(--text-muted); }

/* Capa: painel de marca (troque por <img> quando tiver a foto) */
.article-cover {
  position: relative; aspect-ratio: 4/3; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--gradient-cover); border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 40px 80px -34px rgba(7,18,36,.5);
  display: flex; align-items: center; justify-content: center;
}
.article-cover::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 34px 34px; opacity: .6;
}
.article-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.cover-icon { position: relative; z-index: 1; width: clamp(80px, 12vw, 132px); height: auto; color: var(--cx-blue-300); }
.cover-watermark {
  position: absolute; z-index: 0; right: -2rem; bottom: -4rem;
  font-family: var(--font-primary); font-weight: 900; font-size: 18rem; line-height: .7;
  color: #fff; opacity: .04; letter-spacing: -.04em; user-select: none; pointer-events: none;
}

/* ── Corpo: sumário + conteúdo ────────────────────────────── */
.article-body {
  max-width: var(--max-w); margin: 0 auto; padding: 1rem var(--gutter) 4rem;
  display: grid; grid-template-columns: 230px 1fr; gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.article-sidebar { position: sticky; top: 100px; align-self: start; }
.toc-label {
  font-family: var(--font-secondary); font-size: .68rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 1rem;
}
.toc-list { list-style: none; display: flex; flex-direction: column; gap: .15rem; border-left: 1px solid var(--hairline); }
.toc-list a {
  display: block; padding: .45rem 0 .45rem 1rem; margin-left: -1px;
  font-size: .85rem; line-height: 1.35; color: var(--text-muted);
  border-left: 2px solid transparent; transition: color .2s, border-color .2s;
}
.toc-list a:hover { color: var(--cx-blue-600); }
.toc-list a.active { color: var(--cx-blue-700); font-weight: 600; border-left-color: var(--accent); }
.toc-divider { height: 1px; background: var(--hairline); margin: 1.5rem 0; }

.share-buttons { display: flex; gap: .5rem; }
.share-btn {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--cx-blue-50); color: var(--cx-blue-600); border: 1px solid transparent;
  transition: background .2s, color .2s, transform .2s;
}
.share-btn:hover { background: var(--cx-blue-500); color: #fff; transform: translateY(-2px); }
.share-btn.copied { background: #1f9d57; color: #fff; }

/* ── Conteúdo editorial ───────────────────────────────────── */
.article-content { max-width: 720px; }
.article-content section { scroll-margin-top: 110px; }
.article-content p {
  font-family: var(--font-secondary); font-size: 1.075rem; line-height: 1.75;
  color: var(--text-body); margin-bottom: 1.35rem;
}
.article-content section > p:first-of-type { font-size: 1.15rem; }
#introducao p:first-child {
  font-family: var(--font-primary); font-weight: 500; font-size: 1.4rem; line-height: 1.5;
  color: var(--text-heading); margin-bottom: 1.5rem;
}
.article-content h2 {
  font-family: var(--font-primary); font-weight: 600; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  line-height: 1.18; letter-spacing: -.015em; color: var(--text-heading);
  margin: 2.75rem 0 1.1rem;
}
.article-content h3 {
  font-family: var(--font-primary); font-weight: 600; font-size: 1.22rem;
  color: var(--cx-blue-800); margin: 1.9rem 0 .6rem;
}
.article-content ul, .article-content ol { margin: 0 0 1.5rem 0; padding-left: 0; list-style: none; }
.article-content ul li, .article-content ol li {
  position: relative; padding-left: 1.85rem; margin-bottom: .6rem;
  font-size: 1.075rem; line-height: 1.65; color: var(--text-body);
}
.article-content ul li::before {
  content: ''; position: absolute; left: .35rem; top: .62rem;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.article-content ol { counter-reset: li; }
.article-content ol li { counter-increment: li; }
.article-content ol li::before {
  content: counter(li); position: absolute; left: 0; top: .05rem;
  font-family: var(--font-primary); font-weight: 700; font-size: .85rem; color: var(--accent);
  width: 1.3rem; text-align: left;
}
.article-content strong { color: var(--text-heading); font-weight: 600; }
.article-content a:not(.article-cta-button) {
  color: var(--cx-blue-600); border-bottom: 1px solid var(--cx-blue-200); transition: border-color .2s, color .2s;
}
.article-content a:not(.article-cta-button):hover { color: var(--cx-blue-500); border-color: var(--cx-blue-500); }

/* Callout */
.callout {
  background: var(--cx-blue-50); border: 1px solid var(--cx-blue-100);
  border-left: 4px solid var(--accent); border-radius: var(--radius-md);
  padding: 1.5rem 1.75rem; margin: 2rem 0;
}
.callout-label {
  font-family: var(--font-secondary); font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--cx-blue-600); margin-bottom: .6rem;
}
.callout p:last-child { margin-bottom: 0; font-size: 1rem; color: var(--cx-blue-900); }

/* Blockquote */
.article-content blockquote {
  margin: 2.5rem 0; padding: .25rem 0 .25rem 2rem;
  border-left: 3px solid var(--accent);
}
.article-content blockquote p {
  font-family: var(--font-primary); font-weight: 500; font-size: 1.6rem; line-height: 1.3;
  letter-spacing: -.01em; color: var(--text-heading); margin-bottom: .75rem;
}
.article-content blockquote cite {
  font-style: normal; font-size: .9rem; font-weight: 500; color: var(--text-muted);
}

/* CTA inline */
.article-cta-inline {
  margin: 3rem 0 1rem; padding: clamp(1.75rem, 4vw, 2.75rem);
  background: var(--gradient-brand); border-radius: var(--radius-lg); color: #fff;
  position: relative; overflow: hidden;
}
.article-cta-inline::after {
  content: ''; position: absolute; right: -20%; top: -60%; width: 70%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 60%);
  pointer-events: none;
}
/* Mobile: o card fica estreito + alto e o círculo do glow acaba cortando
   o gradiente no meio (visível como uma "costura" vertical). Trocamos
   pra elipse ancorada no canto superior direito (escala proporcional,
   sem borda visível) e simplificamos o gradiente base (5 → 3 stops). */
@media (max-width: 600px) {
  .article-cta-inline {
    background: linear-gradient(155deg, #2F75DE 0%, #1e4580 55%, #0b1e38 100%);
  }
  .article-cta-inline::after {
    right: 0; top: 0; width: 100%; height: 100%;
    background: radial-gradient(ellipse at top right, rgba(255,255,255,.12), transparent 70%);
  }
}
.article-cta-inline h3 {
  position: relative; font-family: var(--font-primary); font-weight: 600;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem); line-height: 1.25; color: #fff; margin-bottom: .75rem;
}
.article-cta-inline p { position: relative; color: rgba(255,255,255,.8); font-size: 1rem; margin-bottom: 1.5rem; max-width: 52ch; }
.article-cta-button {
  position: relative; display: inline-flex; align-items: center; gap: .6rem;
  background: #fff; color: var(--cx-blue-700);
  font-family: var(--font-secondary); font-size: .85rem; font-weight: 600; letter-spacing: .02em;
  padding: .9rem 1.75rem; border-radius: var(--radius-pill);
  transition: transform .2s, box-shadow .2s;
}
.article-cta-button:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(0,0,0,.4); }
.article-cta-button svg { transition: transform .2s; }
.article-cta-button:hover svg { transform: translate(2px,-2px); }

/* Referências + disclaimer */
.article-references { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--hairline); }
.article-references h2 { font-size: 1.3rem; margin-top: 0; }
.article-references ol { font-size: .92rem; }
.article-references li { font-size: .92rem; color: var(--text-muted); line-height: 1.6; margin-bottom: .9rem; }
.article-references em { color: var(--text-body); }
.article-disclaimer {
  margin-top: 2rem; padding: 1.25rem 1.5rem; background: #f5f7fa;
  border-radius: var(--radius-md); border: 1px solid var(--hairline);
}
.article-disclaimer p { font-size: .85rem; line-height: 1.6; color: var(--text-muted); margin: 0; }

/* Footer do artigo: tags */
.article-footer { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--hairline); }
.article-tags { display: flex; flex-wrap: wrap; gap: .55rem; }
.article-tag-chip {
  font-size: .78rem; font-weight: 500; color: var(--cx-blue-700);
  background: var(--cx-blue-50); padding: .45rem 1rem; border-radius: var(--radius-pill);
}

/* ── Continue lendo ───────────────────────────────────────── */
.related-articles { background: var(--cx-blue-50); padding: clamp(3rem, 7vw, 5.5rem) 0; }
.related-articles-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }
.related-articles > .related-articles-inner > h2 {
  font-family: var(--font-primary); font-weight: 600; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem);
  letter-spacing: -.02em; color: var(--text-heading); margin-bottom: 2.25rem;
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.related-card {
  display: flex; flex-direction: column; background: #fff; border-radius: var(--radius-md);
  overflow: hidden; border: 1px solid var(--hairline);
  transition: transform .3s ease, box-shadow .3s ease;
}
.related-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -24px rgba(11,30,56,.3); }
.related-card-cover {
  position: relative; aspect-ratio: 16/10; background: var(--gradient-cover);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.related-card-cover::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .6;
}
.related-card-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.related-card-cover .cover-icon { width: 54px; }
.related-card-eyebrow {
  font-family: var(--font-secondary); font-size: .68rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--cx-blue-500);
  padding: 1.25rem 1.4rem 0;
}
.related-card-title {
  font-family: var(--font-primary); font-weight: 600; font-size: 1.05rem; line-height: 1.3;
  color: var(--text-heading); padding: .5rem 1.4rem 1.5rem;
}

/* ── Footer da marca (ComexAqui) ──────────────────────────── */
footer {
  background: var(--cx-white); color: var(--cx-blue-900);
  padding: clamp(3rem,6vw,5rem) var(--gutter) 2rem; border-top: 1px solid var(--hairline);
}
.footer-inner { max-width: var(--max-w); margin: 0 auto; }
.footer-brand {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding-bottom: 2.5rem; margin-bottom: 2.5rem; border-bottom: 1px solid var(--hairline); flex-wrap: wrap;
}
.footer-logo svg { height: 46px; width: auto; display: block; }
.footer-logo svg .logo-half-a { fill: var(--cx-blue-500); }
.footer-logo svg .logo-half-b { fill: var(--cx-blue-900); }
.footer-tagline { font-size: .9rem; font-weight: 400; color: rgba(11,30,56,.55); max-width: 28rem; }
.footer-cols {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem;
  padding-bottom: 2.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--hairline);
}
.footer-col-title { font-family: var(--font-primary); font-size: 1.1rem; font-weight: 500; color: var(--cx-blue-900); margin-bottom: 1.1rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.footer-col a { font-size: .9rem; color: var(--cx-blue-900); transition: color .2s; }
.footer-col a:hover { color: var(--cx-blue-500); }
.footer-meta-row {
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  padding: 1.5rem 0; border-bottom: 1px solid var(--hairline); flex-wrap: wrap;
}
.footer-meta { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.footer-meta a, .footer-social a { font-size: .85rem; color: rgba(11,30,56,.7); transition: color .2s; }
.footer-meta a:hover, .footer-social a:hover { color: var(--cx-blue-500); }
.footer-social { display: flex; gap: 1.5rem; }
.footer-disclaimer { display: flex; justify-content: space-between; align-items: center; padding-top: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.footer-disclaimer span { font-size: .75rem; color: rgba(11,30,56,.5); }
.footer-credit-link { color: var(--cx-blue-600); }
.footer-credit-link:hover { color: var(--cx-blue-500); }

/* ── Cookie banner ────────────────────────────────────────── */
.cookie-banner {
  position: fixed; left: clamp(1rem,3vw,2rem); right: clamp(1rem,3vw,2rem); bottom: clamp(1rem,3vw,2rem);
  max-width: 720px; margin: 0 auto; z-index: 280;
  background: #fff; border: 1px solid var(--hairline); border-radius: var(--radius-md);
  box-shadow: 0 24px 60px -20px rgba(11,30,56,.35);
  padding: 1.25rem 1.5rem; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
  transform: translateY(160%); transition: transform .45s cubic-bezier(.4,0,.2,1);
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner-text { font-size: .85rem; line-height: 1.55; color: var(--text-body); flex: 1 1 280px; }
.cookie-banner-text a { color: var(--cx-blue-600); border-bottom: 1px solid var(--cx-blue-200); }
.cookie-banner-actions { display: flex; gap: .65rem; }
.cookie-btn { padding: .6rem 1.25rem; border-radius: var(--radius-pill); font-size: .8rem; font-weight: 600; border: 1px solid transparent; transition: all .2s; }
.cookie-btn-secondary { background: transparent; color: var(--text-muted); border-color: var(--hairline); }
.cookie-btn-secondary:hover { color: var(--cx-blue-700); border-color: var(--cx-blue-300); }
.cookie-btn-primary { background: var(--cx-blue-500); color: #fff; }
.cookie-btn-primary:hover { background: var(--cx-blue-600); }

/* ── Responsivo ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .article-hero { grid-template-columns: 1fr; gap: 2rem; padding-top: 7rem; }
  .article-cover { order: -1; aspect-ratio: 16/10; }
  .article-body { grid-template-columns: 1fr; gap: 2rem; }
  .article-sidebar { position: static; top: auto; }
  .toc-list { display: none; }                 /* sumário some no mobile p/ leitura limpa */
  .article-sidebar .toc-label { display: none; }
  .toc-divider { display: none; }
  .share-buttons { justify-content: flex-start; }
  .article-content { max-width: none; }
  .related-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }
}

@media (max-width: 540px) {
  .footer-cols { grid-template-columns: 1fr; }
  .footer-brand { flex-direction: column; align-items: flex-start; }
  .cookie-banner { flex-direction: column; align-items: stretch; }
  .cookie-banner-actions { justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* =====================================================================
   MODAL de contato (CTA) — injetado por artigo.js em toda página de
   artigo (mesmo componente "bottom sheet glass" do index). Tokens de
   espaçamento/peso só existiam no index → escopados em .modal-overlay
   (herdam p/ os filhos) pra não vazar pro resto do artigo.
   ===================================================================== */
.modal-overlay {
  --space-sm:  clamp(1rem,    0.86rem + 0.71vw, 1.5rem);
  --space-md:  clamp(1.5rem,  1.29rem + 1.07vw, 2.25rem);
  --space-lg:  clamp(2rem,    1.71rem + 1.43vw, 3rem);
  --space-xl:  clamp(2.5rem,  2.07rem + 2.14vw, 4rem);
  --space-2xl: clamp(3rem,    2.43rem + 2.86vw, 5rem);
  --fw-extralight: 200;
  --fw-light:      300;
  --fw-regular:    400;
  --fw-bold:       700;
  --ls-tight:  -0.02em;
  --ls-wider:   0.08em;
  --lh-xl:      1.6em;
  --font-size-body-2: clamp(1rem, 0.93rem + 0.36vw, 1.25rem);

  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: flex-end;            /* ancora no pé */
  justify-content: center;
  background: rgba(4, 11, 26, .55);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, visibility .4s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal-glass {
  position: relative;
  width: 100%;
  max-width: 1240px;
  min-height: 92dvh;
  max-height: 97dvh;
  overflow-y: auto;
  border-radius: 28px 28px 0 0;     /* só topo arredondado (cola no pé) */
  background: linear-gradient(160deg,
    rgba(56, 96, 180, .30) 0%,
    rgba(12, 26, 54, .66) 55%,
    rgba(7, 16, 36, .80) 100%);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid rgba(255,255,255,.16);
  border-bottom: none;
  box-shadow:
    0 -30px 100px -24px rgba(0,0,0,.7),
    inset 0 1px 0 rgba(255,255,255,.18);
  transform: translateY(100%);      /* SURGE de baixo */
  transition: transform .6s cubic-bezier(.22,1,.36,1);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.modal-glass::-webkit-scrollbar { display: none; }
.modal-overlay.open .modal-glass { transform: translateY(0); }
.modal-glass::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 50%; height: 70%;
  background: radial-gradient(circle, rgba(47,117,222,.38) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.modal-close {
  position: absolute;
  top: 1.1rem; right: 1.25rem;
  z-index: 3;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(255,255,255,.8);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .25s, transform .35s cubic-bezier(.22,1,.36,1), color .25s;
}
.modal-close:hover { background: rgba(255,255,255,.16); color: #fff; transform: rotate(90deg); }

.modal-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  align-items: stretch;
}
@media (max-width: 860px) { .modal-grid { grid-template-columns: 1fr; } }

.modal-aside {
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-sm);
  border-right: 1px solid rgba(255,255,255,.1);
}
@media (max-width: 860px) {
  .modal-aside { border-right: none; border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: var(--space-md); }
}

/* eyebrow — base do index, escopada ao modal */
.modal-overlay .eyebrow {
  font-family: var(--font-secondary);
  font-size: 0.68rem;
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: var(--space-sm);
}
.modal-overlay .eyebrow::before {
  content: '';
  display: block; width: 1.5rem; height: 1px;
  flex-shrink: 0;
}
.modal-aside .eyebrow { color: var(--cx-blue-300); }
.modal-aside .eyebrow::before { background: var(--cx-blue-400); }

.modal-title {
  font-family: var(--font-primary);
  font-size: clamp(1.75rem, 1.4vw + 1rem, 2.4rem);
  font-weight: var(--fw-extralight);
  line-height: 1.1;
  letter-spacing: var(--ls-tight);
  color: #fff;
}
.modal-title strong { font-weight: var(--fw-bold); }
.modal-aside-sub {
  font-family: var(--font-secondary);
  font-size: var(--font-size-body-2);
  font-weight: var(--fw-light);
  line-height: var(--lh-xl);
  color: rgba(255,255,255,.6);
}
.modal-aside-sub + .modal-aside-sub { margin-top: .75rem; }
.modal-trust {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.modal-trust-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--font-secondary);
  font-size: .85rem;
  color: rgba(255,255,255,.78);
}
.modal-trust-item svg {
  color: var(--cx-blue-300);
  flex-shrink: 0;
  background: rgba(47,117,222,.15);
  border-radius: 50%;
  padding: 3px;
  box-sizing: content-box;
  width: 14px; height: 14px;
}

/* Formulário (dentro do modal) */
.cta-form {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .85rem;
}
.cta-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 480px) {
  .cta-form-row { grid-template-columns: 1fr; }
}
.cta-form label {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  font-family: var(--font-secondary);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
.cta-form input,
.cta-form textarea {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: .8rem 1rem;
  font-family: var(--font-secondary);
  font-size: .9rem;
  font-weight: 400;
  color: rgba(255,255,255,.9);
  transition: border-color .2s, background .2s;
  text-transform: none;
  letter-spacing: 0;
  width: 100%;
  text-overflow: ellipsis;
  min-width: 0;
}
.cta-form input::placeholder,
.cta-form textarea::placeholder {
  color: rgba(255,255,255,.3);
}
.cta-form input:focus,
.cta-form textarea:focus {
  outline: none;
  border-color: var(--cx-blue-400);
  background: rgba(255,255,255,.06);
}
.cta-form textarea {
  resize: vertical;
  min-height: clamp(120px, 16vh, 220px);
  line-height: 1.5;
}

/* Perfil — seletor dropdown */
.perfil-field-wrap { position: relative; display: flex; flex-direction: column; gap: .4rem; }
.perfil-field-label {
  font-family: var(--font-secondary);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
.perfil-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: .8rem 1rem;
  font-family: var(--font-secondary);
  font-size: .9rem;
  color: rgba(255,255,255,.3);
  cursor: pointer;
  text-align: left;
  transition: border-color .2s, background .2s, color .2s;
}
.perfil-field:hover { border-color: rgba(255,255,255,.22); }
.perfil-field.has-value { color: rgba(255,255,255,.92); }
.perfil-field-wrap.open .perfil-field {
  border-color: var(--cx-blue-400);
  background: rgba(255,255,255,.06);
}
.perfil-field-chevron {
  flex-shrink: 0;
  opacity: .55;
  transition: transform .35s cubic-bezier(.22,1,.36,1);
}
.perfil-field-wrap.open .perfil-field-chevron { transform: rotate(180deg); }
.perfil-options {
  position: absolute;
  top: calc(100% + .4rem);
  left: 0; right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: .3rem;
  background: linear-gradient(160deg, rgba(26,46,86,.97) 0%, rgba(12,24,50,.98) 100%);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  box-shadow: 0 22px 55px -16px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transform-origin: top center;
  transition: opacity .2s ease, transform .28s cubic-bezier(.22,1,.36,1), visibility .2s;
}
.perfil-field-wrap.open .perfil-options {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.perfil-pill { display: block; }
.perfil-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.perfil-pill span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  width: 100%;
  padding: .68rem .85rem;
  border-radius: 7px;
  font-family: var(--font-secondary);
  font-size: .88rem;
  font-weight: 400;
  color: rgba(255,255,255,.78);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
  transition: background .18s, color .18s;
}
.perfil-pill span::after {
  content: '';
  width: 14px; height: 14px;
  flex-shrink: 0;
  opacity: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8.5l3 3 7-7' stroke='%235b9bf0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: opacity .18s;
}
.perfil-pill span:hover { background: rgba(255,255,255,.07); color: #fff; }
.perfil-pill input:checked + span {
  background: rgba(47,117,222,.18);
  color: #fff;
}
.perfil-pill input:checked + span::after { opacity: 1; }
.perfil-pill input:focus-visible + span {
  outline: 2px solid var(--cx-blue-400);
  outline-offset: -2px;
}

.cta-form-submit {
  background: var(--cx-blue-500);
  color: #fff;
  border: none;
  border-radius: 99px;
  padding: 1.05rem 2.25rem;
  font-family: var(--font-secondary);
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background .2s, transform .2s, box-shadow .3s;
  box-shadow: 0 10px 30px -12px rgba(47,117,222,.5);
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-top: .35rem;
}
.cta-form-submit:hover {
  background: var(--cx-blue-400);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px -12px rgba(47,117,222,.6);
}
.cta-form-submit svg { transition: transform .2s; }
.cta-form-submit:hover svg { transform: translateX(3px); }
.cta-form-feedback {
  font-family: var(--font-secondary);
  font-size: .82rem;
  font-weight: 400;
  color: rgba(255,255,255,.7);
  margin: 0;
  min-height: 1.2em;
}
.cta-form-feedback.ok    { color: #74e6a4; }
.cta-form-feedback.error { color: #f8a294; }

.cta-form .required-mark {
  color: var(--cx-blue-300);
  margin-left: .2rem;
  font-weight: 600;
}

.cta-form-disclaimer {
  font-family: var(--font-secondary);
  font-size: .72rem;
  font-weight: 400;
  color: rgba(255,255,255,.4);
  line-height: 1.45;
  margin: 0;
  text-align: center;
}
.cta-form-disclaimer a {
  color: rgba(255,255,255,.62);
  border-bottom: 1px solid rgba(255,255,255,.2);
  transition: color .2s, border-color .2s;
}
.cta-form-disclaimer a:hover { color: #fff; border-bottom-color: var(--cx-blue-400); }


/* ═══════════════════════════════════════════════════════════════
   COOKIE BANNER — bilíngue PT/EN
   <body data-lang="pt|en"> controla qual versão aparece (set pelo JS).
   Toggle dentro do banner alterna e persiste em localStorage.
   ═══════════════════════════════════════════════════════════════ */
body[data-lang="pt"] [lang="en"] { display: none !important; }
body[data-lang="en"] [lang="pt"] { display: none !important; }
.cookie-lang-toggle {
  margin-left: .5rem;
  padding: .35rem .75rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: inherit;
  transition: color .2s, border-color .2s, background .2s;
}
.cookie-lang-toggle:hover { color: var(--cx-blue-700); border-color: var(--cx-blue-300); }


/* ════════════════════════════════════════════════════════════════
   CTA ANIMATIONS — arrow nudge + glow pulse no botao inline do CTA
   dos artigos. Mesmo padrao do index e do blog. Pausa no hover.
════════════════════════════════════════════════════════════════ */
@keyframes cx-cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 117, 222, 0); }
  50%      { box-shadow: 0 0 0 10px rgba(47, 117, 222, 0.22); }
}
@keyframes cx-cta-arrow-nudge {
  0%, 72%, 100% { transform: translateX(0); }
  86%           { transform: translateX(4px); }
}
.article-cta-button { animation: cx-cta-pulse 2.8s ease-in-out infinite; }
.article-cta-button svg { animation: cx-cta-arrow-nudge 3.2s cubic-bezier(.22,1,.36,1) infinite; }
.article-cta-button:hover, .article-cta-button:hover svg { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .article-cta-button, .article-cta-button svg { animation: none !important; }
}
