/* ============================================================
   ConnectaPay — site institucional
   Autocontido: sem CDN, sem fonte externa (CSP style-src 'self').
   ============================================================ */

@font-face {
  font-family: "Carnas";
  src: url("../fonts/Carnas_W03_Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* marca (derivada do logotipo: navy + teal + laranja) */
  --navy-950: #081522;
  --navy-900: #0b1c2c;
  --navy-800: #112a42;
  --navy-700: #163a5c;
  --blue-700: #0c4a8b;
  --blue-600: #0f5bae;
  --blue-500: #2f80ed;
  --blue-100: #e6f0fb;
  --blue-50: #f1f6fd;
  --teal-500: #2a7f9e;
  --teal-100: #e0f1f6;
  --orange-500: #e8842a;
  --orange-600: #cf6d15;
  --orange-100: #fdebd9;
  /* neutros */
  --ink-900: #13202e;
  --ink-700: #2e3d4f;
  --ink-600: #4b5a6b;
  --ink-400: #7c8896;
  --ink-200: #d5dde6;
  --bg: #f6f8fb;
  --surface: #ffffff;
  --border: #e3e9f0;
  /* forma */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(16, 42, 67, .06), 0 1px 3px rgba(16, 42, 67, .08);
  --shadow: 0 14px 34px -14px rgba(16, 42, 67, .28);
  --shadow-lg: 0 30px 60px -20px rgba(8, 21, 34, .45);
  /* tipografia */
  --font-display: "Carnas", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --container: 1140px;
}

/* ---------- 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: 1rem;
  line-height: 1.65;
  color: var(--ink-900);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-600); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--blue-700); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding-left: 1.2em; }
h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.01em;
  margin: 0;
  color: var(--navy-900);
}
h3 { font-family: var(--font-body); font-weight: 600; line-height: 1.3; margin: 0; color: var(--navy-900); }
.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.pular {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--navy-900); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
  transition: top .15s;
}
.pular:focus { top: 16px; }
:focus-visible { outline: 3px solid var(--orange-500); outline-offset: 3px; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: .98rem; line-height: 1.2;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--lg { padding: 15px 28px; font-size: 1.04rem; }
.btn--sm { padding: 9px 16px; font-size: .92rem; }
.btn--primario { background: var(--orange-500); color: #fff; box-shadow: 0 8px 20px -10px rgba(232, 132, 42, .9); }
.btn--primario:hover { background: var(--orange-600); color: #fff; box-shadow: 0 12px 24px -10px rgba(232, 132, 42, .95); }
.btn--azul { background: var(--blue-600); color: #fff; }
.btn--azul:hover { background: var(--blue-700); color: #fff; }
.btn--contorno { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn--contorno:hover { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .7); }
.btn--claro { background: #fff; color: var(--navy-900); }
.btn--claro:hover { background: #eaf2fb; color: var(--navy-900); }
.btn--suave { background: var(--blue-50); color: var(--blue-700); border-color: var(--blue-100); }
.btn--suave:hover { background: var(--blue-100); color: var(--blue-700); }

/* ---------- eyebrow / tag ---------- */
.eyebrow {
  display: inline-block; margin-bottom: 14px;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue-600);
}
.eyebrow--claro { color: #9bd3ea; }
.tag {
  display: inline-block; vertical-align: middle; margin-left: 6px;
  padding: 2px 8px; border-radius: 999px;
  background: var(--orange-100); color: var(--orange-600);
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}

/* ---------- topo ---------- */
.topo {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.topo.is-rolado { border-color: var(--border); box-shadow: var(--shadow-sm); }
.topo__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; position: relative; }
.topo__logo img { width: 180px; height: auto; }
.topo__nav { display: flex; align-items: center; gap: 28px; }
.topo__nav a:not(.btn) {
  color: var(--ink-700); text-decoration: none; font-weight: 500; font-size: .97rem;
  padding: 6px 0; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.topo__nav a:not(.btn):hover { color: var(--blue-600); border-color: var(--blue-500); }
.topo__menu-btn {
  display: none; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; position: relative;
}
.hamb, .hamb::before, .hamb::after {
  content: ""; position: absolute; left: 11px; width: 20px; height: 2px; border-radius: 2px;
  background: var(--navy-900); transition: transform .2s, opacity .2s;
}
.hamb { top: 20px; }
.hamb::before { top: -6px; left: 0; }
.hamb::after { top: 6px; left: 0; }
.topo__menu-btn.is-aberto .hamb { background: transparent; }
.topo__menu-btn.is-aberto .hamb::before { transform: translateY(6px) rotate(45deg); }
.topo__menu-btn.is-aberto .hamb::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .topo__menu-btn { display: block; }
  .topo__nav {
    display: none; position: absolute; top: calc(100% + 1px); left: -20px; right: -20px;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: #fff; padding: 12px 20px 20px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .topo__nav.is-aberto { display: flex; }
  .topo__nav a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--border); }
  .topo__nav .btn { margin-top: 12px; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 520px at 85% -10%, rgba(47, 128, 237, .38), transparent 60%),
    radial-gradient(600px 400px at -10% 110%, rgba(42, 127, 158, .35), transparent 60%),
    linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 45%, var(--navy-700) 100%);
  padding: clamp(64px, 9vw, 112px) 0 clamp(56px, 8vw, 96px);
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent);
}
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 4.8vw, 3.7rem); max-width: 14ch; }
.hero h1 .destaque { color: #f4a14a; }
.hero__lead { margin: 22px 0 30px; font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: rgba(255, 255, 255, .82); max-width: 58ch; }
.hero__acoes { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__canais { list-style: none; padding: 0; margin: 34px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hero__canais li {
  font-size: .85rem; font-weight: 600; color: rgba(255, 255, 255, .85);
  padding: 6px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
}
.hero__arte svg { width: min(100%, 420px); margin-inline: auto; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .45)); }
.hero__arte .barra { transform-origin: center bottom; animation: respira 6s ease-in-out infinite; }
.hero__arte .b2, .hero__arte .b8 { animation-delay: .6s; }
.hero__arte .b3, .hero__arte .b7 { animation-delay: 1.2s; }
.hero__arte .b4, .hero__arte .b6 { animation-delay: 1.8s; }
.hero__arte .b5 { animation-delay: 2.4s; }
@keyframes respira {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__arte { order: -1; }
  .hero__arte svg { width: min(48%, 210px); }
  .hero h1 { max-width: none; }
}

/* ---------- seções ---------- */
.secao { padding: clamp(56px, 8vw, 96px) 0; }
.secao--clara { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.secao__cab { max-width: 760px; margin: 0 auto clamp(36px, 5vw, 56px); text-align: center; }
.secao__cab h2 { font-size: clamp(1.85rem, 3.3vw, 2.55rem); }
.secao__cab p { margin: 14px auto 0; color: var(--ink-600); font-size: 1.08rem; max-width: 62ch; }

/* passos */
.passos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.passo {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px 26px; box-shadow: var(--shadow-sm);
}
.passo__num {
  display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 16px;
  border-radius: 12px; background: linear-gradient(135deg, var(--blue-600), var(--teal-500));
  color: #fff; font-family: var(--font-display); font-size: 1.15rem;
}
.passo h3 { font-size: 1.12rem; margin-bottom: 8px; }
.passo p { margin: 0; color: var(--ink-600); font-size: .96rem; }
.passo:not(:last-child)::after {
  content: ""; position: absolute; top: 48px; right: -20px; width: 20px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--ink-200) 0 4px, transparent 4px 8px);
}
@media (max-width: 1000px) { .passos { grid-template-columns: repeat(2, 1fr); } .passo:nth-child(2)::after { display: none; } }
@media (max-width: 600px) { .passos { grid-template-columns: 1fr; } .passo::after { display: none !important; } }

/* cards de funcionalidades */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 26px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #cfdcec; }
.card__icone {
  width: 50px; height: 50px; margin-bottom: 18px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue-100), var(--teal-100)); color: var(--blue-600);
}
.icone { width: 24px; height: 24px; }
.card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.card p { margin: 0; color: var(--ink-600); font-size: .96rem; }

/* perfis */
.perfis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.perfil {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px 28px;
  box-shadow: var(--shadow-sm);
}
.perfil__icone {
  width: 50px; height: 50px; margin-bottom: 18px; border-radius: 50%; display: grid; place-items: center;
  background: var(--orange-100); color: var(--orange-600);
}
.perfil h3 { font-size: 1.2rem; margin-bottom: 12px; }
.perfil ul { padding-left: 0; list-style: none; display: grid; gap: 10px; color: var(--ink-600); font-size: .96rem; }
.perfil li { position: relative; padding-left: 22px; }
.perfil li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 12px; border-radius: 50%;
  background: var(--teal-100); box-shadow: inset 0 0 0 3px var(--teal-500);
}
@media (max-width: 900px) { .perfis { grid-template-columns: 1fr; } }

/* segurança */
.seguranca {
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(42, 127, 158, .35), transparent 60%),
    var(--navy-900);
  color: #fff; padding: clamp(56px, 8vw, 96px) 0;
}
.seguranca__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.seguranca h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.4rem); }
.seguranca__texto p { color: rgba(255, 255, 255, .78); margin: 18px 0 26px; font-size: 1.05rem; }
.seguranca__lista { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.seg-item { display: flex; gap: 16px; align-items: flex-start; }
.seg-item__icone {
  flex: 0 0 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: #9bd3ea;
}
.seg-item h3 { color: #fff; font-size: 1.06rem; margin-bottom: 4px; }
.seg-item p { margin: 0; color: rgba(255, 255, 255, .72); font-size: .95rem; }
@media (max-width: 900px) { .seguranca__grid { grid-template-columns: 1fr; } }

/* cta final */
.cta-final { padding-top: clamp(40px, 6vw, 72px); }
.cta-box {
  text-align: center; color: #fff; border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 68px) clamp(24px, 5vw, 64px);
  background:
    radial-gradient(600px 300px at 0% 0%, rgba(255, 255, 255, .18), transparent 60%),
    linear-gradient(135deg, var(--blue-600), var(--teal-500));
  box-shadow: var(--shadow);
}
.cta-box h2 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.cta-box p { margin: 14px auto 28px; max-width: 56ch; color: rgba(255, 255, 255, .88); font-size: 1.05rem; }
.cta-box__email { display: block; margin-top: 16px; font-size: .92rem; color: rgba(255, 255, 255, .8); }

/* ---------- rodapé ---------- */
.rodape { background: var(--navy-950); color: rgba(255, 255, 255, .72); padding: 56px 0 24px; font-size: .95rem; }
.rodape a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.rodape a:hover { color: #fff; text-decoration: underline; }
.rodape__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.rodape__marca img { width: 170px; margin-bottom: 16px; }
.rodape__marca p { max-width: 44ch; margin: 0; }
.rodape h2 {
  font-family: var(--font-body); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; margin: 0 0 14px;
}
.rodape__links { display: flex; flex-direction: column; gap: 8px; }
.rodape__contato p { margin: 8px 0 0; font-size: .9rem; color: rgba(255, 255, 255, .55); }
.rodape__base {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .88rem;
}
@media (max-width: 760px) { .rodape__grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- página de documento (termos) ---------- */
.doc-hero {
  color: #fff; padding: clamp(44px, 6vw, 72px) 0;
  background: linear-gradient(160deg, var(--navy-950), var(--navy-800));
}
.doc-hero h1 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.doc-hero__meta { margin: 16px 0 0; color: rgba(255, 255, 255, .75); max-width: 80ch; }
.doc-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; padding: clamp(32px, 5vw, 56px) 0 clamp(48px, 6vw, 80px); align-items: start; }
.doc-toc { position: sticky; top: 92px; }
.doc-toc h2 { font-family: var(--font-body); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-400); margin: 0 0 12px; }
.doc-toc ol { list-style: none; padding: 0; display: grid; gap: 2px; font-size: .92rem; counter-reset: toc; }
.doc-toc li { counter-increment: toc; }
.doc-toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--ink-700); text-decoration: none; }
.doc-toc a::before { content: counter(toc) ". "; color: var(--ink-400); }
.doc-toc a:hover { background: var(--blue-50); color: var(--blue-700); }
.doc {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(24px, 4vw, 48px); box-shadow: var(--shadow-sm); min-width: 0;
}
.doc__intro { font-size: 1.08rem; color: var(--ink-700); }
.doc h2 { font-size: 1.5rem; margin: 40px 0 12px; scroll-margin-top: 92px; }
.doc h2:first-of-type { margin-top: 24px; }
.doc h3 { font-size: 1.05rem; margin: 22px 0 6px; }
.doc p, .doc li { color: var(--ink-700); }
.doc ul, .doc ol { padding-left: 1.25em; margin-bottom: 1em; display: grid; gap: 6px; }
.doc .aviso {
  background: var(--orange-100); border-left: 4px solid var(--orange-500);
  padding: 14px 18px; border-radius: 8px; color: var(--ink-900);
}
.tabela-scroll { overflow-x: auto; margin: 12px 0 20px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.doc table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 560px; }
.doc th, .doc td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.doc th { background: var(--blue-50); color: var(--navy-900); font-weight: 600; }
.doc tr:last-child td { border-bottom: 0; }
.doc td:first-child { font-weight: 600; color: var(--navy-900); }
.doc .t-cat td:first-child { white-space: nowrap; }
.doc .t-bases th:last-child, .doc .t-bases td:last-child { width: 38%; }
.doc .t-bases td:first-child { font-weight: 400; color: var(--ink-700); }
.doc__rodape { margin: 32px 0 0; padding-top: 18px; border-top: 1px solid var(--border); font-size: .9rem; color: var(--ink-400); scroll-margin-top: 92px; }
@media (max-width: 960px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-toc { position: static; }
  .doc-toc ol { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) { .doc-toc ol { grid-template-columns: 1fr; } .doc .t-cat td:first-child { white-space: normal; } }

/* ---------- página de erro ---------- */
.erro { min-height: 60vh; display: grid; place-items: center; padding: 64px 20px; }
.erro__card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 48px 40px; max-width: 540px; text-align: center; box-shadow: var(--shadow);
}
.erro__codigo { display: block; font-family: var(--font-display); font-size: 4.5rem; line-height: 1; color: var(--blue-600); margin-bottom: 8px; }
.erro__card h1 { font-size: 1.8rem; margin-bottom: 10px; }
.erro__card p { color: var(--ink-600); }
.erro__acoes { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-visivel { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__arte .barra { animation: none; }
  .btn, .card { transition: none; }
}
