/* ═══════════════════════════════════════════════════════════════
   TEMA CLARO — Meu Caderninho Digital
   Paleta aprovada em 15/07/2026 (feedback da mentora de publicidade):
   fundo branco quente, texto azul-marinho, CTA azul, dourado só na
   marca, verde nos positivos. Compartilhado entre as páginas públicas
   (piloto: /comecar-crediario; Fase 2 replica pro index e SEO pages).
   Cada página pode ter <style> próprio só pro que for específico dela.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #FAF7F2;
  --surface: #ffffff;
  --border: #e5ded2;
  --ink: #16324F;
  --ink-soft: #40566e;
  --muted: #6b7a8d;
  --blue: #2456A6;
  --blue-deep: #1c4485;
  --gold: #d4a017;
  --green: #2E9E6B;
  --green-soft: rgba(46,158,107,0.08);
  --danger: #c0392b;
  --radius: 14px;
  --shadow-soft: 0 4px 20px rgba(22,50,79,0.07);
  --shadow-btn: 0 8px 24px rgba(36,86,166,0.22);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Sora', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 40px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(22,50,79,0.08);
  z-index: 100;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  font-size: 1.02rem; font-weight: 700;
  color: var(--ink); white-space: nowrap;
}
.nav-brand img { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a {
  color: var(--ink-soft); text-decoration: none;
  font-size: 0.85rem; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--blue); }
.nav-cta {
  background: var(--blue); color: #fff !important;
  padding: 9px 20px; border-radius: 10px;
  font-weight: 700 !important; font-size: 0.85rem !important;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--blue-deep) !important; }
.nav-entrar {
  border: 1px solid var(--border);
  color: var(--muted) !important;
  padding: 8px 18px; border-radius: 10px;
  font-size: 0.85rem; font-weight: 500;
}
.nav-entrar:hover { border-color: var(--blue); color: var(--blue) !important; }

.mobile-nav {
  display: none;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid rgba(22,50,79,0.08);
  padding: 8px 16px; gap: 8px;
  position: fixed; top: 57px; left: 0; right: 0; z-index: 99;
}
.mobile-nav a {
  flex: 1; text-align: center;
  color: var(--ink-soft); text-decoration: none;
  font-size: 0.8rem; font-weight: 500;
  padding: 8px; border-radius: 8px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.mobile-nav .m-cta { background: var(--blue); color: #fff !important; border-color: var(--blue); font-weight: 700; }

/* ─── HERO COM FOTO ───
   A imagem entra pelo <style> da página (background-image na .hero-foto),
   porque cada página pode usar uma foto diferente. O véu garante a
   legibilidade da headline navy sobre qualquer foto clara. */
.hero-foto {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: center;
  background-size: cover;
  /* ancora no topo: as duas fotos do carrossel têm as pessoas no terço de cima */
  background-position: right top;
  padding-top: 60px;
}
/* Carrossel do hero: foto A = background-image (definido por página),
   foto B = ::after com parceria.webp cruzando a opacidade. Ordem das
   camadas (de baixo pra cima): foto A (bg) < foto B (::after z1) <
   degradê de legibilidade (::before z2) < texto (.hero-inner z3). */
.hero-foto::after {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background-image: url('/assets/parceria.webp');
  background-size: cover;
  /* as cabeças ficam no terço de cima da foto — ancora no topo pra não cortá-las */
  background-position: right top;
  opacity: 0;
  animation: heroFade 16s ease-in-out infinite;
}
@keyframes heroFade {
  0%, 42%  { opacity: 0; }
  50%, 92% { opacity: 1; }
  100%     { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-foto::after { animation: none; opacity: 0; }
}
.hero-foto::before {
  content: '';
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(100deg,
    rgba(250,247,242,0.97) 0%,
    rgba(250,247,242,0.94) 34%,
    rgba(250,247,242,0.55) 55%,
    rgba(250,247,242,0.05) 78%);
}
.hero-inner {
  position: relative; z-index: 3;
  max-width: 1100px; width: 100%;
  margin: 0 auto;
  padding: 48px 24px;
}
.hero-copy { max-width: 560px; }
.hero-foto h1 {
  font-size: clamp(2.1rem, 4.8vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 18px;
}
.hero-sub {
  font-size: clamp(1rem, 2.2vw, 1.12rem);
  color: var(--ink-soft);
  max-width: 480px;
  margin-bottom: 28px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.trust-line {
  display: flex; gap: 18px; flex-wrap: wrap;
  font-size: 0.85rem; font-weight: 600;
  color: var(--ink-soft);
}
.trust-line .ok { color: var(--green); }

/* ─── HERO no MOBILE: empilha, não sobrepõe ───
   No celular a foto (composta em 16:9) era cortada e o texto claro caía
   sobre a parte clara dela, ilegível. Solução: NÃO usar a foto como fundo
   atrás do texto. Empilha — a foto vira um bloco próprio no topo (as pessoas
   da parceria visíveis) e o texto vem abaixo, sobre o fundo sólido claro do
   site (--bg), com contraste garantido. Tudo dentro deste media query: o
   desktop (carrossel com foto de fundo + véu) fica intacto. */
@media (max-width: 720px) {
  .hero-foto {
    min-height: 0;
    display: flex;
    flex-direction: column;
    /* espaço da barra fixa do logo: a foto começa ABAIXO dela, sobre fundo
       sólido, pra não vazar por trás da nav translúcida */
    padding-top: 56px;
    background: var(--bg);           /* some com a foto de fundo do texto */
  }
  /* a foto de parceria (as pessoas) vira um bloco no topo, largura total */
  .hero-foto::before {
    content: '';
    position: relative;              /* entra no fluxo da coluna (não mais absoluto) */
    inset: auto;
    z-index: 0;
    display: block;
    width: 100%;
    height: 210px;
    background: url('/assets/parceria-mobile.webp') no-repeat;
    background-size: cover;
    background-position: center 30%; /* mostra as cabeças/pessoas, não a parede */
    animation: none;
    opacity: 1;
  }
  /* sem crossfade no mobile — a 2ª foto cairia sob o texto */
  .hero-foto::after { display: none; }
  .hero-inner {
    position: relative;
    z-index: 3;
    background: var(--bg);           /* fundo sólido claro sob o texto */
    padding: 28px 22px 38px;
  }
  .hero-copy { max-width: 100%; }
  .hero-foto h1 {
    font-size: clamp(1.55rem, 6.2vw, 2rem);  /* legível, sem quebrar em 6 linhas */
    margin-bottom: 14px;
  }
  .hero-sub {
    font-size: 1rem;
    max-width: 100%;
    margin-bottom: 22px;
  }
}

/* ─── BOTÕES ─── */
.btn-primary {
  background: var(--blue);
  color: #fff; font-weight: 700;
  padding: 15px 30px; border-radius: 12px;
  text-decoration: none; font-size: 1rem;
  transition: background 0.2s, transform 0.15s;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover { background: var(--blue-deep); transform: translateY(-2px); }

.btn-agenda {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px; border-radius: 12px;
  background: var(--surface);
  font-weight: 600; font-size: 0.95rem;
  text-decoration: none;
  border: 1.5px solid rgba(22,50,79,0.18);
  color: var(--ink);
  transition: border-color 0.2s, color 0.2s;
}
.btn-agenda:hover { border-color: var(--blue); color: var(--blue); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-soft); font-weight: 500;
  padding: 14px 28px; border-radius: 12px;
  text-decoration: none; font-size: 0.95rem;
  transition: border-color 0.2s, color 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

/* ─── SEÇÕES ─── */
section { position: relative; z-index: 1; }

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 88px 24px;
}

.section-tag {
  display: inline-block;
  font-size: 0.78rem; font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.7rem, 3.8vw, 2.5rem);
  font-weight: 800; line-height: 1.18;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.05rem; color: var(--ink-soft);
  max-width: 640px;
}

.texto-corpo { font-size: 1.05rem; color: var(--ink-soft); line-height: 1.9; max-width: 700px; }
.texto-corpo p { margin-bottom: 18px; }
.texto-corpo strong { color: var(--ink); }

.surface-bg { background: var(--surface); }

/* ─── CARDS ─── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 44px;
}
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(22,50,79,0.11); }
.surface-bg .card { background: var(--bg); box-shadow: none; border: 1px solid var(--border); }
.card-icon { font-size: 2rem; margin-bottom: 14px; }
.card-title { font-size: 1.02rem; font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.card-text { font-size: 0.92rem; color: var(--muted); line-height: 1.7; }
.card-text a { color: var(--blue); text-decoration: none; font-weight: 600; }

/* ─── PASSOS (como funciona) ─── */
.passos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 44px;
  counter-reset: passo;
}
.passo {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-soft);
  position: relative;
}
.surface-bg .passo { background: var(--bg); box-shadow: none; border: 1px solid var(--border); }
.passo-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--blue); color: #fff;
  font-weight: 800; font-size: 1.05rem;
  margin-bottom: 16px;
}
.passo-title { font-size: 1.02rem; font-weight: 700; margin-bottom: 8px; }
.passo-text { font-size: 0.92rem; color: var(--muted); line-height: 1.7; }
.passo-tempo {
  display: inline-block; margin-top: 12px;
  font-size: 0.78rem; font-weight: 700;
  color: var(--green);
}

/* ─── FECHO (caixa de reforço positivo) ─── */
.fecho {
  margin-top: 36px;
  background: var(--green-soft);
  border: 1px solid rgba(46,158,107,0.3);
  border-radius: var(--radius);
  padding: 20px 24px;
  font-size: 1.02rem; line-height: 1.7;
  color: var(--ink-soft);
}
.fecho strong { color: var(--green); }

/* ─── BLOCO HUMANO (parceirão) ─── */
.parceiro {
  display: flex; gap: 32px; align-items: flex-start;
  margin-top: 40px;
  background: var(--surface);
  border-radius: 18px;
  padding: 38px;
  box-shadow: var(--shadow-soft);
  max-width: 820px;
}
.parceiro-texto { font-size: 1.02rem; color: var(--ink-soft); line-height: 1.9; }
.parceiro-texto p + p { margin-top: 16px; }
.parceiro-texto strong { color: var(--ink); }
.parceiro-assina { margin-top: 18px; font-weight: 700; color: var(--ink); font-size: 0.95rem; }
.parceiro-assina span { display: block; font-weight: 500; color: var(--muted); font-size: 0.82rem; }
@media (max-width: 640px) { .parceiro { padding: 26px 20px; } }

/* ─── HONESTIDADE / CITAÇÕES SÓBRIAS ─── */
.honesto {
  max-width: 720px;
  margin-top: 28px;
  padding-left: 22px;
  border-left: 3px solid var(--border);
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.9;
}
.honesto p + p { margin-top: 18px; }
.honesto strong { color: var(--ink); font-weight: 600; }

/* ─── PREÇO ─── */
.preco-box {
  max-width: 720px;
  margin-top: 28px;
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--ink-soft);
}
.preco-box p + p { margin-top: 18px; }
.preco-box strong { color: var(--ink); }
.preco-box .gratis { color: var(--green); font-weight: 700; }
.preco-link {
  display: inline-block;
  margin-top: 26px;
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}
.preco-link:hover { color: var(--blue); border-color: var(--blue); }

/* ─── SCREENSHOTS ─── */
.screens-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 44px;
}
@media (max-width: 680px) { .screens-grid { grid-template-columns: 1fr; } }

.screen-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s;
}
.screen-card:hover { transform: scale(1.02); }
.screen-card img { width: 100%; display: block; }
.screen-caption {
  padding: 12px 16px;
  font-size: 0.82rem; color: var(--muted);
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.screen-caption::before { content: '●'; color: var(--green); font-size: 0.6rem; }
.screen-wide { grid-column: 1 / -1; }

/* ─── FAQ ─── */
.faq-list { max-width: 760px; margin-top: 36px; }
.faq-item {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 22px 26px;
  margin-bottom: 14px;
}
.faq-q { font-size: 1rem; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.faq-a { font-size: 0.95rem; color: var(--ink-soft); line-height: 1.8; }
.faq-a strong { color: var(--ink); }

/* ─── FORMULÁRIO ─── */
.form-wrap {
  background: var(--surface);
  border-radius: 20px;
  padding: 48px;
  max-width: 680px;
  margin: 48px auto 0;
  box-shadow: 0 12px 40px rgba(22,50,79,0.1);
}

.form-title {
  font-size: 1.5rem; font-weight: 800;
  margin-bottom: 8px;
}
.form-sub { font-size: 0.9rem; color: var(--muted); margin-bottom: 32px; }

.form-row {
  display: grid; gap: 16px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 16px;
}
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }

label {
  font-size: 0.8rem; font-weight: 600;
  color: var(--muted); letter-spacing: 0.04em;
  text-transform: uppercase;
}

input, select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--ink);
  font-family: 'Sora', sans-serif;
  font-size: 0.92rem;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
input:focus, select:focus { border-color: var(--blue); }
input::placeholder { color: var(--muted); opacity: 0.6; }

.form-radio-group { display: flex; gap: 12px; }
.radio-opt {
  flex: 1;
  display: flex; align-items: center; gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: border-color 0.2s, color 0.2s;
}
.radio-opt:has(input:checked) { border-color: var(--blue); color: var(--blue); font-weight: 600; }
.radio-opt input { display: none; }

.sistema-condicional { display: none; }
.sistema-condicional.visible { display: flex; }

.form-submit {
  width: 100%;
  margin-top: 28px;
  background: var(--blue);
  color: #fff; font-weight: 700;
  padding: 16px; border-radius: 12px;
  font-size: 1rem; font-family: 'Sora', sans-serif;
  border: none; cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: var(--shadow-btn);
}
.form-submit:hover { background: var(--blue-deep); transform: translateY(-2px); }
.form-submit:disabled { opacity: 0.6; cursor: default; transform: none; }

.form-msg {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  display: none;
}
.form-msg.success { background: var(--green-soft); border: 1px solid var(--green); color: var(--green); display: block; }
.form-msg.error { background: rgba(192,57,43,0.08); border: 1px solid var(--danger); color: var(--danger); display: block; }

/* ─── BOTÃO FLUTUANTE WHATSAPP ─── */
.wa-float {
  position: fixed; right: 20px; bottom: 24px; z-index: 150;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.wa-float:hover { transform: scale(1.08); box-shadow: 0 10px 28px rgba(37,211,102,0.5); }
.wa-float svg { width: 30px; height: 30px; }
@media (max-width: 640px) { .wa-float { width: 52px; height: 52px; right: 16px; bottom: 20px; } }

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--blue) !important; }

/* ─── ANIMAÇÕES ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

@media (max-width: 640px) {
  nav { padding: 12px 20px; }
  .nav-links { display: none; }
  /* No celular fica só a barra do logo. A barra de pílulas flutuante
     (SCPC/Juros/Entrar/Testar) vazava a foto do hero por trás e ficava
     feia — escondida no mobile. */
  .mobile-nav { display: none; }
  .form-wrap { padding: 28px 20px; }
  .section-inner { padding: 64px 22px; }
}

/* Hovers de elementos com style= inline. O CSP (script-src-attr 'none')
   bloqueia handler inline; hover é CSS. O !important vence o atributo style. */
[data-hv="hv-borda-texto"]:hover { border-color: var(--blue)!important; color: var(--blue)!important; }
[data-hv="hv-texto"]:hover       { color: var(--blue)!important; }
