/* =========================================================
   Reverse Mortgage Landing Pages - Shared Stylesheet
   Mobile-first, conservative, accessible, high-contrast
   ========================================================= */

/* ---------- CSS Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, "Segoe UI", Roboto, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: #1f2933;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: #0b5394; text-decoration: underline; }
a:hover, a:focus { color: #073763; }

/* ---------- Color & Theme Tokens ---------- */
:root {
  --navy: #0b3d59;
  --navy-dark: #062a3f;
  --gold: #c9962b;
  --gold-dark: #a87d20;
  --cream: #f7f3ec;
  --gray-100: #f4f6f8;
  --gray-200: #e3e8ec;
  --gray-500: #6b7780;
  --gray-700: #3a4750;
  --text: #1f2933;
  --success: #117a3d;
  --error: #b3261e;
  --shadow: 0 4px 14px rgba(0,0,0,0.08);
}

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section-alt { background: var(--cream); }
.section-dark { background: var(--navy); color: #fff; }
.section-dark a { color: #ffd877; }

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; color: var(--navy); line-height: 1.2; margin: 0 0 16px; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 16px; }
.lead { font-size: 1.15rem; color: var(--gray-700); }

@media (min-width: 768px) {
  h1 { font-size: 2.6rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.35rem; }
}

/* ---------- Top bar ---------- */
.topbar { background: var(--navy-dark); color: #fff; font-size: 0.95rem; padding: 8px 0; }
.topbar .container { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; align-items: center; text-align: center; }
.topbar a { color: #ffd877; font-weight: 600; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }

/* ---------- Header / Nav ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--gray-200); padding: 12px 0; position: sticky; top: 0; z-index: 50; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { font-family: Georgia, serif; font-size: 1.25rem; font-weight: 700; color: var(--navy); text-decoration: none; display: inline-flex; align-items: center; }
.brand img { height: 44px; width: auto; display: block; }
@media (min-width: 600px) { .brand img { height: 52px; } }
.brand span { color: var(--gold-dark); }
.nav-cta { display: inline-block; background: var(--gold); color: #1f2933 !important; padding: 10px 16px; border-radius: 6px; font-weight: 700; text-decoration: none; font-size: 0.95rem; }
.nav-cta:hover { background: var(--gold-dark); color: #fff !important; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, #f7f3ec 0%, #ffffff 100%); padding: 40px 0 32px; }
.hero-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
.hero-eyebrow { display: inline-block; background: #fff; border: 1px solid var(--gray-200); color: var(--navy); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; margin-bottom: 12px; }
.hero h1 { margin-bottom: 12px; }
.hero p.lead { margin-bottom: 20px; }
.hero-image-placeholder { background: #e8eef3; border: 2px dashed #b8c2cc; color: #6b7780; border-radius: 10px; min-height: 240px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; font-size: 0.95rem; }
.hero-image { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); background: #e8eef3; }
.hero-image img { width: 100%; height: 100%; display: block; object-fit: cover; min-height: 240px; max-height: 440px; }
@media (min-width: 900px) { .hero-image img { min-height: 360px; } }
.btn { display: inline-block; background: var(--gold); color: #1f2933; padding: 14px 24px; border-radius: 8px; font-weight: 700; font-size: 1.05rem; text-decoration: none; border: none; cursor: pointer; box-shadow: var(--shadow); transition: background 0.15s ease; }
.btn:hover, .btn:focus { background: var(--gold-dark); color: #fff; }
.btn-secondary { background: #ffffff; color: var(--navy); border: 2px solid var(--navy); box-shadow: none; }
.btn-secondary:hover { background: var(--navy); color: #fff; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-large { padding: 16px 28px; font-size: 1.15rem; }

.hero-cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.hero-trust { font-size: 0.95rem; color: var(--gray-700); }
.hero-trust strong { color: var(--navy); }
.hero-benefits { list-style: none; padding: 0; margin: 0 0 20px 0; }
.hero-benefits li { position: relative; padding: 6px 0 6px 30px; font-size: 1.05rem; color: var(--navy); line-height: 1.45; font-weight: 500; }
.hero-benefits li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 14px; height: 7px; border-left: 3px solid var(--gold, #c9a227); border-bottom: 3px solid var(--gold, #c9a227); transform: rotate(-45deg); }
.check-list { list-style: none; padding: 0; margin: 18px 0; }
.check-list li { position: relative; padding: 8px 0 8px 30px; font-size: 1rem; line-height: 1.5; }
.check-list li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 14px; height: 7px; border-left: 3px solid var(--gold, #c9a227); border-bottom: 3px solid var(--gold, #c9a227); transform: rotate(-45deg); }
@media (max-width: 640px) {
  .hero-benefits li { font-size: 1rem; padding-left: 26px; }
  .hero-benefits li::before { top: 11px; width: 12px; height: 6px; }
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr 1fr; align-items: center; }
  .hero-image-placeholder { min-height: 360px; }
}

/* ---------- Trust bar ---------- */
.trust-bar { background: #ffffff; border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200); padding: 18px 0; }
.trust-bar .container { display: grid; gap: 14px; grid-template-columns: 1fr; text-align: center; }
.trust-item { font-size: 0.95rem; color: var(--gray-700); }
.trust-item strong { color: var(--navy); display: block; font-size: 1rem; }
@media (min-width: 700px) { .trust-bar .container { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Generic content blocks ---------- */
.section h2 { text-align: center; margin-bottom: 8px; }
.section .section-intro { text-align: center; max-width: 720px; margin: 0 auto 32px; color: var(--gray-700); font-size: 1.05rem; }

.card-grid { display: grid; gap: 18px; grid-template-columns: 1fr; margin-top: 12px; }
@media (min-width: 700px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.card { background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card .icon-circle { width: 44px; height: 44px; border-radius: 50%; background: var(--cream); color: var(--gold-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 12px; font-size: 1.1rem; }

.benefit-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .benefit-list { grid-template-columns: repeat(2, 1fr); } }
.benefit-list li { background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; padding: 16px 16px 16px 52px; position: relative; font-size: 1.02rem; }
.benefit-list li::before { content: "\2714"; position: absolute; left: 16px; top: 14px; width: 26px; height: 26px; background: var(--navy); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 700; }

.steps { display: grid; gap: 18px; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; padding: 24px; text-align: center; position: relative; }
.step .step-num { width: 44px; height: 44px; background: var(--navy); color: #fff; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 12px; font-size: 1.15rem; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--gray-200); border-radius: 8px; padding: 14px 18px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--navy); font-size: 1.05rem; list-style: none; position: relative; padding-right: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--gold-dark); font-weight: 700; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 12px 0 0; color: var(--gray-700); }

/* =========================================================
   LEAD FORM — improved UX
   ========================================================= */
.lead-form-wrap {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
}
@media (min-width: 700px) { .lead-form-wrap { padding: 28px; } }

.form-header { margin-bottom: 14px; }
.lead-form-wrap h2 { text-align: left; margin-top: 0; margin-bottom: 6px; }
.form-subhead { color: var(--gray-700); margin: 0 0 14px; font-size: 1rem; }

/* Header micro-trust badges (above form body) */
.form-trust-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 4px 0 16px;
}
@media (min-width: 600px) { .form-trust-row { grid-template-columns: repeat(3, 1fr); } }
.form-trust-badge {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.88rem;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  line-height: 1.25;
}
.form-trust-badge .badge-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--navy);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem;
  flex-shrink: 0;
}

/* Progress indicator (visual reassurance) */
.form-progress {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
@media (min-width: 600px) { .form-progress { grid-template-columns: repeat(3, 1fr); } }
.form-progress-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f4f6f8;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--gray-500);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.form-progress-step .step-circle {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--gray-200);
  color: var(--gray-500);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem;
  flex-shrink: 0;
}
.form-progress-step.active {
  background: #eaf2f7;
  border-color: var(--navy);
  color: var(--navy);
}
.form-progress-step.active .step-circle {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.form-progress-step.complete {
  background: #eaf6ee;
  border-color: var(--success);
  color: var(--success);
}
.form-progress-step.complete .step-circle {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

/* Friendly note */
.form-note {
  background: var(--cream);
  border-left: 4px solid var(--gold);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 0.95rem;
  color: var(--gray-700);
  margin-bottom: 18px;
}

/* Section blocks with numbered heading */
.form-section {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--gray-200);
}
.form-section:last-of-type { border-bottom: none; }
.form-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
}
.form-section-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem;
  flex-shrink: 0;
}
.form-section-title {
  font-family: Georgia, serif;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.2;
}
.form-section-hint {
  font-size: 0.88rem;
  color: var(--gray-500);
  margin: 0 0 12px 42px;
}

/* Field grid */
.form-row { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 600px) {
  .form-row.cols-2 { grid-template-columns: 1fr 1fr; }
  .form-row.cols-3 { grid-template-columns: 2fr 1fr 1fr; }
}
.field { display: flex; flex-direction: column; }
.field label {
  font-weight: 700;
  color: var(--gray-700);
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.field .helper {
  font-size: 0.82rem;
  color: var(--gray-500);
  margin-top: 4px;
}
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 1rem;
  padding: 12px 12px;
  border: 1px solid #c2cbd2;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--gray-700) 50%), linear-gradient(135deg, var(--gray-700) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; padding-right: 32px; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 3px solid #ffd877;
  outline-offset: 1px;
  border-color: var(--navy);
}
.field input.invalid,
.field select.invalid {
  border-color: var(--error);
  background: #fff5f5;
}
.field input.valid {
  border-color: #8ec39d;
  background: #fafff9;
}
.field-error {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 6px;
  display: none;
  font-weight: 600;
}
.field-error.show { display: block; }

/* Currency / prefixed input */
.input-with-prefix {
  display: flex;
  align-items: stretch;
  border: 1px solid #c2cbd2;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}
.input-with-prefix:focus-within {
  outline: 3px solid #ffd877;
  outline-offset: 1px;
  border-color: var(--navy);
}
.input-with-prefix.invalid { border-color: var(--error); background: #fff5f5; }
.input-with-prefix .prefix {
  background: #f4f6f8;
  color: var(--navy);
  padding: 12px 14px;
  font-weight: 700;
  border-right: 1px solid #c2cbd2;
  display: flex;
  align-items: center;
  font-size: 1rem;
}
.input-with-prefix input {
  border: none;
  outline: none;
  flex: 1;
  padding: 12px 12px;
  font-size: 1rem;
  font: inherit;
  background: transparent;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}

/* Quick-pick chips */
.quick-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.quick-pick {
  background: #fff;
  border: 1.5px solid #c2cbd2;
  color: var(--navy);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}
.quick-pick:hover { border-color: var(--navy); background: #eaf2f7; }
.quick-pick:focus { outline: 3px solid #ffd877; outline-offset: 1px; }
.quick-pick.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.quick-pick-label {
  display: block;
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-top: 8px;
  font-weight: 600;
}

/* "What happens next" callout above submit */
.next-steps-callout {
  background: #eaf2f7;
  border-left: 4px solid var(--navy);
  border-radius: 6px;
  padding: 14px 16px;
  margin: 14px 0 14px;
  font-size: 0.95rem;
  color: var(--navy-dark);
}
.next-steps-callout strong {
  color: var(--navy);
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}
.next-steps-callout ol {
  margin: 6px 0 0;
  padding-left: 22px;
}
.next-steps-callout ol li { margin-bottom: 4px; }

/* Submit area trust line + lock */
.submit-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--gray-500);
  margin-top: 10px;
  font-weight: 600;
}
.submit-trust .lock-icon {
  width: 16px; height: 16px;
  display: inline-block;
  background-color: var(--gray-700);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 1a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-1V6a5 5 0 0 0-5-5zm-3 8V6a3 3 0 1 1 6 0v3z'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 1a5 5 0 0 0-5 5v3H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-9a2 2 0 0 0-2-2h-1V6a5 5 0 0 0-5-5zm-3 8V6a3 3 0 1 1 6 0v3z'/></svg>") center/contain no-repeat;
}

.privacy-note {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin: 10px 0 0;
  text-align: center;
}

/* Success / error messages */
.success-message {
  display: none;
  background: #e8f5ee;
  border: 1px solid #117a3d;
  color: #0b5d2f;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-weight: 600;
}
.success-message.show { display: block; }
.error-summary {
  display: none;
  background: #fdecea;
  border: 1px solid var(--error);
  color: #7a1c17;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 0.95rem;
  font-weight: 600;
}
.error-summary.show { display: block; }

/* Mobile improvements: prevent iOS zoom; bigger tap targets */
@media (max-width: 600px) {
  .field input,
  .field select,
  .input-with-prefix input {
    font-size: 16px;
    padding: 14px 12px;
  }
  .quick-pick { padding: 10px 14px; font-size: 0.95rem; }
  .lead-form-wrap { padding: 18px; }
  .form-section-hint { margin-left: 0; }
}

/* ---------- Final CTA ---------- */
.final-cta { text-align: center; }
.final-cta h2 { color: #fff; }
.final-cta p { color: #e6eef5; margin-bottom: 20px; }

/* ---------- Footer ---------- */
.site-footer { background: #0c1a23; color: #c9d3da; padding: 36px 0 80px; font-size: 0.9rem; }
.site-footer a { color: #ffd877; }
.footer-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand { font-family: Georgia, serif; color: #fff; font-size: 1.2rem; margin-bottom: 8px; }
.footer-brand img { height: 52px; width: auto; display: block; background: #ffffff; padding: 8px 12px; border-radius: 6px; margin-bottom: 10px; }
.footer-address { color: #c9d3da; margin: 4px 0 1