/* =========================================================
   SYS NF-e · Página para MEI (/para-mei/)
   Mesma identidade do index: Barlow (títulos) + Hanken Grotesk (texto)
   Um único caminho: WhatsApp.
   ========================================================= */

:root {
  --blue: #0077B6;
  --blue-dark: #00578A;
  --blue-text: #00689F;
  --sky: #E6F6FB;
  --sky-2: #D6F3FA;
  --sky-3: #C4EAF6;
  --sky-line: #9FD6EC;
  --navy: #1A1A2E;
  --deep: #0F3460;
  --gray: #F2F5F8;
  --line: #E3E8EF;
  --line-2: #DDE3EA;
  --text: #1A1A2E;
  --text-2: #4A5068;
  --text-3: #3B4158;
  --on-dark: #D3DEEA;
  --green: #22C55E;
  --green-hover: #16B352;
  --green-ink: #04240F;
  --green-dark: #15803D;

  --font-display: 'Barlow', 'Arial Narrow', system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-app: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --section-y: clamp(72px, 9vw, 112px);
  --gutter: clamp(20px, 5vw, 40px);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --sticky-h: 0px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
h1, h2, h3, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid #00B4D8; outline-offset: 3px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--navy); color: #fff; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

.container { width: 100%; max-width: calc(1240px + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.container--faq { max-width: calc(860px + var(--gutter) * 2); }
.stack-36, .stack-48 { display: flex; flex-direction: column; }
.stack-36 { gap: 36px; } .stack-48 { gap: 48px; }

.section { padding-block: var(--section-y); }
.section--gray { background: var(--gray); }
.section--sky { background: var(--sky); }
.section--deep { background: var(--deep); color: #fff; }

.h2 { font-family: var(--font-display); font-weight: 700; font-size: clamp(34px, 4.2vw, 54px); line-height: 1.05; letter-spacing: -0.015em; text-wrap: balance; }
.h2--light { color: #fff; }

/* ---------- Botão de WhatsApp (único tipo de botão da página) ---------- */
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 64px; padding: 0 32px; border-radius: var(--radius-md);
  background: var(--green); color: var(--green-ink);
  font-weight: 700; font-size: 19px; text-decoration: none; white-space: nowrap;
  box-shadow: 0 10px 24px -10px rgba(21, 128, 61, .55);
  transition: background-color .2s ease, transform .2s var(--ease);
}
.cta:hover { background: var(--green-hover); color: var(--green-ink); }
.cta:active { transform: translateY(1px); }
.cta__icon { width: 24px; height: 24px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cta--block { width: 100%; }

/* ---------- "Resposta de uma pessoa" ---------- */
.human { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 600; color: var(--text); }
.human--small { font-size: 15px; color: var(--text-3); }
.human__avatar { position: relative; width: 44px; height: 44px; flex-shrink: 0; }
.human__avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(15, 52, 96, .18); }
.human__avatar--lg { width: 48px; height: 48px; }
.human__online {
  position: absolute; right: -1px; bottom: 0; width: 13px; height: 13px; border-radius: 50%;
  background: var(--green); border: 2.5px solid var(--sky);
}
.human__online::after {
  content: ""; position: absolute; inset: -2.5px; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); animation: onlinePulse 2.4s ease-out infinite;
}
@keyframes onlinePulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); } 70%, 100% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } }

/* ---------- Header ---------- */
.mei-header { background: var(--sky); }
.mei-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 84px; }
.mei-header__logo { display: block; flex-shrink: 0; }
.mei-header__logo img { height: 48px; width: auto; }

/* Navegação entre páginas: a página atual fica azul com borda */
.page-switch { display: flex; align-items: center; gap: 4px; }
.page-switch__link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border: 1.5px solid transparent; border-radius: 999px;
  font-family: var(--font-display); font-weight: 700; font-size: 15px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text); text-decoration: none; transition: color .2s ease, border-color .2s ease;
}
.page-switch__link:hover { color: var(--blue); }
.page-switch__link[aria-current="page"] { color: var(--blue-text); border-color: var(--sky-line); padding: 0 16px; }

/* ---------- 1 · Primeira tela ----------
   Sem efeito de entrada: o título aparece já no primeiro quadro. */
.mei-hero { background: var(--sky); overflow: hidden; }
.mei-hero__inner { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 48px; padding-block: 24px 72px; }
.mei-hero__copy { display: flex; flex-direction: column; gap: 28px; padding-top: 24px; }
.mei-hero__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(42px, 5.6vw, 76px); line-height: 1; letter-spacing: -0.02em; text-wrap: balance; }
.mei-hero__lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--text-3); max-width: 560px; text-wrap: pretty; }
.mei-hero__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }

.mei-hero__visual { position: relative; padding: 24px 0 76px 40px; }

/* Ilustração do modal "Serviço" (lembra o formulário real da plataforma) */
.mock {
  width: min(500px, 100%); margin-left: auto;
  background: #fff; border: 1px solid #D5DDE5; border-radius: 10px; overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(15, 52, 96, .5);
  font-family: var(--font-app); color: #212529;
}
.mock__title { background: #F4F6F7; border-bottom: 1px solid #DEE2E6; padding: 12px 20px; font-size: 22px; font-weight: 500; }
.mock__body { padding: 14px 20px 18px; display: flex; flex-direction: column; gap: 12px; }
.mock__section { font-size: 17px; font-weight: 500; }
.mock__row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.mock__row--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mock__row--money { grid-template-columns: 130px 80px; }
.mock__field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mock__label { font-size: 12px; }
.mock__label--sm { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock__input {
  height: 34px; display: flex; align-items: center; padding: 0 10px;
  border: 1px solid #CED4DA; border-radius: 4px; font-size: 13px; white-space: nowrap; overflow: hidden;
}
.mock__input--select { justify-content: space-between; }
.mock__input--select::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid #495057; border-bottom: 1.5px solid #495057; transform: rotate(45deg) translateY(-2px); flex-shrink: 0; margin-left: 8px; }
.mock__input--off { background: #E9ECEF; color: #6C757D; }
.mock__input--sm { height: 30px; }
.mock__input--right { justify-content: flex-end; }
.mock__box { background: #F8F9FA; border: 1px solid #DEE2E6; border-radius: 4px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.mock__box-title { font-size: 14px; }
.mock__field--focus .mock__label { font-weight: 600; color: var(--blue); }
.mock__input--textarea { height: 54px; align-items: flex-start; padding-top: 8px; border: 2px solid var(--blue); box-shadow: 0 0 0 4px var(--sky-2); white-space: normal; }
.mock__caret { display: inline-block; width: 1.5px; height: 16px; margin-left: 2px; background: var(--blue); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.mock__tip { margin-top: 6px; display: flex; gap: 8px; align-items: flex-start; background: var(--sky); border-radius: 8px; padding: 8px 10px; font-family: var(--font-body); font-size: 13px; line-height: 1.4; color: #1A3A52; }
.mock__tip-i { width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 13px; }
.mock__actions { border-top: 1px solid #DEE2E6; padding-top: 12px; display: flex; gap: 10px; }
.mock__btn { height: 36px; padding: 0 14px; border-radius: 4px; background: #007BFF; color: #fff; display: flex; align-items: center; font-size: 15px; }
.mock__btn--gray { background: #6C757D; }

.bubble { position: absolute; left: 0; bottom: 0; display: flex; align-items: flex-end; gap: 10px; max-width: 330px; }
.bubble .human__online { border-color: #fff; width: 14px; height: 14px; }
.bubble__text {
  display: flex; flex-direction: column; gap: 2px;
  background: #fff; border-radius: 16px 16px 16px 4px; padding: 12px 16px;
  box-shadow: 0 16px 36px -14px rgba(15, 52, 96, .45);
  font-size: 15px; font-weight: 600; line-height: 1.35;
}
.bubble__who { font-size: 12px; font-weight: 700; color: var(--green-dark); }

/* ---------- Selos ---------- */
.seals { border-bottom: 1px solid var(--line); }
.seals__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 32px; padding-block: 28px; }
.seals__list li { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.seals__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--sky); color: var(--blue); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.seals__icon svg, .pain__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 2 · Identificação ---------- */
.pains { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.pain { background: var(--gray); border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.pain p { font-size: 18px; line-height: 1.5; font-weight: 500; }
.pain__icon { width: 48px; height: 48px; border-radius: 14px; background: #fff; color: var(--blue); display: flex; align-items: center; justify-content: center; }
.pain__icon svg { width: 24px; height: 24px; }
.pain__icon--text { width: auto; align-self: flex-start; padding: 0 12px; font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .04em; }

/* ---------- 3 · Como funciona ---------- */
.how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: center; gap: 48px 64px; }
.how__text { display: flex; flex-direction: column; gap: 40px; }
.steps { display: flex; flex-direction: column; gap: 28px; }
.step { display: flex; gap: 20px; align-items: flex-start; }
.step__n { width: 52px; height: 52px; flex-shrink: 0; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 22px; }
.step__n--green { background: var(--green); color: var(--green-ink); }
.step > div { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.step__title { font-family: var(--font-display); font-weight: 700; font-size: 24px; line-height: 1.2; }
.step p { font-size: 17px; color: var(--text-2); }

.browser { background: #fff; border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(15, 52, 96, .35); }
.browser__bar { height: 40px; background: var(--gray); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; padding: 0 16px; }
.browser__bar span { width: 10px; height: 10px; border-radius: 50%; background: #CBD3DD; }
.browser__bar i { margin-left: 12px; flex: 1; max-width: 320px; height: 24px; border-radius: 6px; background: #fff; border: 1px solid var(--line); }
.browser img { width: 100%; height: auto; }
.browser__video { display: block; width: 100%; height: auto; }

/* ---------- 4 · Chamada do meio ---------- */
.mid { padding-block: clamp(64px, 8vw, 104px); }
.mid__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 32px 64px; }
.mid__num { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 3vw, 40px); line-height: .9; color: #5CCBEA; }
.mid__num span { font-size: clamp(96px, 11vw, 160px); letter-spacing: -0.04em; }
.mid__copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 32px; }
.mid .h2 { font-size: clamp(32px, 3.8vw, 50px); line-height: 1.08; }

/* ---------- 5 · Dúvidas ---------- */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0;
  font-family: var(--font-display); font-weight: 700; font-size: 22px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__plus { position: relative; width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%; background: var(--sky); transition: transform .2s var(--ease); }
.faq__plus::before, .faq__plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2.4px; border-radius: 2px; background: var(--blue); transform: translate(-50%, -50%); }
.faq__plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq__item[open] .faq__plus { transform: rotate(45deg); }
.faq__item p { padding: 0 52px 24px 0; font-size: 18px; color: var(--text-2); }

/* ---------- 6 · Fechamento ---------- */
.closing { padding-block: clamp(72px, 9vw, 120px); }
.closing__inner { max-width: calc(900px + var(--gutter) * 2); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 32px; }
.closing__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(36px, 4.8vw, 62px); line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; }

/* ---------- Rodapé ---------- */
.mei-footer { background: var(--navy); color: var(--on-dark); }
.mei-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 32px; }
.mei-footer__inner img { height: 48px; width: auto; }
.mei-footer p { font-size: 14px; }

/* ---------- Barra fixa do celular ----------
   Só no celular, e só quando nenhum botão da página está na tela (js/para-mei.js). */
.sticky-cta { display: none; }

/* =========================================================
   Responsivo
   ========================================================= */
@media (max-width: 1100px) {
  .pains { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seals__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .mei-hero__inner { grid-template-columns: 1fr; gap: 8px; padding-bottom: 56px; }
  .mei-hero__visual { padding: 24px 0 72px; max-width: 540px; width: 100%; margin-inline: auto; }
  .mock { margin-inline: auto; }
  .how { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .mei-header__inner { min-height: 72px; }
  .mei-header__logo img { height: 40px; }
  .page-switch__link { padding: 0 10px; font-size: 13px; }
  .page-switch__link[aria-current="page"] { padding: 0 12px; min-height: 36px; }

  .mei-hero__inner { padding-top: 8px; }
  .mei-hero__copy { gap: 20px; padding-top: 8px; }
  .mei-hero__actions { align-items: stretch; }
  .cta { min-height: 60px; padding: 0 24px; font-size: 18px; }
  .mei-hero__visual { padding-left: 0; }
  .bubble { left: 0; right: 0; bottom: 0; max-width: none; padding-inline: 8px; }
  .seals__list { grid-template-columns: 1fr; gap: 14px; padding-block: 24px; }

  .pains { grid-template-columns: 1fr; gap: 12px; }
  .pain { flex-direction: row; align-items: flex-start; gap: 14px; padding: 18px 20px; border-radius: 18px; }
  .pain p { font-size: 16px; line-height: 1.45; }
  .pain__icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; }
  .pain__icon svg { width: 20px; height: 20px; }
  .pain__icon--text { width: 40px; padding: 0; font-size: 0; }
  .pain__icon--text::before { content: "NCM"; font-size: 12px; font-weight: 800; }

  .steps { gap: 22px; }
  .step { gap: 14px; }
  .step__n { width: 44px; height: 44px; font-size: 20px; }
  .step__title { font-size: 21px; }
  .step p { font-size: 16px; }

  .faq__item summary { font-size: 19px; }
  .faq__item p { padding-right: 0; font-size: 17px; }

  .mei-footer__inner { flex-direction: column; text-align: center; }

  /* Barra fixa */
  .sticky-cta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px max(16px, env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid var(--line);
    box-shadow: 0 -10px 30px -12px rgba(15, 52, 96, .25);
    transition: transform .25s var(--ease), visibility .25s;
  }
  .sticky-cta .human__online { border-color: #fff; }
  .sticky-cta .cta { min-height: 54px; font-size: 17px; padding: 0 16px; gap: 10px; box-shadow: none; }
  .sticky-cta .cta__icon { width: 20px; height: 20px; }
  .js .sticky-cta { transform: translateY(110%); visibility: hidden; }
  .js .sticky-cta.is-visible { transform: none; visibility: visible; }
  /* Espaço para a barra não cobrir o fim do rodapé */
  .mei-footer { padding-bottom: 96px; }
}

@media (max-width: 380px) {
  .page-switch__link:not([aria-current]) { padding: 0 6px; }
  .cta { font-size: 17px; }
  .mock__row { grid-template-columns: 1fr; }
  .mock__row--even, .mock__row--money { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .human__online::after, .mock__caret { animation: none; }
  .sticky-cta, .cta, .faq__plus { transition: none; }
}
