/* ============================================================
   Gerador de Invoice — Landing Page (Contabilizei)
   style.css — vanilla, sem build
   ============================================================ */

/* ----------------------------------------------------------
   RESET / BASE
---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  color: #2D3342;
  background: #ffffff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
/* Trava de fonte do DS (Inter): controles de formulário NÃO herdam font-family do
   body por padrão. A regra cobria só `button` (e os campos do gerador tinham
   `font-family: inherit` avulso), então os 2 inputs do modal "Falar com
   especialista" (.modal__input) renderizavam em Arial.
   Herança explícita em vez do `* { ...!important }` global, que é agressivo e
   pode quebrar todos os textos de uma vez (guia da esteira §7). */
button, input, select, textarea, optgroup { font-family: inherit; }
a { color: inherit; }
::selection { background: #0E53C0; color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Garante que [hidden] sempre esconda, mesmo em elementos com display:grid/flex por
   classe (regra de autor com a MESMA especificidade do [hidden] do user-agent vence
   por origem — sem isso o país/pagamento "Outro" fica com display:grid mesmo hidden). */
[hidden] { display: none !important; }

/* ----------------------------------------------------------
   ANIMAÇÃO DE ENTRADA (scroll reveal) — imagens deslizam pelo
   lado em que estão alinhadas; .is-visible é ligado via JS
   (IntersectionObserver) quando a imagem entra na tela.
---------------------------------------------------------- */
.reveal { opacity: 0; transform: translateX(var(--reveal-x, 48px)); transition: opacity .8s ease, transform .8s cubic-bezier(.16,1,.3,1); }
.reveal.is-visible { opacity: 1; transform: translateX(0); }
.reveal--from-right { --reveal-x: 48px; }
.reveal--from-left { --reveal-x: -48px; }
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
}

/* ----------------------------------------------------------
   FORMA DECORATIVA DE FUNDO (hero + CTA navy) — asset do Figma
   (node 4239-3086), posicionada atrás do conteúdo (z-index
   negativo) e recortada pelo overflow:hidden da seção.
---------------------------------------------------------- */
.section-bg-shape {
  position: absolute;
  top: -80px;
  right: -260px;
  width: 900px;
  max-width: none;
  height: auto;
  z-index: -1;
  pointer-events: none;
  user-select: none;
}
/* No hero a forma fica mais pra baixo, mais centralizada verticalmente na seção
   (no CTA navy o posicionamento original — mais pro topo — continua). */
.ihero .section-bg-shape { top: 0; }

/* ----------------------------------------------------------
   TOKENS DE COR (DS Contabilizei)
---------------------------------------------------------- */
:root {
  --blue-50:  #E5F0FF;
  --blue-100: #C9E0FF;
  --blue-200: #9FC8FF;
  --blue-600: #1169F5;
  --blue-700: #0E53C0;
  --blue-800: #093CA3;
  --blue-900: #002868;
  --cyan:     #04F7F7;
  --cyan-700: #00d9d9;

  --cinza-50:  #F7F9FF;
  --cinza-100: #EBEFFA;
  --cinza-200: #E1E6F5;
  --cinza-300: #CCD4E8;
  --cinza-400: #B0B9D1;
  --cinza-500: #757D92;
  --cinza-600: #545B6F;
  --cinza-700: #3F4658;
  --cinza-800: #2D3342;
  --cinza-900: #202636;

  --sucesso-100:  #AADFC1;
  --sucesso-500: #128243;
  --sucesso-600: #0F6735;
  --erro-100: #F7D2DA;
  --erro-500: #DF1642;
  --erro-600: #B21235;
  --alerta-100: #FFE1A6;
  --alerta-400: #CF972D;

  /* --s5 = calha lateral do grid. TEM que acompanhar o padding real do
     .pcon / .main-header__container / .organism-footer .container
     (16 → 24 ≥600 → 40 ≥1280), porque é ele que alinha o painel do mega menu
     com o conteúdo (patch 4 do header).
     ⚠️ Estava fixo em 16px: como o token EXISTE, os fallbacks `var(--s5, 24px)`
     e `var(--s5, 40px)` do patch nunca entravam, e o mega menu abria 8px à
     esquerda do conteúdo a partir de 600px e 24px no desktop. */
  --s5: 16px;
}
@media (min-width: 600px)  { :root { --s5: 24px; } }
@media (min-width: 1280px) { :root { --s5: 40px; } }

/* ----------------------------------------------------------
   GRID GLOBAL — .pcon (page container) max 1200px
---------------------------------------------------------- */
.pcon {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--s5, 16px);
  padding-right: var(--s5, 16px);
}

.section-pad { padding-top: 40px; padding-bottom: 40px; }
@media (min-width: 1024px) { .section-pad { padding-top: 72px; padding-bottom: 72px; } }

/* ----------------------------------------------------------
   TIPOGRAFIA FLUIDA
---------------------------------------------------------- */
.fluid-h2 { font-size: clamp(1.5rem, 2.5vw, 1.75rem); line-height: 1.2857; letter-spacing: -0.03em; font-weight: 700; }
.fluid-h3 { font-size: clamp(1.25rem, 2vw, 1.5rem);   line-height: 1.2917; letter-spacing: -0.03em; font-weight: 700; }
.fluid-h4 { font-size: clamp(1.125rem, 1.5vw, 1.25rem); line-height: 1.3;  letter-spacing: -0.02em; font-weight: 700; }
.fluid-b1 { font-size: clamp(1rem, 1.5vw, 1.125rem);  line-height: 1.65; }

.sec-head { max-width: 46rem; margin: 0 auto 32px; text-align: center; }
.sec-head h2 { color: var(--cinza-800, #2D3342); }
.sec-head p { margin-top: 12px; color: var(--cinza-500, #757D92); font-size: clamp(.875rem,1.5vw,1rem); line-height: 1.65; }
.sec-head p.narrow { max-width: 40rem; margin-left: auto; margin-right: auto; }

/* Cabeçalho do gerador é alinhado à esquerda, não centralizado */
.gerador .sec-head { text-align: left; margin-left: 0; margin-right: 0; }
.gerador .sec-head p.narrow { margin-left: 0; margin-right: 0; }

.accent { color: #0E53C0; }

/* ----------------------------------------------------------
   CTA PADRÃO — btn-cta
---------------------------------------------------------- */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 329px;
  max-width: 100%;
  height: 48px;
  padding: 0 24px;
  background: #04F7F7;
  color: #0E1829;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 4px 20px rgba(4,247,247,.30);
}
.btn-cta:hover  { background: #00d9d9; transform: translateY(-1px); box-shadow: 0 6px 24px rgba(4,247,247,.35); }
.btn-cta:active { transform: translateY(0); box-shadow: none; }
.btn-cta:focus-visible { outline: 2px solid #0E53C0; outline-offset: 3px; }
.btn-cta:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-cta svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-cta--interaction { background: #0E53C0; color: #fff; box-shadow: 0 4px 20px rgba(14,83,192,.25); }
.btn-cta--interaction:hover { background: #093CA3; box-shadow: 0 6px 24px rgba(14,83,192,.35); }

.btn-cta--outline { background: #fff; color: #0E53C0; border: 1px solid #0E53C0; box-shadow: none; }
.btn-cta--outline:hover { background: #E5F0FF; color: #093CA3; border-color: #093CA3; transform: translateY(-1px); box-shadow: none; }
.btn-cta--outline:active { transform: translateY(0); }
.btn-cta--outline.btn-cta--on-dark { background: transparent; color: #04F7F7; border-color: #04F7F7; }
.btn-cta--outline.btn-cta--on-dark:hover { background: rgba(4,247,247,.12); color: #04F7F7; border-color: #04F7F7; }

/* ============================================================
   ORGANISM CSS — Header + Footer (Contabilizei)
   Espelha o site oficial — não alterar classes.
   ============================================================ */
.d-none { display: none !important; }
@media (min-width: 992px) {
  .d-lg-none  { display: none !important; }
  .d-lg-block { display: block !important; }
  .d-none.d-lg-block { display: block !important; }
}
@media (max-width: 991px) {
  .d-lg-none  { display: flex !important; }
  .d-none.d-lg-block { display: none !important; }
}

.main-header {
  background-color: #fff;
  position: sticky;
  top: 0;
  z-index: 1045;
  transition: all .3s ease-in-out;
  max-width: 100vw;
  box-shadow: 0 2px 12px rgba(0,40,104,.06);
}
.main-header__navbar { padding: 0; min-height: 68px; display: flex; align-items: center; width: 100%; }
.main-header__container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; flex-wrap: nowrap;
}
.main-header__navbar-brand { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.main-header__logo-desktop, .main-header__logo-mobile { height: 22px; width: auto; }

.navbar-menu { display: none; background: transparent; border: 0; padding: 0; cursor: pointer; flex-shrink: 0; }
.navbar-menu__icon-wrapper { position: relative; display: flex; }
.navbar-menu__icon,
.navbar-menu__icon::before,
.navbar-menu__icon::after {
  display: block; background-color: #0a2a5e; width: 30px; height: 3px;
  border-radius: 100px; transition: .3s ease-in-out;
}
.navbar-menu__icon { position: relative; margin: 8px 0; }
.navbar-menu__icon::before, .navbar-menu__icon::after { content: ''; position: absolute; width: 100%; }
.navbar-menu__icon::before { top: -8px; }
.navbar-menu__icon::after  { bottom: -8px; }
.navbar-menu:not(.collapsed) .navbar-menu__icon { transform: rotate(90deg); background-color: transparent; }
.navbar-menu:not(.collapsed) .navbar-menu__icon::before { transform: rotate(-45deg); top: 0; }
.navbar-menu:not(.collapsed) .navbar-menu__icon::after  { transform: rotate(45deg); bottom: 0; }

.navbar-collapse { display: flex; justify-content: center; align-items: center; flex: 1; }
.navbar-nav { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; }
.nav-link, .dropdown-toggle-mobile {
  display: block; color: #0a2a5e; font-size: 14px; font-weight: 700; line-height: 28px;
  text-decoration: none; padding: .5rem 1.25rem; white-space: nowrap; cursor: pointer; transition: color .15s;
}
.nav-link:hover, .dropdown-toggle-mobile:hover { color: #0E53C0; }
/* Aperto do espaçamento do menu na faixa em que o nav desktop já está ligado mas
   ainda é apertado.
   ⚠️ Começava em 1024px, mas o nav desktop liga em 992px (d-lg-*): na faixa
   992–1023 o header precisava de 1086px e estourava o viewport em 94px, com
   scroll horizontal na página e o cluster Login + "Abra sua empresa" fora da
   tela. Só o min-width mudou (1024 → 992); nada acima de 1024px é afetado.
   Medido depois do fix: header cabe com 14px de folga a 992px. */
@media (min-width: 992px) and (max-width: 1399px) {
  .nav-link, .dropdown-toggle-mobile { padding: .5rem .5rem; }
}
.dropdown-toggle-desktop > a,
.dropdown-toggle-desktop > .dropdown-toggle-mobile { padding-right: 40px !important; position: relative; }
/* O caret é filho do <a>/.dropdown-toggle-mobile (não da <li>) — a <li> do mega menu
   vira position:static no patch 4 (ver abaixo) para ancorar o painel no container; se o
   caret fosse ::after da <li>, ele "pularia" para se posicionar relativo ao container. */
.dropdown-toggle-desktop > a::after,
.dropdown-toggle-desktop > .dropdown-toggle-mobile::after {
  content: ''; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); position: absolute; right: 18px; top: 35%; transition: transform .3s ease-in-out;
  pointer-events: none; color: #0a2a5e;
}
.dropdown-toggle-desktop:hover > a::after,
.dropdown-toggle-desktop:hover > .dropdown-toggle-mobile::after { transform: rotate(225deg); top: 42%; }

/* Patch — cluster "Login" das ações não exibe caret (só os mega-menus mantêm) */
.main-header__actions .dropdown-toggle-desktop > a::after { content: none; }
.main-header__actions .dropdown-toggle-desktop > a { padding-right: 20px !important; }

.dropdown .dropdown-menu {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; list-style: none; margin: 0; padding: 8px 0;
  min-width: 200px; background: #F7F9FC; border-radius: 4px; border-top: 1px solid #0033B7;
  box-shadow: 0 4px 11px 0 rgba(207,212,214,.73); z-index: 200;
}
.dropdown-item {
  display: block; color: #0a2a5e; font-size: 16px; line-height: 24px; text-decoration: none;
  padding: 11px 33px 11px 18px; transition: all .15s;
}
.dropdown-item:hover { background-color: #fff; color: #0E53C0; text-decoration: underline; }

.dropdown-menu-group {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; background: #F7F9FC; border-radius: 4px;
  border-top: 1px solid #0033B7; box-shadow: 0 4px 11px 0 rgba(207,212,214,.73); padding: 16px; z-index: 200; gap: 24px;
}
.dropdown-menu-group__group { display: flex; flex-direction: column; width: max-content; }
.dropdown-menu-group__title { padding: 0 18px 8px; color: #0E1829; font-weight: 700; font-size: 13px; line-height: 18px; }
.dropdown-menu-group ul { list-style: none; padding: 0; margin: 0; }

/* Patch 1 — ponte de hover de 6px (cobre exatamente o vão declarado em top: calc(100% + 6px)) */
.dropdown .dropdown-menu::before,
.dropdown .dropdown-menu-group::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: -6px;
  height: 6px;
}
/* Patch 3 — abre por :hover E :focus-within (acessível por teclado) */
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu { display: block; }
.dropdown:hover .dropdown-menu-group,
.dropdown:focus-within .dropdown-menu-group { display: flex; }

.main-header__cta-btn {
  display: inline-flex; align-items: center; background: #0E53C0; color: #fff; font-size: 14px; font-weight: 700;
  text-decoration: none; padding: 9px 22px; border-radius: 64px; white-space: nowrap; margin-left: 1rem; transition: background .15s;
}
.main-header__cta-btn:hover { background: #093CA3; text-decoration: none; }

/* Botão "Abra sua empresa" ao lado do logo no mobile, igual ao header oficial do site
   (contabilizei.com.br) — some no desktop, some substituído pelo da .main-header__actions. */
.main-header__button-mobile { order: 2; flex-shrink: 0; }
.main-header__cta-btn--mobile { margin-left: 0; padding: 8px 16px; font-size: 13px; }

.main-header__actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

/* Patch 4 — mega menu ancorado no container do header entre ~992px e ~1240px */
@media (min-width: 992px) {
  #menu .main-header__container  { position: relative; }
  #menu .nav-item.dropdown--mega { position: static; }
  #menu .nav-item.dropdown--mega > .dropdown-menu-group {
    left: 0;
    right: auto;
    margin-left: var(--s5, 24px);
    max-width: calc(100% - 2 * var(--s5, 24px));
  }
}
@media (min-width: 1280px) {
  #menu .nav-item.dropdown--mega > .dropdown-menu-group {
    margin-left: var(--s5, 40px);
    max-width: calc(100% - 2 * var(--s5, 40px));
  }
}

@media (max-width: 991px) {
  .main-header { background-color: #f4f7fb; }
  .main-header__navbar { min-height: 64px; padding: 0; }
  .main-header__container { justify-content: space-between; }
  .main-header__navbar-brand { order: 1; flex: 0 0 auto; margin-right: auto; }
  .main-header__navbar-brand img { transform: none; }
  .main-header__logo-mobile { height: 33px; }
  .main-header__actions { display: none; }
  .navbar-menu { display: block; order: 3; flex: 0 0 auto; }
  .navbar-collapse {
    display: none; flex-direction: column; align-items: flex-start; background-color: #f4f7fb;
    height: calc(100vh - 64px); left: 0; top: 64px; width: 100%; overflow-y: auto; padding: 1rem 16px;
    position: absolute; z-index: 1050;
  }
  .navbar-collapse.show { display: flex; }
  .navbar-nav { flex-direction: column; align-items: flex-start; width: 100%; }
  .navbar-nav .navbar-nav { width: 100%; }
  .nav-item { border-bottom: 1px solid rgba(158,175,199,.50); margin: 0 0 1rem; width: 100%; }
  .nav-link, .dropdown-toggle-mobile {
    color: #0E1829; font-size: 14px; padding: 0; margin: 0 0 1rem; width: 100%;
    display: flex; justify-content: space-between; align-items: center;
  }
  .nav-link:hover, .dropdown-toggle-mobile:hover { color: #0E1829; }
  .dropdown-toggle-desktop > a::after,
  .dropdown-toggle-desktop > .dropdown-toggle-mobile::after { display: none; }
  .dropdown .dropdown-menu, .dropdown .dropdown-menu-group {
    display: block; position: static; background: transparent; border: none; box-shadow: none; padding: 0; margin: 0 0 .5rem;
  }
  .dropdown-menu-group__group { width: 100%; margin-bottom: 20px; }
  .dropdown-menu-group__title { padding: 0 0 8px; }
  .dropdown-item { color: #0E1829; font-size: 16px; line-height: 18px; padding: 11px 0; }
  .dropdown-item:hover { background: transparent; color: #0a2a5e; }
  .main-header__cta-btn { width: 100%; justify-content: center; margin: 0; }
}

/* FOOTER */
.organism-footer { background-color: #0a2a5e; color: #c5d3e8; font-size: 14px; padding: 56px 0 64px; }
.organism-footer a { color: #c5d3e8; text-decoration: none; transition: color .15s; }
.organism-footer a:hover { color: #fff; }
.organism-footer .container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.organism-footer__top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.organism-footer__top-row { display: flex; align-items: flex-start; gap: 24px; margin-bottom: 8px; }
.organism-footer__brand { display: flex; flex-shrink: 0; }
.organism-footer__logo img { height: 48px; width: auto; }
.organism-footer__manifest { color: #fff; font-size: 14px; font-weight: 700; line-height: 1.45; max-width: 200px; margin: 0; }
.organism-footer__manifest .ciano { color: #04F7F7; }
.organism-footer__divider { height: 1px; background: rgba(255,255,255,.18); margin: 24px 0 20px; }
.organism-footer__social { display: flex; list-style: none; gap: 12px; padding: 0; margin: 0 0 24px; }
.organism-footer__social a {
  display: flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border-radius: 50%; background: #0E53C0; color: #fff; transition: background .15s;
}
.organism-footer__social a svg { width: 20px; height: 20px; display: block; }
.organism-footer__social a:hover { background: #1a65d6; }
.organism-footer__ombudsman p { margin: 0 0 6px; font-size: 14px; }
.organism-footer__menu-title { color: #04F7F7; font-size: 15px; font-weight: 700; margin: 0 0 20px; }
.organism-footer__menu-list { list-style: none; padding: 0; margin: 0; }
.organism-footer__menu-list li { margin-bottom: 18px; }
.organism-footer__menu-list a { font-size: 14px; }
.footer-accordion > summary { list-style: none; cursor: default; }
.footer-accordion > summary::-webkit-details-marker { display: none; }
.footer-accordion__chevron { display: none; }
@media (min-width: 992px) {
  .footer-accordion > summary { pointer-events: none; }
  .organism-footer__badges--mobile { display: none !important; }
}
@media (max-width: 991px) { .organism-footer__badges--desktop { display: none !important; } }
.organism-footer__badges { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; margin-top: 32px; }
.badge-ra1000 img { display: block; height: auto; max-width: 115px; }
.badge-ethics { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.badge-ethics img { display: block; width: 92px; height: auto; }
.badge-ethics__by { font-size: 9px; color: #fff; font-weight: 700; text-align: center; margin: 4px 0 0; line-height: 1.3; width: 92px; }
.organism-footer__hr { height: 1px; background: rgba(255,255,255,.15); margin: 40px 0 32px; }
.organism-footer__about { color: #8ba3c7; font-size: 14px; line-height: 1.6; margin: 0 0 32px; }
.organism-footer__legal-title { color: #6f88ad; font-size: 22px; font-weight: 700; margin: 0 0 24px; }
.organism-footer__address { margin-bottom: 20px; }
.organism-footer__city { color: #8ba3c7; font-size: 14px; font-weight: 600; margin: 0 0 4px; text-transform: uppercase; }
.organism-footer__address p { color: #6f88ad; font-size: 14px; line-height: 1.6; margin: 0 0 2px; }
.organism-footer__copyright { color: #6f88ad; font-size: 13px; margin: 32px 0 0; }
@media (max-width: 991px) {
  .organism-footer { padding: 40px 0 48px; }
  .organism-footer__top { grid-template-columns: 1fr; gap: 0; }
  .organism-footer__top-row { flex-direction: column; align-items: center; gap: 16px; }
  .organism-footer__brand { justify-content: center; }
  .organism-footer__manifest { text-align: center; max-width: 320px; margin: 0 auto; }
  .organism-footer__divider { margin: 24px auto; width: 100%; }
  .organism-footer__social { justify-content: center; }
  .organism-footer__ombudsman { text-align: center; margin-bottom: 24px; }
  .organism-footer__badges { align-items: center; margin-top: 0; margin-bottom: 24px; }
  .badge-ra1000 { display: none; }
  .badge-ethics { align-items: center; }
  .badge-ethics__by { text-align: center; }
  .footer-accordion { border-top: 1px solid rgba(255,255,255,.15); padding: 0; }
  .footer-accordion > summary {
    cursor: pointer; display: flex; align-items: center; justify-content: space-between;
    padding: 18px 0; margin: 0; text-transform: uppercase; font-size: 15px; user-select: none;
  }
  .footer-accordion__chevron {
    display: block; width: 11px; height: 11px; border-right: 2px solid #04F7F7; border-bottom: 2px solid #04F7F7;
    transform: rotate(45deg); transition: transform .25s ease; margin-right: 4px; flex-shrink: 0;
  }
  .footer-accordion[open] .footer-accordion__chevron { transform: rotate(-135deg); }
  .footer-accordion .organism-footer__menu-list { padding: 0 0 18px; }
  .organism-footer__top .footer-accordion:last-of-type { border-bottom: 1px solid rgba(255,255,255,.15); }
  .organism-footer__legal-title { font-size: 18px; }
}

/* Grid compartilhado: header e footer seguem o MESMO padding do .pcon */
@media (min-width: 600px)  { .main-header__container, .organism-footer .container { padding-left: 24px; padding-right: 24px; } }
@media (min-width: 1280px) { .main-header__container, .organism-footer .container { padding-left: 40px; padding-right: 40px; } }

/* ============================================================
   MODAL (compartilhado)
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 1100; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.is-open { display: flex; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(32,38,54,.4); backdrop-filter: blur(4px); }
.modal__card { position: relative; width: 100%; max-width: 32rem; overflow: hidden; border-radius: 24px; background: #fff; box-shadow: 0 25px 50px -12px rgba(0,0,0,.25); border: 1px solid var(--cinza-200, #E1E6F5); max-height: 90vh; overflow-y: auto; }
.modal__bar { position: absolute; top: 0; left: 0; height: 4px; width: 100%; background: #0E53C0; }
.modal__close { position: absolute; right: 16px; top: 16px; border-radius: 9999px; padding: 6px; color: var(--cinza-400, #B0B9D1); background: none; border: none; cursor: pointer; transition: all .15s; }
.modal__close:hover { background: var(--cinza-50, #F7F9FF); color: var(--cinza-700, #3F4658); }
.modal__close svg { width: 20px; height: 20px; }
.modal__progress { display: flex; justify-content: center; gap: 6px; padding: 24px 24px 0; }
.modal__progress span { height: 4px; width: 48px; border-radius: 9999px; background: var(--cinza-100, #EBEFFA); transition: background .2s; }
.modal__progress span.on { background: #0E53C0; }
.modal__body { padding: 24px; }
@media (min-width: 640px) { .modal__body { padding: 32px; } }
.modal__icon { margin: 0 auto 12px; display: flex; height: 44px; width: 44px; align-items: center; justify-content: center; border-radius: 9999px; background: var(--blue-50, #E5F0FF); color: #0E53C0; }
.modal__icon svg { width: 22px; height: 22px; }
.modal__icon--ok { height: 56px; width: 56px; background: var(--sucesso-100, #AADFC1); color: var(--sucesso-500, #128243); }
.modal__icon--ok svg { width: 32px; height: 32px; }
.modal__title { text-align: center; font-size: 20px; font-weight: 700; color: var(--cinza-800, #2D3342); }
.modal__subtitle { margin: 6px auto 0; text-align: center; font-size: 12px; color: var(--cinza-400, #B0B9D1); line-height: 1.6; max-width: 24rem; }
.modal__step { display: none; }
.modal__step.is-active { display: block; }
.modal__fields { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.modal__field label { display: block; font-size: 10px; font-weight: 700; color: var(--cinza-500, #757D92); margin-bottom: 4px; }
.modal__input, .modal__select {
  width: 100%; border-radius: 12px; border: 1px solid var(--cinza-200, #E1E6F5); padding: 0 16px; height: 40px;
  font-size: 12px; outline: none; background: var(--cinza-50, #F7F9FF); color: var(--cinza-800, #2D3342); transition: border .15s, box-shadow .15s;
}
.modal__select { padding-right: 36px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230E53C0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; cursor: pointer; }
.modal__input:focus, .modal__select:focus { border-color: #0E53C0; box-shadow: 0 0 0 1px #0E53C0; }
.modal__input.is-invalid { border-color: #DF1642; }
.modal__input.is-invalid:focus { border-color: #DF1642; box-shadow: 0 0 0 1px #DF1642; }
.modal__error { display: none; align-items: center; gap: 4px; font-size: 10px; color: #DF1642; margin-top: 4px; }
.modal__error.show { display: flex; }
.modal__error svg { width: 12px; height: 12px; flex-shrink: 0; }
.modal__btn-row { display: flex; gap: 8px; margin-top: 20px; }
.modal__btn-full { width: 100%; margin-top: 20px; }
.modal__btn-back { flex: 1; border-radius: 9999px; border: 1px solid var(--cinza-200, #E1E6F5); background: none; color: var(--cinza-500, #757D92); font-size: 12px; padding: 12px 0; font-weight: 600; cursor: pointer; }
.modal__btn-back:hover { background: var(--cinza-50, #F7F9FF); }
.modal__success { text-align: center; }
.modal__success-box { background: var(--cinza-50, #F7F9FF); border: 1px solid var(--cinza-200, #E1E6F5); padding: 20px; border-radius: 16px; text-align: left; font-size: 12px; color: var(--cinza-500, #757D92); margin: 20px auto 0; max-width: 28rem; }
.modal__success-box-head { display: flex; align-items: center; gap: 8px; color: var(--cinza-800, #2D3342); font-weight: 700; margin-bottom: 8px; }
.modal__success-box-head svg { width: 18px; height: 18px; color: #0E53C0; }
.modal__success-box p { font-size: 11px; line-height: 1.6; }
.modal__greeting { font-size: 12px; color: var(--cinza-400, #B0B9D1); line-height: 1.6; max-width: 24rem; margin: 8px auto 0; }
.modal__greeting b, .modal__success-box b { color: var(--cinza-700, #3F4658); }

/* ============================================================
   VIEW A/B — troca sem navegação
   ============================================================ */
.view { display: none; }
.view.is-active { display: block; }

/* ============================================================
   HERO
   ============================================================ */
.ihero { position: relative; z-index: 0; overflow: hidden; background: radial-gradient(ellipse 70% 90% at 85% 40%, #dde9ff 0%, #eef4ff 35%, #f5f8ff 60%, #ffffff 100%); border-bottom: 1px solid var(--cinza-100, #EBEFFA); }
.ihero__inner { padding-top: 40px; padding-bottom: 40px; }
@media (min-width: 1024px) { .ihero__inner { padding-top: 48px; padding-bottom: 72px; } }
.ihero__grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
@media (min-width: 1024px) { .ihero__grid { grid-template-columns: minmax(0,1fr) auto; gap: 56px; } }
.ihero__text { display: flex; flex-direction: column; gap: 20px; order: 2; }
@media (min-width: 1024px) { .ihero__text { order: 1; } }
.ihero__title { font-size: clamp(1.875rem, 4.5vw, 2.75rem); line-height: 1.12; letter-spacing: -0.03em; font-weight: 800; color: #2D3342; }
.ihero__sub { color: #545B6F; font-size: clamp(1rem, 1.5vw, 1.125rem); line-height: 1.6; max-width: 34rem; }
.ihero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.ihero__ctas .btn-cta { width: auto; min-width: 220px; }
@media (max-width: 480px) { .ihero__ctas { flex-direction: column; } .ihero__ctas .btn-cta { width: 100%; } }
/* No desktop os dois CTAs ficam sempre lado a lado, nunca quebram linha */
@media (min-width: 1024px) { .ihero__ctas { flex-wrap: nowrap; } }
.ihero__trust { display: flex; flex-wrap: wrap; gap: 20px; list-style: none; margin-top: 4px; }
.ihero__trust li { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--cinza-600, #545B6F); }
.ihero__trust svg { width: 16px; height: 16px; color: #0E53C0; flex-shrink: 0; }
/* Imagem exibida no tamanho real do arquivo (617x717) — só encolhe quando a
   coluna/viewport for mais estreita que isso (mobile); nunca esticada além do arquivo. */
.ihero__media { order: 1; display: flex; justify-content: center; }
@media (min-width: 1024px) { .ihero__media { order: 2; justify-content: flex-end; } }
/* Largura fixa de 600px (altura proporcional ao arquivo original 617x717);
   o texto/CTAs preenchem o resto da largura do container. */
.ihero__media img { width: 600px; max-width: 100%; height: auto; border-radius: 24px; transition: transform .3s ease; }
.ihero__media:hover img { transform: scale(.97); }

/* ============================================================
   GERADOR — form + prévia
   ============================================================ */
.gerador { background: #fff; }
.gerador__split { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
@media (min-width: 1024px) { .gerador__split { grid-template-columns: minmax(0,797px) 363px; gap: 40px; } }

.gerador__form {
  background: #fff; border: 1px solid var(--cinza-200, #E1E6F5); border-radius: 24px; overflow: hidden;
  padding-top: 40px;
}
/* Um <legend> se posiciona sobre a borda superior do fieldset e ignora o padding-top/
   margin-top do PRÓPRIO fieldset/legend — por isso o respiro do topo vem de margin-top
   no .gform__group (empurra a caixa inteira, com a legend, para longe da divisória
   anterior), não de padding-top/margin-top que não teriam efeito nela. */
/* ⚠️ min-width: 0 é OBRIGATÓRIO aqui. O navegador aplica
   `min-inline-size: min-content` por padrão em <fieldset>, e isso NÃO pode ser
   sobrescrito por width/max-width — o fieldset infla até caber seu conteúdo mais
   largo, ignorando o pai. No mobile (375px) o toggle de idioma tem 320px de
   min-content; somado ao padding lateral de 24+24, o fieldset ia a 368px dentro
   de um form de 343px e era CORTADO pelo `overflow: hidden` do .gerador__form
   (o botão "English" aparecia estourando a borda do card).
   Com min-width: 0 o fieldset volta a respeitar a largura do pai. Vale para
   todos os grupos do formulário, não só o do idioma. */
.gform__group { border: none; min-width: 0; padding: 0 24px 24px; margin-top: 20px; border-bottom: 1px solid var(--cinza-100, #EBEFFA); }
.gform__group:first-child { margin-top: 0; }
.gform__group:last-child { border-bottom: none; }
@media (min-width: 640px) { .gform__group { padding: 0 32px 32px; } }
.gform__eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--cinza-800, #2D3342); display: block; margin: 0 0 20px; }
.gform__opt { font-weight: 400; color: var(--cinza-400, #B0B9D1); }

.gform__row { display: grid; grid-template-columns: 1fr; gap: 16px; }
.gform__row + .gform__row { margin-top: 16px; }
.gform__row--2 { grid-template-columns: 1fr; }
@media (min-width: 600px) { .gform__row--2 { grid-template-columns: 1fr 1fr; } }
.gform__row--4 { grid-template-columns: 1fr; }
@media (min-width: 600px) { .gform__row--4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .gform__row--4 { grid-template-columns: repeat(4,1fr); } }

.gform__field label { display: block; font-size: 12px; font-weight: 600; color: var(--cinza-600, #545B6F); margin-bottom: 6px; }
.gform__field input,
.gform__field select,
.gform__field textarea {
  width: 100%; height: 44px; border-radius: 10px; border: 1px solid var(--cinza-200, #E1E6F5); background: var(--cinza-50, #F7F9FF);
  padding: 0 14px; font-size: 14px; font-family: inherit; color: var(--cinza-800, #2D3342); outline: none;
  transition: border .15s, box-shadow .15s;
}
.gform__field select {
  appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230E53C0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.gform__field textarea { height: auto; padding: 12px 14px; resize: vertical; min-height: 88px; }
.gform__field input:focus, .gform__field select:focus, .gform__field textarea:focus {
  border-color: #0E53C0; box-shadow: 0 0 0 3px rgba(14,83,192,.12); background: #fff;
}
.gform__field input[aria-invalid="true"],
.gform__field select[aria-invalid="true"],
.gform__field textarea[aria-invalid="true"] { border-color: #DF1642; }
.gform__field input[aria-invalid="true"]:focus,
.gform__field select[aria-invalid="true"]:focus,
.gform__field textarea[aria-invalid="true"]:focus { border-color: #DF1642; box-shadow: 0 0 0 3px rgba(223,22,66,.12); }
.items-table.has-error { border-color: #DF1642; }
.gform__helper { font-size: 11px; color: var(--cinza-400, #B0B9D1); margin-top: 6px; line-height: 1.5; }
.gform__error { font-size: 12px; font-weight: 600; color: #DF1642; margin-top: 6px; }
.gform__conditional { margin-top: 12px; }

.gform__note {
  display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--cinza-500, #757D92); line-height: 1.55;
  margin-top: 16px; background: var(--cinza-50, #F7F9FF); border: 1px solid var(--cinza-100, #EBEFFA); border-radius: 12px; padding: 12px 14px;
}
.gform__note svg { width: 16px; height: 16px; color: #0E53C0; flex-shrink: 0; margin-top: 1px; }
.gform__note--muted { background: #fff; border-color: var(--cinza-200, #E1E6F5); }
.gform__note--muted svg { color: var(--cinza-400, #B0B9D1); }

.gform__checkbox {
  display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--cinza-600, #545B6F); line-height: 1.5;
  margin-top: 20px; cursor: pointer;
}
.gform__checkbox input { width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0; accent-color: #0E53C0; cursor: pointer; }
.gform__checkbox a { color: #0E53C0; text-decoration: underline; }

.gform__submit { width: 100%; margin-top: 20px; }
.gform__fav-note { font-size: 11px; color: var(--cinza-400, #B0B9D1); margin-top: 14px; text-align: center; }

/* Toggle segmentado de idioma */
.lang-toggle {
  display: flex; width: 320px; max-width: 100%; height: 44px; background: var(--cinza-100, #EBEFFA);
  border-radius: 9999px; padding: 4px; gap: 4px;
}
.lang-toggle__btn {
  /* min-width: 0 desarma o "automatic minimum size" do flex item, que ancorava
     cada botão na largura do próprio texto e impedia o toggle de encolher abaixo
     de 320px no mobile. Com isso os dois botões dividem o espaço disponível. */
  flex: 1; min-width: 0; border: none; background: transparent; border-radius: 9999px; font-size: 14px; font-weight: 600;
  color: var(--cinza-500, #757D92); cursor: pointer; transition: all .15s;
}
.lang-toggle__btn.is-active { background: #fff; color: #0E53C0; box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* Tabela dinâmica de itens */
.items-table { border: 1px solid var(--cinza-200, #E1E6F5); border-radius: 14px; overflow: hidden; }
.items-table__head {
  display: none; background: var(--cinza-50, #F7F9FF); font-size: 11px; font-weight: 700; color: var(--cinza-500, #757D92);
  text-transform: uppercase; letter-spacing: .03em;
}
@media (min-width: 700px) {
  .items-table__head { display: grid; grid-template-columns: minmax(0,1fr) 49px 100px 70px 36px; gap: 16px; padding: 12px 14px; }
}
.items-table__head-del { visibility: hidden; }
.items-table__body { display: flex; flex-direction: column; }
.item-row { padding: 16px 14px; border-top: 1px solid var(--cinza-100, #EBEFFA); display: grid; grid-template-columns: 1fr; gap: 16px; }
.items-table__body .item-row:first-child { border-top: none; }
@media (min-width: 700px) {
  .item-row { grid-template-columns: minmax(0,1fr) 49px 100px 70px 36px; align-items: start; gap: 16px; padding: 14px; }
}
.item-row__field label { display: block; font-size: 10px; font-weight: 700; color: var(--cinza-400, #B0B9D1); margin-bottom: 4px; }
@media (min-width: 700px) { .item-row__field label { display: none; } }
.item-row__field textarea, .item-row__field input {
  width: 100%; border: 1px solid var(--cinza-200, #E1E6F5); border-radius: 8px; background: var(--cinza-50, #F7F9FF);
  padding: 8px 10px; font-size: 13px; font-family: inherit; color: var(--cinza-800, #2D3342); outline: none; resize: vertical; min-height: 40px;
}
.item-row__field textarea:focus, .item-row__field input:focus { border-color: #0E53C0; box-shadow: 0 0 0 3px rgba(14,83,192,.12); background: #fff; }
.item-row__total { display: flex; flex-direction: column; }
.item-row__total-value { font-weight: 700; color: var(--cinza-800, #2D3342); font-size: 14px; padding: 8px 0; text-align: right; }
@media (max-width: 699px) { .item-row__total-value { text-align: left; } }
.item-row__del {
  display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--cinza-200, #E1E6F5); background: #fff; color: var(--cinza-400, #B0B9D1); cursor: pointer; transition: all .15s;
}
.item-row__del:hover:not(:disabled) { border-color: #DF1642; color: #DF1642; background: var(--erro-100, #F7D2DA); }
.item-row__del:disabled { opacity: .35; cursor: not-allowed; }
.item-row__del svg { width: 16px; height: 16px; }

.btn-add-item {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; height: 40px; padding: 0 18px;
  border-radius: 9999px; border: 1px solid #0E53C0; background: #fff; color: #0E53C0; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.btn-add-item:hover { background: var(--blue-50, #E5F0FF); }
.btn-add-item svg { width: 14px; height: 14px; }

.items-total {
  display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--cinza-100, #EBEFFA); font-size: 14px; font-weight: 600; color: var(--cinza-600, #545B6F);
}
.items-total strong { font-size: clamp(1.25rem,2vw,1.5rem); color: var(--cinza-800, #2D3342); font-weight: 800; }
.items-total__value-row { display: flex; align-items: baseline; gap: 6px; }
.items-total__currency { font-size: 13px; font-weight: 600; color: var(--cinza-500, #757D92); }

/* Prévia ao vivo — oculta no mobile (só existe como coluna ao lado do form, no desktop) */
.preview { display: none; }
@media (min-width: 1024px) { .preview { display: block; position: sticky; top: 88px; } }
.preview__bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.preview__label { font-size: 14px; font-weight: 700; color: var(--cinza-800, #2D3342); }
.preview__status { font-size: 11px; color: var(--cinza-400, #B0B9D1); text-align: right; }
.preview__viewport {
  position: relative; background: var(--cinza-50, #F7F9FF); border: 1px solid var(--cinza-200, #E1E6F5); border-radius: 16px;
  padding: 16px; overflow: hidden; min-height: 360px;
}
.preview__doc-wrap { transform: scale(.92); transform-origin: top center; }
.preview__watermark {
  position: absolute; top: 45%; left: 50%; transform: translate(-50%,-50%) rotate(-28deg);
  font-size: clamp(2rem,10vw,2.75rem); font-weight: 800; letter-spacing: .1em; color: rgba(14,83,192,.14);
  pointer-events: none; white-space: nowrap;
}
.preview.is-unlocked .preview__watermark { display: none; }
.preview__lock {
  margin-top: 12px; font-size: 12px; color: var(--cinza-500, #757D92); text-align: center; background: var(--alerta-100, #FFE1A6);
  border-radius: 10px; padding: 10px 12px; line-height: 1.5;
}
.preview.is-unlocked .preview__lock { display: none; }

/* ============================================================
   DOCUMENTO DO INVOICE (compartilhado prévia + resultado)
   ============================================================ */
.invoice-doc {
  background: #fff; border: 1px solid var(--cinza-200, #E1E6F5); border-radius: 16px; padding: 24px;
  font-size: 13px; color: var(--cinza-700, #3F4658);
}
@media (min-width: 640px) { .invoice-doc:not(.invoice-doc--preview) { padding: 40px; } }
.idoc__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--cinza-100, #EBEFFA); }
.idoc__head-title { font-size: clamp(1.25rem,2.5vw,1.75rem); font-weight: 800; letter-spacing: -.02em; color: var(--cinza-900, #202636); }
.idoc__head-num { font-size: 12px; color: var(--cinza-400, #B0B9D1); margin-top: 4px; }
.idoc__head-right { text-align: right; }
.idoc__head-label { font-size: 11px; color: var(--cinza-400, #B0B9D1); text-transform: uppercase; letter-spacing: .03em; }
.idoc__head-total { font-size: clamp(1.25rem,2.5vw,1.75rem); font-weight: 800; color: #0E53C0; margin-top: 2px; }
.idoc__head-due { font-size: 12px; color: var(--cinza-500, #757D92); margin-top: 6px; }

.idoc__parties { display: grid; grid-template-columns: 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--cinza-100, #EBEFFA); }
@media (min-width: 480px) { .idoc__parties { grid-template-columns: 1fr 1fr; } }
.idoc__party-label { font-size: 11px; font-weight: 700; color: var(--cinza-400, #B0B9D1); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 6px; }
.idoc__party-name { font-weight: 700; color: var(--cinza-800, #2D3342); }
.idoc__party p { color: var(--cinza-500, #757D92); font-size: 12px; margin-top: 2px; line-height: 1.5; }

.idoc__meta { display: flex; flex-wrap: wrap; gap: 16px 28px; padding: 16px 0; border-bottom: 1px solid var(--cinza-100, #EBEFFA); font-size: 12px; color: var(--cinza-500, #757D92); }
.idoc__meta b { color: var(--cinza-700, #3F4658); font-weight: 600; }

.idoc__table { width: 100%; border-collapse: collapse; margin-top: 16px; }
.idoc__table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--cinza-400, #B0B9D1); font-weight: 700; padding: 0 8px 8px; border-bottom: 1px solid var(--cinza-100, #EBEFFA); }
.idoc__table td { padding: 10px 8px; font-size: 12px; color: var(--cinza-700, #3F4658); border-bottom: 1px solid var(--cinza-100, #EBEFFA); vertical-align: top; }
.idoc__table th:nth-child(2), .idoc__table td:nth-child(2),
.idoc__table th:nth-child(3), .idoc__table td:nth-child(3),
.idoc__table th:nth-child(4), .idoc__table td:nth-child(4) { text-align: right; white-space: nowrap; }

.idoc__totals { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; padding: 16px 0; }
.idoc__totals-row { display: flex; gap: 24px; font-size: 12px; color: var(--cinza-500, #757D92); }
.idoc__totals-row.is-total { font-size: 15px; font-weight: 800; color: var(--cinza-900, #202636); }
.idoc__totals-row.is-total .idoc__totals-value { color: #0E53C0; }
.idoc__totals-value { min-width: 90px; text-align: right; }

.idoc__footer-grid { display: grid; grid-template-columns: 1fr; gap: 20px; padding-top: 16px; border-top: 1px solid var(--cinza-100, #EBEFFA); }
@media (min-width: 480px) { .idoc__footer-grid { grid-template-columns: 1fr 1fr; } }
.idoc__footer-label { font-size: 11px; font-weight: 700; color: var(--cinza-400, #B0B9D1); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 6px; }
.idoc__footer-row { font-size: 12px; color: var(--cinza-600, #545B6F); margin-top: 3px; }
.idoc__footer-row b { color: var(--cinza-800, #2D3342); font-weight: 600; }
.idoc__nfse-ref { margin-top: 16px; font-size: 11px; color: var(--cinza-400, #B0B9D1); }
.idoc__legal { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--cinza-100, #EBEFFA); font-size: 10px; color: var(--cinza-400, #B0B9D1); line-height: 1.5; }

/* ============================================================
   RESULTADO
   ============================================================ */
.result { background: #fff; }
.result__confirm {
  display: flex; align-items: flex-start; gap: 16px; background: var(--cinza-50, #F7F9FF); border: 1px solid var(--cinza-200, #E1E6F5);
  border-radius: 16px; padding: 20px; margin-bottom: 32px;
}
.result__confirm-icon {
  display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 9999px;
  background: var(--sucesso-100, #AADFC1); color: var(--sucesso-500, #128243); flex-shrink: 0;
}
.result__confirm-icon svg { width: 22px; height: 22px; }
.result__confirm p { color: var(--cinza-500, #757D92); font-size: 13px; margin-top: 4px; line-height: 1.5; }

.result__split { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
@media (min-width: 1024px) { .result__split { grid-template-columns: minmax(0,828px) 1fr; gap: 40px; } }
.result__actions { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 1024px) { .result__actions { position: sticky; top: 88px; } }
.result__btn { width: 100%; }
.result__btn svg { width: 18px; height: 18px; }
.result__email-block {
  margin-top: 8px; padding: 16px; background: var(--cinza-50, #F7F9FF); border: 1px solid var(--cinza-200, #E1E6F5); border-radius: 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.result__email-label { font-size: 11px; color: var(--cinza-400, #B0B9D1); }
.result__email-block strong { font-size: 14px; color: var(--cinza-800, #2D3342); word-break: break-all; }
.result__fix-email { align-self: flex-start; margin-top: 6px; font-size: 12px; font-weight: 600; color: #0E53C0; background: none; border: none; cursor: pointer; padding: 0; text-decoration: underline; }
.result__nfse-note { font-size: 11px; color: var(--cinza-400, #B0B9D1); line-height: 1.5; }

/* ============================================================
   CTA NAVY — "O invoice é só o começo"
   ============================================================ */
.cnpj-cta {
  /* Redesenho conforme Figma (nodes 4209-3888 / 4209-4454): fundo claro
     accent-primary/050 (#E5F0FF), com um glow branco bem sutil vazando pela
     direita — em vez do navy escuro usado antes. Textos em tom escuro. */
  background:
    radial-gradient(circle at 108% 45%, rgba(255,255,255,.65) 0%, rgba(255,255,255,0) 45%),
    #E5F0FF;
  color: #2D3342;
  padding-top: 56px; padding-bottom: 56px;
  position: relative;
  z-index: 0;
  overflow: hidden;
}
@media (min-width: 1024px) { .cnpj-cta { padding-top: 88px; padding-bottom: 88px; } }
.cnpj-cta__row { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; }
@media (min-width: 1024px) { .cnpj-cta__row { grid-template-columns: minmax(0,1fr) auto; gap: 48px; } }
.cnpj-cta__copy { text-align: center; }
@media (min-width: 1024px) { .cnpj-cta__copy { text-align: left; } }
.cnpj-cta__eyebrow { font-size: clamp(1rem,1.5vw,1.125rem); font-weight: 700; color: #2D3342; display: block; }
.cnpj-cta__eyebrow .accent { color: #0E53C0; }
.cnpj-cta__title { margin-top: 10px; font-size: clamp(1.75rem,3.5vw,2.625rem); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; color: #2D3342; }
.cnpj-cta__title .accent { color: #0E53C0; }
.cnpj-cta__sub { margin-top: 16px; color: #3F4658; line-height: 1.65; font-size: clamp(.9375rem,1.5vw,1.0625rem); max-width: 46rem; }
@media (min-width: 1024px) { .cnpj-cta__sub { margin-left: 0; margin-right: 0; } }
.cnpj-cta__copy .cnpj-cta__sub { margin-left: auto; margin-right: auto; }
@media (min-width: 1024px) { .cnpj-cta__copy .cnpj-cta__sub { margin-left: 0; margin-right: 0; } }

.cnpj-cta__cards { margin-top: 28px; display: grid; grid-template-columns: 1fr; gap: 14px; text-align: left; }
@media (min-width: 640px) { .cnpj-cta__cards { grid-template-columns: repeat(3,1fr); } }
.cnpj-cta__card { background: #E5F0FF; border: 1px solid #9FC8FF; border-radius: 16px; padding: 18px; }
.cnpj-cta__card-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: #fff; color: #0E53C0; margin-bottom: 12px; }
.cnpj-cta__card-icon svg { width: 18px; height: 18px; }
.cnpj-cta__card h3 { font-size: 14px; font-weight: 700; color: #2D3342; margin-bottom: 6px; }
.cnpj-cta__card p { font-size: 12px; color: #3F4658; line-height: 1.55; }

.cnpj-cta__media { display: flex; justify-content: center; }
@media (min-width: 1024px) { .cnpj-cta__media { justify-content: flex-end; } }
/* Imagem no tamanho real do arquivo (418x492) — só encolhe no mobile, quando a
   viewport for mais estreita que isso. */
.cnpj-cta__media img { width: auto; max-width: 100%; height: auto; border-radius: 20px; transition: transform .3s ease; }
.cnpj-cta__media:hover img { transform: scale(.97); }

.cnpj-cta__actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
@media (min-width: 640px) { .cnpj-cta__actions { justify-content: flex-start; } }
.cnpj-cta__actions .btn-cta { width: auto; min-width: 260px; }
@media (max-width: 480px) { .cnpj-cta__actions .btn-cta { width: 100%; } }

/* ============================================================
   FAQ — módulo padrão da esteira (mídia + card, accordion)
   ============================================================ */
.faq { background: #EEF3FB; padding-top: 52px; padding-bottom: 52px; }
@media (min-width: 1024px) { .faq { padding-top: 84px; padding-bottom: 84px; } }
.faq__grid { position: relative; }
.faq__media { margin: 0; margin-bottom: 16px; display: flex; align-items: center; justify-content: center; }
.faq__media img { display: block; width: 100%; height: 220px; object-fit: cover; border-radius: 22px; transition: transform .3s ease; }
.faq__media:hover img { transform: scale(.97); }
.faq__card { background: #fff; border-radius: 26px; box-shadow: 0 24px 60px rgba(14,45,110,.14); padding: 32px 28px; position: relative; z-index: 2; }
.faq__title { color: var(--cinza-800, #2D3342); }
.faq__title .accent { color: #04F7F7; }
.faq__sub { margin-top: 8px; color: var(--cinza-500, #757D92); font-size: 14px; line-height: 1.6; }
.faq__list { margin-top: 20px; display: flex; flex-direction: column; }
.faq__item { border-bottom: 1px solid #EAEDF5; }
.faq__q { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 2px; text-align: left; font-weight: 700; font-size: clamp(.875rem,2vw,1rem); color: var(--cinza-800, #2D3342); background: none; border: none; cursor: pointer; }
.faq__q svg { width: 20px; height: 20px; flex-shrink: 0; color: #9AA3BC; transition: transform .3s; }
.faq__item.is-open .faq__q svg { transform: rotate(180deg); color: #0E53C0; }
.faq__a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq__item.is-open .faq__a { max-height: 400px; }
.faq__a-inner { padding: 0 2px 18px; }
.faq__a-inner p { font-size: 14px; color: var(--cinza-500, #757D92); line-height: 1.65; margin: 0; }
.faq__cta { margin-top: 40px; display: flex; justify-content: center; }
@media (min-width: 1024px) { .faq__cta { justify-content: flex-start; } }
@media (min-width: 1024px) {
  /* Layout lado a lado (sem overlap, sem posicionamento absoluto): o card e a imagem
     são colunas independentes de uma mesma grid, alinhadas ao centro verticalmente.
     A imagem nunca fica "por baixo"/atrás do card, e como não depende da altura do
     card, o accordion abrir/fechar não afeta o tamanho dela — só re-centraliza. */
  .faq__grid { display: grid; grid-template-columns: 42% 1fr; gap: 40px; align-items: center; }
  .faq__media { margin-bottom: 0; }
  /* Tamanho natural da imagem (sem crop/estica) */
  .faq__media img { width: auto; height: auto; max-width: 100%; object-fit: contain; }
  .faq__card { padding: 40px 44px; }
}

/* ============================================================
   PRINT — isola só o documento do resultado
   ============================================================ */
@media print {
  header, footer, .ihero, .gerador, .cnpj-cta, .faq, .result__confirm, .result__actions, .modal { display: none !important; }
  .view#view-result { display: block !important; }
  body { background: #fff; }
  .result { padding: 0 !important; }
  .result__split { grid-template-columns: 1fr !important; gap: 0 !important; }
  .invoice-doc { border: none !important; padding: 0 !important; }
  .pcon { max-width: none !important; padding: 0 !important; }
}
