/* ==========================================================================
   juajuda — folha de estilo compartilhada
   Brandbook: navy / indigo / salmon / green · Poppins
   ========================================================================== */

:root {
  /* Cores principais */
  --off-white: #F4F4F4;
  --indigo: #626AF1;
  --salmon: #F3A17C;
  --deep-blue: #3339A7;
  --navy: #1D1840;

  /* Cores de apoio */
  --green: #52E391;
  --purple: #9900FF;
  --dark-slate: #354346;

  /* Derivadas */
  --navy-soft: #241E4E;
  --indigo-dim: rgba(98, 106, 241, 0.12);
  --indigo-border: rgba(98, 106, 241, 0.25);
  --card-bg: linear-gradient(165deg, rgba(51, 57, 167, 0.18) 0%, rgba(29, 24, 64, 0.95) 60%);
  --card-border: rgba(255, 255, 255, 0.10);
  --hairline: rgba(255, 255, 255, 0.08);

  --text-primary: #F4F4F4;
  --text-secondary: #b0afc4;
  --text-muted: #7a7892;

  --input-bg: rgba(29, 24, 64, 0.6);
  --input-border: rgba(98, 106, 241, 0.2);

  --radius: 16px;
  --radius-sm: 10px;
  --page-max: 1080px;
  --prose-max: 780px;
}

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

html {
  scroll-behavior: smooth;
  /* Sem isso, o header fixo cobre o topo do alvo ao pular para uma âncora. */
  scroll-padding-top: 84px;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--navy);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--salmon);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Visível só para leitores de tela */
.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;
}

/* Link "pular para o conteúdo" — acessibilidade */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--indigo);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ── Atmosfera de fundo ── */
.bg-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-atmosphere::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -30%;
  width: 90vw;
  height: 90vw;
  background: radial-gradient(circle, rgba(98, 106, 241, 0.10) 0%, transparent 55%);
  animation: drift 22s ease-in-out infinite alternate;
}
.bg-atmosphere::after {
  content: '';
  position: absolute;
  bottom: -25%;
  right: -20%;
  width: 75vw;
  height: 75vw;
  background: radial-gradient(circle, rgba(243, 161, 124, 0.07) 0%, transparent 50%);
  animation: drift 28s ease-in-out infinite alternate-reverse;
}
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -25px) scale(1.04); }
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ── Layout ── */
.container {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 24px;
}
.container-prose { max-width: var(--prose-max); }

main {
  position: relative;
  z-index: 2;
  flex: 1 0 auto;
}

section { padding: 56px 0; }
section + section { padding-top: 0; }

/* ── Logotipo ──
   Wordmark oficial (Brandbook v3, slide 7): versão "fundo escuro (Navy)",
   com "ju" em off-white e "ajuda" em indigo. Não recolorir nem distorcer. */
.site-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.site-logo:hover { text-decoration: none; opacity: 0.85; }
.site-logo img { width: auto; }
.site-header .site-logo img { height: 30px; }
.site-footer .site-logo img { height: 34px; }

@media (max-width: 640px) {
  .site-header .site-logo img { height: 26px; }
}

/* ── Cabeçalho / navegação ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--hairline);
  /* Opacidade alta o bastante para o conteúdo não "vazar" atrás do menu em
     navegadores sem backdrop-filter. */
  background: rgba(24, 20, 54, 0.94);
  backdrop-filter: blur(10px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
  flex-wrap: wrap;
  padding-top: 12px;
  padding-bottom: 12px;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.site-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--text-primary); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--text-primary); font-weight: 600; }
.site-nav .nav-cta {
  background: var(--indigo);
  color: #fff;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.site-nav .nav-cta:hover { background: #5059e0; color: #fff; }

/* ── Tipografia ── */
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.22; }

.page-title {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  margin-bottom: 14px;
}
.page-lead {
  font-size: clamp(15px, 2.2vw, 18px);
  color: var(--text-secondary);
  max-width: 640px;
}
.section-title {
  font-size: clamp(22px, 3.6vw, 30px);
  font-weight: 700;
  margin-bottom: 12px;
}
.section-sub {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 620px;
  margin-bottom: 32px;
}
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--salmon);
  margin-bottom: 12px;
}
.highlight { color: var(--salmon); }

/* ── Hero ── */
.hero { padding: 64px 0 48px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(30px, 5.4vw, 48px);
  font-weight: 700;
  margin-bottom: 18px;
}
.hero p.hero-sub {
  font-size: clamp(15px, 2.2vw, 18px);
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 560px;
}
.hero-ju {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.ju-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--indigo);
  box-shadow: 0 0 0 6px rgba(98, 106, 241, 0.15), 0 12px 32px rgba(0, 0, 0, 0.3);
  margin-bottom: 18px;
}
.ju-caption {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 300px;
}
.ju-caption strong { color: var(--salmon); font-weight: 600; }

/* ── Botões ── */
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.25s, background 0.25s, border-color 0.25s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--indigo); color: #fff; }
.btn-primary:hover { background: #5059e0; color: #fff; box-shadow: 0 8px 28px rgba(98, 106, 241, 0.35); }

.btn-ghost { background: transparent; color: var(--text-primary); border-color: var(--indigo-border); }
.btn-ghost:hover { color: var(--text-primary); border-color: var(--indigo); background: var(--indigo-dim); }

.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(3px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── Cards ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.card h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--text-secondary); }
/* Card único não deve esticar de ponta a ponta da seção. */
.card-grid-single { grid-template-columns: minmax(0, 520px); }

.card .card-link {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
}
.card .card-link a { color: var(--indigo); }

.card .card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--indigo-dim);
  border: 1px solid var(--indigo-border);
  margin-bottom: 16px;
  font-size: 19px;
}

/* ── Bloco texto + foto ──
   As fotos da Ju têm fundo claro de estúdio. O brandbook autoriza a marca sobre
   container branco, então a figura vira um cartão claro sobre o navy. */
.media-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 44px;
  align-items: center;
}
.media-split.media-left { grid-template-columns: 0.9fr 1.1fr; }
.media-split.media-left .ju-figure { order: -1; }

.ju-figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: #fff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3);
}
.ju-figure img { width: 100%; display: block; }
.ju-figure figcaption {
  padding: 12px 16px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-muted);
  background: rgba(29, 24, 64, 0.92);
  border-top: 1px solid var(--hairline);
}
.ju-figure-narrow { max-width: 340px; }

@media (max-width: 860px) {
  .media-split,
  .media-split.media-left { grid-template-columns: 1fr; gap: 32px; }
  .media-split.media-left .ju-figure { order: 0; }
  .ju-figure-narrow { max-width: 300px; margin-inline: auto; }
}

/* ── Precisa / não precisa ── */
.req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.req-col {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
}
.req-col h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.req-no h3 { color: var(--text-muted); }
.req-yes h3 { color: var(--green); }
.req-col ul { list-style: none; display: grid; gap: 10px; }
.req-col li {
  font-size: 15px;
  padding-left: 26px;
  position: relative;
  color: var(--text-secondary);
}
.req-col li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
}
.req-no li::before { content: '✕'; color: var(--text-muted); }
.req-yes li::before { content: '✓'; color: var(--green); }
.req-yes li { color: var(--text-primary); }

/* ── Lista de etapas ── */
.steps { list-style: none; counter-reset: step; display: grid; gap: 18px; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 56px;
  min-height: 40px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--indigo-dim);
  border: 1px solid var(--indigo-border);
  color: var(--indigo);
  font-weight: 700;
  font-size: 15px;
}
.steps li h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; padding-top: 8px; }
.steps li p { font-size: 14px; color: var(--text-secondary); }

/* ── Faixa de CTA ── */
.cta-band {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 36px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--indigo), var(--salmon), var(--green));
}
.cta-band h2 { font-size: clamp(20px, 3.2vw, 27px); font-weight: 700; margin-bottom: 10px; }
.cta-band p { font-size: 15px; color: var(--text-secondary); margin-bottom: 22px; }

/* ── Blocos de contato ── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
}
.contact-card h3 { font-size: 14px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.contact-card p, .contact-card address {
  font-size: 15px;
  font-style: normal;
  color: var(--text-primary);
  line-height: 1.65;
}
.contact-card a { word-break: break-word; }

/* ── Formulário ── */
.form-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 30px 26px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}
.form-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--indigo), var(--salmon), var(--green));
}
.form-title { font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.form-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 22px; }

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.field input,
.field select {
  width: 100%;
  padding: 12px 14px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
  -webkit-appearance: none;
}
.field input::placeholder { color: var(--text-muted); }
.field input:focus,
.field select:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px var(--indigo-dim);
}
.field select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23b0afc4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.field select option { background: var(--navy); color: var(--text-primary); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field-erp-outro { margin-top: 8px; display: none; }
.field-erp-outro.visible { display: block; animation: fadeUp 0.25s ease-out; }

.terms-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0 6px;
}
.terms-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 3px;
  accent-color: var(--indigo);
  cursor: pointer;
}
.terms-field label {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.5;
  cursor: pointer;
}
.terms-field label a { text-decoration: underline; text-underline-offset: 2px; }

.recaptcha-wrapper {
  margin: 16px 0 8px;
  display: flex;
  justify-content: center;
  min-height: 78px;
}
.recaptcha-error { border: 2px solid var(--salmon); border-radius: 4px; padding: 2px; }

.submit-btn { width: 100%; margin-top: 10px; }

.field-error input,
.field-error select {
  border-color: var(--salmon) !important;
  box-shadow: 0 0 0 3px rgba(243, 161, 124, 0.15) !important;
}
.terms-error { animation: shake 0.4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.success-state { display: none; text-align: center; padding: 30px 12px; }
.success-state.visible { display: block; animation: fadeUp 0.4s ease-out; }
.success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), #3dd47a);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 18px;
  color: var(--navy);
  font-weight: 700;
}
.success-state h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.success-state p { font-size: 14px; color: var(--text-secondary); }

.form-note { font-size: 12px; color: var(--text-muted); margin-top: 14px; text-align: center; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Páginas de texto jurídico ── */
.legal h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--salmon);
  margin-top: 34px;
  margin-bottom: 12px;
}
.legal h3 {
  font-size: 16px;
  font-weight: 600;
  margin-top: 22px;
  margin-bottom: 8px;
}
.legal p,
.legal li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 14px;
}
.legal ul { margin-left: 22px; margin-bottom: 14px; }
.legal strong { color: var(--text-primary); font-weight: 600; }
.legal .updated { font-size: 13px; color: var(--text-muted); }
.legal .legal-box {
  background: rgba(98, 106, 241, 0.07);
  border: 1px solid var(--indigo-border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 20px 0;
}
.legal .legal-box p:last-child { margin-bottom: 0; }

/* ── Rodapé ── */
.site-footer {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  border-top: 1px solid var(--hairline);
  background: rgba(20, 16, 44, 0.6);
  margin-top: 64px;
  padding: 40px 0 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer-col h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: grid; gap: 9px; }
.footer-col a { font-size: 14px; color: var(--text-secondary); }
.footer-col a:hover { color: var(--text-primary); }
.footer-brand-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 12px;
  max-width: 320px;
}

/* Bloco legal — é o que o revisor da Meta procura. Não remover. */
.footer-legal {
  border-top: 1px solid var(--hairline);
  padding-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
}
.footer-legal .legal-entity { color: var(--text-secondary); }
.footer-legal .legal-entity strong { color: var(--text-primary); font-weight: 600; }
.footer-legal address { font-style: normal; display: inline; }
.footer-legal a { color: var(--text-secondary); }
.footer-legal a:hover { color: var(--text-primary); }
.footer-bottom {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-bottom nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ── Responsivo ── */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-ju { order: -1; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-col.footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  section { padding: 40px 0; }
  .hero { padding: 40px 0 32px; }
  .site-header .container { min-height: 60px; }
  .site-nav { gap: 16px; width: 100%; justify-content: flex-start; }
  .site-nav a { font-size: 13px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .ju-photo { width: 150px; height: 150px; }
  .data-list { grid-template-columns: 1fr; gap: 2px 0; }
  .data-list dd { margin-bottom: 12px; }
  .cta-band { padding: 28px 20px; }
  .form-card { padding: 24px 18px; }
}

@media (max-width: 420px) {
  .container { padding: 0 18px; }
  .footer-top { grid-template-columns: 1fr; }
}
