/* ============================================================
   Subpáginas (html/formulario.html e html/privacidade.html).
   Mesma identidade da home (fontes, paleta do manual, cantos
   redondos, coração como motivo), num arquivo próprio pra não
   carregar o CSS do hero e das seções.
   ============================================================ */

@font-face { font-family: 'Resist Sans'; src: url('../assets/fonts/ResistSansDisplay-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Resist Sans'; src: url('../assets/fonts/ResistSansDisplay-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Bacalar Condensed'; src: url('../assets/fonts/bacalartest-condensed.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --accent: #0B54BF;        /* Sapphire, o mesmo do card do hero */
  --brand-soft: #EAF5FC;
  --brand-deep: #061E59;
  --brand: #0D4BA1;
  --brand-dynamic: #0C69C8;
  --brand-light: #38A9EF;
  /* Texto: preto #212121 (Logan, 01/11), no lugar do azul profundo e dos
     cinzas. --brand-deep continua só como cor de FUNDO (seção 6, rodapé). */
  --ink: #212121;
  --ink-soft: #212121;
  --line: rgba(6, 30, 89, .14);
  --error: #C62C4A;
  --gutter: clamp(16px, 4vw, 32px);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #FFFFFF;
  color: var(--ink);
  font-family: 'Resist Sans', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.07em; /* -7% em todo o texto, igual à home */
  overflow-x: clip;
}
button, input, select, textarea { letter-spacing: inherit; }
a { color: var(--brand-dynamic); }
[hidden] { display: none !important; }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Topo ---------- */
.page-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px var(--gutter);
}
.page-logo img { display: block; height: clamp(34px, 4vw, 48px); width: auto; }
.page-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px 9px;
  border: 2px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color .3s ease, color .3s ease;
}
.page-back span { transition: translate .35s var(--spring); }
.page-back:hover { background: var(--accent); color: #FFFFFF; }
.page-back:hover span { translate: -4px 0; }

/* Rótulo em pílula de Liquid Glass (Logan, 01/11): fonte do texto (Resist
   Sans) em vez da Bacalar; tint quase transparente + borda polida com 3
   brilhos internos. A refração da borda vem do js/liquid-glass.js (só
   Chromium); no Safari fica o vidro fosco do backdrop-filter. */
.eyebrow {
  position: relative;
  display: inline-block;
  border: 1px solid rgba(11, 84, 191, .16);
  border-radius: 999px;
  padding: 9px 18px 8px;
  font-family: 'Resist Sans', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.2;
  background: linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(234, 245, 252, .34));
  box-shadow:
    0 8px 22px rgba(11, 84, 191, .12),
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 0 0 1px rgba(255, 255, 255, .3),
    inset 0 -1px 0 rgba(255, 255, 255, .15);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
  backdrop-filter: blur(8px) saturate(160%);
}
.eyebrow.is-light {
  border-color: rgba(255, 255, 255, .28);
  color: #FFFFFF;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06));
  box-shadow:
    0 8px 22px rgba(0, 0, 0, .18),
    inset 0 1px 0 rgba(255, 255, 255, .5),
    inset 0 0 0 1px rgba(255, 255, 255, .1),
    inset 0 -1px 0 rgba(255, 255, 255, .06);
}

/* ---------- Layout do formulário ---------- */
.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  max-width: 1240px;
  margin: 0 auto;
  padding: 8px var(--gutter) clamp(48px, 6vw, 96px);
}

/* Card azul da esquerda: fica preso enquanto a pessoa rola o formulário */
.form-intro {
  position: sticky;
  top: 20px;
  overflow: hidden;
  padding: clamp(32px, 4vw, 52px);
  border-radius: 45px;
  background: var(--accent);
  color: #FFFFFF;
  animation: rise .9s var(--out) both;
}
.form-intro::after { /* coração gigante ao fundo, como no card do investimento */
  content: "";
  position: absolute;
  right: -70px;
  bottom: -60px;
  width: 280px;
  aspect-ratio: 1;
  background: rgba(255, 255, 255, .07);
  -webkit-mask: url(../assets/icons/heart-plain.svg) center / contain no-repeat;
  mask: url(../assets/icons/heart-plain.svg) center / contain no-repeat;
  rotate: -14deg;
  animation: floaty 7s ease-in-out infinite;
  pointer-events: none;
}
.intro-title {
  margin: 22px 0 0;
  font-weight: 700;
  font-size: clamp(1.9rem, 3.3vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.07em;
  text-wrap: balance;
}
.intro-lead {
  margin: 18px 0 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, .82);
  max-width: 40ch;
}
.intro-steps {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}
.intro-steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-weight: 700;
  line-height: 1.4;
  animation: rise .8s var(--out) both;
}
.intro-steps li:nth-child(1) { animation-delay: .25s; }
.intro-steps li:nth-child(2) { animation-delay: .35s; }
.intro-steps li:nth-child(3) { animation-delay: .45s; }
.step-n {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-top: -3px;
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--accent);
  font-size: 0.9rem;
}
.intro-price {
  position: relative;
  z-index: 1;
  margin: 30px 0 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .25);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, .85);
}
.intro-price strong { color: #FFFFFF; }

.f-sticker {
  position: absolute;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--brand-light);
  box-shadow: 0 12px 26px rgba(6, 30, 89, .25);
  rotate: var(--rot, 0deg);
  animation: pop .7s .5s var(--spring) both, bob 4.5s 1.2s ease-in-out infinite;
}
.f-heart {
  width: 46%;
  height: 46%;
  background: #FFFFFF;
  -webkit-mask: url(../assets/icons/heart-plain.svg) center / contain no-repeat;
  mask: url(../assets/icons/heart-plain.svg) center / contain no-repeat;
}

/* ---------- Caixa do formulário ---------- */
.form-box { animation: rise .9s .1s var(--out) both; }
.form-progress {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  background: rgba(255, 255, 255, .97);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.form-progress-bar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  overflow: hidden;
}
.form-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-light), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .6s var(--spring);
}
.form-progress-text {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
}

.form { display: grid; gap: 12px; }
.q {
  margin: 0;
  min-width: 0;
  padding: clamp(20px, 2.4vw, 28px);
  border: 1.5px solid var(--line);
  border-radius: 24px;
  transition: border-color .3s ease, background-color .3s ease;
}
.q:focus-within { border-color: var(--brand-light); }
.q.is-done { background: var(--brand-soft); border-color: transparent; }
.q.has-error { border-color: var(--error); background: #FFF6F8; }

.q-label {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 0;
  font-weight: 700;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.3;
}
.q-n {
  flex: none;
  font-family: 'Bacalar Condensed', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--brand-dynamic);
  transition: color .3s ease;
}
.q.is-done .q-n { color: var(--accent); }

.q-input {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 15px 18px 13px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  background: #FFFFFF;
  color: var(--ink);
  font: inherit;
  font-size: 1rem; /* 16px: o iPhone não dá zoom ao focar */
  transition: border-color .25s ease, box-shadow .25s ease;
}
.q-input::placeholder { color: rgba(33, 33, 33, .4); }
.q-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(56, 169, 239, .25); }
.q.has-error .q-input { border-color: var(--error); }

.q-select { position: relative; }
.q-select select { appearance: none; padding-right: 48px; cursor: pointer; }
.q-select::after {
  content: "";
  position: absolute;
  right: 20px;
  top: calc(50% + 7px);
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-75%) rotate(45deg);
  pointer-events: none;
}
.q-select select:invalid { color: rgba(33, 33, 33, .45); }

/* Opções em pílula; a marcada ganha o coração */
.opts { display: grid; gap: 8px; margin-top: 14px; }
.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px 11px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #FFFFFF;
  line-height: 1.3;
  transition: border-color .25s ease, background-color .25s ease, color .25s ease, translate .35s var(--spring);
}
.opt:hover .opt-box { border-color: var(--brand-light); translate: 3px 0; }
.opt-check {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  border: 1.5px solid rgba(6, 30, 89, .3);
  border-radius: 50%;
  transition: border-color .25s ease, background-color .25s ease;
}
.opt-check::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: #FFFFFF;
  -webkit-mask: url(../assets/icons/heart-plain.svg) center / contain no-repeat;
  mask: url(../assets/icons/heart-plain.svg) center / contain no-repeat;
  scale: 0;
  transition: scale .4s var(--spring);
}
.opt input:checked + .opt-box { border-color: var(--accent); background: var(--accent); color: #FFFFFF; font-weight: 700; }
.opt input:checked + .opt-box .opt-check { border-color: #FFFFFF; background: var(--brand-light); }
.opt input:checked + .opt-box .opt-check::after { scale: 1; }
.opt input:focus-visible + .opt-box { outline: 3px solid var(--brand-light); outline-offset: 2px; }

/* Consentimento (LGPD) */
.q-consent { border-style: dashed; }
.consent { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; font-size: 0.95rem; line-height: 1.5; }
.consent input { position: absolute; opacity: 0; pointer-events: none; }
.consent-box {
  position: relative;
  flex: none;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border: 1.5px solid rgba(6, 30, 89, .35);
  border-radius: 8px;
  background: #FFFFFF;
  transition: background-color .25s ease, border-color .25s ease;
}
.consent-box::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 3px;
  width: 6px;
  height: 12px;
  border-right: 2.5px solid #FFFFFF;
  border-bottom: 2.5px solid #FFFFFF;
  rotate: 45deg;
  scale: 0;
  transition: scale .35s var(--spring);
}
.consent input:checked + .consent-box { background: var(--accent); border-color: var(--accent); }
.consent input:checked + .consent-box::after { scale: 1; }
.consent input:focus-visible + .consent-box { outline: 3px solid var(--brand-light); outline-offset: 2px; }
.q-consent.is-done, .q-consent:has(input:checked) { background: var(--brand-soft); border-color: transparent; }

.q-error {
  display: none;
  margin: 10px 0 0;
  color: var(--error);
  font-size: 0.88rem;
  font-weight: 700;
}
.q.has-error .q-error { display: block; animation: shake .4s ease; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Botão principal: mesma pílula do CTA do hero, com o ícone de seta */
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin-top: 8px;
  padding: 10px 10px 10px 28px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #FFFFFF;
  font: inherit;
  font-weight: 700;
  font-size: 1.08rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .3s ease, translate .35s var(--spring), box-shadow .3s ease;
}
.btn-submit:hover { background: var(--brand-dynamic); translate: 0 -2px; box-shadow: 0 14px 30px rgba(11, 84, 191, .3); }
.btn-submit:active { translate: 0 1px; }
.btn-submit:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 3px; }
.btn-submit:disabled { opacity: .6; cursor: progress; }
.btn-submit-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--accent);
  font-size: 1.3rem;
  transition: rotate .4s var(--spring);
}
.btn-submit:hover .btn-submit-icon { rotate: -45deg; }
.form-note { margin: 4px 0 0; text-align: center; font-size: 0.88rem; color: var(--ink-soft); }

/* ---------- Obrigado ---------- */
.thanks {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: clamp(40px, 6vw, 72px) clamp(24px, 4vw, 48px);
  border-radius: 45px;
  background: var(--brand-soft);
  text-align: center;
  outline: none;
}
.thanks:not([hidden]) { animation: rise .8s var(--out) both; }
.thanks-heart {
  width: 84px;
  height: 84px;
  background: var(--accent);
  -webkit-mask: url(../assets/icons/heart-plain.svg) center / contain no-repeat;
  mask: url(../assets/icons/heart-plain.svg) center / contain no-repeat;
  animation: pop .7s .3s var(--spring) both, beat 1.4s 1.2s ease-in-out infinite;
}
.thanks-title { margin: 6px 0 0; font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.1; }
.thanks-title span { color: var(--brand-dynamic); }
.thanks-text { margin: 0; max-width: 34ch; font-size: 1.08rem; color: var(--ink-soft); }
.thanks .btn-submit { max-width: 360px; margin-top: 12px; }
.thanks-back { margin-top: 6px; font-weight: 700; font-size: 0.95rem; }

/* ---------- Rodapé ---------- */
.page-foot {
  padding: 28px var(--gutter) 36px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.page-foot p { margin: 0; }

/* Corações do clique (js/heart-burst.js) */
.heart-particle {
  position: fixed;
  z-index: 9000;
  width: 14px;
  height: 14px;
  pointer-events: none;
  background: var(--p, var(--brand-light));
  -webkit-mask: url(../assets/icons/heart-plain.svg) center / contain no-repeat;
  mask: url(../assets/icons/heart-plain.svg) center / contain no-repeat;
}

/* ---------- Política de privacidade ---------- */
.legal {
  max-width: 780px;
  margin: 0 auto;
  padding: 8px var(--gutter) clamp(56px, 7vw, 104px);
}
.legal-head { padding: clamp(28px, 4vw, 48px); border-radius: 45px; background: var(--brand-soft); animation: rise .9s var(--out) both; }
.legal-head h1 { margin: 20px 0 0; font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.08; }
.legal-head p { margin: 14px 0 0; color: var(--ink-soft); }
.legal h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 48px 0 0;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.25;
}
.legal h2::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background: var(--brand-dynamic);
  -webkit-mask: url(../assets/icons/heart-plain.svg) center / contain no-repeat;
  mask: url(../assets/icons/heart-plain.svg) center / contain no-repeat;
}
.legal p, .legal li { font-size: 1.02rem; line-height: 1.7; color: var(--ink); }
.legal p { margin: 14px 0 0; }
.legal ul { margin: 14px 0 0; padding-left: 22px; }
.legal li + li { margin-top: 6px; }
.legal strong { color: var(--ink); }

/* ---------- Animações ---------- */
@keyframes rise { from { opacity: 0; translate: 0 30px; } to { opacity: 1; translate: 0 0; } }
@keyframes pop { from { scale: 0; } to { scale: 1; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: -10px -14px; } }
@keyframes beat { 0%, 100% { scale: 1; } 15% { scale: 1.12; } 30% { scale: 1; } 45% { scale: 1.08; } }
@keyframes shake { 0%, 100% { translate: 0 0; } 25% { translate: -5px 0; } 75% { translate: 5px 0; } }

/* ---------- Celular ---------- */
@media (max-width: 900px) {
  .form-layout { grid-template-columns: 1fr; }
  .form-intro { position: relative; top: auto; border-radius: 32px; }
  .intro-steps { margin-top: 24px; }
}
@media (max-width: 640px) {
  .page-top { padding-block: 16px; }
  .page-back { padding: 9px 16px 7px; font-size: 0.85rem; }
  .form-intro { padding: 30px 24px; border-radius: 28px; }
  .f-sticker { width: 44px; height: 44px; top: 20px !important; right: 20px !important; }
  .intro-lead { font-size: 1rem; }
  .q { border-radius: 20px; padding: 20px 18px; }
  .btn-submit { font-size: 1rem; padding-left: 22px; }
  .btn-submit-icon { width: 44px; height: 44px; }
  .thanks, .legal-head { border-radius: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
