/* =========================================================
   Menos Automático — formulário de planejamento (página única)
   Construído sobre os tokens de ../../assets/css/styles.css
   ========================================================= */
:root {
  --form-error: #a1462b;
  --form-line: rgb(74 59 46 / 16%);
  --form-line-soft: rgb(74 59 46 / 10%);
}

/* ---------- Abertura ---------- */
.lead-hero { padding-bottom: 8px; background: var(--off-white); }
.lead-hero-banner { display: none; margin: 0; }
.lead-hero-banner img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 54%; }
.lead-hero-copy { padding-top: clamp(104px, 15vw, 138px); }
.lead-hero-copy h1 {
  margin-bottom: 16px;
  font-size: clamp(2.1rem, 6vw, 3.1rem);
  line-height: 1.08;
}
.lead-hero-text { max-width: 560px; margin: 0; color: var(--brown); font-size: 16px; }

/* ---------- Corpo do formulário ---------- */
.lead-form-section { padding-top: 6px; padding-bottom: 90px; background: var(--off-white); }
.lead-form-shell { max-width: 760px; }

.form-status { margin-bottom: 22px; padding: 14px 16px; border-radius: 10px; background: rgb(201 168 124 / 16%); color: var(--brown); font-size: 14px; line-height: 1.5; }
.form-status:empty { display: none; }
.form-status.is-error { background: rgb(161 70 43 / 10%); color: var(--form-error); }

.form-section { padding-block: 34px; }
.form-section:first-of-type { padding-top: 6px; }
.form-section + .form-section { border-top: 1px solid var(--form-line); }
.form-section-head { margin-bottom: 22px; }
.form-section-title { margin-bottom: 4px; color: var(--terra); font-size: 22px; line-height: 1.2; }
.form-section-hint { margin: 0; color: var(--olive); font-size: 14px; }

/* ---------- Campos de texto ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 22px; }
.field:last-child { margin-bottom: 0; }
.field label, .field-group legend { color: var(--brown); font-size: 14px; font-weight: 600; letter-spacing: -.005em; }
.field-group legend { margin-bottom: 16px; font-size: 16px; }
.req-mark { color: var(--terra); }

.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="number"],
.field textarea {
  width: 100%;
  padding: 12px 2px 11px;
  border: 0;
  border-bottom: 1.5px solid rgb(74 59 46 / 26%);
  border-radius: 0;
  background: transparent;
  color: var(--brown);
  font-family: var(--sans);
  font-size: 16px;
  transition: border-color .2s ease;
}
.field input::placeholder, .field textarea::placeholder { color: rgb(74 59 46 / 42%); }
.field input:hover, .field textarea:hover { border-color: rgb(74 59 46 / 42%); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--terra); }
.field textarea { min-height: 84px; resize: vertical; line-height: 1.55; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--form-error); }

.field-error { min-height: 1em; margin: 0; color: var(--form-error); font-size: 13px; }
.field-error:empty { display: none; }

.field-grid { display: grid; gap: 20px; margin-bottom: 22px; }
.field-grid .field { margin-bottom: 0; }

/* ---------- Fieldset base ---------- */
.field-group { margin: 0 0 22px; padding: 0; border: 0; }
.field-group:last-child { margin-bottom: 0; }

/* ---------- Chips (radio/checkbox compactos) ---------- */
.chip-group { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; display: inline-flex; min-height: 44px; padding: 10px 18px; border: 1px solid rgb(74 59 46 / 22%); border-radius: 999px; align-items: center; background: var(--off-white); cursor: pointer; transition: border-color .2s ease, background .2s ease, color .2s ease; }
.chip input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; opacity: 0; clip: rect(0 0 0 0); white-space: nowrap; }
.chip span { color: var(--brown); font-size: 14px; font-weight: 500; }
.chip:hover { border-color: var(--terra); }
.chip:has(input:checked) { border-color: var(--brown); background: var(--brown); }
.chip:has(input:checked) span { color: var(--off-white); }
.chip:has(input:focus-visible) { outline: 3px solid var(--areia); outline-offset: 3px; }

/* ---------- Como podemos ajudar: opções em destaque ---------- */
.help-grid { display: grid; gap: 12px; }
.help-option { position: relative; display: flex; padding: 20px; border: 1px solid rgb(74 59 46 / 20%); border-radius: 14px; align-items: flex-start; background: var(--off-white); gap: 14px; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.help-option input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; opacity: 0; clip: rect(0 0 0 0); white-space: nowrap; }
.help-option-mark { flex: none; width: 18px; height: 18px; margin-top: 3px; border: 1.5px solid rgb(74 59 46 / 40%); border-radius: 50%; }
.help-option-body { display: flex; flex-direction: column; gap: 5px; }
.help-option-body strong { color: var(--terra); font-family: var(--serif); font-size: 17px; font-weight: 600; }
.help-option-body small { color: var(--olive); font-size: 13.5px; line-height: 1.5; }
.help-option:hover { border-color: var(--terra); }
.help-option:has(input:checked) { border-color: var(--brown); background: rgb(201 168 124 / 12%); }
.help-option:has(input:checked) .help-option-mark { border-color: var(--brown); background: var(--brown); box-shadow: inset 0 0 0 3px var(--off-white); }
.help-option:has(input:focus-visible) { outline: 3px solid var(--areia); outline-offset: 3px; }

/* ---------- Campos condicionais ---------- */
.conditional { display: grid; grid-template-rows: 0fr; opacity: 0; margin-top: 0; transition: grid-template-rows .3s ease, opacity .25s ease, margin-top .3s ease; }
.conditional > div { min-height: 0; overflow: hidden; }
.conditional.is-open { grid-template-rows: 1fr; opacity: 1; margin-top: 18px; }
.conditional .field-grid { margin-bottom: 0; padding-top: 2px; }

/* ---------- Consentimento (LGPD) ---------- */
.consent-field { display: flex; margin-bottom: 16px; align-items: flex-start; gap: 12px; }
.consent-field:last-of-type { margin-bottom: 0; }
.consent-field label { position: relative; display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.consent-field input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; opacity: 0; clip: rect(0 0 0 0); white-space: nowrap; }
.consent-mark { flex: none; width: 19px; height: 19px; margin-top: 2px; border: 1.5px solid rgb(74 59 46 / 45%); border-radius: 5px; background: var(--off-white); transition: border-color .2s ease, background .2s ease; }
.consent-field label:has(input:checked) .consent-mark { border-color: var(--brown); background: var(--brown); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23f5f0e8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3 3 7-7'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; }
.consent-field label:has(input:focus-visible) .consent-mark { outline: 3px solid var(--areia); outline-offset: 2px; }
.consent-field span { color: var(--brown); font-size: 14px; line-height: 1.5; }
.consent-field a { color: var(--terra); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Honeypot ---------- */
.honeypot { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; opacity: 0; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Envio ---------- */
.form-submit { margin-top: 34px; }
.submit-button { width: 100%; }
.submit-button[disabled] { opacity: .72; cursor: not-allowed; }
.privacy-copy { margin: 14px 0 0; color: var(--olive); font-size: 13px; text-align: center; }

/* ---------- Confirmação inline ---------- */
.form-success { padding-block: 28px; text-align: left; }
.form-success h2 { margin-bottom: 16px; font-size: clamp(1.9rem, 4.6vw, 2.5rem); line-height: 1.12; }
.form-success p { max-width: 560px; margin: 0 0 26px; color: var(--brown); font-size: 16px; }
.form-success .button { display: inline-flex; }

@media (min-width: 640px) {
  .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 960px) {
  .lead-hero-banner { display: block; height: clamp(200px, 22vw, 320px); overflow: hidden; }
  .lead-hero-copy { padding-top: 36px; }
  .form-section { padding-block: 42px; }
  .form-section-title { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .conditional { transition: none; }
  .chip, .help-option, .consent-mark { transition: none; }
}
